[PATCH] Documentation: document d_prune op in vfs.txt

2019-04-01 Thread Jeff Layton
Signed-off-by: Jeff Layton --- Documentation/filesystems/vfs.txt | 4 1 file changed, 4 insertions(+) diff --git a/Documentation/filesystems/vfs.txt b/Documentation/filesystems/vfs.txt index 761c6fd24a53..4f1638e5f95b 100644 --- a/Documentation/filesystems/vfs.txt +++ b/Documentation

Re: [PATCH] Add errseq_t documentation to the tree

2017-12-22 Thread Jeff Layton
"big boss" is coming in > @@ -125,6 +129,7 @@ not usable by anyone else. > > Serializing errseq_t cursor updates > === > + > Note that the errseq_t API does not protect the errseq_t cursor during a > check_and_advance_operation. Onl

Re: [PATCH v2] Documentation: filesystems: update filesystem locking documentation

2017-08-01 Thread Jeff Layton
s against concurrent modifications > since this is something the userspace has to take care about. > > +->iterate() is called with i_rwsem exclusive. > + > +->iterate_shared() is called with i_rwsem at least shared. > + > ->fasync() is responsible for maintaining

Re: [xfstests PATCH v3 5/5] btrfs: allow it to use $SCRATCH_LOGDEV

2017-06-08 Thread Jeff Layton
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

Re: [xfstests PATCH v3 1/5] generic: add a writeback error handling test

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

Re: [xfstests PATCH v3 1/5] generic: add a writeback error handling test

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

Re: [PATCH v5 08/17] dax: set errors in mapping when writeback fails

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

Re: [PATCH v5 00/17] fs: introduce new writeback error reporting and convert ext2 and ext4 to use it

2017-06-02 Thread Jeff Layton
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

Re: [PATCH v5 00/17] fs: introduce new writeback error reporting and convert ext2 and ext4 to use it

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

Re: [PATCH v5 00/17] fs: introduce new writeback error reporting and convert ext2 and ext4 to use it

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

Re: [xfstests PATCH v3 1/5] generic: add a writeback error handling test

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

[xfstests PATCH v3 0/5] add a test for reporting writeback errors across all fds on fsync

2017-05-31 Thread Jeff Layton
descriptions when there is an error on fsync, not just the first one to race in. Note that this set contains a patch to emulate $SCRATCH_LOGDEV on btrfs, but the kernel patches for that are not quite ready yet. The test did pass on btrfs in an earlier incarnation of the set, however. Jeff Layton (5

[xfstests PATCH v3 2/5] ext4: allow ext4 to use $SCRATCH_LOGDEV

2017-05-31 Thread Jeff Layton
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 743df427c047..391d36f373cd 100644 --- a/common/rc +++ b/common/rc @@ -676,6 +

[xfstests PATCH v3 4/5] ext3: allow it to put journal on a separate device when doing scratch_mkfs

2017-05-31 Thread Jeff Layton
Signed-off-by: Jeff Layton --- common/rc | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/common/rc b/common/rc index 391d36f373cd..83765aacfb06 100644 --- a/common/rc +++ b/common/rc @@ -832,7 +832,16 @@ _scratch_mkfs() mkfs_cmd="$MKFS_BTRFS

[xfstests PATCH v3 3/5] generic: test writeback error handling on dmerror devices

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

[xfstests PATCH v3 5/5] btrfs: allow it to use $SCRATCH_LOGDEV

2017-05-31 Thread Jeff Layton
t the current incarnation of btrfs has a fixed 64k stripe width. If that ever changes or becomes settable, we may need to adjust the amount of data that the test program writes. Signed-off-by: Jeff Layton --- common/rc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/rc b/common/rc

[xfstests PATCH v3 1/5] generic: add a writeback error handling test

2017-05-31 Thread Jeff Layton
s all it can do, but we can fill it out with other commands as necessary. Signed-off-by: Jeff Layton --- common/dmerror | 13 ++-- doc/auxiliary-programs.txt | 8 +++ src/Makefile | 2 +- src/fsync-err.c| 161 + te

[PATCH v5 01/17] lib: add errseq_t type and infrastructure for handling it

2017-05-31 Thread Jeff Layton
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 --- include/linux/errseq.h | 19 + lib/Makefile | 2 +- lib/errseq.c

[PATCH v5 02/17] fs: new infrastructure for writeback error handling and reporting

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

[PATCH v5 00/17] fs: introduce new writeback error reporting and convert ext2 and ext4 to use it

2017-05-31 Thread Jeff Layton
ut any bugs that might be lurking here. I also have a couple of xfstests for this as well that I'll re-post soon. Jeff Layton (17): lib: add errseq_t type and infrastructure for handling it fs: new infrastructure for writeback error handling and reporting mm: tracepoints for writeback

[PATCH v5 04/17] fs: add a new fstype flag to indicate how writeback errors are tracked

2017-05-31 Thread Jeff Layton
errseq_t based error tracking. Signed-off-by: Jeff Layton --- include/linux/fs.h | 1 + include/linux/pagemap.h | 32 ++-- mm/filemap.c| 7 +++ 3 files changed, 34 insertions(+), 6 deletions(-) diff --git a/include/linux/fs.h b/include/linux/fs.h i

[PATCH v5 03/17] mm: tracepoints for writeback error events

2017-05-31 Thread Jeff Layton
To enable that, make __errseq_set return the value that it was set to 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/

[PATCH v5 05/17] Documentation: flesh out the section in vfs.txt on storing and reporting writeback errors

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

[PATCH v5 10/17] block: add sync_blockdev_since and sync_filesystem_since

2017-05-31 Thread Jeff Layton
New variants of sync_filesystem and sync_blockdev. Signed-off-by: Jeff Layton --- fs/block_dev.c | 15 +++ fs/internal.h | 8 fs/sync.c | 45 + include/linux/fs.h | 13 - 4 files changed, 80

[PATCH v5 08/17] dax: set errors in mapping when writeback fails

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

[PATCH v5 06/17] fs: adapt sync_file_range to new reporting infrastructure

2017-05-31 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 --- fs/sync.c | 17 + 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/fs/sync.c b/fs/sync.c index

[PATCH v5 09/17] block: convert to errseq_t based writeback error tracking

2017-05-31 Thread Jeff Layton
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 --- fs/block_dev.c | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-)

[PATCH v5 14/17] ext4: convert to errseq_t based error tracking

2017-05-31 Thread Jeff Layton
racked 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 --- fs/ext4/dir.c | 8 ++-- fs/ext4/ext4.h| 8 fs/ext4/extents.c | 24 ++-

[PATCH v5 12/17] fs: allow __generic_file_fsync to support both flavors of error reporting

2017-05-31 Thread Jeff Layton
For now, we add a FS_WB_ERRSEQ check to know how to handle it. Signed-off-by: Jeff Layton --- fs/libfs.c | 26 +++--- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/fs/libfs.c b/fs/libfs.c index 1dec90819366..2ae58a252718 100644 --- a/fs/libfs.c +++ b/fs

[PATCH v5 15/17] fs: add a write_one_page_since

2017-05-31 Thread Jeff Layton
Allow filesystems to pass in an errseq_t for a since value. Signed-off-by: Jeff Layton --- include/linux/mm.h | 2 ++ mm/page-writeback.c | 53 + 2 files changed, 43 insertions(+), 12 deletions(-) diff --git a/include/linux/mm.h b/include

[PATCH v5 13/17] jbd2: conditionally handle errors using errseq_t based on FS_WB_ERRSEQ flag

2017-05-31 Thread Jeff Layton
ince value to sync_blockdev_since. Signed-off-by: Jeff Layton --- 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(-) diff --git a/fs/jbd2/commit.c b/fs/

[PATCH v5 16/17] ext2: convert to errseq_t based writeback error tracking

2017-05-31 Thread Jeff Layton
s the error on the device inode on every call. Signed-off-by: Jeff Layton --- fs/ext2/dir.c | 8 fs/ext2/file.c | 29 +++-- fs/ext2/super.c | 2 +- 3 files changed, 32 insertions(+), 7 deletions(-) diff --git a/fs/ext2/dir.c b/fs/ext2/dir.c index e270969

[PATCH v5 17/17] fs: convert ext2 to use write_one_page_since

2017-05-31 Thread Jeff Layton
Sample the wb_err before changing the directory, so that we can catch errors that occur since that point. Signed-off-by: Jeff Layton --- fs/ext2/dir.c | 17 +++-- 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/fs/ext2/dir.c b/fs/ext2/dir.c index 6e476c9929f8

[PATCH v5 07/17] mm: add filemap_fdatawait_range_since and filemap_write_and_wait_range_since

2017-05-31 Thread Jeff Layton
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 --- include/linux/fs.h | 9 mm/filemap.c | 67 ++ 2 files changed, 76

[PATCH v5 11/17] fs: add f_md_wb_err field to struct file for tracking metadata errors

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

Re: [PATCH 21/36] fs: locks: Fix some troubles at kernel-doc comments

2017-05-12 Thread Jeff Layton
t; + * - %LOCK_EX -- an exclusive lock. > + * - %LOCK_UN -- remove an existing lock. > + * - %LOCK_MAND -- a 'mandatory' flock. > + * This exists to emulate Windows Share Modes. > * > * %LOCK_MAND can be combined with %LOCK_READ or %LOCK_WRITE to allow other &g

Re: [PATCH v4] ceph: set io_pages bdi hint

2017-01-10 Thread Jeff Layton
0 /* max read size */ > -#define CEPH_RASIZE_DEFAULT(8192*1024) /* readahead */ > +#define CEPH_RSIZE_DEFAULT (64*1024*1024) /* max read size */ > +#define CEPH_RASIZE_DEFAULT (8192*1024)/* max readahead */ > #define CEPH_