From: Jeff Layton <jlayton@kernel.org>
To: Miklos Szeredi <miklos@szeredi.hu>
Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] fuse: convert to errseq_t based error tracking for fsync
Date: Fri, 28 Jul 2017 08:32:45 -0400 [thread overview]
Message-ID: <20170728123245.9663-1-jlayton@kernel.org> (raw)
From: Jeff Layton <jlayton@redhat.com>
Change to file_write_and_wait_range and
file_check_and_advance_wb_err.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
---
fs/fuse/file.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
This patch is untested, mostly because I have no idea how to test it.
Based on my experience with other filesystems though, this should make
FUSE do the right thing when reporting writeback errors.
xfstest generic/441 could work with a block-based FUSE fs driver, or
we maybe we could roll some sort of specialized FUSE fault injector
dummy filesystem?
Miklos, do you have any thoughts on ways to test this?
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index 3ee4fdc3da9e..e2ffc499d106 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -457,7 +457,7 @@ int fuse_fsync_common(struct file *file, loff_t start, loff_t end,
* wait for all outstanding writes, before sending the FSYNC
* request.
*/
- err = filemap_write_and_wait_range(inode->i_mapping, start, end);
+ err = file_write_and_wait_range(file, start, end);
if (err)
goto out;
@@ -465,10 +465,10 @@ int fuse_fsync_common(struct file *file, loff_t start, loff_t end,
/*
* Due to implementation of fuse writeback
- * filemap_write_and_wait_range() does not catch errors.
+ * file_write_and_wait_range() does not catch errors.
* We have to do this directly after fuse_sync_writes()
*/
- err = filemap_check_errors(file->f_mapping);
+ err = file_check_and_advance_wb_err(file);
if (err)
goto out;
--
2.13.3
reply other threads:[~2017-07-28 12:32 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170728123245.9663-1-jlayton@kernel.org \
--to=jlayton@kernel.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miklos@szeredi.hu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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 NNTP newsgroup(s).