Re: [Cluster-devel] [PATCH 03/12] filemap: update ki_pos in generic_perform_write

2023-08-27 Thread Al Viro
On Thu, Jun 01, 2023 at 04:58:55PM +0200, Christoph Hellwig wrote: > All callers of generic_perform_write need to updated ki_pos, move it into > common code. > @@ -4034,7 +4037,6 @@ ssize_t __generic_file_write_iter(struct kiocb *iocb, > struct iov_iter *from) > endbyte = pos + stat

Re: [Cluster-devel] [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 buf

Re: [Cluster-devel] [PATCH 04/11] vfs: add a vfs helper for io_uring file pos lock

2023-08-27 Thread Matthew Wilcox
On Sun, Aug 27, 2023 at 09:28:28PM +0800, Hao Xu wrote: > +++ b/include/linux/file.h > @@ -81,6 +81,8 @@ static inline void fdput_pos(struct fd f) > fdput(f); > } > > +extern int file_pos_lock_nowait(struct file *file, bool nowait); No extern on function declarations.

Re: [Cluster-devel] [PATCH 09/11] vfs: error out -EAGAIN if atime needs to be updated

2023-08-27 Thread Matthew Wilcox
On Sun, Aug 27, 2023 at 09:28:33PM +0800, Hao Xu wrote: > From: Hao Xu > > To enforce nowait semantics, error out -EAGAIN if atime needs to be > updated. Squash this into patch 6. Otherwise patch 6 makes no sense.

Re: [Cluster-devel] [PATCH 07/11] vfs: add nowait parameter for file_accessed()

2023-08-27 Thread Matthew Wilcox
On Sun, Aug 27, 2023 at 09:28:31PM +0800, Hao Xu wrote: > From: Hao Xu > > Add a boolean parameter for file_accessed() to support nowait semantics. > Currently it is true only with io_uring as its initial caller. So why do we need to do this as part of this series? Apparently it hasn't caused a

Re: [Cluster-devel] [PATCH 03/12] filemap: update ki_pos in generic_perform_write

2023-08-27 Thread Al Viro
On Sun, Aug 27, 2023 at 08:41:22PM +0100, Al Viro wrote: > On Thu, Jun 01, 2023 at 04:58:55PM +0200, Christoph Hellwig wrote: > > All callers of generic_perform_write need to updated ki_pos, move it into > > common code. > > > @@ -4034,7 +4037,6 @@ ssize_t __generic_file_write_iter(struct kiocb *i

Re: [Cluster-devel] [PATCH 03/12] filemap: update ki_pos in generic_perform_write

2023-08-27 Thread Al Viro
On Sun, Aug 27, 2023 at 08:41:22PM +0100, Al Viro wrote: > That part is somewhat fishy - there's a case where you return a positive value > and advance ->ki_pos by more than that amount. I really wonder if all callers > of ->write_iter() are OK with that. Speaking of which, in case of negative r