Re: [Cluster-devel] [PATCH RFC v5 00/29] io_uring getdents

2023-08-25 Thread Dave Chinner
On Fri, Aug 25, 2023 at 09:54:02PM +0800, Hao Xu wrote: > From: Hao Xu > > This series introduce getdents64 to io_uring, the code logic is similar > with the snychronized version's. It first try nowait issue, and offload > it to io-wq threads if the first try fails. > > Patch1 and Patch2 are

Re: [Cluster-devel] [PATCH 25/29] xfs: support nowait for xfs_buf_item_init()

2023-08-25 Thread Dave Chinner
On Fri, Aug 25, 2023 at 09:54:27PM +0800, Hao Xu wrote: > From: Hao Xu > > support nowait for xfs_buf_item_init() and error out -EAGAIN to > _xfs_trans_bjoin() when it would block. > > Signed-off-by: Hao Xu > --- > fs/xfs/xfs_buf_item.c | 9 +++-- > fs/xfs/xfs_buf_item.h

Re: [Cluster-devel] [PATCH 28/29] xfs: support nowait semantics for xc_ctx_lock in xlog_cil_commit()

2023-08-25 Thread Dave Chinner
On Fri, Aug 25, 2023 at 09:54:30PM +0800, Hao Xu wrote: > From: Hao Xu > > Apply trylock logic for xc_ctx_lock in xlog_cil_commit() in nowait > case and error out -EAGAIN for xlog_cil_commit(). Again, fundamentally broken. Any error from xlog_cil_commit() will result in a filesystem shutdown as

Re: [Cluster-devel] [PATCH 26/29] xfs: return -EAGAIN when nowait meets sync in transaction commit

2023-08-25 Thread Dave Chinner
On Fri, Aug 25, 2023 at 09:54:28PM +0800, Hao Xu wrote: > From: Hao Xu > > if the log transaction is a sync one, let's fail the nowait try and > return -EAGAIN directly since sync transaction means blocked by IO. > > Signed-off-by: Hao Xu > --- > fs/xfs/xfs_trans.c | 14 +- > 1

Re: [Cluster-devel] [PATCH 24/29] xfs: support nowait for xfs_buf_read_map()

2023-08-25 Thread Dave Chinner
On Fri, Aug 25, 2023 at 09:54:26PM +0800, Hao Xu wrote: > From: Hao Xu > > This causes xfstests generic/232 hung in umount process, waiting for ail > push, so I comment it for now, need some hints from xfs folks. > Not a real patch. > > Signed-off-by: Hao Xu > --- > fs/xfs/xfs_buf.c | 7

Re: [Cluster-devel] [PATCH 02/29] xfs: rename XBF_TRYLOCK to XBF_NOWAIT

2023-08-25 Thread Dave Chinner
On Fri, Aug 25, 2023 at 09:54:04PM +0800, Hao Xu wrote: > From: Hao Xu > > XBF_TRYLOCK means we need lock but don't block on it, Yes. > we can use it to > stand for not waiting for memory allcation. Rename XBF_TRYLOCK to > XBF_NOWAIT, which is more generic. No. Not only can XBF_TRYLOCK

Re: [Cluster-devel] [PATCH 1/7] lockd: introduce safe async lock op

2023-08-25 Thread Chuck Lever
On Wed, Aug 23, 2023 at 05:33:46PM -0400, Alexander Aring wrote: > This patch reverts mostly commit 40595cdc93ed ("nfs: block notification > on fs with its own ->lock") and introduces an EXPORT_OP_SAFE_ASYNC_LOCK > export flag to signal that the "own ->lock" implementation supports > async lock

Re: [Cluster-devel] [PATCH 3/7] lockd: fix race in async lock request handling

2023-08-25 Thread Chuck Lever
On Wed, Aug 23, 2023 at 05:33:48PM -0400, Alexander Aring wrote: > This patch fixes a race in async lock request handling between adding > the relevant struct nlm_block to nlm_blocked list after the request was > sent by vfs_lock_file() and nlmsvc_grant_deferred() does a lookup of the > nlm_block

Re: [Cluster-devel] [PATCH 6/7] dlm: use FL_SLEEP to determine blocking vs non-blocking

2023-08-25 Thread Jeff Layton
On Wed, 2023-08-23 at 17:33 -0400, Alexander Aring wrote: > This patch uses the FL_SLEEP flag in struct file_lock to determine if > the lock request is a blocking or non-blocking request. Before dlm was > using IS_SETLKW() was being used which is not usable for lock requests > coming from lockd

Re: [Cluster-devel] [PATCH 4/7] lockd: add doc to enable EXPORT_OP_SAFE_ASYNC_LOCK

2023-08-25 Thread Jeff Layton
On Wed, 2023-08-23 at 17:33 -0400, Alexander Aring wrote: > This patch adds a note to enable EXPORT_OP_SAFE_ASYNC_LOCK for > asynchronous lock request handling. > > Signed-off-by: Alexander Aring > --- > fs/locks.c | 12 +++- > 1 file changed, 7 insertions(+), 5 deletions(-) > > diff

Re: [Cluster-devel] [PATCH 3/7] lockd: fix race in async lock request handling

2023-08-25 Thread Jeff Layton
On Wed, 2023-08-23 at 17:33 -0400, Alexander Aring wrote: > This patch fixes a race in async lock request handling between adding > the relevant struct nlm_block to nlm_blocked list after the request was > sent by vfs_lock_file() and nlmsvc_grant_deferred() does a lookup of the > nlm_block in the

Re: [Cluster-devel] [PATCH 1/7] lockd: introduce safe async lock op

2023-08-25 Thread Jeff Layton
On Wed, 2023-08-23 at 17:33 -0400, Alexander Aring wrote: > This patch reverts mostly commit 40595cdc93ed ("nfs: block notification > on fs with its own ->lock") and introduces an EXPORT_OP_SAFE_ASYNC_LOCK > export flag to signal that the "own ->lock" implementation supports > async lock requests.

Re: [Cluster-devel] [PATCH 2/7] lockd: don't call vfs_lock_file() for pending requests

2023-08-25 Thread Jeff Layton
On Wed, 2023-08-23 at 17:33 -0400, Alexander Aring wrote: > This patch returns nlm_lck_blocked in nlmsvc_lock() when an asynchronous > lock request is pending. During testing I ran into the case with the > side-effects that lockd is waiting for only one lm_grant() callback > because it's already

Re: [Cluster-devel] [PATCH RFC v5 00/29] io_uring getdents

2023-08-25 Thread Darrick J. Wong
On Fri, Aug 25, 2023 at 09:54:02PM +0800, Hao Xu wrote: > From: Hao Xu > > This series introduce getdents64 to io_uring, the code logic is similar > with the snychronized version's. It first try nowait issue, and offload > it to io-wq threads if the first try fails. NAK on the entire series

Re: [Cluster-devel] [PATCH 22/29] xfs: comment page allocation for nowait case in xfs_buf_find_insert()

2023-08-25 Thread Matthew Wilcox
On Fri, Aug 25, 2023 at 09:54:24PM +0800, Hao Xu wrote: > @@ -633,6 +633,8 @@ xfs_buf_find_insert( >* allocate the memory from the heap to minimise memory usage. If we >* can't get heap memory for these small buffers, we fall back to using >* the page allocator. > + *

Re: [Cluster-devel] [PATCH 12/29] xfs: enforce GFP_NOIO implicitly during nowait time update

2023-08-25 Thread Matthew Wilcox
On Fri, Aug 25, 2023 at 09:54:14PM +0800, Hao Xu wrote: > +++ b/fs/xfs/xfs_iops.c > @@ -1037,6 +1037,8 @@ xfs_vn_update_time( > int log_flags = XFS_ILOG_TIMESTAMP; > struct xfs_trans*tp; > int error; > + int

Re: [Cluster-devel] [PATCH dlm/next] dlm: fix plock lookup when using multiple lockspaces

2023-08-25 Thread Alexander Aring
Hi, On Thu, Aug 24, 2023 at 7:22 PM Alexander Aring wrote: ... > > The reason why I probably never saw it is because those fields in my > tests are always the same and we simply don't compare all fields on > the sanity check. I need to correct some things here... the patch works, but the commit