allowed to service reads (assuming
that it was uptodate before)?
Can I redirty it and have it retry the write? Is there standard behavior
for this or is it just up to the whim of the filesystem?
I'll probably have questions about the read side as well, but for now it
looks like it's mostly used in an ad-hoc way to communicate errors
across subsystems (block to fs layer, for instance).
--
Jeff Layton <jlay...@redhat.com>
On Tue, 2017-02-28 at 12:12 +0200, Boaz Harrosh wrote:
> On 02/28/2017 03:11 AM, Jeff Layton wrote:
> <>
> >
> > I'll probably have questions about the read side as well, but for now it
> > looks like it's mostly used in an ad-hoc way to communicate errors
> >
On Mon, 2017-02-27 at 08:03 +1100, NeilBrown wrote:
> On Sun, Feb 26 2017, James Bottomley wrote:
>
> > [added linux-scsi and linux-block because this is part of our error
> > handling as well]
> > On Sun, 2017-02-26 at 09:42 -0500, Jeff Layton wrote:
> > >
ux-block because this is part of our error
> > > > handling as well]
> > > > On Sun, 2017-02-26 at 09:42 -0500, Jeff Layton wrote:
> > > > > Proposing this as a LSF/MM TOPIC, but it may turn out to be me
> > > > > just not understanding the
> > > On Sun, 2017-02-26 at 09:42 -0500, Jeff Layton wrote:
> > > > Proposing this as a LSF/MM TOPIC, but it may turn out to be me
> > > > just not understanding the semantics here.
> > > >
> > > > As I was looking into -ENOS
age:
James Bottomley
Martin K. Petersen (track chair)
Sagi Grimberg
Filesystems:
Anna Schumaker
Chris Mason
Eric Sandeen
Jan Kara
Jeff Layton (summit chair)
Josef Bacik (track chair)
Trond Myklebust
MM:
Johannes Weiner
Rik van Riel (track chair)
--
J
age:
James Bottomley
Martin K. Petersen (track chair)
Sagi Grimberg
Filesystems:
Anna Schumaker
Chris Mason
Eric Sandeen
Jan Kara
Jeff Layton (summit chair)
Josef Bacik (track chair)
Trond Myklebust
MM:
Johannes Weiner
Rik van Riel (track chair)
--
J
(b) write mapping
> (c) wait for mapping
> (d) wait for metamapping
>
> If you use the helper for both, it becomes, (a & d)(b & c) which is probably
> acceptable. (I think we just tried to optimize what the elevator was doing).
>
> But the way you've got it coded here still looks wrong. It looks like:
> (a)
> if (ip)
>(b & c)
> ELSE -
>(d)
>
> So (d) (metamapping) isn't guaranteed to be synced at the end of the function.
> Of course, you know the modified helper functions better than I do.
> What am I missing?
>
>
You're right of course. I'll fix that up in my tree.
Thanks!
--
Jeff Layton <jlay...@redhat.com>
lemap_fdatawait calls into filemap_write_and_wait.
> > That will at least return writeback errors that occur during the write
> > phase.
> >
> > Signed-off-by: Jeff Layton <jlay...@redhat.com>
> > ---
> > fs/gfs2/glops.c | 12
> > fs/gfs2/lops.c | 4 +--
On Mon, 2017-04-24 at 18:04 +0200, Jan Kara wrote:
> On Mon 24-04-17 09:22:49, Jeff Layton wrote:
> > This ensures that we see errors on fsync when writeback fails.
> >
> > Signed-off-by: Jeff Layton <jlay...@redhat.com>
>
> Hum, but do we really want to clob
On Mon, 2017-04-24 at 08:27 -0700, Christoph Hellwig wrote:
> On Mon, Apr 24, 2017 at 09:22:50AM -0400, Jeff Layton wrote:
> > Signed-off-by: Jeff Layton <jlay...@redhat.com>
> > ---
> > fs/cifs/file.c | 10 ++
> > 1 file changed, 6 insertions(+), 4 dele
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 <jlay...@redhat.com>
> >
> > Let's try to make this extra clear for fs authors.
> >
> > Cc: Jan Kara <j.
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 <jlay...@redhat.com>
> >
> > ext2 currently does a test+clear of the AS_EIO flag, which is
> > is pr
On Thu, 2017-06-29 at 09:19 -0400, jlay...@kernel.org wrote:
> From: Jeff Layton <jlay...@redhat.com>
>
> Most filesystems currently use mapping_set_error and
> filemap_check_errors for setting and reporting/clearing writeback errors
> at the mapping level. filemap_check
t 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 <jlay...@poochiereds.net>
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 <jlay...@redhat.com>
> >
> > Just check and advance the errseq_t in the file before returning.
> > Intern
ecomes a pretty straight conversion 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
On Thu, 2017-06-29 at 09:19 -0400, jlay...@kernel.org wrote:
> From: Jeff Layton <jlay...@redhat.com>
>
> Most filesystems currently use mapping_set_error and
> filemap_check_errors for setting and reporting/clearing writeback errors
> at the mapping level. filemap_check
On Tue, 2017-04-25 at 13:19 +0200, Jan Kara wrote:
> On Tue 25-04-17 06:35:13, Jeff Layton wrote:
> > On Tue, 2017-04-25 at 10:17 +0200, Jan Kara wrote:
> > > On Mon 24-04-17 13:14:36, Jeff Layton wrote:
> > > > On Mon, 2017-04-24 at 18:04 +0200, Jan Kara wrote:
>
Now that we don't clear writeback errors after fetching them, there is
no need to reset them. This is also potentially racy.
Signed-off-by: Jeff Layton <jlay...@redhat.com>
---
fs/jbd2/commit.c | 13 ++---
1 file changed, 2 insertions(+), 11 deletions(-)
diff --git a/fs/jbd2/comm
They're no longer used.
Signed-off-by: Jeff Layton <jlay...@redhat.com>
---
include/linux/pagemap.h | 10 --
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
index 32512ffc15fa..9593eac41499 100644
--- a/include
t from other subsystem
maintainers. I'm quite open to adding new API functions to help enable
this if that would be helpful, but I don't really want to do that until
I better understand what's needed.
Signed-off-by: Jeff Layton <jlay...@redhat.com>
---
Documentation/filesy
t
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 <jlay...@redhat.com>
---
include/linux/errseq.h | 16
lib/Makefile | 2 +-
lib/errseq.c
If writepage fails during a page migration, then we need to ensure that
fsync will see it by flagging the mapping.
Signed-off-by: Jeff Layton <jlay...@redhat.com>
---
mm/migrate.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/mm/migrate.c b/mm/migrate.c
Orangefs doesn't do buffered writes yet, so there's no point in
initiating and waiting for writeback.
Signed-off-by: Jeff Layton <jlay...@redhat.com>
---
fs/orangefs/file.c | 5 +
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/fs/orangefs/file.c b/fs/orangefs/file.c
in the address space.
Ensure that this is set in nilfs2.
Cc: Ryusuke Konishi <konishi.ryus...@lab.ntt.co.jp>
Signed-off-by: Jeff Layton <jlay...@redhat.com>
---
fs/nilfs2/segment.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/nilfs2/segment.c b/fs/nilfs2/segment.c
index
In order to get proper error codes from fsync, we must set an error in
the mapping range when writeback fails.
Signed-off-by: Jeff Layton <jlay...@redhat.com>
---
fs/dax.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/fs/dax.c b/fs/dax.c
index 85abd741253d..9b6b04
on a
separate device?
Signed-off-by: Jeff Layton <jlay...@redhat.com>
---
common/dmerror| 13 ---
src/Makefile | 2 +-
src/fsync-err.c | 102 ++
tests/generic/999 | 74
tests/g
launder_page is just writeback under the page lock. We still need to
mark the mapping for errors there when they occur.
Signed-off-by: Jeff Layton <jlay...@redhat.com>
---
fs/9p/vfs_addr.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/fs/9p/vfs_addr.c b/fs/9p/vfs_
these errors properly as well.
With that, we don't need to twiddle it in ext2.
Suggested-by: Jan Kara <j...@suse.cz>
Signed-off-by: Jeff Layton <jlay...@redhat.com>
---
fs/ext2/file.c | 2 +-
fs/libfs.c | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/fs/ext2/file
Signed-off-by: Jeff Layton <jlay...@redhat.com>
Reviewed-by: Jan Kara <j...@suse.cz>
Reviewed-by: Matthew Wilcox <mawil...@microsoft.com>
---
fs/buffer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/buffer.c b/fs/buffer.c
index 9196f2a270da..7063894106
Now that writeback errors are handled on a per-file basis using the new
sequence counter method at the vfs layer, we no longer need to re-set
errors in the mapping after doing writeback in non-fsync codepaths.
Also, fix up some bogus comments.
Signed-off-by: Jeff Layton <jlay...@redhat.
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 <jlay...@redhat.com>
---
mm/filemap.c | 19 +---
Don't try to check PageError since that's potentially racy and not
necessarily going to be set after writepage errors out.
Instead, sample the mapping error early on, and use that value to tell
us whether we got a writeback error since then.
Signed-off-by: Jeff Layton <jlay...@redhat.
.
The new behavior is still consistent with the POSIX spec, and is more
reliable for application developers. This patch just adds some basic
infrastructure for doing this. Later patches will change the existing
code to use this new infrastructure.
Signed-off-by: Jeff Layton <jlay.
-by: Jeff Layton <jlay...@redhat.com>
---
fs/gfs2/glops.c | 12
fs/gfs2/lops.c | 4 +---
fs/gfs2/super.c | 6 ++
3 files changed, 7 insertions(+), 15 deletions(-)
diff --git a/fs/gfs2/glops.c b/fs/gfs2/glops.c
index 5db59d444838..7362d19fdc4c 100644
--- a/fs/gfs2/glops.c
++
This ensures that we see errors on fsync when writeback fails.
Signed-off-by: Jeff Layton <jlay...@redhat.com>
---
fs/fuse/file.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/fs/fuse/file.c b/fs/fuse/file.c
index ec238fb5a584..07d0efcb050c 100644
--- a/fs/fuse/file.c
+++ b/fs/fuse/
Signed-off-by: Jeff Layton <jlay...@redhat.com>
---
fs/cifs/file.c | 10 ++
1 file changed, 6 insertions(+), 4 deletions(-)
diff --git a/fs/cifs/file.c b/fs/cifs/file.c
index 21d404535739..4b696a23b0b1 100644
--- a/fs/cifs/file.c
+++ b/fs/cifs/file.c
@@ -2234,14 +2
roversial
and seem like reasonable bugfixes and cleanups. If any subsystem
maintainers want to pick those up, then please do.
After that, I'd like to get the larger changes into linux-next with an
aim for merge in v4.13 or v4.14 (depending on how testing goes).
Feedback is of course welcome!
Jeff Layton
an error here in some fashion.
Signed-off-by: Jeff Layton <jlay...@redhat.com>
Reviewed-by: Ross Zwisler <ross.zwis...@linux.intel.com>
Reviewed-by: Jan Kara <j...@suse.cz>
Reviewed-by: Matthew Wilcox <mawil...@microsoft.com>
---
fs/exofs/dir.c| 2 +-
fs/ext2/dir.c
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 <jlay...@redhat.com>
Reviewed-by: Ross Zwisler <
On Tue, 2017-04-25 at 10:17 +0200, Jan Kara wrote:
> On Mon 24-04-17 13:14:36, Jeff Layton wrote:
> > On Mon, 2017-04-24 at 18:04 +0200, Jan Kara wrote:
> > > On Mon 24-04-17 09:22:49, Jeff Layton wrote:
> > > > This ensures that we see errors on fsync when writeback
On Wed, 2017-05-10 at 08:03 +1000, NeilBrown wrote:
> On Tue, May 09 2017, Jeff Layton wrote:
>
> > 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 previo
t
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 <jlay...@redhat.com>
---
include/linux/errseq.h | 19 +
lib/Makefile | 2 +-
lib/errseq.c
On Tue, 2017-05-09 at 11:49 -0400, Jeff Layton wrote:
> I waxed a little loquacious here, but I figured that more detail was
> better, and writeback error handling is so hard to get right.
>
> Cc: Jan Kara <j...@suse.cz>
> Signed-off-by: Jeff Layton <jlay...@redhat.com
, but
we can fill it out with other commands as necessary.
Signed-off-by: Jeff Layton <jlay...@redhat.com>
---
common/dmerror| 13 +++--
src/Makefile | 2 +-
src/fsync-err.c | 138 ++
tests/generic/999
Signed-off-by: Jeff Layton <jlay...@redhat.com>
---
include/linux/pagemap.h | 14 ++
1 file changed, 14 insertions(+)
diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h
index 9593eac41499..9b453eae0aa1 100644
--- a/include/linux/pagemap.h
+++ b/include/linux/pag
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 <jlay...@redhat.com>
Reviewed-by: Jan Kara <j...@suse.cz>
Reviewed-by: Christoph Hellwig <h...@lst.de>
Reviewed-and-Tested-by: Ross
Now that writeback errors are handled on a per-file basis using the new
sequence counter method at the vfs layer, we no longer need to re-set
errors in the mapping after doing writeback in non-fsync codepaths.
Also, fix up some bogus comments.
Signed-off-by: Jeff Layton <jlay...@redhat.
that it's first
detected.
Signed-off-by: Jeff Layton <jlay...@redhat.com>
---
fs/buffer.c | 19 +--
fs/gfs2/lops.c | 2 +-
include/linux/buffer_head.h | 1 +
3 files changed, 15 insertions(+), 7 deletions(-)
diff --git a/fs/buffer.c b/fs/buffer.c
On Wed, 2017-05-10 at 13:48 +0200, Jan Kara wrote:
> On Tue 09-05-17 11:49:17, Jeff Layton wrote:
> > Most filesystems currently use mapping_set_error and
> > filemap_check_errors for setting and reporting/clearing writeback errors
> > at the mapping level. filemap_check
On Wed, 2017-05-10 at 07:18 -0700, Matthew Wilcox wrote:
> On Tue, May 09, 2017 at 11:49:16AM -0400, Jeff Layton wrote:
> > +++ b/lib/errseq.c
> > @@ -0,0 +1,199 @@
> > +#include
> > +#include
> > +#include
> > +#include
> > +
> > +/*
>
Don't try to check PageError since that's potentially racy and not
necessarily going to be set after writepage errors out.
Instead, sample the mapping error early on, and use that value to tell
us whether we got a writeback error since then.
Signed-off-by: Jeff Layton <jlay...@redhat.
On Mon, 2017-05-15 at 12:42 +0200, Jan Kara wrote:
> On Tue 09-05-17 11:49:18, Jeff Layton wrote:
> > Now that we have a better way to store and report errors that occur
> > during writeback, we need to convert the existing codebase to use it. We
> > could just adapt all o
I waxed a little loquacious here, but I figured that more detail was
better, and writeback error handling is so hard to get right.
Cc: Jan Kara <j...@suse.cz>
Signed-off-by: Jeff Layton <jlay...@redhat.com>
---
Documentation/filesystems/vfs.txt | 54 ++
Signed-off-by: Jeff Layton <jlay...@redhat.com>
---
include/linux/fs.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 7251f7bb45e8..38adefd8e2a0 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1252,8 +1252,6 @@ extern void f_
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 <jlay...@redhat.
code to use this new infrastructure.
Signed-off-by: Jeff Layton <jlay...@redhat.com>
Reviewed-by: Jan Kara <j...@suse.cz>
---
drivers/dax/device.c | 1 +
fs/block_dev.c | 1 +
fs/file_table.c | 1 +
fs/open.c|
.cz>
Signed-off-by: Jeff Layton <jlay...@redhat.com>
---
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
.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 <jlay...@redhat.com>
---
includ
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 <jlay...@redhat.
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 mapping at the time that the error occurs
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 <j...@suse.cz>
Signed-off-by: Jeff Layton <jlay...@redhat.com>
---
D
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-off-by: Jeff
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 <jlay...@redhat.com>
---
include/linux/fs.
Internal callers of filemap_* functions are left as-is.
Signed-off-by: Jeff Layton <jlay...@redhat.com>
---
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/
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 <j
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 <jlay...@redhat.com>
---
fs/btrfs/super.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/btrfs/super.c b/fs/btrfs/super.c
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 <jlay...@redhat.com>
---
fs/xfs/xfs_super.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/
rently 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 <jlay...@redhat.com>
Revi
-by: Jeff Layton <jlay...@redhat.com>
---
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 = {
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 Layton <jlay.
t
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 <jlay...@redhat.com>
Reviewed-by: NeilBrown <ne...@suse.com>
Reviewed-by: Jan Kara <j...@suse.cz>
---
include/linux/errseq
the same thing when _scratch_mkfs is
called.
Signed-off-by: Jeff Layton <jlay...@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.w...@oracle.com>
---
common/rc | 3 +++
1 file changed, 3 insertions(+)
diff --git a/common/rc b/common/rc
index 87e6ff08b18d..08807ac7c22a 100644
--- a/com
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 <jlay...@redhat.com>
---
tests/generic/998 | 64 +++
tests/generic/998.out | 2 ++
tests/generic
, but
we can fill it out with other commands as necessary.
Signed-off-by: Jeff Layton <jlay...@redhat.com>
---
.gitignore | 1 +
common/dmerror | 13 ++-
doc/auxiliary-programs.txt | 16
src/Makefile | 2 +-
src/dmerror
Signed-off-by: Jeff Layton <jlay...@redhat.com>
---
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()
mk
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: make a btrfs version
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 Layton <j
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 <jlay...@redhat.com>
Reviewed-by: Jan Kara <j...@suse.cz>
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 <jlay...@redhat.com>
---
include/linux/errse
Signed-off-by: Jeff Layton <jlay...@redhat.com>
Reviewed-by: Jan Kara <j...@suse.cz>
Reviewed-by: Matthew Wilcox <mawil...@microsoft.com>
Reviewed-by: Christoph Hellwig <h...@lst.de>
---
fs/buffer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/f
that it's first
detected.
Signed-off-by: Jeff Layton <jlay...@redhat.com>
Reviewed-by: Jan Kara <j...@suse.cz>
---
fs/buffer.c | 20 +---
fs/gfs2/lops.c | 2 +-
include/linux/buffer_head.h | 1 +
3 files changed, 15 insertions(+), 8 deletions(-)
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 <jlay...@redhat.com>
---
mm/filemap.
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 <jlay...@redhat.com>
Reviewed-by: Ross Zwisler <
these errors properly as well.
With that, we don't need to twiddle it in ext2.
Suggested-by: Jan Kara <j...@suse.cz>
Signed-off-by: Jeff Layton <jlay...@redhat.com>
Reviewed-by: Christoph Hellwig <h...@lst.de>
Reviewed-by: Jan Kara <j...@suse.cz>
Reviewed-by: Matthew Wilcox
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 <jlay...@redhat.com> wrote:
> >
> > If there are no major objections to this set, I'd like to have
> > linux-next start picking it up
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 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
ed 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 <jlay...@redhat.com>
Sample the wb_err before changing the directory, so that we can catch
errors that occur since that point.
Signed-off-by: Jeff Layton <jlay...@redhat.com>
---
fs/ext2/dir.c | 17 +++--
1 file changed, 11 insertions(+), 6 deletions(-)
diff --git a/fs/ext2/dir.c b/fs/ext2/dir.c
Add new filemap_*wait* variants that take a "since" value and return an
error if one occurred since that sample point.
Signed-off-by: Jeff Layton <jlay...@redhat.com>
---
include/linux/fs.h | 9
mm/filemap.c | 67 +++
Some filesystems (particularly local ones) 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
Allow filesystems to pass in an errseq_t for a since value.
Signed-off-by: Jeff Layton <jlay...@redhat.com>
---
include/linux/mm.h | 2 ++
mm/page-writeback.c | 53 +
2 files changed, 43 insertions(+), 12 deletions(-)
diff --git a/i
e since value to sync_blockdev_since.
Signed-off-by: Jeff Layton <jlay...@redhat.com>
---
fs/jbd2/commit.c | 29 +++--
fs/jbd2/recovery.c| 5 +++--
fs/jbd2/transaction.c | 1 +
include/linux/jbd2.h | 3 +++
4 files changed, 26 insertions(+), 12 deletions(-)
d
Fairly straightforward conversion. In fsync, just use the file->f_wb_err
value as a "since" value. At the end, call filemap_report_wb_err to
advance the cursor in it.
Signed-off-by: Jeff Layton <jlay...@redhat.com>
---
fs/block_dev.c | 13 ++---
1 file changed,
New variants of sync_filesystem and sync_blockdev.
Signed-off-by: Jeff Layton <jlay...@redhat.com>
---
fs/block_dev.c | 15 +++
fs/internal.h | 8
fs/sync.c | 45 +
include/linux/fs.h | 13 -
4
d 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.
Signed-off-by: Jeff Layton <jlay...@redhat.com>
---
fs/ext4/dir.c | 8 ++--
fs/ext4/ext4.h| 8
fs/ext4/extents.c | 24
.cz>
Signed-off-by: Jeff Layton <jlay...@redhat.com>
---
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
1 - 100 of 159 matches
Mail list logo