* [ANN] cmogstored 1.7.0 - a mogstored alternative
@ 2018-12-18 4:12 5% Eric Wong
0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2018-12-18 4:12 UTC (permalink / raw)
To: mogile, cmogstored-public
cmogstored is an alternative implementation of the "mogstored" storage
component of MogileFS. cmogstored is implemented in C and does not use
Perl at runtime. cmogstored is the only component you need to install
on a MogileFS storage node.
Changes:
The big feature in this release is "devNNN/usage" are served
from memory, allowing up-to-date usage information even
unwritable/unreadable filesystems.
This can also be used to reduce spinups and wear on HDDs.
"devNNN/usage" files are still updated on the FS by default for
compatibility with existing HTTP servers, but admins may wish
to disable updates to them by removing all permissions from
the "usage" files:
chmod 0000 $MOG_DOCROOT/dev*/usage
Filesystem errors from the sendfile(2) syscalls are also
logged to syslog. There's also a bugfix for zombies for
libkqueue-on-epoll users, but that doesn't affect native
kqueue users on *BSDs.
And the usual round of gnulib, minor doc and style updates.
18 changes since v1.6.0:
cmogstored.h: remove unused mog_file.mmptr member
doc: documentation for ioq
doc: further comment updates around ioq
build-aux/txt2pre: support '=' in URLs
test/inherit: fix ambiguous parenthese warning
test/inherit: stop testing Ruby itself
doc: update URLs to HTTPS
compat_sendfile: ensure this works without an offset
doc/queues.txt: add key point about only retrieving ONE event
fix trace.h dependency on probes.h
update to gnulib.git 90f289f249a266b1afb9c63e182f5d979d17df5f
http_get.c: log filesystem-level errors from sendfile
serve /dev*/usage requests from memory
doc: URL updates to reduce redirects and favor HTTPS
test/inherit.rb: fix syntax error under Ruby 1.8
update copyrights for 2018 and use SPDX for "GPL-3.0+"
selfwake: enable self-pipe with kqueue
http_parser: workaround parsing OOM in Ragel 6.10
https://bogomips.org/cmogstored/files/cmogstored-1.7.0.tar.gz
SHA-256: b5847b837e72f573832fd5e35d0f541cf5d743c9af10369ea48ecdd9bf8d872b
* homepage: http://bogomips.org/cmogstored/README
* git clone https://bogomips.org/cmogstored.git
* git clone https://bogomips.org/cmogstored.git
* gitweb: http:s//repo.or.cz/w/cmogstored.git
* list: cmogstored-public@bogomips.org (subscription optional)
* archives: https://bogomips.org/cmogstored-public/
* nntp://news.public-inbox.org/inbox.comp.file-systems.mogilefs.cmogstored
^ permalink raw reply [relevance 5%]
* [PATCH] http_get.c: log filesystem-level errors from sendfile
@ 2018-07-09 7:37 7% Eric Wong
0 siblings, 0 replies; 2+ results
From: Eric Wong @ 2018-07-09 7:37 UTC (permalink / raw)
To: cmogstored-public
Socket errors are too common to log (especially from malicous
clients), but filesystem errors are rare and important.
---
http_get.c | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/http_get.c b/http_get.c
index 23140de..154d8c5 100644
--- a/http_get.c
+++ b/http_get.c
@@ -260,6 +260,25 @@ forbidden:
} while(0));
}
+static void sendfile_error(struct mog_fd *file_mfd, int sferr)
+{
+ struct mog_file *file = &file_mfd->as.file;
+ struct stat st;
+
+ if (!fstat(file_mfd->fd, &st)) {
+ errno = sferr;
+ syslog(LOG_ERR,
+"sendfile on (dev=%lu,ino=%lu) failed at offset=%lld: %m",
+ (unsigned long)st.st_dev, (unsigned long)st.st_ino,
+ (long long)file->foff);
+ }
+ else {
+ syslog(LOG_ERR,
+"sendfile failed at offset=%lld: %s (fstat error: %m)",
+ (long long)file->foff, strerror(sferr));
+ }
+}
+
enum mog_next mog_http_get_in_progress(struct mog_fd *mfd)
{
struct mog_http *http = &mfd->as.http;
@@ -289,6 +308,12 @@ retry:
switch (errno) {
case_EAGAIN: return MOG_NEXT_WAIT_WR;
case EINTR: goto retry;
+ case EPIPE:
+ case ENOTCONN:
+ case ECONNRESET:
+ break;
+ default:
+ sendfile_error(file_mfd, errno);
}
http->_p.persistent = 0;
} else { /* w == 0 */
--
EW
^ permalink raw reply related [relevance 7%]
Results 1-2 of 2 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2018-07-09 7:37 7% [PATCH] http_get.c: log filesystem-level errors from sendfile Eric Wong
2018-12-18 4:12 5% [ANN] cmogstored 1.7.0 - a mogstored alternative Eric Wong
Code repositories for project(s) associated with this public inbox
https://yhbt.net/cmogstored.git/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).