t; - }
> + put_user_pages_dirty_lock(pages, num_pages, dirty);
> kvfree(pages);
> }
> EXPORT_SYMBOL(ceph_put_page_vector);
This patch looks sane enough. Assuming that the earlier patches are OK:
Acked-by: Jeff Layton
cpy() is safe.
>*/
> - memcpy(snap_names, &ondisk->snaps[snap_count], snap_names_len);
> snaps = ondisk->snaps;
> for (i = 0; i < snap_count; i++) {
> snapc->snaps[i] = le64_to_cpu(snaps[i].id);
Reviewed-by: Jeff Layton
From: Jeff Layton
When a loop block device encounters a writeback error, that error will
get propagated to the bd_inode's wb_err field. If we then detach the
backing file from it, attach another and fsync it, we'll get back the
writeback error that we had from the previous backing file
On Mon, 2018-05-21 at 08:37 -0400, Jeff Layton wrote:
> From: Jeff Layton
>
> When a loop block device encounters a writeback error, that error will
> get propagated to the bd_inode's wb_err field. If we then detach the
> backing file from it, attach another and fsync it
From: Jeff Layton
When a loop block device encounters a writeback error, that error will
get propagated to the bd_inode's wb_err field. If we then detach the
backing file from it, attach another and fsync it, we'll get back the
writeback error that we had from the previous backing file
lush or __loop_update_dio weren't called before we detach the
device, it should still be possible to call fsync on the original fd and
get back the error.
As a side note, it looks like __loop_update_dio will discard an error
from vfs_fsync, so certain ioctls against a loop device can cause errors
to be lost. It seems like those ought to get propagated to userland or
to the blockdev's mapping somehow.
--
Jeff Layton
e'll prevent dirtying of new pages when
> we know the underlying device is gone. Because that will fix your problem
> and also make sure user sees the IO errors directly instead of just in the
> kernel log. The question is how to make this happen in the least painful
> way. I think we could intercept writes in grab_cache_page_write_begin()
> (which however requires that function to return a proper error code and not
> just NULL / non-NULL). And we should also intercept write faults to not
> allow page dirtying via mmap - probably somewhere in do_shared_fault() and
> do_wp_page(). I've added Jeff to CC since he's dealing with IO error
> handling a lot these days. Jeff, what do you think?
>
> Honza
(cc'ing Willy too since he's given this more thought than me)
For the record, I've mostly been looking at error _reporting_. Handling
errors at this level is not something I've really considered in great
detail as of yet.
Still, I think the basic idea sounds reasonable. Not allowing pages to
be dirtied when we can't clean them seems like a reasonable thing to
do.
The big question is how we'll report this to userland:
Would your approach have it return an error on write() and such? What
sort of error if so? ENODEV? Would we have to SIGBUS when someone tries
to dirty the page through mmap?
--
Jeff Layton
On Thu, 2018-04-19 at 13:26 -0400, Jerome Glisse wrote:
> On Thu, Apr 19, 2018 at 12:58:39PM -0400, Jeff Layton wrote:
> > On Thu, 2018-04-19 at 12:30 -0400, Jerome Glisse wrote:
> > > On Thu, Apr 19, 2018 at 07:43:56AM -0700, Matthew Wilcox wrote:
> > > > On Thu, Ap
dded to
the files_struct. Those are generally shared with other threads within
the same process. The files_struct can also be shared with other
processes if you clone() with the right flags.
Doing something per-thread on every open may be rather difficult to do.
--
Jeff Layton
ze_fs can then just have the engine stop parking RPCs and wake up
the waitq.
That should be enough to make suspend and resume work more reliably. If,
however, you're interested in making the cgroup freezer also work, then
we may need to do a bit more work to ensure that we don't end up with
frozen tasks squatting on VFS locks.
--
Jeff Layton
onversion to file_write_and_wait_range -- one
liner patches for the most part.
I've started rolling patches to do that, but now I'm wondering...
Should I aim to do that with an individual patch for each fs, or is it
better to do a swath of them all at once in a single patch here?
--
Jeff Layton
On Thu, 2017-06-29 at 18:21 +, Matthew Wilcox wrote:
> From: Jeff Layton [mailto:jlay...@poochiereds.net]
> > On Thu, 2017-06-29 at 10:11 -0700, Darrick J. Wong wrote:
> > > On Thu, Jun 29, 2017 at 09:19:48AM -0400, jlay...@kernel.org wrote:
> > > > +Ha
On Thu, 2017-06-29 at 07:17 -0700, Christoph Hellwig wrote:
> On Thu, Jun 29, 2017 at 09:19:54AM -0400, jlay...@kernel.org wrote:
> > From: Jeff Layton
> >
> > Just check and advance the errseq_t in the file before returning.
> > Internal callers of filemap
ent it also doesn't
> seem to belong into this patch.
I revised the patch description earlier to say:
While we're at it, ensure we always "goto out" instead of just
returning directly, so that we always hit the exit tracepoint.
...but I'm fine with taking that out if you prefer.
--
Jeff Layton
On Thu, 2017-06-29 at 07:19 -0700, Christoph Hellwig wrote:
> On Thu, Jun 29, 2017 at 09:19:39AM -0400, jlay...@kernel.org wrote:
> > From: Jeff Layton
> >
> > ext2 currently does a test+clear of the AS_EIO flag, which is
> > is problematic for some coming changes.
&
On Thu, 2017-06-29 at 10:11 -0700, Darrick J. Wong wrote:
> On Thu, Jun 29, 2017 at 09:19:48AM -0400, jlay...@kernel.org wrote:
> > From: Jeff Layton
> >
> > Let's try to make this extra clear for fs authors.
> >
> > Cc: Jan Kara
> > Signed-off
On Thu, 2017-06-29 at 09:19 -0400, jlay...@kernel.org wrote:
> 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
On Thu, 2017-06-29 at 09:19 -0400, jlay...@kernel.org wrote:
> 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
On Sat, 2017-06-24 at 09:16 -0400, Jeff Layton wrote:
> On Sat, 2017-06-24 at 04:59 -0700, Christoph Hellwig wrote:
> > On Tue, Jun 20, 2017 at 01:44:44PM -0400, Jeff Layton wrote:
> > > In order to query for errors with errseq_t, you need a previously-
> > > sample
On Sat, 2017-06-24 at 04:59 -0700, Christoph Hellwig wrote:
> On Tue, Jun 20, 2017 at 01:44:44PM -0400, Jeff Layton wrote:
> > In order to query for errors with errseq_t, you need a previously-
> > sampled point from which to check. When you call
> > filemap_write_and_wait_r
sly-
sampled point from which to check. When you call
filemap_write_and_wait_range though you don't have a struct file and so
no previously-sampled value.
--
Jeff Layton
struct address_space *mapping,
> > errseq_t since)
>
> Overly long line here (the patch has a few more)
>
Ok, I'll fix those up.
--
Jeff Layton
On Tue, 2017-06-20 at 09:25 +1000, Stephen Rothwell wrote:
> Hi Jeff,
>
> On Mon, 19 Jun 2017 12:23:46 -0400 Jeff Layton wrote:
> >
> > If there are no major objections to this set, I'd like to have
> > linux-next start picking it up to get some wider testing.
On Fri, 2017-06-16 at 15:34 -0400, Jeff Layton wrote:
> v7:
> ===
> This is the seventh posting of the patchset to revamp the way writeback
> errors are tracked and reported.
>
> The main difference from the v6 posting is the removal of the
> FS_WB_ERRSEQ flag. That
On Fri, 2017-06-16 at 15:34 -0400, Jeff Layton wrote:
> 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(
hrowing I/O errors, and then test the
how the filesystem layer reports errors after that.
Jeff Layton (22):
fs: remove call_fsync helper function
buffer: use mapping_set_error instead of setting the flag
fs: check for writeback errors after syncing out buffers in
generic_file_fsync
buffe
Requested-by: Christoph Hellwig
Signed-off-by: Jeff Layton
---
fs/sync.c | 2 +-
include/linux/fs.h | 6 --
ipc/shm.c | 2 +-
3 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/fs/sync.c b/fs/sync.c
index 11ba023434b1..2a54c1f22035 100644
--- a/fs/sync.c
+++ b
consistent across
subsystems, let's just rely on marking the address space when there are
writeback errors. Change the TestClearPageError call to ClearPageError,
and make __filemap_fdatawait_range a void return function.
Signed-off-by: Jeff Layton
---
mm/filemap.c | 20 +---
1
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 deletions(-)
diff --git a/Documentation/filesystems/vfs.txt
b/Document
will change the
existing code to use this new infrastructure for reporting errors at
fsync time.
Signed-off-by: Jeff Layton
Reviewed-by: Jan Kara
---
drivers/dax/device.c | 1 +
fs/block_dev.c | 1 +
fs/file_table.c | 1 +
fs/open.c
or occurs.
In later patches, we're going to want to convert many of these callers
to check for errors since a well-defined point in time. For now, ensure
that we can handle both sorts of checks by both setting errors in both
places when there is a writeback failure.
Signed-off-by: Jeff L
ilesystems, and eventually make it a more general test.
Signed-off-by: Jeff Layton
---
.gitignore | 1 +
common/dmerror | 13 ++-
doc/auxiliary-programs.txt | 16
src/Makefile | 4 +-
src/dmerror| 44 +
src/fsync-err.c
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 --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index
Mason
Signed-off-by: Jeff Layton
---
tests/btrfs/999 | 94 +
tests/btrfs/999.out | 3 ++
tests/btrfs/group | 1 +
3 files changed, 98 insertions(+)
create mode 100755 tests/btrfs/999
create mode 100644 tests/btrfs/999.out
diff --git a
Ensure that we get an error back on all fds when a block device is
open by multiple writers and writeback fails.
Signed-off-by: Jeff Layton
---
tests/generic/998 | 63 +++
tests/generic/998.out | 2 ++
tests/generic/group | 1 +
3 files
metadata writeback errors are only tracked on a
per-device level, this does mean that we'll end up reporting an error on
all open file descriptors when there is a metadata writeback failure.
That's not ideal, but we can possibly improve upon it in the future.
Signed-off-by: Jeff Layto
pen against the file or if sync(2) gets called before
fsync(2). So convert DAX to using standard error reporting through the
mapping.
Signed-off-by: Jeff Layton
Reviewed-by: Jan Kara
Reviewed-by: Christoph Hellwig
Reviewed-and-Tested-by: Ross Zwisler
---
fs/dax.c | 4 +++-
1 file changed, 3 i
ue in the mapping.
Note that there are internal callers that call sync_blockdev
and the like that are not affected by this. They'll continue
to use the AS_EIO/AS_ENOSPC flags for error reporting like
they always have for now.
Signed-off-by: Jeff Layton
---
fs/block_dev.c | 8 ++--
1 file
Signed-off-by: Jeff Layton
---
common/rc | 11 ++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/common/rc b/common/rc
index 57001b47a8b7..43e160e91360 100644
--- a/common/rc
+++ b/common/rc
@@ -840,7 +840,16 @@ _scratch_mkfs()
mkfs_cmd="$MKFS_BTRFS
Some filesystems keep a different mapping for metadata writeback. Add a
second errseq_t to struct file for tracking metadata writeback errors.
Also add a new function for checking a mapping of the caller's choosing
vs. the f_md_wb_err value.
Signed-off-by: Jeff Layton
---
include/linux
block
devices and one test for btrfs.
The tests work with dmerror to make data writeback from the pagecache
fail, and then tests how the kernel reports errors afterward.
xfs, ext2/3/4 and btrfs all pass on a kernel with the patchset above. "Bare"
block devices also work correctly.
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 | 15 +++
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/fs/xfs
o the same thing when _scratch_mkfs is
called.
Signed-off-by: Jeff Layton
Reviewed-by: Darrick J. Wong
---
common/rc | 3 +++
1 file changed, 3 insertions(+)
diff --git a/common/rc b/common/rc
index ff1b75c9cd25..57001b47a8b7 100644
--- a/common/rc
+++ b/common/rc
@@ -679,6 +
. That will be added in a later patch.
Signed-off-by: Jeff Layton
---
fs/ext4/fsync.c | 15 +++
1 file changed, 11 insertions(+), 4 deletions(-)
diff --git a/fs/ext4/fsync.c b/fs/ext4/fsync.c
index 9d549608fd30..03d6259d8662 100644
--- a/fs/ext4/fsync.c
+++ b/fs/ext4/fsync.c
@@ -100,8
Set the flag to indicate that we want new-style data writeback error
handling.
This means that we need to override the open routines for files and
directories so that we can sample the bdev wb_err at open.
Signed-off-by: Jeff Layton
---
fs/ext2/dir.c | 8
fs/ext2/file.c | 26
nce it
was last bumped.
Later patches will build on this infrastructure to change how writeback
errors are tracked in the kernel.
Signed-off-by: Jeff Layton
Reviewed-by: NeilBrown
Reviewed-by: Jan Kara
---
include/linux/errseq.h | 19 +
lib/Makefile | 2 +-
lib/errseq.c
To enable that, make __errseq_set return the value that it was set to
when we exit the loop. Take heed that that value is not suitable as a
later "since" value, as it will not have been marked seen.
Signed-off-by: Jeff Layton
---
include/linux/errseq.h | 2 +-
include/
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 Kara
---
mm/page-writeback.c | 15 +++--
lways attempting to
write out the metadata, even when a flush of the data reports an error.
Signed-off-by: Jeff Layton
---
fs/libfs.c | 9 -
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/fs/libfs.c b/fs/libfs.c
index 1dec90819366..c93e77ecb49c 100644
--- a/fs/libfs.c
+++
s
an error.
Signed-off-by: Jeff Layton
---
mm/filemap.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/mm/filemap.c b/mm/filemap.c
index 37f286df7c95..c349a5d3a34b 100644
--- a/mm/filemap.c
+++ b/mm/filemap.c
@@ -517,6 +517,9 @@ int filemap_write_and_wait(struct address_spac
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 flag if it fails.
Signed-off-by:
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(-)
diff --git a/fs/buffer.c b/fs/buffer.c
index 44172d11efae..7b4f4bfde91e 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
errors properly as well.
With that, we don't need to twiddle it in ext2.
Suggested-by: Jan Kara
Signed-off-by: Jeff Layton
Reviewed-by: Christoph Hellwig
Reviewed-by: Jan Kara
Reviewed-by: Matthew Wilcox
---
fs/ext2/file.c | 2 +-
fs/libfs.c | 3 ++-
2 files changed, 3 insertions(
that it's first
detected.
Signed-off-by: Jeff Layton
Reviewed-by: Jan Kara
---
fs/buffer.c | 20 +---
fs/gfs2/lops.c | 2 +-
include/linux/buffer_head.h | 1 +
3 files changed, 15 insertions(+), 8 deletions(-)
diff --git a/fs/buffer.c b/fs/buff
On Thu, 2017-06-15 at 07:57 -0700, Christoph Hellwig wrote:
> On Thu, Jun 15, 2017 at 06:42:12AM -0400, Jeff Layton wrote:
> > Correct.
> >
> > But if there is a data writeback error, should we report an error on all
> > open fds at that time (like we will for fsync
On Thu, 2017-06-15 at 01:22 -0700, Christoph Hellwig wrote:
> On Wed, Jun 14, 2017 at 01:24:43PM -0400, Jeff Layton wrote:
> > In this smaller set, it's only really used for DAX.
>
> DAX only is implemented by three filesystems, please just fix them
> up in one go.
>
On Tue, 2017-06-13 at 23:47 -0700, Christoph Hellwig wrote:
> On Tue, Jun 13, 2017 at 06:24:32AM -0400, Jeff Layton wrote:
> > That's definitely what I want for the endgame here. My plan was to add
> > this flag for now, and then eventually reverse it (or drop it) once all
>
On Tue, 2017-06-13 at 16:40 +0800, Eryu Guan wrote:
> On Mon, Jun 12, 2017 at 08:42:13AM -0400, Jeff Layton wrote:
> > Make a new btrfs/999 test that works the way Chris Mason suggested:
> >
> > Build a filesystem with 2 devices that stripes the data across
> > both de
On Tue, 2017-06-13 at 16:32 +0800, Eryu Guan wrote:
> On Mon, Jun 12, 2017 at 08:42:08AM -0400, Jeff Layton wrote:
> > v4: respin set based on Eryu's comments
> >
> > These tests are companion tests to the patchset I recently posted with
> > the cover letter:
On Mon, 2017-06-12 at 21:30 -0700, Darrick J. Wong wrote:
> On Mon, Jun 12, 2017 at 08:23:15AM -0400, Jeff Layton wrote:
> > Just set the FS_WB_ERRSEQ flag to indicate that we want to use errseq_t
> > based error reporting. Internal filemap_* calls are left as-is for now.
> &g
On Mon, 2017-06-12 at 05:45 -0700, Christoph Hellwig wrote:
> On Mon, Jun 12, 2017 at 08:23:06AM -0400, Jeff Layton wrote:
> > Add a new FS_WB_ERRSEQ flag to the fstype. Later patches will set and
> > key off of that to decide what behavior should be used.
>
> Please invert t
s all it can do, but
we can fill it out with other commands as necessary.
Signed-off-by: Jeff Layton
---
.gitignore | 1 +
common/dmerror | 13 ++-
doc/auxiliary-programs.txt | 16
src/Makefile | 2 +-
src/dmerror| 44 +
Make a new btrfs/999 test that works the way Chris Mason suggested:
Build a filesystem with 2 devices that stripes the data across
both devices, but mirrors metadata across both. Then, make one
of the devices fail and see how fsync is handled.
Signed-off-by: Jeff Layton
---
tests/btrfs/999
o the same thing when _scratch_mkfs is
called.
Signed-off-by: Jeff Layton
Reviewed-by: Darrick J. Wong
---
common/rc | 3 +++
1 file changed, 3 insertions(+)
diff --git a/common/rc b/common/rc
index 87e6ff08b18d..08807ac7c22a 100644
--- a/common/rc
+++ b/common/rc
@@ -676,6 +
Signed-off-by: Jeff Layton
---
common/rc | 11 ++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/common/rc b/common/rc
index 08807ac7c22a..46b890cbff6a 100644
--- a/common/rc
+++ b/common/rc
@@ -832,7 +832,16 @@ _scratch_mkfs()
mkfs_cmd="$MKFS_BTRFS
just let unconverted filesystems
fail this test?
Jeff Layton (5):
generic: add a writeback error handling test
ext4: allow ext4 to use $SCRATCH_LOGDEV
generic: test writeback error handling on dmerror devices
ext3: allow it to put journal on a separate device when doing
scratch_mkfs
btrfs: mak
Ensure that we get an error back on all fds when a block device is
open by multiple writers and writeback fails.
Signed-off-by: Jeff Layton
---
tests/generic/998 | 64 +++
tests/generic/998.out | 2 ++
tests/generic/group | 1 +
3 files
To enable that, make __errseq_set return the value that it was set to
when we exit the loop. Take heed that that value is not suitable as a
later "since" value, as it will not have been marked seen.
Signed-off-by: Jeff Layton
---
include/linux/errseq.h | 2 +-
include/
an error here in some fashion.
Signed-off-by: Jeff Layton
Reviewed-by: Ross Zwisler
Reviewed-by: Jan Kara
Reviewed-by: Matthew Wilcox
Reviewed-by: Christoph Hellwig
---
fs/exofs/dir.c| 2 +-
fs/ext2/dir.c | 2 +-
fs/jfs/jfs_metapage.c | 4 ++--
fs/minix/dir.c| 2
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(-)
diff --git a/fs/buffer.c b/fs/buffer.c
index 161be58c5cb0..4be8b914a222 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
consistent across
subsystems, let's just rely on marking the address space when there are
writeback errors. Change the TestClearPageError call to ClearPageError,
and make __filemap_fdatawait_range a void return function.
Signed-off-by: Jeff Layton
---
mm/filemap.c | 20 +---
1
The error code should be negative. Since this ends up in the default
case anyway, this is harmless, but it's less confusing to negate it.
Also, later patches will require a negative error code here.
Signed-off-by: Jeff Layton
Reviewed-by: Ross Zwisler
Reviewed-by: Jan Kara
Reviewed-by: Ma
errors properly as well.
With that, we don't need to twiddle it in ext2.
Suggested-by: Jan Kara
Signed-off-by: Jeff Layton
Reviewed-by: Christoph Hellwig
Reviewed-by: Jan Kara
Reviewed-by: Matthew Wilcox
---
fs/ext2/file.c | 2 +-
fs/libfs.c | 3 ++-
2 files changed, 3 insertions(
that it's first
detected.
Signed-off-by: Jeff Layton
Reviewed-by: Jan Kara
---
fs/buffer.c | 20 +---
fs/gfs2/lops.c | 2 +-
include/linux/buffer_head.h | 1 +
3 files changed, 15 insertions(+), 8 deletions(-)
diff --git a/fs/buffer.c b/fs/buff
.some code is shared between
filesystems and needs to be able to handle both error tracking schemes.
Add a new FS_WB_ERRSEQ flag to the fstype. Later patches will set and
key off of that to decide what behavior should be used.
Signed-off-by: Jeff Layton
---
include/linux/fs.h | 1 +
1 file
or occurs.
In later patches, we're going to want to convert many of these callers
to check for errors since a well-defined point in time. For now, ensure
that we can handle both sorts of checks by both setting errors in both
places when there is a writeback failure.
Signed-off-by: Jeff L
nce it
was last bumped.
Later patches will build on this infrastructure to change how writeback
errors are tracked in the kernel.
Signed-off-by: Jeff Layton
Reviewed-by: NeilBrown
Reviewed-by: Jan Kara
---
include/linux/errseq.h | 19 +
lib/Makefile | 2 +-
lib/errseq.c
Some filesystems keep a different mapping for metadata writeback. Add a
second errseq_t to struct file for tracking metadata writeback errors.
Also add a new function for checking a mapping of the caller's choosing
vs. the f_md_wb_err value.
Signed-off-by: Jeff Layton
---
include/linux
will change the
existing code to use this new infrastructure.
Signed-off-by: Jeff Layton
Reviewed-by: Jan Kara
---
drivers/dax/device.c | 1 +
fs/block_dev.c | 1 +
fs/file_table.c | 1 +
fs/open.c| 3 +++
include/linux/fs.h | 53 ++
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.
We also set the FS_WB_ERRSEQ flag just for completeness sake.
Not much is really using it at this point.
Signed-off-by: Jeff Layton
---
fs/xfs
ags are not currently cleared in the older code when
writeback initiation fails, only when we discover an error after waiting
on writeback to complete, so we only want to do this with errseq_t based
error handling to prevent seeing duplicate errors on fsync.
Signed-off-by: Jeff Layton
Reviewed-by:
ff-by: Jeff Layton
---
fs/block_dev.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/block_dev.c b/fs/block_dev.c
index 4d62fe771587..4bf865cc99de 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -801,6 +801,7 @@ static struct file_system_type bd_type = {
.name =
Let's try to make this extra clear for fs authors.
Also, although I think we'll eventually remove it once the transition is
complete, I've gone ahead and documented the FS_WB_ERRSEQ flag as well.
Cc: Jan Kara
Signed-off-by: Jeff Layton
---
Documentation/filesyste
when there is a metadata writeback
failure. That's not ideal, but we can possibly improve upon it in the
future.
ext4 also has several calls to filemap_fdatawait and
filemap_write_and_wait. Those will also be changed in a later patch to
versions that use errseq_t based reporting.
Signed-of
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 --git a/fs/btrfs/file.c b/fs/btrfs/file.c
index da1096eb1a40..4632f16bc49c 100644
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
Allow filesystems to opt-in to a final check of wb_err if FS_WB_ERRSEQ
is set. Technically, we could just plumb these calls into all of the
fsync operations, but I think this means less code, changes and churn.
Signed-off-by: Jeff Layton
---
include/linux/fs.h | 20 ++--
1 file
Set the FS_WB_ERRSEQ flag to opt-in to errseq_t based reporting.
Internal call to filemap_* functions are left as-is.
Signed-off-by: Jeff Layton
---
fs/btrfs/super.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
index 4f1cdd5058f1
Just set the FS_WB_ERRSEQ flag to indicate that we want to use errseq_t
based error reporting. Internal filemap_* calls are left as-is for now.
Signed-off-by: Jeff Layton
---
fs/xfs/xfs_super.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/xfs/xfs_super.c b/fs/xfs
Signed-off-by: Jeff Layton
---
Documentation/filesystems/vfs.txt | 50 ---
1 file changed, 47 insertions(+), 3 deletions(-)
diff --git a/Documentation/filesystems/vfs.txt
b/Documentation/filesystems/vfs.txt
index f42b90687d40..c3efdd833a3d 100644
--- a/Doc
metadata writeback errors are only tracked on a
per-device level, this does mean that we'll end up reporting an error on
all open file descriptors when there is a metadata writeback failure.
That's not ideal, but we can possibly improve upon it in the future.
Signed-off-by: Jeff Layto
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 Kara
---
mm/page-writeback.c | 15 +++--
behavior of the filesystem layer on top of that.
Jeff Layton (20):
mm: fix mapping_set_error call in me_pagecache_dirty
buffer: use mapping_set_error instead of setting the flag
fs: check for writeback errors after syncing out buffers in
generic_file_fsync
buffer: set errors in mappin
On Tue, 2017-06-06 at 17:19 +0800, Eryu Guan wrote:
> On Wed, May 31, 2017 at 09:08:20AM -0400, Jeff Layton wrote:
> > With btrfs, we can't really put the log on a separate device. What we
> > can do however is mirror the metadata across two devices and make the
> > data
On Tue, 2017-06-06 at 10:17 -0700, Darrick J. Wong wrote:
> On Tue, Jun 06, 2017 at 08:23:25PM +0800, Eryu Guan wrote:
> > On Tue, Jun 06, 2017 at 06:15:57AM -0400, Jeff Layton wrote:
> > > On Tue, 2017-06-06 at 16:58 +0800, Eryu Guan wrote:
> > > > On Wed, May 31,
On Tue, 2017-06-06 at 16:58 +0800, Eryu Guan wrote:
> On Wed, May 31, 2017 at 09:08:16AM -0400, Jeff Layton wrote:
> > I'm working on a set of kernel patches to change how writeback errors
> > are handled and reported in the kernel. Instead of reporting a
> > writeba
On Mon, 2017-06-05 at 19:01 -0600, Ross Zwisler wrote:
> On Wed, May 31, 2017 at 08:45:31AM -0400, Jeff Layton wrote:
> > Jan's description for this patch is much better than mine, so I'm
> > quoting it verbatim here:
> >
> > -8<---
On Thu, 2017-06-01 at 23:25 -0600, Ross Zwisler wrote:
> On Wed, May 31, 2017 at 08:45:23AM -0400, Jeff Layton wrote:
> > v5: don't retrofit old API over the new infrastructure
> > add fstype flag to indicate how wb errors are tracked within that fs
> > add more f
On Wed, 2017-05-31 at 14:37 -0700, Andrew Morton wrote:
> On Wed, 31 May 2017 17:31:49 -0400 Jeff Layton wrote:
>
> > On Wed, 2017-05-31 at 13:27 -0700, Andrew Morton wrote:
> > > On Wed, 31 May 2017 08:45:23 -0400 Jeff Layton wrote:
> > >
> > > >
On Wed, 2017-05-31 at 13:27 -0700, Andrew Morton wrote:
> On Wed, 31 May 2017 08:45:23 -0400 Jeff Layton wrote:
>
> > This is v5 of the patchset to improve how we're tracking and reporting
> > errors that occur during pagecache writeback.
>
> I'm curious to
On Wed, 2017-05-31 at 11:59 -0700, Eduardo Valentin wrote:
> Hello,
>
> On Wed, May 31, 2017 at 09:08:16AM -0400, Jeff Layton wrote:
> > I'm working on a set of kernel patches to change how writeback errors
> > are handled and reported in the kernel. Instead of reportin
1 - 100 of 199 matches
Mail list logo