Re: [RFC] vfs: skip extra attributes check on removal for symlinks

2018-05-07 Thread Darrick J. Wong
On Tue, May 01, 2018 at 05:45:12PM +, Luis R. Rodriguez wrote: > On Tue, May 01, 2018 at 10:23:19AM -0700, Darrick J. Wong wrote: > > On Thu, Apr 26, 2018 at 04:46:39PM -0700, Luis R. Rodriguez wrote: > > > Linux filesystems cannot set extra file attributes (stx_attributes as

Re: [PATCH v2 21/35] ovl: add reflink/copyfile/dedup support

2018-05-07 Thread Darrick J. Wong
On Mon, May 07, 2018 at 10:37:53AM +0200, Miklos Szeredi wrote: > Since set of arguments are so similar, handle in a common helper. > > Signed-off-by: Miklos Szeredi > --- > fs/overlayfs/file.c | 88 > + > 1 file changed,

Re: [PATCH v2 21/35] ovl: add reflink/copyfile/dedup support

2018-05-07 Thread Darrick J. Wong
On Mon, May 07, 2018 at 10:37:53AM +0200, Miklos Szeredi wrote: > Since set of arguments are so similar, handle in a common helper. > > Signed-off-by: Miklos Szeredi > --- > fs/overlayfs/file.c | 88 > + > 1 file changed, 88 insertions(+) >

[GIT PULL] xfs: more fixes for 4.17-rc4

2018-05-04 Thread Darrick J. Wong
) Changes since last update: - Cap the maximum length of a deduplication request at MAX_RW_COUNT/2 to avoid kernel livelock due to excessively large IO requests. Darrick J. Wong (1): xfs: cap the length

[GIT PULL] xfs: more fixes for 4.17-rc4

2018-05-04 Thread Darrick J. Wong
) Changes since last update: - Cap the maximum length of a deduplication request at MAX_RW_COUNT/2 to avoid kernel livelock due to excessively large IO requests. Darrick J. Wong (1): xfs: cap the length

Re: [PATCH 4/7] aio: remove the extra get_file/fput pair in io_submit_one

2018-05-02 Thread Darrick J. Wong
extra > reference. > > Signed-off-by: Christoph Hellwig <h...@lst.de> LGTM, Reviewed-by: Darrick J. Wong <darrick.w...@oracle.com> --D > --- > fs/aio.c | 25 - > 1 file changed, 16 insertions(+), 9 deletions(-) > > diff --git a/fs/aio.

Re: [PATCH 4/7] aio: remove the extra get_file/fput pair in io_submit_one

2018-05-02 Thread Darrick J. Wong
extra > reference. > > Signed-off-by: Christoph Hellwig LGTM, Reviewed-by: Darrick J. Wong --D > --- > fs/aio.c | 25 - > 1 file changed, 16 insertions(+), 9 deletions(-) > > diff --git a/fs/aio.c b/fs/aio.c > index 18507743757a..e5866e2f

Re: [RFC] vfs: skip extra attributes check on removal for symlinks

2018-05-01 Thread Darrick J. Wong
On Thu, Apr 26, 2018 at 04:46:39PM -0700, Luis R. Rodriguez wrote: > Linux filesystems cannot set extra file attributes (stx_attributes as per > statx(2)) on a symbolic link. To set extra file attributes you issue > ioctl(2) with FS_IOC_SETFLAGS, *all* ioctl(2) calls on a symbolic link > yield

Re: [RFC] vfs: skip extra attributes check on removal for symlinks

2018-05-01 Thread Darrick J. Wong
On Thu, Apr 26, 2018 at 04:46:39PM -0700, Luis R. Rodriguez wrote: > Linux filesystems cannot set extra file attributes (stx_attributes as per > statx(2)) on a symbolic link. To set extra file attributes you issue > ioctl(2) with FS_IOC_SETFLAGS, *all* ioctl(2) calls on a symbolic link > yield

[GIT PULL] xfs: fixes for 4.17-rc4

2018-05-01 Thread Darrick J. Wong
. Darrick J. Wong (2): xfs: prevent creating negative-sized file via INSERT_RANGE xfs: don't fail when converting shortform attr to long form during ATTR_REPLACE Eric Sandeen (2): xfs: enhance dinode verifier xfs: set format back to extents

[GIT PULL] xfs: fixes for 4.17-rc4

2018-05-01 Thread Darrick J. Wong
. Darrick J. Wong (2): xfs: prevent creating negative-sized file via INSERT_RANGE xfs: don't fail when converting shortform attr to long form during ATTR_REPLACE Eric Sandeen (2): xfs: enhance dinode verifier xfs: set format back to extents

Re: [PATCH 4/7] aio: remove the extra get_file/fput pair in io_submit_one

2018-04-26 Thread Darrick J. Wong
On Sun, Apr 15, 2018 at 05:01:05PM +0200, Christoph Hellwig wrote: > If we release the lockdep write protection token before calling into > ->write_iter and thus never access the file pointer after an -EIOCBQUEUED > return from ->write_iter or ->read_iter we don't need this extra > reference.

Re: [PATCH 4/7] aio: remove the extra get_file/fput pair in io_submit_one

2018-04-26 Thread Darrick J. Wong
On Sun, Apr 15, 2018 at 05:01:05PM +0200, Christoph Hellwig wrote: > If we release the lockdep write protection token before calling into > ->write_iter and thus never access the file pointer after an -EIOCBQUEUED > return from ->write_iter or ->read_iter we don't need this extra > reference.

Re: [PATCH 2/7] aio: remove an outdated BUG_ON and comment in aio_complete

2018-04-24 Thread Darrick J. Wong
> Signed-off-by: Christoph Hellwig <h...@lst.de> Looks ok, Reviewed-by: Darrick J. Wong <darrick.w...@oracle.com> --D > --- > fs/aio.c | 9 - > 1 file changed, 9 deletions(-) > > diff --git a/fs/aio.c b/fs/aio.c > index add46b06be86..7c1855afd723 100644 &g

Re: [PATCH 2/7] aio: remove an outdated BUG_ON and comment in aio_complete

2018-04-24 Thread Darrick J. Wong
> Signed-off-by: Christoph Hellwig Looks ok, Reviewed-by: Darrick J. Wong --D > --- > fs/aio.c | 9 - > 1 file changed, 9 deletions(-) > > diff --git a/fs/aio.c b/fs/aio.c > index add46b06be86..7c1855afd723 100644 > --- a/fs/aio.c > +++ b/fs/aio.c > @@ -1

Re: [RFC v2 06/83] Add inode get/read methods.

2018-04-23 Thread Darrick J. Wong
[haaa, I finally found time to read more of these] On Sat, Mar 10, 2018 at 10:17:47AM -0800, Andiry Xu wrote: > From: Andiry Xu > > These routines are incomplete and currently only support reserved inodes, > whose addresses are fixed. This is necessary for fill_super to

Re: [RFC v2 06/83] Add inode get/read methods.

2018-04-23 Thread Darrick J. Wong
[haaa, I finally found time to read more of these] On Sat, Mar 10, 2018 at 10:17:47AM -0800, Andiry Xu wrote: > From: Andiry Xu > > These routines are incomplete and currently only support reserved inodes, > whose addresses are fixed. This is necessary for fill_super to work. > File/dir

Re: [RFC PATCH 00/79] Generic page write protection and a solution to page waitqueue

2018-04-18 Thread Darrick J. Wong
On Wed, Apr 18, 2018 at 11:54:30AM -0400, Jerome Glisse wrote: > On Wed, Apr 18, 2018 at 04:13:37PM +0200, Jan Kara wrote: > > Hello, > > > > so I finally got to this :) > > > > On Wed 04-04-18 15:17:50, jgli...@redhat.com wrote: > > > From: Jérôme Glisse > > [...] > > > >

Re: [RFC PATCH 00/79] Generic page write protection and a solution to page waitqueue

2018-04-18 Thread Darrick J. Wong
On Wed, Apr 18, 2018 at 11:54:30AM -0400, Jerome Glisse wrote: > On Wed, Apr 18, 2018 at 04:13:37PM +0200, Jan Kara wrote: > > Hello, > > > > so I finally got to this :) > > > > On Wed 04-04-18 15:17:50, jgli...@redhat.com wrote: > > > From: Jérôme Glisse > > [...] > > > >

[GIT PULL] xfs: cleanups & fixes for 4.17

2018-04-12 Thread Darrick J. Wong
itted" argument of xfs_dir_ialloc Christoph Hellwig (1): xfs: remove filestream item xfs_inode reference Darrick J. Wong (1): xfs: only cancel cow blocks when truncating the data fork Dave Chinner (1): xfs: fix intent use-after-free on abort Eric Sandeen (1): xfs:

[GIT PULL] xfs: cleanups & fixes for 4.17

2018-04-12 Thread Darrick J. Wong
itted" argument of xfs_dir_ialloc Christoph Hellwig (1): xfs: remove filestream item xfs_inode reference Darrick J. Wong (1): xfs: only cancel cow blocks when truncating the data fork Dave Chinner (1): xfs: fix intent use-after-free on abort Eric Sandeen (1): xfs:

Re: WARNING: bad unlock balance in xfs_iunlock

2018-04-06 Thread Darrick J. Wong
On Fri, Apr 06, 2018 at 07:38:44AM +1000, Dave Chinner wrote: > On Thu, Apr 05, 2018 at 08:54:50PM +0200, Dmitry Vyukov wrote: > > On Tue, Apr 3, 2018 at 6:38 AM, Dave Chinner wrote: > > > On Mon, Apr 02, 2018 at 07:01:02PM -0700, syzbot wrote: > > >> Hello, > > >> > > >>

Re: WARNING: bad unlock balance in xfs_iunlock

2018-04-06 Thread Darrick J. Wong
On Fri, Apr 06, 2018 at 07:38:44AM +1000, Dave Chinner wrote: > On Thu, Apr 05, 2018 at 08:54:50PM +0200, Dmitry Vyukov wrote: > > On Tue, Apr 3, 2018 at 6:38 AM, Dave Chinner wrote: > > > On Mon, Apr 02, 2018 at 07:01:02PM -0700, syzbot wrote: > > >> Hello, > > >> > > >> syzbot hit the following

[GIT PULL] xfs: new features for 4.17

2018-04-02 Thread Darrick J. Wong
for xfs_reflink_end_cow xfs: refactor xfs_log_force_lsn xfs: unwind the try_again loop in xfs_log_force Darrick J. Wong (15): xfs: don't iunlock the quota ip when quota block xfs: convert a few more directory asserts to corruption xfs: check for cow blocks before trying to clear them

[GIT PULL] xfs: new features for 4.17

2018-04-02 Thread Darrick J. Wong
for xfs_reflink_end_cow xfs: refactor xfs_log_force_lsn xfs: unwind the try_again loop in xfs_log_force Darrick J. Wong (15): xfs: don't iunlock the quota ip when quota block xfs: convert a few more directory asserts to corruption xfs: check for cow blocks before trying to clear them

Re: [PATCH v7 12/14] xfs: prepare xfs_break_layouts() to be called with XFS_MMAPLOCK_EXCL

2018-03-30 Thread Darrick J. Wong
break_layouts(). > > Cc: "Darrick J. Wong" <darrick.w...@oracle.com> > Cc: Ross Zwisler <ross.zwis...@linux.intel.com> > Cc: Dave Chinner <da...@fromorbit.com> > Suggested-by: Christoph Hellwig <h...@lst.de> > Signed-off-by: Dan Williams &

Re: [PATCH v7 12/14] xfs: prepare xfs_break_layouts() to be called with XFS_MMAPLOCK_EXCL

2018-03-30 Thread Darrick J. Wong
break_layouts(). > > Cc: "Darrick J. Wong" > Cc: Ross Zwisler > Cc: Dave Chinner > Suggested-by: Christoph Hellwig > Signed-off-by: Dan Williams Looks ok, Reviewed-by: Darrick J. Wong --D > --- > fs/xfs/xfs_file.c |5 + > fs/xfs/xfs_ioctl.c |

Re: [PATCH] xfs: always free inline data before resetting inode fork during ifree

2018-03-28 Thread Darrick J. Wong
; > No reason they can't run in parallel, right? Correct, parallelizing them turns horrifying long test runs into manageable quantities. > >> > From: Sasha Levin <alexander.le...@microsoft.com> > >> > To: Sasha Levin <alexander.le...@microsoft.com> > >>

Re: [PATCH] xfs: always free inline data before resetting inode fork during ifree

2018-03-28 Thread Darrick J. Wong
; > No reason they can't run in parallel, right? Correct, parallelizing them turns horrifying long test runs into manageable quantities. > >> > From: Sasha Levin > >> > To: Sasha Levin > >> > To: linux-...@vger.kernel.org, "Darrick J . Wong" > >

Re: [PATCH 2/6] aio: remove an outdated comment in aio_complete

2018-03-28 Thread Darrick J. Wong
b to the top of the function. > > Signed-off-by: Christoph Hellwig <h...@lst.de> Yeah that looks fairly impossible now... Reviewed-by: Darrick J. Wong <darrick.w...@oracle.com> --D > --- > fs/aio.c | 9 - > 1 file changed, 9 deletions(-) > > diff --g

Re: [PATCH 2/6] aio: remove an outdated comment in aio_complete

2018-03-28 Thread Darrick J. Wong
b to the top of the function. > > Signed-off-by: Christoph Hellwig Yeah that looks fairly impossible now... Reviewed-by: Darrick J. Wong --D > --- > fs/aio.c | 9 - > 1 file changed, 9 deletions(-) > > diff --git a/fs/aio.c b/fs/aio.c > index 03d59593912d..

Re: [PATCH v9 05/61] Export __set_page_dirty

2018-03-26 Thread Darrick J. Wong
osoft.com> > Acked-by: Jeff Layton <jlay...@kernel.org> Looks ok, Reviewed-by: Darrick J. Wong <darrick.w...@oracle.com> --D > --- > fs/buffer.c| 3 ++- > fs/xfs/xfs_aops.c | 15 ++- > include/linux/mm.h | 1 + > 3 files changed, 5 insertions(+),

Re: [PATCH v9 05/61] Export __set_page_dirty

2018-03-26 Thread Darrick J. Wong
On Tue, Mar 13, 2018 at 06:25:43AM -0700, Matthew Wilcox wrote: > From: Matthew Wilcox > > XFS currently contains a copy-and-paste of __set_page_dirty(). Export > it from buffer.c instead. > > Signed-off-by: Matthew Wilcox > Acked-by: Jeff Layton Looks ok, Reviewed-by:

Re: [PATCH] xfs: always free inline data before resetting inode fork during ifree

2018-03-26 Thread Darrick J. Wong
On Mon, Mar 26, 2018 at 04:54:59AM +, Sasha Levin wrote: > On Sat, Mar 24, 2018 at 10:21:59AM -0700, Darrick J. Wong wrote: > >On Sat, Mar 24, 2018 at 10:06:38AM +0100, Greg Kroah-Hartman wrote: > >> On Fri, Mar 23, 2018 at 06:23:02PM +, Luis R. Rodriguez wrote: > >

Re: [PATCH] xfs: always free inline data before resetting inode fork during ifree

2018-03-26 Thread Darrick J. Wong
On Mon, Mar 26, 2018 at 04:54:59AM +, Sasha Levin wrote: > On Sat, Mar 24, 2018 at 10:21:59AM -0700, Darrick J. Wong wrote: > >On Sat, Mar 24, 2018 at 10:06:38AM +0100, Greg Kroah-Hartman wrote: > >> On Fri, Mar 23, 2018 at 06:23:02PM +, Luis R. Rodriguez wrote: > >

Re: [PATCH] xfs: always free inline data before resetting inode fork during ifree

2018-03-24 Thread Darrick J. Wong
On Sat, Mar 24, 2018 at 10:06:38AM +0100, Greg Kroah-Hartman wrote: > On Fri, Mar 23, 2018 at 06:23:02PM +, Luis R. Rodriguez wrote: > > On Fri, Mar 23, 2018 at 10:26:20AM -0700, Darrick J. Wong wrote: > > > On Fri, Mar 23, 2018 at 05:08:13PM +, Luis R. Rodriguez wrote: &

Re: [PATCH] xfs: always free inline data before resetting inode fork during ifree

2018-03-24 Thread Darrick J. Wong
On Sat, Mar 24, 2018 at 10:06:38AM +0100, Greg Kroah-Hartman wrote: > On Fri, Mar 23, 2018 at 06:23:02PM +, Luis R. Rodriguez wrote: > > On Fri, Mar 23, 2018 at 10:26:20AM -0700, Darrick J. Wong wrote: > > > On Fri, Mar 23, 2018 at 05:08:13PM +, Luis R. Rodriguez wrote: &

Re: [PATCH] xfs: Change URL for the project in xfs.txt

2018-03-21 Thread Darrick J. Wong
On Sat, Mar 03, 2018 at 09:43:10AM +1100, Dave Chinner wrote: > On Fri, Mar 02, 2018 at 04:08:24PM -0600, Eric Sandeen wrote: > > > > > > On 3/2/18 3:57 PM, Dave Chinner wrote: > > > On Fri, Mar 02, 2018 at 09:24:01AM -0800, Darrick J. Wong wrote: > > >>

Re: [PATCH] xfs: Change URL for the project in xfs.txt

2018-03-21 Thread Darrick J. Wong
On Sat, Mar 03, 2018 at 09:43:10AM +1100, Dave Chinner wrote: > On Fri, Mar 02, 2018 at 04:08:24PM -0600, Eric Sandeen wrote: > > > > > > On 3/2/18 3:57 PM, Dave Chinner wrote: > > > On Fri, Mar 02, 2018 at 09:24:01AM -0800, Darrick J. Wong wrote: > > >>

Re: [PATCH 6/9] aio: delete iocbs from the active_reqs list in kiocb_cancel

2018-03-21 Thread Darrick J. Wong
d-by: Jeff Moyer <jmo...@redhat.com> Looks ok, Reviewed-by: Darrick J. Wong <darrick.w...@oracle.com> --D > --- > fs/aio.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/fs/aio.c b/fs/aio.c > index 2d40cf5dd4ec..0b6394b4e528 100644 &

Re: [PATCH 6/9] aio: delete iocbs from the active_reqs list in kiocb_cancel

2018-03-21 Thread Darrick J. Wong
oyer Looks ok, Reviewed-by: Darrick J. Wong --D > --- > fs/aio.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/fs/aio.c b/fs/aio.c > index 2d40cf5dd4ec..0b6394b4e528 100644 > --- a/fs/aio.c > +++ b/fs/aio.c > @@ -561,6 +561,8 @@ stati

Re: [PATCH 8/9] aio: implement io_pgetevents

2018-03-21 Thread Darrick J. Wong
ments, which aren't easily supported > by the syscall infrastructure. It seems a lot less painful to just add a > new syscall variant in the unlikely case we're going to increase the > sigset size. > > Signed-off-by: Christoph Hellwig <h...@lst.de> Looks ok, Reviewed-by: Darr

Re: [PATCH 8/9] aio: implement io_pgetevents

2018-03-21 Thread Darrick J. Wong
ments, which aren't easily supported > by the syscall infrastructure. It seems a lot less painful to just add a > new syscall variant in the unlikely case we're going to increase the > sigset size. > > Signed-off-by: Christoph Hellwig Looks ok, Reviewed-by: Darrick J. Wong -

Re: [PATCH 7/9] aio: add delayed cancel support

2018-03-21 Thread Darrick J. Wong
> outside the context lock to avoid this reversal. > > Signed-off-by: Christoph Hellwig <h...@lst.de> > Acked-by: Jeff Moyer <jmo...@redhat.com> Looks ok, Reviewed-by: Darrick J. Wong <darrick.w...@oracle.com> --D > --- > fs/aio.c | 49 ++

Re: [PATCH 7/9] aio: add delayed cancel support

2018-03-21 Thread Darrick J. Wong
> outside the context lock to avoid this reversal. > > Signed-off-by: Christoph Hellwig > Acked-by: Jeff Moyer Looks ok, Reviewed-by: Darrick J. Wong --D > --- > fs/aio.c | 49 ++--- > 1 file changed, 38 insertions(+), 11 deletions(-) &

Re: [PATCH 06/28] aio: implement IOCB_CMD_POLL

2018-03-21 Thread Darrick J. Wong
eff Moyer <jmo...@redhat.com> Looks ok, Reviewed-by: Darrick J. Wong <darrick.w...@oracle.com> After this point in the series my familiarity with network code and sockets drops way off, so please don't be too surprised if I don't get any further

Re: [PATCH 06/28] aio: implement IOCB_CMD_POLL

2018-03-21 Thread Darrick J. Wong
irst 32 bits of the aio_buf field of the iocb. > > Unlike poll or epoll without EPOLLONESHOT this interface always works > in one shot mode, that is once the iocb is completed, it will have to be > resubmitted. > > Signed-off-by: Christoph Hellwig > Acked-by: Jeff Moyer Looks

Re: [PATCH 9/9] aio: implement IOCB_CMD_FSYNC and IOCB_CMD_FDSYNC

2018-03-21 Thread Darrick J. Wong
Looks ok, Reviewed-by: Darrick J. Wong <darrick.w...@oracle.com> --D > --- > fs/aio.c | 50 ++ > 1 file changed, 50 insertions(+) > > diff --git a/fs/aio.c b/fs/aio.c > index da87cbf7c67a..79d3eb3d2dd9 100644 > --- a/fs/aio.c &

Re: [PATCH 9/9] aio: implement IOCB_CMD_FSYNC and IOCB_CMD_FDSYNC

2018-03-21 Thread Darrick J. Wong
On Wed, Mar 21, 2018 at 08:32:32AM +0100, Christoph Hellwig wrote: > Simple workqueue offload for now, but prepared for adding a real aio_fsync > method if the need arises. Based on an earlier patch from Dave Chinner. > > Signed-off-by: Christoph Hellwig Looks ok, Reviewed-by: Dar

Re: [PATCH 03/28] fs: update documentation to mention __poll_t

2018-03-21 Thread Darrick J. Wong
led patch that updated the docs but dropped the actual code update)... ...so with that fixed, Reviewed-by: Darrick J. Wong <darrick.w...@oracle.com> --D > --- > Documentation/filesystems/Locking | 2 +- > Documentation/filesystems/vfs.txt | 2 +- > 2 files changed, 2 insertions(+

Re: [PATCH 03/28] fs: update documentation to mention __poll_t

2018-03-21 Thread Darrick J. Wong
ted the docs but dropped the actual code update)... ...so with that fixed, Reviewed-by: Darrick J. Wong --D > --- > Documentation/filesystems/Locking | 2 +- > Documentation/filesystems/vfs.txt | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/Docu

Re: [PATCH 05/28] fs: introduce new ->get_poll_head and ->poll_mask methods

2018-03-21 Thread Darrick J. Wong
h Hellwig <h...@lst.de> Looks ok, Reviewed-by: Darrick J. Wong <darrick.w...@oracle.com> --D > --- > Documentation/filesystems/Locking | 7 ++- > Documentation/filesystems/vfs.txt | 13 + > fs/select.c | 28 +++

Re: [PATCH 05/28] fs: introduce new ->get_poll_head and ->poll_mask methods

2018-03-21 Thread Darrick J. Wong
toph Hellwig Looks ok, Reviewed-by: Darrick J. Wong --D > --- > Documentation/filesystems/Locking | 7 ++- > Documentation/filesystems/vfs.txt | 13 + > fs/select.c | 28 > include/linux/fs.h|

Re: [PATCH 5/9] aio: simplify cancellation

2018-03-21 Thread Darrick J. Wong
*cancel) > } > EXPORT_SYMBOL(kiocb_set_cancel_fn); > > +/* > + * Only cancel if there ws a ki_cancel function to start with, and we > + * are the one how managed to clear it (to protect against simulatinious ^^^ ^^^^^ I hav

Re: [PATCH 5/9] aio: simplify cancellation

2018-03-21 Thread Darrick J. Wong
el_fn); > > +/* > + * Only cancel if there ws a ki_cancel function to start with, and we > + * are the one how managed to clear it (to protect against simulatinious ^^^ ^^^^^ I have the same complaint about how/who confusion an

Re: [PATCH 13/36] fs: introduce new ->get_poll_head and ->poll_mask methods

2018-03-19 Thread Darrick J. Wong
On Mon, Mar 05, 2018 at 01:27:20PM -0800, Christoph Hellwig wrote: > ->get_poll_head returns the waitqueue that the poll operation is going > to sleep on. Note that this means we can only use a single waitqueue > for the poll, unlike some current drivers that use two waitqueues for > different

Re: [PATCH 13/36] fs: introduce new ->get_poll_head and ->poll_mask methods

2018-03-19 Thread Darrick J. Wong
On Mon, Mar 05, 2018 at 01:27:20PM -0800, Christoph Hellwig wrote: > ->get_poll_head returns the waitqueue that the poll operation is going > to sleep on. Note that this means we can only use a single waitqueue > for the poll, unlike some current drivers that use two waitqueues for > different

Re: [PATCH 07/36] aio: add delayed cancel support

2018-03-19 Thread Darrick J. Wong
On Mon, Mar 05, 2018 at 01:27:14PM -0800, Christoph Hellwig wrote: > The upcoming aio poll support would like to be able to complete the > iocb inline from the cancellation context, but that would cause > a lock order reversal. Add support for optionally moving the cancelation > outside the

Re: [PATCH 07/36] aio: add delayed cancel support

2018-03-19 Thread Darrick J. Wong
On Mon, Mar 05, 2018 at 01:27:14PM -0800, Christoph Hellwig wrote: > The upcoming aio poll support would like to be able to complete the > iocb inline from the cancellation context, but that would cause > a lock order reversal. Add support for optionally moving the cancelation > outside the

Re: [PATCH 12/36] fs: add new vfs_poll and file_can_poll helpers

2018-03-19 Thread Darrick J. Wong
| 12 > mm/memcontrol.c | 2 +- For the fs/include/mm changes, Reviewed-by: Darrick J. Wong <darrick.w...@oracle.com> The other conversions look fine to me too but I've never looked at them before. :) --D > net/9p/trans_fd.c

Re: [PATCH 12/36] fs: add new vfs_poll and file_can_poll helpers

2018-03-19 Thread Darrick J. Wong
2 > mm/memcontrol.c | 2 +- For the fs/include/mm changes, Reviewed-by: Darrick J. Wong The other conversions look fine to me too but I've never looked at them before. :) --D > net/9p/trans_fd.c | 18 -- > virt/k

Re: [PATCH 11/36] fs: update documentation for __poll_t

2018-03-19 Thread Darrick J. Wong
On Mon, Mar 05, 2018 at 01:27:18PM -0800, Christoph Hellwig wrote: No commit message... "Update documentation to match the headers"? --D > Signed-off-by: Christoph Hellwig > --- > Documentation/filesystems/Locking | 2 +- > Documentation/filesystems/vfs.txt | 2 +- > 2 files

Re: [PATCH 11/36] fs: update documentation for __poll_t

2018-03-19 Thread Darrick J. Wong
On Mon, Mar 05, 2018 at 01:27:18PM -0800, Christoph Hellwig wrote: No commit message... "Update documentation to match the headers"? --D > Signed-off-by: Christoph Hellwig > --- > Documentation/filesystems/Locking | 2 +- > Documentation/filesystems/vfs.txt | 2 +- > 2 files changed, 2

Re: [PATCH 10/36] fs: cleanup do_pollfd

2018-03-19 Thread Darrick J. Wong
On Mon, Mar 05, 2018 at 01:27:17PM -0800, Christoph Hellwig wrote: > Use straigline code with failure handling gotos instead of a lot > of nested conditionals. > > Signed-off-by: Christoph Hellwig <h...@lst.de> Looks ok, Reviewed-by: Darrick J. Wong <darrick.w...@oracle.c

Re: [PATCH 10/36] fs: cleanup do_pollfd

2018-03-19 Thread Darrick J. Wong
On Mon, Mar 05, 2018 at 01:27:17PM -0800, Christoph Hellwig wrote: > Use straigline code with failure handling gotos instead of a lot > of nested conditionals. > > Signed-off-by: Christoph Hellwig Looks ok, Reviewed-by: Darrick J. Wong --D > --- >

Re: [PATCH 09/36] fs: unexport poll_schedule_timeout

2018-03-19 Thread Darrick J. Wong
On Mon, Mar 05, 2018 at 01:27:16PM -0800, Christoph Hellwig wrote: > No users outside of select.c. > > Signed-off-by: Christoph Hellwig <h...@lst.de> Looks ok, Reviewed-by: Darrick J. Wong <darrick.w...@oracle.com> --D > --- > fs/select.c | 3 +-- > in

Re: [PATCH 09/36] fs: unexport poll_schedule_timeout

2018-03-19 Thread Darrick J. Wong
On Mon, Mar 05, 2018 at 01:27:16PM -0800, Christoph Hellwig wrote: > No users outside of select.c. > > Signed-off-by: Christoph Hellwig Looks ok, Reviewed-by: Darrick J. Wong --D > --- > fs/select.c | 3 +-- > include/linux/poll.h | 2 -- > 2 files chang

Re: [PATCH 08/36] aio: implement io_pgetevents

2018-03-19 Thread Darrick J. Wong
On Mon, Mar 05, 2018 at 01:27:15PM -0800, Christoph Hellwig wrote: > This is the io_getevents equivalent of ppoll/pselect and allows to > properly mix signals and aio completions (especially with IOCB_CMD_POLL) > and atomically executes the following sequence: > > sigset_t origmask; > >

Re: [PATCH 08/36] aio: implement io_pgetevents

2018-03-19 Thread Darrick J. Wong
On Mon, Mar 05, 2018 at 01:27:15PM -0800, Christoph Hellwig wrote: > This is the io_getevents equivalent of ppoll/pselect and allows to > properly mix signals and aio completions (especially with IOCB_CMD_POLL) > and atomically executes the following sequence: > > sigset_t origmask; > >

Re: [PATCH 06/36] aio: delete iocbs from the active_reqs list in kiocb_cancel

2018-03-19 Thread Darrick J. Wong
d-by: Jeff Moyer <jmo...@redhat.com> Reviewed-by: Darrick J. Wong <darrick.w...@oracle.com> --D > --- > fs/aio.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/fs/aio.c b/fs/aio.c > index 2d40cf5dd4ec..0b6394b4e528 100644 > --- a/fs/a

Re: [PATCH 06/36] aio: delete iocbs from the active_reqs list in kiocb_cancel

2018-03-19 Thread Darrick J. Wong
oyer Reviewed-by: Darrick J. Wong --D > --- > fs/aio.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/fs/aio.c b/fs/aio.c > index 2d40cf5dd4ec..0b6394b4e528 100644 > --- a/fs/aio.c > +++ b/fs/aio.c > @@ -561,6 +561,8 @@ stati

Re: [PATCH 05/36] aio: simplify cancellation

2018-03-19 Thread Darrick J. Wong
*cancel) > } > EXPORT_SYMBOL(kiocb_set_cancel_fn); > > +/* > + * Only cancel if there ws a ki_cancel function to start with, and we > + * are the one how managed to clear it (to protect against simulatinious "...are the one who managed to clear it (to protect against simultaneous cancel

Re: [PATCH 05/36] aio: simplify cancellation

2018-03-19 Thread Darrick J. Wong
el_fn); > > +/* > + * Only cancel if there ws a ki_cancel function to start with, and we > + * are the one how managed to clear it (to protect against simulatinious "...are the one who managed to clear it (to protect against simultaneous cancel calls)." ? Really only complaining

Re: [PATCH 04/36] aio: sanitize ki_list handling

2018-03-19 Thread Darrick J. Wong
of ignoring it. > > Signed-off-by: Christoph Hellwig <h...@lst.de> > Acked-by: Jeff Moyer <jmo...@redhat.com> Reviewed-by: Darrick J. Wong <darrick.w...@oracle.com> --D > --- > fs/aio.c | 13 ++--- > 1 file changed, 6 insertions(+), 7 deletions(

Re: [PATCH 04/36] aio: sanitize ki_list handling

2018-03-19 Thread Darrick J. Wong
of ignoring it. > > Signed-off-by: Christoph Hellwig > Acked-by: Jeff Moyer Reviewed-by: Darrick J. Wong --D > --- > fs/aio.c | 13 ++--- > 1 file changed, 6 insertions(+), 7 deletions(-) > > diff --git a/fs/aio.c b/fs/aio.c > index 6295fc00f104..c32c315f

Re: [PATCH 03/36] aio: refactor read/write iocb setup

2018-03-19 Thread Darrick J. Wong
> fields. > > Signed-off-by: Christoph Hellwig <h...@lst.de> > Acked-by: Jeff Moyer <jmo...@redhat.com> Looks straightforward enough to me, Reviewed-by: Darrick J. Wong <darrick.w...@oracle.com> --D > --- > fs/aio.c | 171 > +

Re: [PATCH 03/36] aio: refactor read/write iocb setup

2018-03-19 Thread Darrick J. Wong
> fields. > > Signed-off-by: Christoph Hellwig > Acked-by: Jeff Moyer Looks straightforward enough to me, Reviewed-by: Darrick J. Wong --D > --- > fs/aio.c | 171 > --- > 1 file changed, 97 insertions(+)

Re: [PATCH 02/36] aio: remove an outdated comment in aio_complete

2018-03-19 Thread Darrick J. Wong
toph Hellwig <h...@lst.de> > Acked-by: Jeff Moyer <jmo...@redhat.com> Looks ok, Reviewed-by: Darrick J. Wong <darrick.w...@oracle.com> --D > --- > fs/aio.c | 11 ++- > 1 file changed, 2 insertions(+), 9 deletions(-) > > diff --git a/fs/aio.c b

Re: [PATCH 02/36] aio: remove an outdated comment in aio_complete

2018-03-19 Thread Darrick J. Wong
ristoph Hellwig > Acked-by: Jeff Moyer Looks ok, Reviewed-by: Darrick J. Wong --D > --- > fs/aio.c | 11 ++- > 1 file changed, 2 insertions(+), 9 deletions(-) > > diff --git a/fs/aio.c b/fs/aio.c > index 03d59593912d..41fc8ce6bc7f 100644 > --- a/fs/aio.c > +++

Re: [PATCH 01/36] aio: don't print the page size at boot time

2018-03-19 Thread Darrick J. Wong
..@redhat.com> Looks ok, Reviewed-by: Darrick J. Wong <darrick.w...@oracle.com> --D > --- > fs/aio.c | 3 --- > 1 file changed, 3 deletions(-) > > diff --git a/fs/aio.c b/fs/aio.c > index a062d75109cb..03d59593912d 100644 > --- a/fs/aio.c > +++ b/fs/aio

Re: [PATCH 01/36] aio: don't print the page size at boot time

2018-03-19 Thread Darrick J. Wong
On Mon, Mar 05, 2018 at 01:27:08PM -0800, Christoph Hellwig wrote: > The page size is in no way related to the aio code, and printing it in > the (debug) dmesg at every boot serves no purpose. > > Signed-off-by: Christoph Hellwig > Acked-by: Jeff Moyer Looks ok, Reviewed-by:

Re: [PATCH v6 12/15] xfs: require mmap lock for xfs_break_layouts()

2018-03-19 Thread Darrick J. Wong
On Mon, Mar 19, 2018 at 10:57:55AM -0700, Dan Williams wrote: > On Mon, Mar 19, 2018 at 10:33 AM, Darrick J. Wong > <darrick.w...@oracle.com> wrote: > > On Thu, Mar 15, 2018 at 08:52:29AM -0700, Dan Williams wrote: > >> In preparation for adding coordination

Re: [PATCH v6 12/15] xfs: require mmap lock for xfs_break_layouts()

2018-03-19 Thread Darrick J. Wong
On Mon, Mar 19, 2018 at 10:57:55AM -0700, Dan Williams wrote: > On Mon, Mar 19, 2018 at 10:33 AM, Darrick J. Wong > wrote: > > On Thu, Mar 15, 2018 at 08:52:29AM -0700, Dan Williams wrote: > >> In preparation for adding coordination between truncate operations and > &

Re: [PATCH v6 14/15] xfs: prepare xfs_break_layouts() for another layout type

2018-03-19 Thread Darrick J. Wong
ap. While BREAK_WRITE breaks can be satisfied > be recalling FL_LAYOUT leases, BREAK_TRUNCATE breaks additionally > require waiting for busy dax-pages to go idle. > > Cc: "Darrick J. Wong" <darrick.w...@oracle.com> > Cc: Ross Zwisler <ross.zwis...@linux.intel.com>

Re: [PATCH v6 14/15] xfs: prepare xfs_break_layouts() for another layout type

2018-03-19 Thread Darrick J. Wong
ap. While BREAK_WRITE breaks can be satisfied > be recalling FL_LAYOUT leases, BREAK_TRUNCATE breaks additionally > require waiting for busy dax-pages to go idle. > > Cc: "Darrick J. Wong" > Cc: Ross Zwisler > Reported-by: Dave Chinner > Reported-by: Christop

Re: [PATCH v6 12/15] xfs: require mmap lock for xfs_break_layouts()

2018-03-19 Thread Darrick J. Wong
mmap locks too -- definitely the exclusive mmap lock for the destination file because we anticipate punching out blocks. I'm not sure about the source file; I think taking the shared mmap lock is fine for that? --D > > Cc: "Darrick J. Wong" <darrick.w...@oracle.com> > Cc: Ro

Re: [PATCH v6 12/15] xfs: require mmap lock for xfs_break_layouts()

2018-03-19 Thread Darrick J. Wong
mmap locks too -- definitely the exclusive mmap lock for the destination file because we anticipate punching out blocks. I'm not sure about the source file; I think taking the shared mmap lock is fine for that? --D > > Cc: "Darrick J. Wong" > Cc: Ross Zwisler > Cc: Dave Chinn

Re: [RFC v2 03/83] Add super.h.

2018-03-16 Thread Darrick J. Wong
On Thu, Mar 15, 2018 at 11:17:54PM -0700, Andiry Xu wrote: > On Thu, Mar 15, 2018 at 7:59 PM, Theodore Y. Ts'o wrote: > > On Thu, Mar 15, 2018 at 09:38:29PM +0100, Arnd Bergmann wrote: > >> > >> You could also have a resolution of less than a nanosecond. Note > >> that today, the

Re: [RFC v2 03/83] Add super.h.

2018-03-16 Thread Darrick J. Wong
On Thu, Mar 15, 2018 at 11:17:54PM -0700, Andiry Xu wrote: > On Thu, Mar 15, 2018 at 7:59 PM, Theodore Y. Ts'o wrote: > > On Thu, Mar 15, 2018 at 09:38:29PM +0100, Arnd Bergmann wrote: > >> > >> You could also have a resolution of less than a nanosecond. Note > >> that today, the file time stamps

Re: [PATCH RFC] xfs, memcg: Call xfs_fs_nr_cached_objects() only in case of global reclaim

2018-03-15 Thread Darrick J. Wong
On Thu, Mar 15, 2018 at 06:01:34PM +0300, Kirill Tkhai wrote: > xfs_reclaim_inodes_count(XFS_M(sb)) does not care about memcg. > So, it's called for memcg reclaim too, e.g. this list is shrinked > disproportionality to another lists. > > This looks confusing, so I'm reporting about this. >

Re: [PATCH RFC] xfs, memcg: Call xfs_fs_nr_cached_objects() only in case of global reclaim

2018-03-15 Thread Darrick J. Wong
On Thu, Mar 15, 2018 at 06:01:34PM +0300, Kirill Tkhai wrote: > xfs_reclaim_inodes_count(XFS_M(sb)) does not care about memcg. > So, it's called for memcg reclaim too, e.g. this list is shrinked > disproportionality to another lists. > > This looks confusing, so I'm reporting about this. >

Re: [RFC v2 04/83] NOVA inode definition.

2018-03-14 Thread Darrick J. Wong
On Sat, Mar 10, 2018 at 10:17:45AM -0800, Andiry Xu wrote: > From: Andiry Xu > > inode.h defines the non-volatile and volatile NOVA inode data structures. > > The non-volatile NOVA inode (nova_inode) is aligned to 128 bytes and contains > file/directory metadata information.

Re: [RFC v2 04/83] NOVA inode definition.

2018-03-14 Thread Darrick J. Wong
On Sat, Mar 10, 2018 at 10:17:45AM -0800, Andiry Xu wrote: > From: Andiry Xu > > inode.h defines the non-volatile and volatile NOVA inode data structures. > > The non-volatile NOVA inode (nova_inode) is aligned to 128 bytes and contains > file/directory metadata information. The most important

Re: [RFC v2 03/83] Add super.h.

2018-03-14 Thread Darrick J. Wong
On Sat, Mar 10, 2018 at 10:17:44AM -0800, Andiry Xu wrote: > From: Andiry Xu > > This header file defines NOVA persistent and volatile superblock > data structures. > > It also defines NOVA block layout: > > Page 0: Superblock > Page 1: Reserved inodes > Page 2 - 15:

Re: [RFC v2 03/83] Add super.h.

2018-03-14 Thread Darrick J. Wong
On Sat, Mar 10, 2018 at 10:17:44AM -0800, Andiry Xu wrote: > From: Andiry Xu > > This header file defines NOVA persistent and volatile superblock > data structures. > > It also defines NOVA block layout: > > Page 0: Superblock > Page 1: Reserved inodes > Page 2 - 15: Reserved > Page 16 - 31:

[GIT PULL] xfs: fixes for 4.16-rc5

2018-03-08 Thread Darrick J. Wong
Hi Linus, Here's a few more fixes for locking problems and incorrect copy on write behaviors on 4.16. It should merge cleanly, but please let me know if it doesn't. --Darrick The following changes since commit 5b4c845ea4f4b86c43096eb924354c83a2e26f3c: xfs: fix potential memory leak in mount

[GIT PULL] xfs: fixes for 4.16-rc5

2018-03-08 Thread Darrick J. Wong
Hi Linus, Here's a few more fixes for locking problems and incorrect copy on write behaviors on 4.16. It should merge cleanly, but please let me know if it doesn't. --Darrick The following changes since commit 5b4c845ea4f4b86c43096eb924354c83a2e26f3c: xfs: fix potential memory leak in mount

Re: [PATCH] xfs: Correctly invert xfs_buftarg LRU isolation logic

2018-03-06 Thread Darrick J. Wong
;bfos...@redhat.com> > Reviewed-by: Darrick J. Wong <darrick.w...@oracle.com> Looks ok, tests ok... Reviewed-by: Darrick J. Wong <darrick.w...@oracle.com> --D > --- > fs/xfs/xfs_buf.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a

Re: [PATCH] xfs: Correctly invert xfs_buftarg LRU isolation logic

2018-03-06 Thread Darrick J. Wong
buffers end up right back on the LRU > once they are released, because b_lru_ref remains elevated. > > Fix that circuitous route by leaving them on the LRU > as originally intended. > > Signed-off-by: Vratislav Bendel > Reviewed-by: Brian Foster > Reviewed-by: Darrick J

Re: [PATCH] xfs: Correctly invert xfs_buftarg LRU isolation logic

2018-03-05 Thread Darrick J. Wong
ed for this comma > isolating buffers with non-zero b_lru_ref. > > Additionally those isolated buffers end up right back on the LRU > once they are released, because ->b_lru_ref remains elevated. > > Fix that circuitous route by leaving them on the LRU > as original

<    2   3   4   5   6   7   8   9   10   11   >