Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1226322
| From | Tejun Heo <tj@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v2] fs: global sync to not clear error status of individual inodes |
| Date | 2015-09-16 19:50 +0200 |
| Message-ID | <q9p0e-309-15@gated-at.bofh.it> (permalink) |
| References | <q8VbQ-1dV-3@gated-at.bofh.it> <q8VbQ-1dV-1@gated-at.bofh.it> <q90lc-mc-33@gated-at.bofh.it> <q99ou-5Xi-15@gated-at.bofh.it> <q9gzE-7Lr-9@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Wed, Sep 16, 2015 at 08:39:09AM +0000, Junichi Nomura wrote: > filemap_fdatawait() is a function to wait for on-going writeback > to complete but also consume and clear error status of the mapping > set during writeback. > The latter functionality is critical for applications to detect > writeback error with system calls like fsync(2)/fdatasync(2). > > However filemap_fdatawait() is also used by sync(2) or FIFREEZE > ioctl, which don't check error status of individual mappings. > > As a result, fsync() may not be able to detect writeback error > if events happen in the following order: > > Application System admin > ---------------------------------------------------------- > write data on page cache > Run sync command > writeback completes with error > filemap_fdatawait() clears error > fsync returns success > (but the data is not on disk) > > This patch adds filemap_fdatawait_keep_errors() for call sites where > writeback error is not handled so that they don't clear error status. > > Signed-off-by: Jun'ichi Nomura <j-nomura@ce.jp.nec.com> > Acked-by: Andi Kleen <ak@linux.intel.com> Reviewed-by: Tejun Heo <tj@kernel.org> Thanks. -- tejun -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH 1/1] fs: global sync to not clear error status of individual inodes Junichi Nomura <j-nomura@ce.jp.nec.com> - 2015-09-15 12:00 +0200
Re: [PATCH 1/1] fs: global sync to not clear error status of individual inodes Andi Kleen <andi@firstfloor.org> - 2015-09-15 16:40 +0200
Re: [PATCH 1/1] fs: global sync to not clear error status of individual inodes Andrew Morton <akpm@linux-foundation.org> - 2015-09-16 00:10 +0200
Re: [PATCH 1/1] fs: global sync to not clear error status of individual inodes Junichi Nomura <j-nomura@ce.jp.nec.com> - 2015-09-16 03:10 +0200
xfstests: test data-writeback error detection with fsync Junichi Nomura <j-nomura@ce.jp.nec.com> - 2015-09-16 12:50 +0200
Re: [PATCH 1/1] fs: global sync to not clear error status of individual inodes Tejun Heo <tj@kernel.org> - 2015-09-15 17:30 +0200
Re: [PATCH 1/1] fs: global sync to not clear error status of individual inodes Andi Kleen <andi@firstfloor.org> - 2015-09-15 19:00 +0200
Re: [PATCH 1/1] fs: global sync to not clear error status of individual inodes Junichi Nomura <j-nomura@ce.jp.nec.com> - 2015-09-16 03:10 +0200
[PATCH v2] fs: global sync to not clear error status of individual inodes Junichi Nomura <j-nomura@ce.jp.nec.com> - 2015-09-16 10:50 +0200
Re: [PATCH v2] fs: global sync to not clear error status of individual inodes Tejun Heo <tj@kernel.org> - 2015-09-16 19:50 +0200
csiph-web