Re: [Cluster-devel] [PATCH 02/14] fs/buffer: add some new buffer read helpers

2022-08-31 Thread Jan Kara
On Wed 31-08-22 15:20:59, Zhang Yi wrote: > Current ll_rw_block() helper is fragile because it assumes that locked > buffer means it's under IO which is submitted by some other who hold > the lock, it skip buffer if it failed to get the lock, so it's only > safe on the readahead path.

Re: [Cluster-devel] [PATCH 08/14] ocfs2: replace ll_rw_block()

2022-08-31 Thread Jan Kara
On Wed 31-08-22 15:21:05, Zhang Yi wrote: > ll_rw_block() is not safe for the sync read path because it cannot > guarantee that submitting read IO if the buffer has been locked. We > could get false positive EIO after wait_on_buffer() if the buffer has > been locked by others. So stop using

Re: [Cluster-devel] [PATCH 14/14] fs/buffer: remove bh_submit_read() helper

2022-08-31 Thread Jan Kara
On Wed 31-08-22 15:21:11, Zhang Yi wrote: > bh_submit_read() has no user anymore, just remove it. > > Signed-off-by: Zhang Yi Looks good. Feel free to add: Reviewed-by: Jan Kara Honza > --- > fs/buffer.c | 25

Re: [Cluster-devel] [PATCH 13/14] ext2: replace bh_submit_read() helper with bh_read_locked()

2022-08-31 Thread Jan Kara
On Wed 31-08-22 15:21:10, Zhang Yi wrote: > bh_submit_read() is almost the same as bh_read_locked(), switch to use > bh_read_locked() in read_block_bitmap(), prepare remove the old one. > > Signed-off-by: Zhang Yi ... > diff --git a/fs/ext2/balloc.c b/fs/ext2/balloc.c > index

Re: [Cluster-devel] [PATCH 12/14] fs/buffer: remove ll_rw_block() helper

2022-08-31 Thread Jan Kara
On Wed 31-08-22 15:21:09, Zhang Yi wrote: > Now that all ll_rw_block() users has been replaced to new safe helpers, > we just remove it here. > > Signed-off-by: Zhang Yi Looks good. Feel free to add: Reviewed-by: Jan Kara Honza

Re: [Cluster-devel] [PATCH 11/14] ufs: replace ll_rw_block()

2022-08-31 Thread Jan Kara
On Wed 31-08-22 15:21:08, Zhang Yi wrote: > ll_rw_block() is not safe for the sync read path because it cannot > guarantee that submitting read IO if the buffer has been locked. We > could get false positive EIO after wait_on_buffer() if the buffer has > been locked by others. So stop using

Re: [Cluster-devel] [PATCH 10/14] udf: replace ll_rw_block()

2022-08-31 Thread Jan Kara
On Wed 31-08-22 15:21:07, Zhang Yi wrote: > ll_rw_block() is not safe for the sync read path because it cannot > guarantee that submitting read IO if the buffer has been locked. We > could get false positive EIO after wait_on_buffer() if the buffer has > been locked by others. So stop using

Re: [Cluster-devel] [PATCH 09/14] reiserfs: replace ll_rw_block()

2022-08-31 Thread Jan Kara
On Wed 31-08-22 15:21:06, Zhang Yi wrote: > ll_rw_block() is not safe for the sync read/write path because it cannot > guarantee that submitting read/write IO if the buffer has been locked. > We could get false positive EIO after wait_on_buffer() in read path if > the buffer has been locked by

Re: [Cluster-devel] [PATCH 07/14] ntfs3: replace ll_rw_block()

2022-08-31 Thread Jan Kara
On Wed 31-08-22 15:21:04, Zhang Yi wrote: > ll_rw_block() is not safe for the sync read path because it cannot > guarantee that submitting read IO if the buffer has been locked. We > could get false positive EIO after wait_on_buffer() if the buffer has > been locked by others. So stop using

Re: [Cluster-devel] [PATCH 06/14] jbd2: replace ll_rw_block()

2022-08-31 Thread Jan Kara
On Wed 31-08-22 15:21:03, Zhang Yi wrote: > ll_rw_block() is not safe for the sync read path because it cannot > guarantee that submitting read IO if the buffer has been locked. We > could get false positive EIO after wait_on_buffer() if the buffer has > been locked by others. So stop using

Re: [Cluster-devel] [PATCH 05/14] isofs: replace ll_rw_block()

2022-08-31 Thread Jan Kara
On Wed 31-08-22 15:21:02, Zhang Yi wrote: > ll_rw_block() is not safe for the sync read path because it cannot > guarantee that submitting read IO if the buffer has been locked. We > could get false positive EIO return from zisofs_uncompress_block() if > he buffer has been locked by others. So

Re: [Cluster-devel] [PATCH 04/14] gfs2: replace ll_rw_block()

2022-08-31 Thread Jan Kara
On Wed 31-08-22 15:21:01, Zhang Yi wrote: > ll_rw_block() is not safe for the sync read path because it cannot > guarantee that always submitting read IO if the buffer has been locked, > so stop using it. We also switch to new bh_readahead() helper for the > readahead path. > > Signed-off-by:

Re: [Cluster-devel] [PATCH 03/14] fs/buffer: replace ll_rw_block()

2022-08-31 Thread Jan Kara
On Wed 31-08-22 15:21:00, Zhang Yi wrote: > ll_rw_block() is not safe for the sync IO path because it skip buffers > which has been locked by others, it could lead to false positive EIO > when submitting read IO. So stop using ll_rw_block(), switch to use new > helpers which could guarantee buffer

Re: [Cluster-devel] [PATCH 01/14] fs/buffer: remove __breadahead_gfp()

2022-08-31 Thread Jan Kara
On Wed 31-08-22 15:20:58, Zhang Yi wrote: > No one use __breadahead_gfp() and sb_breadahead_unmovable() any more, > remove them. > > Signed-off-by: Zhang Yi Looks good. Feel free to add: Reviewed-by: Jan Kara Honza > --- >