From: Jeff Layton
This is a very minimal conversion to errseq_t based error tracking
for raw block device access. Just have it use the standard
file_write_and_wait_range call.
Note that there are internal callers that call sync_blockdev
and the like that are not affected by
From: Jeff Layton
Signed-off-by: Jeff Layton
---
fs/libfs.c | 9 ++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/fs/libfs.c b/fs/libfs.c
index 1dec90819366..3aabe553fc45 100644
--- a/fs/libfs.c
+++ b/fs/libfs.c
@@ -974,7 +974,7 @@
From: Jeff Layton
Let's try to make this extra clear for fs authors.
Cc: Jan Kara
Signed-off-by: Jeff Layton
---
Documentation/filesystems/vfs.txt | 43 ---
1 file changed, 40 insertions(+), 3
From: Jeff Layton
Signed-off-by: Jeff Layton
Reviewed-by: Jan Kara
Reviewed-by: Matthew Wilcox
Reviewed-by: Christoph Hellwig
---
fs/buffer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
From: Jeff Layton
Just check and advance the data errseq_t in struct file before
before returning from fsync on normal files. Internal filemap_*
callers are left as-is.
Signed-off-by: Jeff Layton
---
fs/xfs/xfs_file.c | 2 +-
1 file changed, 1
From: Jeff Layton
Add a call to filemap_report_wb_err at the end of ext4_sync_file. This
will ensure that we check and advance the errseq_t in the file, which
allows us to track and report errors on all open fds when they occur.
Note that metadata writeback errors are not
From: Jeff Layton
When a writeback error occurs, we want later callers to be able to pick
up that fact when they go to wait on that writeback to complete.
Traditionally, we've used AS_EIO/AS_ENOSPC flags to track that, but
that's problematic since only one "checker" will be
From: Jeff Layton
Just check and advance the errseq_t in the file before returning.
Internal callers of filemap_* functions are left as-is.
Signed-off-by: Jeff Layton
---
fs/btrfs/file.c | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff
From: Jeff Layton
Most filesystems currently use mapping_set_error and
filemap_check_errors for setting and reporting/clearing writeback errors
at the mapping level. filemap_check_errors is indirectly called from
most of the filemap_fdatawait_* functions and from
From: Jeff Layton
An errseq_t is a way of recording errors in one place, and allowing any
number of "subscribers" to tell whether an error has been set again
since a previous time.
It's implemented as an unsigned 32-bit value that is managed with atomic
operations. The low
From: Jeff Layton
Don't try to check PageError since that's potentially racy and not
necessarily going to be set after writepage errors out.
Instead, check the mapping for an error after writepage returns.
Signed-off-by: Jeff Layton
Reviewed-by: Jan
From: Jeff Layton
I noticed on xfs that I could still sometimes get back an error on fsync
on a fd that was opened after the error condition had been cleared.
The problem is that the buffer code sets the write_io_error flag and
then later checks that flag to set the error in
From: Jeff Layton
Reviewed-by: Christoph Hellwig
Reviewed-by: Jan Kara
Reviewed-by: Carlos Maiolino
Signed-off-by: Jeff Layton
---
fs/sync.c | 2 +-
include/linux/fs.h | 6 --
ipc/shm.c
From: Jeff Layton
filemap_write_and_wait{_range} will return an error if writeback
initiation fails, but won't clear errors in the address_space. This is
particularly problematic on DAX, as it's effectively synchronous. Ensure
that we clear the AS_EIO/AS_ENOSPC flags when
From: Jeff Layton
Jan Kara's description for this patch is much better than mine, so I'm
quoting it verbatim here:
DAX currently doesn't set errors in the mapping when cache flushing
fails in dax_writeback_mapping_range(). Since this function can get
called only from
From: Jeff Layton
The -EIO returned here can end up overriding whatever error is marked in
the address space, and be returned at fsync time, even when there is a
more appropriate error stored in the mapping.
Read errors are also sometimes tracked on a per-page level using
From: Jeff Layton
v8:
===
- rename filemap_report_wb_err to file_check_and_advance_wb_err (per
Darrick's suggestion)
- add a file_write_and_wait helper function (per HCH's suggestion)
- change __generic_file_fsync to use errseq_t reporting
- focus on data writeback for now,
From: Jeff Layton
Resetting this flag is almost certainly racy, and will be problematic
with some coming changes.
Make filemap_fdatawait_keep_errors return int, but not clear the flag(s).
Have jbd2 call it instead of filemap_fdatawait and don't attempt to
re-set the error
From: Jeff Layton
ext2 currently does a test+clear of the AS_EIO flag, which is
is problematic for some coming changes.
What we really need to do instead is call filemap_check_errors
in __generic_file_fsync after syncing out the buffers. That
will be sufficient for this
On Mon, 2017-06-26 at 08:22 -0700, Darrick J. Wong wrote:
> On Fri, Jun 16, 2017 at 03:34:26PM -0400, Jeff Layton wrote:
> > Just check and advance the data errseq_t in struct file before
> > before returning from fsync on normal files. Internal filemap_*
> > callers are left as-is.
> >
> >
20 matches
Mail list logo