Re: [Cluster-devel] [PATCH 2/8] xfs: abstract PF_FSTRANS to PF_MEMALLOC_NOFS

2017-01-09 Thread Darrick J. Wong
l API for it as xfs uses the flag directly > anyway. > > This patch doesn't introduce any functional change. > > Signed-off-by: Michal Hocko <mho...@suse.com> > Reviewed-by: Brian Foster <bfos...@redhat.com> Reviewed-by: Darrick J. Wong <darrick.w...@oracle.c

Re: [Cluster-devel] [PATCH 4/8] xfs: use memalloc_nofs_{save, restore} instead of memalloc_noio*

2017-01-09 Thread Darrick J. Wong
ctly what we need here - implicit GFP_NOFS context. > > Changes since v1 > - s@memalloc_noio_restore@memalloc_nofs_restore@ in _xfs_buf_map_pages > as per Brian Foster > > Signed-off-by: Michal Hocko <mho...@suse.com> Reviewed-by: Darrick J. Wong <darrick.w...@orac

Re: [Cluster-devel] [PATCH 2/9] xfs: introduce and use KM_NOLOCKDEP to silence reclaim lockdep false positives

2017-01-05 Thread Darrick J. Wong
On Tue, Dec 20, 2016 at 08:24:13AM +1100, Dave Chinner wrote: > On Thu, Dec 15, 2016 at 03:07:08PM +0100, Michal Hocko wrote: > > From: Michal Hocko > > > > Now that the page allocator offers __GFP_NOLOCKDEP let's introduce > > KM_NOLOCKDEP alias for the xfs allocation APIs.

Re: [Cluster-devel] [xfstests PATCH v2 2/3] ext4: allow ext4 to use $SCRATCH_LOGDEV

2017-05-15 Thread Darrick J. Wong
infrastructure for this (a'la $SCRATCH_LOGDEV), so wire > up the ext4 code so that it can do the same thing when _scratch_mkfs is > called. > > Signed-off-by: Jeff Layton <jlay...@redhat.com> Looks ok, Reviewed-by: Darrick J. Wong <darrick.w...@oracle.com> --D > --- > comm

Re: [Cluster-devel] [PATCH 4/7] vfs: Add iomap_seek_hole_data helper

2017-06-19 Thread Darrick J. Wong
On Fri, Jun 16, 2017 at 04:51:17PM +0200, Andreas Gruenbacher wrote: > Filesystems can use this for implementing lseek SEEK_HOLE / SEEK_DATA > support via iomap. > > The __iomap_seek_hole_data helper takes an additional size argument and > doesn't reposition the file offset; this is for internal

Re: [Cluster-devel] [PATCH 7/7] xfs: Switch to iomap for seeking in quota files

2017-06-16 Thread Darrick J. Wong
On Fri, Jun 16, 2017 at 04:51:20PM +0200, Andreas Gruenbacher wrote: > (This patch is largely untested.) In principle the XFS bits look ok, but I think you'd be better off with a review from hch and, uh, while you wait, a run through the xfstests 'quota' group and probably 'auto' too? I also

Re: [Cluster-devel] vmalloc with GFP_NOFS

2018-05-09 Thread Darrick J. Wong
lems. Sometimes if the context is not really clear or there are > layering violations then the recommended way around that is to wrap > ``vmalloc`` > by the scope API with a comment explaining the problem. Otherwise looks ok to me based on my understanding of how all this is supposed to work... Reviewed-by: Darrick J. Wong <darrick.w...@oracle.com> --D > -- > Michal Hocko > SUSE Labs

Re: [Cluster-devel] vmalloc with GFP_NOFS

2018-05-09 Thread Darrick J. Wong
On Wed, May 09, 2018 at 11:04:47PM +0200, Michal Hocko wrote: > On Wed 09-05-18 08:13:51, Darrick J. Wong wrote: > > On Wed, May 09, 2018 at 03:42:22PM +0200, Michal Hocko wrote: > > > On Tue 24-04-18 13:25:42, Michal Hocko wrote: > > > [...] > > >

Re: [Cluster-devel] [PATCH 2/6] iomap: move bdev and dax_dev in a union

2018-06-19 Thread Darrick J. Wong
On Tue, Jun 19, 2018 at 08:44:51AM +0200, Christoph Hellwig wrote: > On Mon, Jun 18, 2018 at 11:25:57PM -0700, Darrick J. Wong wrote: > > Is this going to blow up iomap_dax_zero? It seems to use both bdev and > > dax_dev on __dax_zero_page_range, which definitely uses both. >

Re: [Cluster-devel] [PATCH 11/34] iomap: move IOMAP_F_BOUNDARY to gfs2

2018-05-29 Thread Darrick J. Wong
... Reviewed-by: Darrick J. Wong --D > --- > fs/gfs2/bmap.c| 8 +--- > include/linux/iomap.h | 9 +++-- > 2 files changed, 12 insertions(+), 5 deletions(-) > > diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c > index cbeedd3cfb36..8efa6297e19c 100644 >

Re: [Cluster-devel] [PATCH 09/34] iomap: inline data should be an iomap type, not a flag

2018-05-29 Thread Darrick J. Wong
> Signed-off-by: Christoph Hellwig Looks ok to me, anyone from gfs2/ext4 want to ack this? Let's cc those lists and see what happens... Reviewed-by: Darrick J. Wong --D > --- > fs/ext4/inline.c | 4 ++-- > fs/gfs2/bmap.c| 3 +-- > fs/iomap.c| 21 +++

Re: [Cluster-devel] [PATCH 2/6] iomap: move bdev and dax_dev in a union

2018-06-19 Thread Darrick J. Wong
On Thu, Jun 14, 2018 at 02:04:53PM +0200, Christoph Hellwig wrote: > We always either ask for a block device or DAX device mapping, so we can > use the same space for both. > > Signed-off-by: Christoph Hellwig > --- > fs/ext2/inode.c | 6 -- > fs/ext4/inode.c | 6 -- >

Re: [Cluster-devel] [PATCH 3/3] iomap: add inline data support to iomap_readpage_actor

2018-07-03 Thread Darrick J. Wong
On Mon, Jul 02, 2018 at 08:54:58AM -0600, Christoph Hellwig wrote: > From: Andreas Gruenbacher > > Just copy the inline data into the page using the existing helper. > > Signed-off-by: Andreas Gruenbacher > Signed-off-by: Christoph Hellwig Looks ok, Reviewed-by: Dar

Re: [Cluster-devel] [PATCH 1/3] iomap: refactor iomap_dio_actor

2018-07-03 Thread Darrick J. Wong
> Signed-off-by: Christoph Hellwig > Reviewed-by: Andreas Gruenbacher Looks ok, Reviewed-by: Darrick J. Wong --D > --- > fs/iomap.c | 88 -- > 1 file changed, 52 insertions(+), 36 deletions(-) > > diff --git a/fs/iomap.c

Re: [Cluster-devel] [PATCH 2/3] iomap: support direct I/O to inline data

2018-07-03 Thread Darrick J. Wong
ta is actually cached in the inode, so the I/O is only > direct in the sense that it doesn't go through the page cache. > > Signed-off-by: Andreas Gruenbacher Looks ok, Reviewed-by: Darrick J. Wong --D > --- > fs/iomap.c | 29 + > 1 file changed

[PATCH 3/4] fs: teach vfs_ioc_fssetxattr_check to check project id info

2019-06-10 Thread Darrick J. Wong
From: Darrick J. Wong Standardize the project id checks for FSSETXATTR. Signed-off-by: Darrick J. Wong --- fs/ext4/ioctl.c| 27 --- fs/f2fs/file.c | 27 --- fs/inode.c | 13 + fs/xfs/xfs_ioctl.c | 15

[PATCH 1/4] vfs: create a generic checking function for FS_IOC_SETFLAGS

2019-06-10 Thread Darrick J. Wong
From: Darrick J. Wong Create a generic checking function for the incoming FS_IOC_SETFLAGS flag values so that we can standardize the implementations that follow ext4's flag values. Signed-off-by: Darrick J. Wong --- fs/btrfs/ioctl.c| 13 + fs/efivarfs/file.c | 18

[PATCH 2/4] vfs: create a generic checking function for FS_IOC_FSSETXATTR

2019-06-10 Thread Darrick J. Wong
From: Darrick J. Wong Create a generic checking function for the incoming FS_IOC_FSSETXATTR fsxattr values so that we can standardize some of the implementation behaviors. Signed-off-by: Darrick J. Wong --- fs/btrfs/ioctl.c | 21 +--- fs/ext4/ioctl.c| 27

[PATCH 0/4] vfs: clean up SETFLAGS and FSSETXATTR option processing

2019-06-10 Thread Darrick J. Wong
Hi all, The FS_IOC_SETFLAGS and FS_IOC_FSSETXATTR ioctls were promoted from ext4 and XFS, respectively, into the VFS. However, we didn't promote any of the parameter checking code from those filesystems, which lead to a mess where each filesystem open-codes whatever parameter checks they want

Re: [PATCH 2/4] vfs: create a generic checking function for FS_IOC_FSSETXATTR

2019-06-25 Thread Darrick J. Wong
On Tue, Jun 25, 2019 at 07:02:48PM +0200, David Sterba wrote: > On Tue, Jun 25, 2019 at 03:57:25AM -0700, Christoph Hellwig wrote: > > On Fri, Jun 21, 2019 at 04:56:29PM -0700, Darrick J. Wong wrote: > > > From: Darrick J. Wong > > > > > > Create a generi

Re: [PATCH 1/4] vfs: create a generic checking function for FS_IOC_SETFLAGS

2019-06-25 Thread Darrick J. Wong
On Tue, Jun 25, 2019 at 07:12:54PM +0200, David Sterba wrote: > On Fri, Jun 21, 2019 at 04:56:21PM -0700, Darrick J. Wong wrote: > > From: Darrick J. Wong > > > > Create a generic checking function for the incoming FS_IOC_SETFLAGS flag > > values so that we can stan

[Cluster-devel] [PATCH 1/4] vfs: create a generic checking function for FS_IOC_SETFLAGS

2019-06-21 Thread Darrick J. Wong
From: Darrick J. Wong Create a generic checking function for the incoming FS_IOC_SETFLAGS flag values so that we can standardize the implementations that follow ext4's flag values. Signed-off-by: Darrick J. Wong Reviewed-by: Jan Kara --- fs/btrfs/ioctl.c| 13 + fs/efivarfs

[PATCH 2/4] vfs: create a generic checking function for FS_IOC_FSSETXATTR

2019-06-21 Thread Darrick J. Wong
From: Darrick J. Wong Create a generic checking function for the incoming FS_IOC_FSSETXATTR fsxattr values so that we can standardize some of the implementation behaviors. Signed-off-by: Darrick J. Wong Reviewed-by: Jan Kara --- fs/btrfs/ioctl.c | 21 +--- fs/ext4/ioctl.c

[PATCH 4/4] vfs: teach vfs_ioc_fssetxattr_check to check extent size hints

2019-06-21 Thread Darrick J. Wong
From: Darrick J. Wong Move the extent size hint checks that aren't xfs-specific to the vfs. Signed-off-by: Darrick J. Wong Reviewed-by: Jan Kara --- fs/inode.c | 18 + fs/xfs/xfs_ioctl.c | 70 ++-- 2 files changed, 47

[PATCH v2 0/4] vfs: clean up SETFLAGS and FSSETXATTR option processing

2019-06-21 Thread Darrick J. Wong
Hi all, The FS_IOC_SETFLAGS and FS_IOC_FSSETXATTR ioctls were promoted from ext4 and XFS, respectively, into the VFS. However, we didn't promote any of the parameter checking code from those filesystems, which lead to a mess where each filesystem open-codes whatever parameter checks they want

[PATCH 3/4] fs: teach vfs_ioc_fssetxattr_check to check project id info

2019-06-21 Thread Darrick J. Wong
From: Darrick J. Wong Standardize the project id checks for FSSETXATTR. Signed-off-by: Darrick J. Wong Reviewed-by: Jan Kara --- fs/ext4/ioctl.c| 27 --- fs/f2fs/file.c | 27 --- fs/inode.c | 13 + fs/xfs

Re: [Jfs-discussion] [PATCH 1/4] vfs: create a generic checking function for FS_IOC_SETFLAGS

2019-06-11 Thread Darrick J. Wong
On Tue, Jun 11, 2019 at 08:41:06AM -0500, Dave Kleikamp wrote: > On 6/10/19 11:45 PM, Darrick J. Wong wrote: > > From: Darrick J. Wong > > > > Create a generic checking function for the incoming FS_IOC_SETFLAGS flag > > values so that we can standardize the impleme

[PATCH v2 1/4] vfs: create a generic checking function for FS_IOC_SETFLAGS

2019-06-11 Thread Darrick J. Wong
From: Darrick J. Wong Create a generic checking function for the incoming FS_IOC_SETFLAGS flag values so that we can standardize the implementations that follow ext4's flag values. Signed-off-by: Darrick J. Wong --- v2: fix jfs locking and remove its opencoded flags check --- fs/btrfs/ioctl.c

Re: [Cluster-devel] [PATCH v7 5/5] gfs2: Fix iomap write page reclaim deadlock

2019-04-30 Thread Darrick J. Wong
On Tue, Apr 30, 2019 at 12:09:34AM +0200, Andreas Gruenbacher wrote: > Since commit 64bc06bb32ee ("gfs2: iomap buffered write support"), gfs2 is > doing > buffered writes by starting a transaction in iomap_begin, writing a range of > pages, and ending that transaction in iomap_end. This approach

Re: [Cluster-devel] [PATCH v7 4/5] iomap: Add a page_prepare callback

2019-04-30 Thread Darrick J. Wong
the gfs2 side. :) Reviewed-by: Darrick J. Wong --D > --- > fs/gfs2/bmap.c| 15 ++- > fs/iomap.c| 36 ++-- > include/linux/iomap.h | 22 +- > 3 files changed, 53 insertions(+), 20 deletions(-) > &

Re: [Cluster-devel] [PATCH v7 5/5] gfs2: Fix iomap write page reclaim deadlock

2019-04-30 Thread Darrick J. Wong
On Tue, Apr 30, 2019 at 05:39:28PM +0200, Andreas Gruenbacher wrote: > On Tue, 30 Apr 2019 at 17:33, Darrick J. Wong wrote: > > On Tue, Apr 30, 2019 at 12:09:34AM +0200, Andreas Gruenbacher wrote: > > > Since commit 64bc06bb32ee ("gfs2: iomap buffered write support&

Re: [Cluster-devel] [PATCH v7 0/5] iomap and gfs2 fixes

2019-05-01 Thread Darrick J. Wong
On Wed, May 01, 2019 at 07:21:46AM +1000, Dave Chinner wrote: > On Mon, Apr 29, 2019 at 07:50:28PM -0700, Darrick J. Wong wrote: > > On Tue, Apr 30, 2019 at 12:09:29AM +0200, Andreas Gruenbacher wrote: > > > Here's another update of this patch queue, hopefully with all wrinkle

Re: [Cluster-devel] [PATCH v7 1/5] iomap: Clean up __generic_write_end calling

2019-04-30 Thread Darrick J. Wong
uffer_head case. > > Signed-off-by: Christoph Hellwig > Signed-off-by: Andreas Gruenbacher > Reviewed-by: Jan Kara Looks ok, Reviewed-by: Darrick J. Wong --D > --- > fs/iomap.c | 18 -- > 1 file changed, 8 insertions(+), 10 deletions(-) > > di

Re: [Cluster-devel] [PATCH v7 2/5] fs: Turn __generic_write_end into a void function

2019-04-30 Thread Darrick J. Wong
> instead. (Also weird that @copied is unsigned but the return value is signed...) > Signed-off-by: Andreas Gruenbacher Reviewed-by: Darrick J. Wong --D > --- > fs/buffer.c | 6 +++--- > fs/internal.h | 2 +- > fs/iomap.c| 2 +- > 3 files changed, 5 insertions(+),

Re: [Cluster-devel] [PATCH v7 3/5] iomap: Fix use-after-free error in page_done callback

2019-04-30 Thread Darrick J. Wong
n Kara > Reviewed-by: Christoph Hellwig Looks ok, Reviewed-by: Darrick J. Wong --D > --- > fs/buffer.c | 2 +- > fs/iomap.c | 1 + > 2 files changed, 2 insertions(+), 1 deletion(-) > > diff --git a/fs/buffer.c b/fs/buffer.c > index e0d4c6a5e2d2..0faa41fb4c88 100

Re: [Cluster-devel] [PATCH v7 0/5] iomap and gfs2 fixes

2019-04-29 Thread Darrick J. Wong
On Tue, Apr 30, 2019 at 12:09:29AM +0200, Andreas Gruenbacher wrote: > Here's another update of this patch queue, hopefully with all wrinkles > ironed out now. > > Darrick, I think Linus would be unhappy seeing the first four patches in > the gfs2 tree; could you put them into the xfs tree

[Cluster-devel] [GIT PULL] iomap: cleanups and enhancements for 5.2

2019-05-07 Thread Darrick J. Wong
Hi Linus, Here are some patches for the iomap code for 5.2. Nothing particularly exciting here, just adding some callouts for gfs2 and cleaning a few things. It merges cleanly against this morning's HEAD and survived an overnight run of xfstests. Let me know if you run into anything weird.

Re: [PATCH 1/5] vfs: create a generic checking and prep function for FS_IOC_SETFLAGS

2019-06-26 Thread Darrick J. Wong
On Wed, Jun 26, 2019 at 05:02:02AM +0100, Al Viro wrote: > On Tue, Jun 25, 2019 at 07:32:10PM -0700, Darrick J. Wong wrote: > > From: Darrick J. Wong > > > > Create a generic function to check incoming FS_IOC_SETFLAGS flag values > > and later prepare the inode

Re: [PATCH 2/5] vfs: create a generic checking function for FS_IOC_FSSETXATTR

2019-06-26 Thread Darrick J. Wong
On Wed, Jun 26, 2019 at 05:11:33AM +0100, Al Viro wrote: > On Tue, Jun 25, 2019 at 07:32:18PM -0700, Darrick J. Wong wrote: > > --- a/fs/btrfs/ioctl.c > > +++ b/fs/btrfs/ioctl.c > > @@ -373,10 +373,9 @@ static int check_xflags(unsigned int flags) > > static int btrfs_i

Re: [Cluster-devel] [PATCH v2 2/3] fs: fold __generic_write_end back into generic_write_end

2019-06-26 Thread Darrick J. Wong
by: Christoph Hellwig > Signed-off-by: Andreas Gruenbacher Looks ok, Reviewed-by: Darrick J. Wong --D > --- > fs/buffer.c | 62 --- > fs/internal.h | 2 -- > 2 files changed, 29 insertions(+), 35 deletions(-) > > diff --

Re: [Cluster-devel] [PATCH v2 3/3] iomap: fix page_done callback for short writes

2019-06-26 Thread Darrick J. Wong
On Wed, Jun 26, 2019 at 03:23:35PM +0200, Andreas Gruenbacher wrote: > When we truncate a short write to have it retried, pass the truncated > length to the page_done callback instead of the full length. > > Signed-off-by: Andreas Gruenbacher LGTM, Reviewed-by: Darrick J

Re: [Cluster-devel] [PATCH v2 1/3] iomap: don't mark the inode dirty in iomap_write_end

2019-06-26 Thread Darrick J. Wong
rty inode > tracking. So instead, only set an iomap flag when changing the in-core > inode size, and open code the rest of __generic_write_end. > > Partially based on code from Christoph Hellwig. > > Signed-off-by: Andreas Gruenbacher > Reviewed-by: Christoph Hellwig Looks ok

[GIT PULL] iomap: new code for 5.3, part 1

2019-07-09 Thread Darrick J. Wong
Hi Linus, Here's the first part of the iomap merge for 5.3. There are a few fixes for gfs2 but otherwise it's pretty quiet so far. The branch merges cleanly against this morning's HEAD and survived an overnight run of xfstests. The merge was completely straightforward, so please let me know if

[PATCH 2/5] vfs: create a generic checking function for FS_IOC_FSSETXATTR

2019-06-28 Thread Darrick J. Wong
From: Darrick J. Wong Create a generic checking function for the incoming FS_IOC_FSSETXATTR fsxattr values so that we can standardize some of the implementation behaviors. Signed-off-by: Darrick J. Wong Reviewed-by: Jan Kara --- fs/btrfs/ioctl.c | 17 + fs/ext4/ioctl.c

[Cluster-devel] [PATCH 3/5] vfs: teach vfs_ioc_fssetxattr_check to check project id info

2019-06-28 Thread Darrick J. Wong
From: Darrick J. Wong Standardize the project id checks for FSSETXATTR. Signed-off-by: Darrick J. Wong Reviewed-by: Jan Kara --- fs/ext4/ioctl.c| 27 --- fs/f2fs/file.c | 27 --- fs/inode.c | 13 + fs/xfs

[Cluster-devel] [PATCH 5/5] vfs: only allow FSSETXATTR to set DAX flag on files and dirs

2019-06-28 Thread Darrick J. Wong
From: Darrick J. Wong The DAX flag only applies to files and directories, so don't let it get set for other types of files. Signed-off-by: Darrick J. Wong --- fs/inode.c |8 1 file changed, 8 insertions(+) diff --git a/fs/inode.c b/fs/inode.c index 670d5408d022..f08711b34341

[PATCH 4/5] vfs: teach vfs_ioc_fssetxattr_check to check extent size hints

2019-06-28 Thread Darrick J. Wong
From: Darrick J. Wong Move the extent size hint checks that aren't xfs-specific to the vfs. Signed-off-by: Darrick J. Wong Reviewed-by: Jan Kara --- fs/inode.c | 18 + fs/xfs/xfs_ioctl.c | 70 ++-- 2 files changed, 47

Re: [PATCH 2/5] vfs: create a generic checking function for FS_IOC_FSSETXATTR

2019-06-26 Thread Darrick J. Wong
On Wed, Jun 26, 2019 at 08:43:02AM -0700, Christoph Hellwig wrote: > On Wed, Jun 26, 2019 at 08:35:42AM -0700, Darrick J. Wong wrote: > > > static inline void simple_fill_fsxattr(struct fsxattr *fa, unsigned > > > xflags) > > > { > > > memset(fa, 0, sizeof

[PATCH v3 0/5] vfs: clean up SETFLAGS and FSSETXATTR option processing

2019-06-25 Thread Darrick J. Wong
Hi all, The FS_IOC_SETFLAGS and FS_IOC_FSSETXATTR ioctls were promoted from ext4 and XFS, respectively, into the VFS. However, we didn't promote any of the parameter checking code from those filesystems, which lead to a mess where each filesystem open-codes whatever parameter checks they want

[PATCH 1/5] vfs: create a generic checking and prep function for FS_IOC_SETFLAGS

2019-06-25 Thread Darrick J. Wong
From: Darrick J. Wong Create a generic function to check incoming FS_IOC_SETFLAGS flag values and later prepare the inode for updates so that we can standardize the implementations that follow ext4's flag values. Signed-off-by: Darrick J. Wong Reviewed-by: Jan Kara Reviewed-by: Christoph

[PATCH 3/5] vfs: teach vfs_ioc_fssetxattr_check to check project id info

2019-06-25 Thread Darrick J. Wong
From: Darrick J. Wong Standardize the project id checks for FSSETXATTR. Signed-off-by: Darrick J. Wong Reviewed-by: Jan Kara --- fs/ext4/ioctl.c| 27 --- fs/f2fs/file.c | 27 --- fs/inode.c | 13 + fs/xfs

[Cluster-devel] [PATCH 2/5] vfs: create a generic checking function for FS_IOC_FSSETXATTR

2019-06-25 Thread Darrick J. Wong
From: Darrick J. Wong Create a generic checking function for the incoming FS_IOC_FSSETXATTR fsxattr values so that we can standardize some of the implementation behaviors. Signed-off-by: Darrick J. Wong Reviewed-by: Jan Kara --- fs/btrfs/ioctl.c | 18 ++--- fs/ext4/ioctl.c

[PATCH 4/5] vfs: teach vfs_ioc_fssetxattr_check to check extent size hints

2019-06-25 Thread Darrick J. Wong
From: Darrick J. Wong Move the extent size hint checks that aren't xfs-specific to the vfs. Signed-off-by: Darrick J. Wong Reviewed-by: Jan Kara --- fs/inode.c | 18 + fs/xfs/xfs_ioctl.c | 70 ++-- 2 files changed, 47

[PATCH 5/5] vfs: only allow FSSETXATTR to set DAX flag on files and dirs

2019-06-25 Thread Darrick J. Wong
From: Darrick J. Wong The DAX flag only applies to files and directories, so don't let it get set for other types of files. Signed-off-by: Darrick J. Wong --- fs/inode.c |8 1 file changed, 8 insertions(+) diff --git a/fs/inode.c b/fs/inode.c index 670d5408d022..f08711b34341

[Cluster-devel] [PATCH v4 0/5] vfs: clean up SETFLAGS and FSSETXATTR option processing

2019-06-28 Thread Darrick J. Wong
Hi all, The FS_IOC_SETFLAGS and FS_IOC_FSSETXATTR ioctls were promoted from ext4 and XFS, respectively, into the VFS. However, we didn't promote any of the parameter checking code from those filesystems, which lead to a mess where each filesystem open-codes whatever parameter checks they want

[PATCH 1/5] vfs: create a generic checking and prep function for FS_IOC_SETFLAGS

2019-06-28 Thread Darrick J. Wong
From: Darrick J. Wong Create a generic function to check incoming FS_IOC_SETFLAGS flag values and later prepare the inode for updates so that we can standardize the implementations that follow ext4's flag values. Note that the efivarfs implementation no longer fails a no-op SETFLAGS without

[GIT PULL] iomap: small fixes for 5.3-rc5

2019-08-15 Thread Darrick J. Wong
Hi Linus, Here's a single update to the MAINTAINERS entry for iomap. I test-merged it with this morning's master and didn't see any conflicts. Please let me know if you encounter any funniness. --D The following changes since commit 609488bc979f99f805f34e9a32c1e3b71179d10b: Linux 5.3-rc2

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

2019-08-27 Thread Darrick J. Wong
is the wide-spread addition of the > flags option for xattr functions, and a replacement of __vfs_getxattr > with __vfs_getxattr({...XATTR_NOSECURITY}). > > Signed-off-by: Mark Salyzyn > Reviewed-by: Jan Kara > Cc: Stephen Smalley > Cc: linux-ker...@vger.kernel.org &

Re: [Cluster-devel] [PATCH v2 2/2] iomap: partially revert 4721a601099 (simulated directio short read on EFAULT)

2019-08-28 Thread Darrick J. Wong
On Wed, Aug 21, 2019 at 10:23:49PM +0200, Andreas Grünbacher wrote: > Hi Darrick, > > Am So., 2. Dez. 2018 um 19:13 Uhr schrieb Darrick J. Wong > : > > From: Darrick J. Wong > > > > In commit 4721a601099, we tried to fix a problem wherein directio reads > > i

Re: [Cluster-devel] [PATCH v2 2/2] iomap: partially revert 4721a601099 (simulated directio short read on EFAULT)

2019-08-28 Thread Darrick J. Wong
On Wed, Aug 28, 2019 at 04:37:59PM +0200, Andreas Grünbacher wrote: > Am Mi., 28. Aug. 2019 um 16:23 Uhr schrieb Darrick J. Wong > : > > On Wed, Aug 21, 2019 at 10:23:49PM +0200, Andreas Grünbacher wrote: > > > Hi Darrick, > > > > > > Am So., 2. Dez. 20

[GIT PULL] iomap: new code for 5.4

2019-09-17 Thread Darrick J. Wong
Hi Linus, Please pull this series containing all the new iomap code for 5.4. The biggest change here is porting some of XFS' writeback code to iomap so that we can share it with other filesystems; and making some adjustments to the iomap directio code in preparation for other filesystems

Re: [GIT PULL] iomap: new code for 5.4

2019-09-18 Thread Darrick J. Wong
On Wed, Sep 18, 2019 at 06:31:29PM -0700, Linus Torvalds wrote: > On Tue, Sep 17, 2019 at 8:21 AM Darrick J. Wong wrote: > > > > Please pull this series containing all the new iomap code for 5.4. > > So looking at the non-iomap parts of it, I react to the new "list_pop(

[GIT PULL] iomap: cleanups for 5.3 (part 2)

2019-07-19 Thread Darrick J. Wong
) Also new for 5.3: - Regroup the fs/iomap.c code by major functional area so that we can start development for 5.4 from a more stable base. Darrick J. Wong (8): iomap: start moving code to fs/iomap

[Cluster-devel] [GIT PULL] iomap: (far less) new code for 5.4

2019-09-24 Thread Darrick J. Wong
Hi Linus, Please pull this series containing all the new iomap code for 5.4. After last week's failed pull request attempt, I scuttled everything in the branch except for the directio endio api changes, which were trivial. Everything else will simply have to wait for the next cycle. The branch

[Cluster-devel] [GIT PULL] iomap: small cleanups for 5.5

2019-12-03 Thread Darrick J. Wong
Hi Linus, Please pull this series containing some more new iomap code for 5.5. There's not much this time -- just removing some local variables that don't need to exist in the iomap directio code. The branch merges cleanly against this morning's HEAD and survived a few days' worth of xfstests.

Re: [Cluster-devel] [PATCH] iomap: Export iomap_page_create and iomap_set_range_uptodate

2019-12-10 Thread Darrick J. Wong
On Tue, Dec 10, 2019 at 09:39:31PM +0100, Andreas Grünbacher wrote: > Am Di., 10. Dez. 2019 um 21:33 Uhr schrieb Darrick J. Wong > : > > On Tue, Dec 10, 2019 at 11:29:16AM +0100, Andreas Gruenbacher wrote: > > > These two functions are needed by filesystems for converting i

[Cluster-devel] [GIT PULL] iomap: fixes for 5.5

2019-12-06 Thread Darrick J. Wong
Hi Linus, Please pull these iomap bug fixes for 5.5-rc1, which fix a race condition and a use-after-free error. The branch has survived overnight xfstests runs and merges cleanly with this morning's master. Please let me know if anything strange happens. --D The following changes since commit

Re: [Cluster-devel] [GIT PULL] iomap: small cleanups for 5.5

2019-12-03 Thread Darrick J. Wong
On Tue, Dec 03, 2019 at 01:21:01PM -0800, Linus Torvalds wrote: > On Tue, Dec 3, 2019 at 8:09 AM Darrick J. Wong wrote: > > Please pull this series containing some more new iomap code for 5.5. > > There's not much this time -- just removing some local variables that > >

Re: [Cluster-devel] [PATCH] iomap: Export iomap_page_create and iomap_set_range_uptodate

2019-12-10 Thread Darrick J. Wong
Reviewed-by: Darrick J. Wong --D > --- > fs/iomap/buffered-io.c | 6 -- > include/linux/iomap.h | 5 + > 2 files changed, 9 insertions(+), 2 deletions(-) > > diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c > index 828444e14d09..e8f6d7ba4e3c 10064

Re: [Cluster-devel] [PATCH v7 21/24] iomap: Restructure iomap_readpages_actor

2020-02-23 Thread Darrick J. Wong
On Fri, Feb 21, 2020 at 05:54:35PM -0800, Matthew Wilcox wrote: > On Fri, Feb 21, 2020 at 04:44:25PM -0800, Darrick J. Wong wrote: > > On Wed, Feb 19, 2020 at 01:01:00PM -0800, Matthew Wilcox wrote: > > > From: "Matthew Wilcox (Oracle)" > > > > >

Re: [Cluster-devel] [PATCH v8 25/25] iomap: Convert from readpages to readahead

2020-02-26 Thread Darrick J. Wong
On Tue, Feb 25, 2020 at 01:48:38PM -0800, Matthew Wilcox wrote: > From: "Matthew Wilcox (Oracle)" > > Use the new readahead operation in iomap. Convert XFS and ZoneFS to > use it. > > Signed-off-by: Matthew Wilcox (Oracle) > --- > fs/iomap/buffered-io.c | 90

Re: [Cluster-devel] [PATCH v8 25/25] iomap: Convert from readpages to readahead

2020-02-26 Thread Darrick J. Wong
On Wed, Feb 26, 2020 at 09:07:28AM -0800, Christoph Hellwig wrote: > On Wed, Feb 26, 2020 at 09:04:25AM -0800, Darrick J. Wong wrote: > > > @@ -456,15 +435,8 @@ iomap_readpages(struct address_space *mapping, > > > struct list_head *pages, > > >

Re: [Cluster-devel] [PATCH v7 22/24] iomap: Convert from readpages to readahead

2020-02-24 Thread Darrick J. Wong
On Sun, Feb 23, 2020 at 08:33:55PM -0800, Matthew Wilcox wrote: > On Fri, Feb 21, 2020 at 05:00:13PM -0800, Darrick J. Wong wrote: > > On Thu, Feb 20, 2020 at 08:57:34AM -0800, Matthew Wilcox wrote: > > > On Thu, Feb 20, 2020 at 07:49:12AM -0800, Chris

[Cluster-devel] [GIT PULL] iomap: new code for 5.6

2020-01-30 Thread Darrick J. Wong
Hi Linus, Please pull this set of new code for 5.6. There's a single patch fixing an off-by-one error when we're checking to see how far we're gotten into an EOF page. --D The following changes since commit fd6988496e79a6a4bdb514a4655d2920209eb85d: Linux 5.5-rc4 (2019-12-29 15:29:16 -0800)

Re: [Cluster-devel] [PATCH v7 21/24] iomap: Restructure iomap_readpages_actor

2020-02-21 Thread Darrick J. Wong
On Wed, Feb 19, 2020 at 01:01:00PM -0800, Matthew Wilcox wrote: > From: "Matthew Wilcox (Oracle)" > > By putting the 'have we reached the end of the page' condition at the end > of the loop instead of the beginning, we can remove the 'submit the last > page' code from iomap_readpages(). Also

Re: [Cluster-devel] [PATCH v7 22/24] iomap: Convert from readpages to readahead

2020-02-21 Thread Darrick J. Wong
On Thu, Feb 20, 2020 at 08:57:34AM -0800, Matthew Wilcox wrote: > On Thu, Feb 20, 2020 at 07:49:12AM -0800, Christoph Hellwig wrote: > > > +/** > > > + * iomap_readahead - Attempt to read pages from a file. > > > + * @rac: Describes the pages to be read. > > > + * @ops: The operations vector for

Re: [Cluster-devel] [PATCH v7 22/24] iomap: Convert from readpages to readahead

2020-02-21 Thread Darrick J. Wong
the mapping prior to submitting a read bio? If so, Reviewed-by: Darrick J. Wong --D > --- > fs/iomap/buffered-io.c | 90 +++--- > fs/iomap/trace.h | 2 +- > fs/xfs/xfs_aops.c | 13 +++--- > fs/zonefs/super.c | 7 ++-- > incl

Re: [Cluster-devel] RFC: iomap write invalidation

2020-07-21 Thread Darrick J. Wong
On Tue, Jul 21, 2020 at 05:16:16PM +0200, Christoph Hellwig wrote: > On Tue, Jul 21, 2020 at 04:14:37PM +0100, Matthew Wilcox wrote: > > On Tue, Jul 21, 2020 at 05:06:15PM +0200, Christoph Hellwig wrote: > > > On Tue, Jul 21, 2020 at 04:04:32PM +0100, Matthew Wilcox wrote: > > > > I thought you

Re: [Cluster-devel] [PATCH 3/3] iomap: fall back to buffered writes for invalidation failures

2020-07-21 Thread Darrick J. Wong
f-by: Christoph Hellwig > Acked-by: Dave Chinner > Reviewed-by: Goldwyn Rodrigues For the iomap and xfs parts, Reviewed-by: Darrick J. Wong But I'd still like acks from Ted, Andreas, and Damien for ext4, gfs2, and zonefs, respectively. (Particularly if anyone was harboring idea

Re: [Cluster-devel] [PATCH 1/3] xfs: use ENOTBLK for direct I/O to buffered I/O fallback

2020-07-21 Thread Darrick J. Wong
On Tue, Jul 21, 2020 at 08:31:55PM +0200, Christoph Hellwig wrote: > This is what the classic fs/direct-io.c implementation and thuse other > file systems use. > > Signed-off-by: Christoph Hellwig Looks ok to me, Reviewed-by: Darrick J. Wong --D > --- > fs/xfs/xfs_file.c

Re: [Cluster-devel] always fall back to buffered I/O after invalidation failures, was: Re: [PATCH 2/6] iomap: IOMAP_DIO_RWF_NO_STALE_PAGECACHE return if page invalidation fails

2020-07-09 Thread Darrick J. Wong
needed to maintain coherency between mmap/buffered access and > direct IO anymore, and prevents anyone from using direct IO reads > from intentionally invalidating the page cache of a file. > > Signed-off-by: Dave Chinner > --- > fs/iomap/direct-io.c | 33 +

Re: [Cluster-devel] always fall back to buffered I/O after invalidation failures, was: Re: [PATCH 2/6] iomap: IOMAP_DIO_RWF_NO_STALE_PAGECACHE return if page invalidation fails

2020-07-09 Thread Darrick J. Wong
On Thu, Jul 09, 2020 at 06:05:19PM +0100, Matthew Wilcox wrote: > On Thu, Jul 09, 2020 at 09:09:26AM -0700, Darrick J. Wong wrote: > > On Thu, Jul 09, 2020 at 12:25:27PM +1000, Dave Chinner wrote: > > > iomap: Only invalidate page cache pages on direct IO writes > > >

Re: [Cluster-devel] [PATCH 2/2] iomap: fall back to buffered writes for invalidation failures

2020-07-13 Thread Darrick J. Wong
On Mon, Jul 13, 2020 at 09:46:33AM +0200, Christoph Hellwig wrote: > Failing to invalid the page cache means data in incoherent, which is > a very bad state for the system. Always fall back to buffered I/O > through the page cache if we can't invalidate mappings. > > Signed-off-by: Christoph

Re: [Cluster-devel] always fall back to buffered I/O after invalidation failures, was: Re: [PATCH 2/6] iomap: IOMAP_DIO_RWF_NO_STALE_PAGECACHE return if page invalidation fails

2020-07-07 Thread Darrick J. Wong
e invalidation fails, return back control to the > > > > > filesystem so it may fallback to buffered mode. > > > > > > > > > > Reviewed-by: Darrick J. Wong > > > > > Signed-off-by: Goldwyn Rodrigues > > > > > > > > I'd like to start a dis

Re: [Cluster-devel] [PATCH 3/3] iomap: fall back to buffered writes for invalidation failures

2020-07-22 Thread Darrick J. Wong
Hey Ted, Could you please review the fs/ext4/ part of this patch (it's the follow-on to the directio discussion I had with you last week) so that I can get this moving for 5.9? Thx, --D On Tue, Jul 21, 2020 at 08:31:57PM +0200, Christoph Hellwig wrote: > Failing to invalid the page cache means

Re: [Cluster-devel] RFC: iomap write invalidation

2020-07-21 Thread Darrick J. Wong
On Tue, Jul 21, 2020 at 04:53:13PM +0200, Christoph Hellwig wrote: > On Mon, Jul 20, 2020 at 04:51:25PM -0500, Goldwyn Rodrigues wrote: > > Hi Christoph, > > > > On 9:46 13/07, Christoph Hellwig wrote: > > > Hi all, > > > > > > this series has two parts: the first one picks up Dave's patch to

Re: [Cluster-devel] RFC: iomap write invalidation

2020-07-21 Thread Darrick J. Wong
On Tue, Jul 21, 2020 at 05:41:32PM +0200, Christoph Hellwig wrote: > On Tue, Jul 21, 2020 at 08:27:54AM -0700, Darrick J. Wong wrote: > > On Tue, Jul 21, 2020 at 05:16:16PM +0200, Christoph Hellwig wrote: > > > On Tue, Jul 21, 2020 at 04:14:37PM +0100, Matthew Wilcox wrote: >

Re: [Cluster-devel] RFC: iomap write invalidation

2020-07-21 Thread Darrick J. Wong
On Tue, Jul 21, 2020 at 06:01:43PM +0200, Christoph Hellwig wrote: > On Tue, Jul 21, 2020 at 08:59:25AM -0700, Darrick J. Wong wrote: > > In the comment that precedes iomap_dio_rw() for the iomap version, > > maybe let's just do that.. > > > ``direct_IO`` > > ca

Re: [Cluster-devel] [PATCH 3/3] iomap: fall back to buffered writes for invalidation failures

2020-07-22 Thread Darrick J. Wong
On Wed, Jul 22, 2020 at 08:18:50AM +0200, Christoph Hellwig wrote: > On Tue, Jul 21, 2020 at 01:37:49PM -0700, Darrick J. Wong wrote: > > On Tue, Jul 21, 2020 at 08:31:57PM +0200, Christoph Hellwig wrote: > > > Failing to invalid the page cache means data in incoherent, which i

Re: [Cluster-devel] [PATCH v3 1/3] iomap: Permit pages without an iop to enter writeback

2021-07-08 Thread Darrick J. Wong
eems simple enough... Reviewed-by: Darrick J. Wong --D > --- > fs/iomap/buffered-io.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c > index 9023717c5188..598fcfabc337 100644 > --- a/fs/iomap/buffere

Re: [Cluster-devel] [PATCH v3 3/3] iomap: Don't create iomap_page objects in iomap_page_mkwrite_actor

2021-07-08 Thread Darrick J. Wong
as a bugfix branch against -rc1 next week, if there are no other objections? Reviewed-by: Darrick J. Wong --D > --- > fs/iomap/buffered-io.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c > index 6330dabc451e..9f4505

Re: [Cluster-devel] [PATCH v3 2/3] iomap: Don't create iomap_page objects for inline files

2021-07-08 Thread Darrick J. Wong
; > To prevent this kind of bug from occurring in the future, make sure the > page doesn't have private data attached in iomap_read_inline_data. > > Signed-off-by: Andreas Gruenbacher Looks good to me, Reviewed-by: Darrick J. Wong --D > --- > fs/iomap/buffered-io.c | 4 +++

Re: [Cluster-devel] [PATCH v3 2/3] iomap: Don't create iomap_page objects for inline files

2021-07-08 Thread Darrick J. Wong
On Wed, Jul 07, 2021 at 03:28:47PM +0100, Matthew Wilcox wrote: > On Wed, Jul 07, 2021 at 01:55:23PM +0200, Andreas Gruenbacher wrote: > > @@ -252,6 +253,7 @@ iomap_readpage_actor(struct inode *inode, loff_t pos, > > loff_t length, void *data, > > } > > > > /* zero post-eof blocks as

Re: [Cluster-devel] [PATCH v7 16/19] iomap: Add done_before argument to iomap_dio_rw

2021-08-27 Thread Darrick J. Wong
On Fri, Aug 27, 2021 at 06:49:23PM +0200, Andreas Gruenbacher wrote: > Add a done_before argument to iomap_dio_rw that indicates how much of > the request has already been transferred. When the request succeeds, we > report that done_before additional bytes were tranferred. This is > useful for

Re: [Cluster-devel] [PATCH v7 16/19] iomap: Add done_before argument to iomap_dio_rw

2021-08-27 Thread Darrick J. Wong
On Fri, Aug 27, 2021 at 10:15:11PM +0200, Andreas Gruenbacher wrote: > On Fri, Aug 27, 2021 at 8:30 PM Darrick J. Wong wrote: > > On Fri, Aug 27, 2021 at 06:49:23PM +0200, Andreas Gruenbacher wrote: > > > Add a done_before argument to iomap_dio_rw that indicates how much of >

Re: [Cluster-devel] [PATCH v7 15/19] iomap: Support partial direct I/O on user copy failures

2021-09-03 Thread Darrick J. Wong
e > fault and retry the remainder of the request. > > Signed-off-by: Andreas Gruenbacher Pretty straightforward. Reviewed-by: Darrick J. Wong --D > --- > fs/iomap/direct-io.c | 6 ++ > include/linux/iomap.h | 7 +++ > 2 files changed, 13 insertions(+) > > diff --g

Re: [Cluster-devel] [PATCH v7 16/19] iomap: Add done_before argument to iomap_dio_rw

2021-09-03 Thread Darrick J. Wong
On Fri, Aug 27, 2021 at 03:35:06PM -0700, Linus Torvalds wrote: > On Fri, Aug 27, 2021 at 2:32 PM Darrick J. Wong wrote: > > > > No, because you totally ignored the second question: > > > > If the directio operation succeeds even partially and the PARTIAL flag > >

Re: [Cluster-devel] [PATCH v7 16/19] iomap: Add done_before argument to iomap_dio_rw

2021-09-03 Thread Darrick J. Wong
tleties again: /* * For asynchronous IO, we have one chance to call the iocb * completion method with the results of the directio operation. * If this operation is a resubmission after a previous partial * completion (e.g. page fault), we need to know

Re: [Cluster-devel] [PATCH v7 14/19] iomap: Fix iomap_dio_rw return value for user copies

2021-09-03 Thread Darrick J. Wong
get_pages. With these > changes, iomap_dio_actor now consistently fails with -EFAULT when a user > page cannot be faulted in. > > Signed-off-by: Andreas Gruenbacher Reviewed-by: Darrick J. Wong --D > --- > fs/iomap/direct-io.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) >

Re: [Cluster-devel] [PATCH 04/30] iomap: mark the iomap argument to iomap_inline_data const

2021-08-09 Thread Darrick J. Wong
On Mon, Aug 09, 2021 at 08:12:18AM +0200, Christoph Hellwig wrote: > Signed-off-by: Christoph Hellwig Looks ok, Reviewed-by: Darrick J. Wong --D > --- > include/linux/iomap.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/linux/iomap

  1   2   >