Re: [f2fs-dev] [PATCH v3 20/20] gfs2: clean up some filemap_* calls

2017-04-24 Thread Jeff Layton
(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 code

Re: [f2fs-dev] [PATCH v3 20/20] gfs2: clean up some filemap_* calls

2017-04-24 Thread Jeff Layton
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 +--

[f2fs-dev] [PATCH] fs: convert a pile of fsync routines to errseq_t based reporting

2017-07-28 Thread Jeff Layton
From: Jeff Layton <jlay...@redhat.com> This patch converts most of the in-kernel filesystems that do writeback out of the pagecache to report errors using the errseq_t-based infrastructure that was recently added. This allows them to report errors once for each open file description.

Re: [f2fs-dev] [PATCH v3 10/20] fuse: set mapping error in writepage_locked when it fails

2017-04-25 Thread Jeff Layton
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: >

[f2fs-dev] [PATCH v3 14/20] fs: retrofit old error reporting API onto new infrastructure

2017-04-24 Thread Jeff Layton
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

[f2fs-dev] [PATCH v3 18/20] mm: clean up error handling in write_one_page

2017-04-24 Thread 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, 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.

[f2fs-dev] [PATCH v3 03/20] buffer: use mapping_set_error instead of setting the flag

2017-04-24 Thread Jeff Layton
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

[f2fs-dev] [PATCH v3 04/20] fs: check for writeback errors after syncing out buffers in generic_file_fsync

2017-04-24 Thread Jeff Layton
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

[f2fs-dev] [PATCH v3 01/20] mm: drop "wait" parameter from write_one_page

2017-04-24 Thread 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

[f2fs-dev] [PATCH v3 00/20] fs: introduce new writeback error reporting and convert existing API as a wrapper around it

2017-04-24 Thread Jeff Layton
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

[f2fs-dev] [PATCH v3 05/20] orangefs: don't call filemap_write_and_wait from fsync

2017-04-24 Thread Jeff Layton
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

[f2fs-dev] [PATCH v3 12/20] lib: add errseq_t type and infrastructure for handling it

2017-04-24 Thread Jeff Layton
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

[f2fs-dev] [PATCH v3 10/20] fuse: set mapping error in writepage_locked when it fails

2017-04-24 Thread Jeff Layton
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/

[f2fs-dev] [PATCH v3 16/20] mm: don't TestClearPageError in __filemap_fdatawait_range

2017-04-24 Thread Jeff Layton
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 +---

[f2fs-dev] [PATCH v3 07/20] nilfs2: set the mapping error when calling SetPageError on writeback

2017-04-24 Thread Jeff Layton
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

[f2fs-dev] [PATCH v3 11/20] cifs: set mapping error when page writeback fails in writepage or launder_pages

2017-04-24 Thread Jeff Layton
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

[f2fs-dev] [PATCH v3 15/20] mm: remove AS_EIO and AS_ENOSPC flags

2017-04-24 Thread Jeff Layton
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

[f2fs-dev] [PATCH v3 08/20] mm: ensure that we set mapping error if writeout() fails

2017-04-24 Thread Jeff Layton
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

[f2fs-dev] [PATCH v3 13/20] fs: new infrastructure for writeback error handling and reporting

2017-04-24 Thread Jeff Layton
. 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.

[f2fs-dev] [PATCH v3 09/20] 9p: set mapping error when writeback fails in launder_page

2017-04-24 Thread Jeff Layton
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_

[f2fs-dev] [PATCH v3 02/20] mm: fix mapping_set_error call in me_pagecache_dirty

2017-04-24 Thread Jeff Layton
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 <

[f2fs-dev] [PATCH v3 06/20] dax: set errors in mapping when writeback fails

2017-04-24 Thread Jeff Layton
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

Re: [f2fs-dev] [PATCH v3 10/20] fuse: set mapping error in writepage_locked when it fails

2017-04-25 Thread Jeff Layton
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

Re: [f2fs-dev] [PATCH v4 13/27] lib: add errseq_t type and infrastructure for handling it

2017-05-10 Thread Jeff Layton
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

[f2fs-dev] [PATCH v4 15/27] fs: retrofit old error reporting API onto new infrastructure

2017-05-09 Thread Jeff Layton
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/file

[f2fs-dev] [PATCH v4 19/27] buffer: set errors in mapping at the time that the error occurs

2017-05-09 Thread Jeff Layton
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

[f2fs-dev] [PATCH v4 18/27] mm: don't TestClearPageError in __filemap_fdatawait_range

2017-05-09 Thread Jeff Layton
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.

[f2fs-dev] [PATCH v4 16/27] fs: adapt sync_file_range to new reporting infrastructure

2017-05-09 Thread Jeff Layton
Since it returns errors in a way similar to fsync, have it use the same method for returning previously-reported writeback errors. Signed-off-by: Jeff Layton <jlay...@redhat.com> --- fs/sync.c | 13 + 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/fs/sync.c b/fs/

[f2fs-dev] [PATCH v4 11/27] fuse: set mapping error in writepage_locked when it fails

2017-05-09 Thread Jeff Layton
This ensures that we see errors on fsync when writeback fails. Signed-off-by: Jeff Layton <jlay...@redhat.com> Reviewed-by: Christoph Hellwig <h...@lst.de> --- fs/fuse/file.c | 1 + 1 file changed, 1 insertion(+) diff --git a/fs/fuse/file.c b/fs/fuse/file.c index ec238fb5a584..

[f2fs-dev] [PATCH v4 20/27] cifs: cleanup writeback handling errors and comments

2017-05-09 Thread Jeff Layton
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.

[f2fs-dev] [PATCH v4 13/27] lib: add errseq_t type and infrastructure for handling it

2017-05-09 Thread Jeff Layton
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

[f2fs-dev] [PATCH v4 08/27] dax: set errors in mapping when writeback fails

2017-05-09 Thread Jeff Layton
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

[f2fs-dev] [PATCH v4 21/27] mm: clean up error handling in write_one_page

2017-05-09 Thread 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, 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.

[f2fs-dev] [PATCH v4 09/27] nilfs2: set the mapping error when calling SetPageError on writeback

2017-05-09 Thread Jeff Layton
in the address space. Ensure that this is set in nilfs2. Acked-by: Ryusuke Konishi <konishi.ryus...@lab.ntt.co.jp> Signed-off-by: Jeff Layton <jlay...@redhat.com> Reviewed-by: Christoph Hellwig <h...@lst.de> --- fs/nilfs2/segment.c | 1 + 1 file changed, 1 insertion(+) diff

[f2fs-dev] [PATCH v4 12/27] cifs: set mapping error when page writeback fails in writepage or launder_pages

2017-05-09 Thread Jeff Layton
Signed-off-by: Jeff Layton <jlay...@redhat.com> Reviewed-by: Christoph Hellwig <h...@lst.de> --- fs/cifs/file.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/fs/cifs/file.c b/fs/cifs/file.c index 21d404535739..0bee7f8d91ad 100644 --- a/fs/cifs/fil

[f2fs-dev] [PATCH v4 17/27] mm: remove AS_EIO and AS_ENOSPC flags

2017-05-09 Thread Jeff Layton
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

[f2fs-dev] [PATCH v4 06/27] fs: check for writeback errors after syncing out buffers in generic_file_fsync

2017-05-09 Thread Jeff Layton
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> --- fs/ext2/file.c | 2 +- fs/libf

[f2fs-dev] [PATCH v4 00/27] fs: introduce new writeback error reporting and convert existing API as a wrapper around it

2017-05-09 Thread Jeff Layton
hose 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 (27): fs: remove unneeded forward definition of mm_struct from fs.h mm: drop "wait" p

[f2fs-dev] [PATCH v4 07/27] orangefs: don't call filemap_write_and_wait from fsync

2017-05-09 Thread Jeff Layton
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> Reviewed-by: Christoph Hellwig <h...@lst.de> Acked-by: Mike Marshall <hub...@omnibond.com> --- fs/orangefs/file.c | 5 +

[f2fs-dev] [PATCH v4 01/27] fs: remove unneeded forward definition of mm_struct from fs.h

2017-05-09 Thread Jeff Layton
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_

[f2fs-dev] [PATCH v4 04/27] buffer: use mapping_set_error instead of setting the flag

2017-05-09 Thread Jeff Layton
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

[f2fs-dev] [PATCH v4 02/27] mm: drop "wait" parameter from write_one_page

2017-05-09 Thread 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> Reviewed-by: Christoph Hellwig <h...@

[f2fs-dev] [PATCH v4 03/27] mm: fix mapping_set_error call in me_pagecache_dirty

2017-05-09 Thread Jeff Layton
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 <

[f2fs-dev] [PATCH v4 24/27][RFC] nfs: convert to new errseq_t based error tracking for writeback errors

2017-05-09 Thread Jeff Layton
-by: Jeff Layton <jlay...@redhat.com> --- fs/nfs/file.c | 19 +++ fs/nfs/inode.c | 5 +++-- fs/nfs/write.c | 2 +- include/linux/nfs_fs.h | 3 ++- 4 files changed, 17 insertions(+), 12 deletions(-) I did this on a lark to see how it would be, but I

[f2fs-dev] [PATCH v4 26/27] mm: flesh out comments over mapping_set_error

2017-05-09 Thread Jeff Layton
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

[f2fs-dev] [PATCH v4 23/27] gfs2: clean up some filemap_* calls

2017-05-09 Thread Jeff Layton
-by: Jeff Layton <jlay...@redhat.com> --- fs/gfs2/glops.c | 17 - fs/gfs2/lops.c | 4 +--- fs/gfs2/super.c | 6 ++ 3 files changed, 7 insertions(+), 20 deletions(-) diff --git a/fs/gfs2/glops.c b/fs/gfs2/glops.c index 5db59d444838..18ab54e351d6 100644 --- a/fs/gfs2/g

[f2fs-dev] [PATCH v4 22/27] jbd2: don't reset error in journal_finish_inode_data_buffers

2017-05-09 Thread Jeff Layton
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

[f2fs-dev] [PATCH v4 25/27] Documentation: flesh out the section in vfs.txt on storing and reporting writeback errors

2017-05-09 Thread Jeff Layton
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 ++

[f2fs-dev] [PATCH v4 27/27] mm: clean up comments in me_pagecache_dirty

2017-05-09 Thread Jeff Layton
This no longer applies with the new writeback error tracking and reporting infrastructure. Signed-off-by: Jeff Layton <jlay...@redhat.com> --- mm/memory-failure.c | 35 +-- 1 file changed, 5 insertions(+), 30 deletions(-) diff --git a/mm/memory-failure.

[f2fs-dev] [xfstests PATCH v2 2/3] ext4: allow ext4 to use $SCRATCH_LOGDEV

2017-05-09 Thread Jeff Layton
the same thing when _scratch_mkfs is called. Signed-off-by: Jeff Layton <jlay...@redhat.com> --- common/rc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/rc b/common/rc index 257b1903359d..8b815d9c8c33 100644 --- a/common/rc +++ b/common/rc @@ -675,6 +675,9 @@ _scratch_mkf

Re: [f2fs-dev] [PATCH v4 14/27] fs: new infrastructure for writeback error handling and reporting

2017-05-10 Thread Jeff Layton
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

Re: [f2fs-dev] [PATCH v4 13/27] lib: add errseq_t type and infrastructure for handling it

2017-05-10 Thread Jeff Layton
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 > > + > > +/* >

Re: [f2fs-dev] [PATCH v4 15/27] fs: retrofit old error reporting API onto new infrastructure

2017-05-15 Thread Jeff Layton
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

[f2fs-dev] [xfstests PATCH v2 0/3] xfstest for updated writeback error handling

2017-05-09 Thread Jeff Layton
in place, ext4 and xfs now pass. btrfs still clears the error after the first fsync, so it seems like it still needs a bit of work. Jeff Layton (3): generic: add a writeback error handling test ext4: allow ext4 to use $SCRATCH_LOGDEV btrfs: allow it to use $SCRATCH_LOGDEV common/dmerror

[f2fs-dev] [xfstests PATCH v2 1/3] generic: add a writeback error handling test

2017-05-09 Thread Jeff Layton
, 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

[f2fs-dev] [xfstests PATCH v2 3/3] btrfs: allow it to use $SCRATCH_LOGDEV

2017-05-09 Thread Jeff Layton
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 put the data on a single device. When we turn on dmerror then the metadata can fall back to using the other mirror while the data errors out. Signed-off-by: Jeff

Re: [f2fs-dev] [PATCH v4 25/27] Documentation: flesh out the section in vfs.txt on storing and reporting writeback errors

2017-05-09 Thread Jeff Layton
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

Re: [f2fs-dev] [RFC xfstests PATCH] xfstests: add a writeback error handling test

2017-05-09 Thread Jeff Layton
On Mon, 2017-04-24 at 08:00 -0700, Christoph Hellwig wrote: > On Mon, Apr 24, 2017 at 09:45:51AM -0400, Jeff Layton wrote: > > With the patch series above, ext4 now passes. xfs and btrfs end up in > > r/o mode after the test. xfs returns -EIO at that point though, and > >

[f2fs-dev] [PATCH] f2fs: don't bother with inode->i_version

2017-10-30 Thread Jeff Layton
From: Jeff Layton <jlay...@redhat.com> f2fs does not set the SB_I_VERSION flag, so the i_version will never be incremented on write. It was recently changed to increment the i_version on a quota write, which isn't necessary here. Signed-off-by: Jeff Layton <jlay...@redhat.com>

Re: [f2fs-dev] [PATCH v8 00/20] vfs: Add support for timestamp limits

2019-08-20 Thread Jeff Layton
seconds/ns S32_MINS32_MAX 1 > ceph unsigned 32-bit second/ns 0 U32_MAX 1000 Looks reasonable, overall. Note that the granularity changed recently for cephfs. See commit 0f7cf80ae96c2a (ceph: initialize superblock s_time_gran to 1). In any case, you c

Re: [f2fs-dev] [PATCH v8] Add flags option to get xattr method paired to __vfs_getxattr

2019-08-27 Thread Jeff Layton
, void *buf, size_t buflen) > + struct xattr_gs_args *args) > { > - if (security_ismaclabel(key)) { > - const char *name = xattr_full_name(handler, key); > - return __ceph_getxattr(inode, name, buf, buflen); > - } > + if (security_ismaclabel(args->name)) > + return __ceph_getxattr(args->inode, > +xattr_full_name(handler, args->name), > +args->buffer, args->size); > return -EOPNOTSUPP; > } > The ceph bits look fine to me. Note that we do have some patches queued up for v5.4 that might have some merge conflicts here. Shouldn't be too hard to fix it up though. Acked-by: Jeff Layton ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Re: [f2fs-dev] [PATCH v4] fs: Fix page_mkwrite off-by-one errors

2020-01-09 Thread Jeff Layton
fs/ceph/addr.c > index 7ab616601141..ef958aa4adb4 100644 > --- a/fs/ceph/addr.c > +++ b/fs/ceph/addr.c > @@ -1575,7 +1575,7 @@ static vm_fault_t ceph_page_mkwrite(struct vm_fault > *vmf) > do { > lock_page(page); > > - if ((off > size) || (page->mapping != inode->i_mapping)) { > + if (page_mkwrite_check_truncate(page, inode) < 0) { > unlock_page(page); > ret = VM_FAULT_NOPAGE; > break; You can add my Acked-by on the ceph part. -- Jeff Layton ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Re: [f2fs-dev] [RFC PATCH 1/8] fscrypt: add fscrypt_prepare_new_inode() and fscrypt_set_context()

2020-08-24 Thread Jeff Layton
On Mon, 2020-08-24 at 11:21 -0700, Eric Biggers wrote: > On Mon, Aug 24, 2020 at 12:48:48PM -0400, Jeff Layton wrote: > > > +void fscrypt_hash_inode_number(struct fscrypt_info *ci, > > > +const struct fscrypt_master_key *mk) > > > +{ > >

Re: [f2fs-dev] [RFC PATCH 1/8] fscrypt: add fscrypt_prepare_new_inode() and fscrypt_set_context()

2020-08-24 Thread Jeff Layton
On Mon, 2020-08-24 at 12:02 -0700, Eric Biggers wrote: > On Mon, Aug 24, 2020 at 02:47:07PM -0400, Jeff Layton wrote: > > On Mon, 2020-08-24 at 11:21 -0700, Eric Biggers wrote: > > > On Mon, Aug 24, 2020 at 12:48:48PM -0400, Jeff Layton wrote: > > > > > +void

Re: [f2fs-dev] [PATCH v3 00/13] fscrypt: improve file creation flow

2020-09-22 Thread Jeff Layton
_inherit_context() > > fscrypt: require that fscrypt_encrypt_symlink() already has key > > fscrypt: stop pretending that key setup is nofs-safe > > fscrypt: make "#define fscrypt_policy" user-only > > fscrypt: move fscrypt_prepare_symlink() out-of-l

Re: [f2fs-dev] [PATCH] fscrypt: export fscrypt_d_revalidate()

2020-09-24 Thread Jeff Layton
d fscrypt_decrypt_bio(struct bio *bio); > @@ -454,6 +455,12 @@ static inline u64 fscrypt_fname_siphash(const struct > inode *dir, > return 0; > } > > +static inline int fscrypt_d_revalidate(struct dentry *dentry, > +unsigned int fl

Re: [f2fs-dev] [PATCH v3 13/13] fscrypt: make fscrypt_set_test_dummy_encryption() take a 'const char *'

2020-09-17 Thread Jeff Layton
/fscrypt.h > @@ -15,7 +15,6 @@ > > #include > #include > -#include > #include > #include > > @@ -153,9 +152,7 @@ struct fscrypt_dummy_policy { > const union fscrypt_policy *policy; > }; > > -int fscrypt_set_test_dummy_encryption( > -

Re: [f2fs-dev] [PATCH v3 13/13] fscrypt: make fscrypt_set_test_dummy_encryption() take a 'const char *'

2020-09-17 Thread Jeff Layton
On Thu, 2020-09-17 at 08:29 -0700, Eric Biggers wrote: > On Thu, Sep 17, 2020 at 08:32:39AM -0400, Jeff Layton wrote: > > On Wed, 2020-09-16 at 21:11 -0700, Eric Biggers wrote: > > > From: Eric Biggers > > > > > > fscrypt_set_test_dummy_encryption()

Re: [f2fs-dev] [PATCH 10/11] ceph: Fix race between hole punch and page fault

2021-05-12 Thread Jeff Layton
ock similarly to other > filesystems. Note that using invalidate_lock also fixes a similar race > wrt ->readpage(). > > CC: Jeff Layton > CC: ceph-de...@vger.kernel.org > Signed-off-by: Jan Kara > --- > fs/ceph/addr.c | 9 ++--- > fs/ceph/file.c | 2 ++ > 2 files cha

Re: [f2fs-dev] [PATCH 06/11] ceph: remove reliance on bdi congestion

2022-02-24 Thread Jeff Layton
On Thu, 2022-02-24 at 16:41 +1100, NeilBrown wrote: > On Thu, 24 Feb 2022, Jeff Layton wrote: > > On Tue, 2022-02-22 at 14:17 +1100, NeilBrown wrote: > > > The bdi congestion tracking in not widely used and will be removed. > > > > > > CEPHfs is one of a s

Re: [f2fs-dev] [PATCH 06/11] ceph: remove reliance on bdi congestion

2022-02-23 Thread Jeff Layton
> fsc->have_copy_from2 = true; > > atomic_long_set(>writeback_count, 0); > + fsc->write_congested = false; > > err = -ENOMEM; > /* > diff --git a/fs/ceph/super.h b/fs/ceph/super.h > index 67f145e1ae7a..0bd97aea2319 100644 > --- a/fs/ceph/super.h > +++ b/fs/ceph/super.h > @@ -121,6 +121,7 @@ struct ceph_fs_client { > struct ceph_mds_client *mdsc; > > atomic_long_t writeback_count; > + bool write_congested; > > struct workqueue_struct *inode_wq; > struct workqueue_struct *cap_wq; > > -- Jeff Layton ___ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

Re: [f2fs-dev] [PATCH 06/11] ceph: remove reliance on bdi congestion

2022-03-04 Thread Jeff Layton
On Fri, 2022-03-04 at 13:47 +1100, NeilBrown wrote: > On Thu, 24 Feb 2022, Jeff Layton wrote: > > On Thu, 2022-02-24 at 16:41 +1100, NeilBrown wrote: > > > On Thu, 24 Feb 2022, Jeff Layton wrote: > > > > On Tue, 2022-02-22 at 14:17 +1100, NeilBrown wrote: > &g

Re: [f2fs-dev] [PATCH 5/9] cephfs: don't set/clear bdi_congestion

2022-01-27 Thread Jeff Layton
/fs/ceph/super.h b/fs/ceph/super.h > index 67f145e1ae7a..fc58adf1d36a 100644 > --- a/fs/ceph/super.h > +++ b/fs/ceph/super.h > @@ -120,8 +120,6 @@ struct ceph_fs_client { > > struct ceph_mds_client *mdsc; > > - atomic_long_t writeback_count; > - > stru

Re: [f2fs-dev] [PATCH v6 1/7] fs: pass the request_mask to generic_fillattr

2023-08-29 Thread Jeff Layton
On Tue, 2023-08-29 at 23:44 +0100, Al Viro wrote: > On Tue, Jul 25, 2023 at 10:58:14AM -0400, Jeff Layton wrote: > > generic_fillattr just fills in the entire stat struct indiscriminately > > today, copying data from the inode. There is at least one attribute > > (STATX_CH

Re: [f2fs-dev] [PATCH v6 1/7] fs: pass the request_mask to generic_fillattr

2023-08-29 Thread Jeff Layton
On Wed, 2023-08-30 at 01:02 +0100, Al Viro wrote: > On Tue, Aug 29, 2023 at 06:58:47PM -0400, Jeff Layton wrote: > > On Tue, 2023-08-29 at 23:44 +0100, Al Viro wrote: > > > On Tue, Jul 25, 2023 at 10:58:14AM -0400, Jeff Layton wrote: > > > > generic_fillattr just f

Re: [f2fs-dev] [PATCH v2 08/92] fs: new helper: simple_rename_timestamp

2023-08-29 Thread Jeff Layton
On Wed, 2023-08-30 at 01:19 +0100, Al Viro wrote: > On Wed, Jul 05, 2023 at 02:58:11PM -0400, Jeff Layton wrote: > > > + * POSIX mandates that the old and new parent directories have their ctime > > and > > + * mtime updated, and that inodes of @old_dentry and @new_de

Re: [f2fs-dev] [PATCH v7 12/13] ext4: switch to multigrain timestamps

2023-09-19 Thread Jeff Layton
On Tue, 2023-09-19 at 13:10 -0700, Paul Eggert wrote: > On 2023-09-19 09:31, Jeff Layton wrote: > > The typical case for make > > timestamp comparisons is comparing source files vs. a build target. If > > those are being written nearly simultaneously, then that

Re: [f2fs-dev] [PATCH v7 12/13] ext4: switch to multigrain timestamps

2023-09-20 Thread Jeff Layton
t; > diff --git a/include/linux/fs.h b/include/linux/fs.h > > index 4aeb3fa11927..03e415fb3a7c 100644 > > --- a/include/linux/fs.h > > +++ b/include/linux/fs.h > > @@ -1114,6 +1114,7 @@ extern int send_sigurg(struct fown_struct *fown); > > #define SB_NODE

Re: [f2fs-dev] [PATCH v7 12/13] ext4: switch to multigrain timestamps

2023-09-20 Thread Jeff Layton
gt;  #define SB_NOATIME BIT(10) /* Do not update access times. */ > @@ -2105,6 +2106,7 @@ static inline bool sb_rdonly(const struct super_block > *sb) { return sb->s_flags >   ((inode)->i_flags & (S_SYNC|S_DIRSYNC))) >  #define IS_MANDL

Re: [f2fs-dev] [PATCH v7 12/13] ext4: switch to multigrain timestamps

2023-09-20 Thread Jeff Layton
nk? > > > My plan was to take a stab at doing this for a later kernel release. > > Ok. If it works out, then we may be able to eventually remove the mount option, but that is a separate project altogether. -- Jeff Layton ___ L

Re: [f2fs-dev] [PATCH v7 12/13] ext4: switch to multigrain timestamps

2023-09-20 Thread Jeff Layton
d but > v6.6 needs to stabilize so anything that requires more significant work > is not an option. Oh, absolutely. I wasn't proposing to do that work for v6.6. For that, we absolutely either need the mount option or to just revert the mgtime conversions. My plan was to take a

Re: [f2fs-dev] [PATCH v7 12/13] ext4: switch to multigrain timestamps

2023-09-20 Thread Jeff Layton
On Wed, 2023-09-20 at 14:48 +0200, Jan Kara wrote: > On Wed 20-09-23 06:35:18, Jeff Layton wrote: > > On Wed, 2023-09-20 at 12:17 +0200, Jan Kara wrote: > > > If I were a sysadmin, I'd rather opt for something like > > > finegrained timestamps + lazytime (if I needed

Re: [f2fs-dev] [PATCH v7 12/13] ext4: switch to multigrain timestamps

2023-09-20 Thread Jeff Layton
time to ponder the options for this series anyway, and another cycle in next wouldn't hurt. The branch itself looks fine, but you might want to reverse the order of the patches in case someone lands there in the middle of a bisect. IOW, I think you want to revert the "convert to multigrain"

Re: [f2fs-dev] [PATCH 86/87] fs: switch timespec64 fields in inode to discrete integers

2023-09-28 Thread Jeff Layton
On Thu, 2023-09-28 at 07:05 -0400, Jeff Layton wrote: > This shaves 8 bytes off struct inode, according to pahole. > > Signed-off-by: Jeff Layton > --- > include/linux/fs.h | 32 +++- > 1 file changed, 23 insertions(+), 9 deletions(-) > > di

Re: [f2fs-dev] [PATCH 86/87] fs: switch timespec64 fields in inode to discrete integers

2023-09-28 Thread Jeff Layton
On Thu, 2023-09-28 at 10:19 -0700, Darrick J. Wong wrote: > On Thu, Sep 28, 2023 at 01:06:03PM -0400, Jeff Layton wrote: > > On Thu, 2023-09-28 at 11:48 -0400, Arnd Bergmann wrote: > > > On Thu, Sep 28, 2023, at 07:05, Jeff Layton wrote: > > > > This shaves 8 byt

Re: [f2fs-dev] [PATCH 86/87] fs: switch timespec64 fields in inode to discrete integers

2023-09-28 Thread Jeff Layton
On Thu, 2023-09-28 at 11:48 -0400, Arnd Bergmann wrote: > On Thu, Sep 28, 2023, at 07:05, Jeff Layton wrote: > > This shaves 8 bytes off struct inode, according to pahole. > > > > Signed-off-by: Jeff Layton > > FWIW, this is similar to the approach that Dee

Re: [f2fs-dev] [PATCH 87/87] fs: move i_blocks up a few places in struct inode

2023-09-28 Thread Jeff Layton
On Thu, 2023-09-28 at 10:41 -0700, Linus Torvalds wrote: > On Thu, 28 Sept 2023 at 04:06, Jeff Layton wrote: > > > > Move i_blocks up above the i_lock, which moves the new 4 byte hole to > > just after the timestamps, without changing the size of the structure. >

Re: [f2fs-dev] [PATCH 86/87] fs: switch timespec64 fields in inode to discrete integers

2023-09-29 Thread Jeff Layton
'm planning to do a v2 patchbomb early next week, with the changes that Chuck suggested (specific helpers for fetching the _sec and _nsec fields). For now, I'll drop the change from timespec64 to discrete fields. We can do that in a separate follow-on set. -- Jeff Layton __

[f2fs-dev] [PATCH v2 02/89] fs: convert core infrastructure to new timestamp accessors

2023-10-04 Thread Jeff Layton
Convert the core vfs code to use the new timestamp accessor functions. Signed-off-by: Jeff Layton --- fs/attr.c| 4 ++-- fs/bad_inode.c | 2 +- fs/binfmt_misc.c | 2 +- fs/inode.c | 35 +-- fs/nsfs.c| 2 +- fs/pipe.c| 2 +- fs

[f2fs-dev] [PATCH v2 00/89] fs: new accessor methods for inode atime and mtime

2023-10-04 Thread Jeff Layton
lucky). Jeff Layton (89): fs: new accessor methods for atime and mtime fs: convert core infrastructure to new timestamp accessors spufs: convert to new timestamp accessors hypfs: convert to new timestamp accessors android: convert to new timestamp accessors char: convert to new

[f2fs-dev] [PATCH v2 01/89] fs: new accessor methods for atime and mtime

2023-10-04 Thread Jeff Layton
for the atime and mtime that mirror the accessors for the ctime. Signed-off-by: Jeff Layton --- fs/libfs.c | 41 -- include/linux/fs.h | 85 +++--- 2 files changed, 102 insertions(+), 24 deletions(-) diff --git a/fs/libfs.c b/fs

[f2fs-dev] [PATCH v2 36/89] f2fs: convert to new timestamp accessors

2023-10-04 Thread Jeff Layton
Convert to using the new inode timestamp accessor functions. Signed-off-by: Jeff Layton --- fs/f2fs/dir.c | 6 +++--- fs/f2fs/f2fs.h | 10 ++ fs/f2fs/file.c | 14 +++--- fs/f2fs/inline.c | 2 +- fs/f2fs/inode.c| 24 fs/f2fs/namei.c

[f2fs-dev] [PATCH v2 87/89] fs: rename inode i_atime and i_mtime fields

2023-10-04 Thread Jeff Layton
Rename these two fields to discourage direct access (and to help ensure that we mop up any leftover direct accesses). Signed-off-by: Jeff Layton --- include/linux/fs.h | 20 ++-- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/include/linux/fs.h b/include/linux

[f2fs-dev] [PATCH v2 88/89] fs: switch timespec64 fields in inode to discrete integers

2023-10-04 Thread Jeff Layton
This shaves 8 bytes off struct inode with a garden-variety Fedora Kconfig. Signed-off-by: Jeff Layton --- include/linux/fs.h | 53 ++ 1 file changed, 30 insertions(+), 23 deletions(-) diff --git a/include/linux/fs.h b/include/linux/fs.h index

[f2fs-dev] [PATCH v2 89/89] fs: move i_generation into new hole created after timestamp conversion

2023-10-04 Thread Jeff Layton
the i_fsnotify_mask in my setup. Suggested-by: Amir Goldstein Signed-off-by: Jeff Layton --- include/linux/fs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/fs.h b/include/linux/fs.h index 485b5e21c8e5..686c9f33e725 100644 --- a/include/linux/fs.h +++ b/include/linux

Re: [f2fs-dev] [PATCH v7 12/13] ext4: switch to multigrain timestamps

2023-09-19 Thread Jeff Layton
On Tue, 2023-09-19 at 13:04 +0200, Jan Kara wrote: > On Tue 19-09-23 15:05:24, Xi Ruoyao wrote: > > On Mon, 2023-08-07 at 15:38 -0400, Jeff Layton wrote: > > > Enable multigrain timestamps, which should ensure that there is an > > > apparent change to the timestamp w

Re: [f2fs-dev] [PATCH v7 12/13] ext4: switch to multigrain timestamps

2023-09-19 Thread Jeff Layton
On Tue, 2023-09-19 at 16:52 +0200, Bruno Haible wrote: > Jeff Layton wrote: > > I'm not sure what we can do for this test. The nap() function is making > > an assumption that the timestamp granularity will be constant, and that > > isn't necessarily the case now. > >

Re: [f2fs-dev] [PATCH 87/87] fs: move i_blocks up a few places in struct inode

2023-09-28 Thread Jeff Layton
On Thu, 2023-09-28 at 14:35 +0300, Amir Goldstein wrote: > On Thu, Sep 28, 2023 at 2:06 PM Jeff Layton wrote: > > > > The recent change to use discrete integers instead of struct timespec64 > > in struct inode shaved 8 bytes off of it, but it also moves the i_lock > >

[f2fs-dev] [PATCH 00/87] fs: new accessor methods for atime and mtime

2023-09-28 Thread Jeff Layton
% of this conversion was done with coccinelle, with the rest done by hand with vim. Jeff Layton (87): fs: new accessor methods for atime and mtime fs: convert core infrastructure to new {a,m}time accessors arch/powerpc/platforms/cell/spufs: convert to new inode {a,m}time accessors arch/s390/hypfs

[f2fs-dev] [PATCH 01/87] fs: new accessor methods for atime and mtime

2023-09-28 Thread Jeff Layton
for the atime and mtime that mirror the accessors for the ctime. Signed-off-by: Jeff Layton --- fs/libfs.c | 13 + include/linux/fs.h | 42 ++ 2 files changed, 55 insertions(+) diff --git a/fs/libfs.c b/fs/libfs.c index 37f2d34ee090

  1   2   >