Re: [Linux-cachefs] [PATCH 02/11] xfs: add NOWAIT semantics for readdir

2023-09-03 Thread Dave Chinner
On Sun, Aug 27, 2023 at 09:28:26PM +0800, Hao Xu wrote: > From: Hao Xu > > Implement NOWAIT semantics for readdir. Return EAGAIN error to the > caller if it would block, like failing to get locks, or going to > do IO. > > Co-developed-by: Dave Chinner Not really. "Co-developed" implies equal

Re: [Linux-cachefs] [PATCH 02/11] xfs: add NOWAIT semantics for readdir

2023-08-30 Thread Hao Xu
On 8/28/23 04:44, Matthew Wilcox wrote: On Sun, Aug 27, 2023 at 09:28:26PM +0800, Hao Xu wrote: +++ b/fs/xfs/libxfs/xfs_da_btree.c @@ -2643,16 +2643,32 @@ xfs_da_read_buf( struct xfs_buf_map map, *mapp = int nmap = 1; int

[Linux-cachefs] [PATCH 02/11] xfs: add NOWAIT semantics for readdir

2023-08-30 Thread Hao Xu
From: Hao Xu Implement NOWAIT semantics for readdir. Return EAGAIN error to the caller if it would block, like failing to get locks, or going to do IO. Co-developed-by: Dave Chinner Signed-off-by: Dave Chinner Signed-off-by: Hao Xu [fixes deadlock issue, tweak code style] ---

Re: [Linux-cachefs] [PATCH 02/11] xfs: add NOWAIT semantics for readdir

2023-08-29 Thread Matthew Wilcox
On Tue, Aug 29, 2023 at 03:41:43PM +0800, Hao Xu wrote: > On 8/28/23 04:44, Matthew Wilcox wrote: > > > @@ -391,10 +401,17 @@ xfs_dir2_leaf_getdents( > > > bp = NULL; > > > } > > > - if (*lock_mode == 0) > > > -

Re: [Linux-cachefs] [PATCH 02/11] xfs: add NOWAIT semantics for readdir

2023-08-27 Thread Matthew Wilcox
On Sun, Aug 27, 2023 at 09:28:26PM +0800, Hao Xu wrote: > +++ b/fs/xfs/libxfs/xfs_da_btree.c > @@ -2643,16 +2643,32 @@ xfs_da_read_buf( > struct xfs_buf_map map, *mapp = > int nmap = 1; > int error; > + int