Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1520836
| From | Ben Hutchings <ben@decadent.org.uk> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 3.16 124/346] fuse: fsync() did not return IO errors |
| Date | 2016-11-14 03:30 +0100 |
| Message-ID | <sDfbX-xk-21@gated-at.bofh.it> (permalink) |
| References | <sDeSC-o3-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
3.16.39-rc1 review patch. If anyone has any objections, please let me know.
------------------
From: Alexey Kuznetsov <kuznet@parallels.com>
commit ac7f052b9e1534c8248f814b6f0068ad8d4a06d2 upstream.
Due to implementation of fuse writeback filemap_write_and_wait_range() does
not catch errors. We have to do this directly after fuse_sync_writes()
Signed-off-by: Alexey Kuznetsov <kuznet@virtuozzo.com>
Signed-off-by: Maxim Patlasov <mpatlasov@virtuozzo.com>
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
Fixes: 4d99ff8f12eb ("fuse: Turn writeback cache on")
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
---
fs/fuse/file.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
--- a/fs/fuse/file.c
+++ b/fs/fuse/file.c
@@ -499,6 +499,21 @@ int fuse_fsync_common(struct file *file,
goto out;
fuse_sync_writes(inode);
+
+ /*
+ * Due to implementation of fuse writeback
+ * filemap_write_and_wait_range() does not catch errors.
+ * We have to do this directly after fuse_sync_writes()
+ */
+ if (test_bit(AS_ENOSPC, &file->f_mapping->flags) &&
+ test_and_clear_bit(AS_ENOSPC, &file->f_mapping->flags))
+ err = -ENOSPC;
+ if (test_bit(AS_EIO, &file->f_mapping->flags) &&
+ test_and_clear_bit(AS_EIO, &file->f_mapping->flags))
+ err = -EIO;
+ if (err)
+ goto out;
+
err = sync_inode_metadata(inode, 1);
if (err)
goto out;
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[PATCH 3.16 124/346] fuse: fsync() did not return IO errors Ben Hutchings <ben@decadent.org.uk> - 2016-11-14 03:30 +0100
csiph-web