[Cluster-devel] [PATCH v7 14/20] md: raid1: use __bio_add_page for adding single page to bio

2023-05-31 Thread Johannes Thumshirn
() as __must_check. Reviewed-by: Christoph Hellwig Reviewed-by: Damien Le Moal Acked-by: Song Liu Signed-off-by: Johannes Thumshirn --- drivers/md/raid1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c index 8283ef177f6c..ff89839455ec

[Cluster-devel] [PATCH v7 10/20] zonefs: use __bio_add_page for adding single page to bio

2023-05-31 Thread Johannes Thumshirn
bio_add_page() as __must_check. Acked-by: Damien Le Moal Reviewed-by: Christoph Hellwig Signed-off-by: Johannes Thumshirn --- fs/zonefs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/zonefs/super.c b/fs/zonefs/super.c index 23b8b299c64e..9350221abfc5 100644 --- a/fs

[Cluster-devel] [PATCH v7 04/20] fs: buffer: use __bio_add_page to add single page to bio

2023-05-31 Thread Johannes Thumshirn
bio_add_page() as __must_check. Reviewed-by: Gou Hao Reviewed-by: Christoph Hellwig Reviewed-by: Damien Le Moal Signed-off-by: Johannes Thumshirn --- fs/buffer.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/buffer.c b/fs/buffer.c index a7fc561758b1..63da30ce946a 100644

[Cluster-devel] [PATCH v7 16/20] dm-crypt: use __bio_add_page to add single page to clone bio

2023-05-31 Thread Johannes Thumshirn
crypt_alloc_buffer() already allocates enough entries in the clone bio's vector, so adding a page to the bio can't fail. Use __bio_add_page() to reflect this. Signed-off-by: Johannes Thumshirn --- drivers/md/dm-crypt.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git

[Cluster-devel] [PATCH v7 17/20] block: mark bio_add_page as __must_check

2023-05-31 Thread Johannes Thumshirn
Now that all users of bio_add_page check for the return value, mark bio_add_page as __must_check. Reviewed-by: Damien Le Moal Signed-off-by: Johannes Thumshirn --- include/linux/bio.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/linux/bio.h b/include/linux

[Cluster-devel] [PATCH v7 05/20] md: use __bio_add_page to add single page

2023-05-31 Thread Johannes Thumshirn
bio_add_page() as __must_check. Signed-of_-by: Johannes Thumshirn Reviewed-by: Damien Le Moal Reviewed-by: Christoph Hellwig Acked-by: Song Liu --- drivers/md/md.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/md/md.c b/drivers/md/md.c index 8e344b4b3444

[Cluster-devel] [PATCH v7 19/20] fs: iomap: use bio_add_folio_nofail where possible

2023-05-31 Thread Johannes Thumshirn
. Reviewed-by: Christoph Hellwig Reviewed-by: Matthew Wilcox (Oracle) Signed-off-by: Johannes Thumshirn --- fs/iomap/buffered-io.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c index 063133ec77f4..0edab9deae2a 100644 --- a/fs

[Cluster-devel] [PATCH v7 08/20] jfs: logmgr: use __bio_add_page to add single page to bio

2023-05-31 Thread Johannes Thumshirn
() as __must_check. Reviewed-by: Damien Le Moal Acked-by: Dave Kleikamp Reviewed-by: Christoph Hellwig Signed-off-by: Johannes Thumshirn --- fs/jfs/jfs_logmgr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/jfs/jfs_logmgr.c b/fs/jfs/jfs_logmgr.c index 695415cbfe98

Re: [Cluster-devel] [PATCH v6 00/20] bio: check return values of bio_add_page

2023-05-31 Thread Johannes Thumshirn
Oops I've accidentally re-send v6 instead of v7. My apologies.

[Cluster-devel] [PATCH v7 13/20] md: check for failure when adding pages in alloc_behind_master_bio

2023-05-31 Thread Johannes Thumshirn
Signed-off-by: Johannes Thumshirn --- drivers/md/raid1.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c index 68a9e2d9985b..8283ef177f6c 100644 --- a/drivers/md/raid1.c +++ b/drivers/md/raid1.c @@ -1147,7 +1147,10 @@ static void

[Cluster-devel] [PATCH v7 03/20] dm: dm-zoned: use __bio_add_page for adding single metadata page

2023-05-31 Thread Johannes Thumshirn
-by: Johannes Thumshirn --- drivers/md/dm-zoned-metadata.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/md/dm-zoned-metadata.c b/drivers/md/dm-zoned-metadata.c index 8f0896a6990b..9d3cca8e3dc9 100644 --- a/drivers/md/dm-zoned-metadata.c +++ b/drivers/md/dm

[Cluster-devel] [PATCH v7 15/20] md: raid1: check if adding pages to resync bio fails

2023-05-31 Thread Johannes Thumshirn
as __must_check. Reviewed-by: Damien Le Moal Acked-by: Song Liu Signed-off-by: Johannes Thumshirn --- drivers/md/raid1-10.c | 11 ++- drivers/md/raid10.c | 20 ++-- 2 files changed, 16 insertions(+), 15 deletions(-) diff --git a/drivers/md/raid1-10.c b/drivers/md

[Cluster-devel] [PATCH v7 18/20] block: add bio_add_folio_nofail

2023-05-31 Thread Johannes Thumshirn
Just like for bio_add_pages() add a no-fail variant for bio_add_folio(). Reviewed-by: Matthew Wilcox (Oracle) Signed-off-by: Johannes Thumshirn --- block/bio.c | 8 include/linux/bio.h | 2 ++ 2 files changed, 10 insertions(+) diff --git a/block/bio.c b/block/bio.c index

[Cluster-devel] [PATCH v7 02/20] drbd: use __bio_add_page to add page to bio

2023-05-31 Thread Johannes Thumshirn
The drbd code only adds a single page to a newly created bio. So use __bio_add_page() to add the page which is guaranteed to succeed in this case. This brings us closer to marking bio_add_page() as __must_check. Reviewed-by: Damien Le Moal Signed-off-by: Johannes Thumshirn --- drivers/block

[Cluster-devel] [PATCH v7 06/20] md: raid5-log: use __bio_add_page to add single page

2023-05-31 Thread Johannes Thumshirn
bio_add_page() as __must_check. Reviewed-by: Christoph Hellwig Reviewed-by: Damien Le Moal Acked-by: Song Liu Signed-off-by: Johannes Thumshirn --- drivers/md/raid5-cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/md/raid5-cache.c b/drivers/md/raid5-cache.c

[Cluster-devel] [PATCH v7 09/20] gfs2: use __bio_add_page for adding single page to bio

2023-05-31 Thread Johannes Thumshirn
bio_add_page() as __must_check. Reviewed-by: Damien Le Moal Reviewed-by: Andreas Gruenbacher Reviewed-by: Christoph Hellwig Signed-off-by: Johannes Thumshirn --- fs/gfs2/ops_fstype.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c index

[Cluster-devel] [PATCH v7 00/20] bio: check return values of bio_add_page

2023-05-31 Thread Johannes Thumshirn
- Changed commit messages pointed out by Damien - Colledted Damien's Reviews and Acks Johannes Thumshirn (20): swap: use __bio_add_page to add page to bio drbd: use __bio_add_page to add page to bio dm: dm-zoned: use __bio_add_page for adding single metadata page fs: buffer: use __bio_add_page

[Cluster-devel] [PATCH v7 20/20] block: mark bio_add_folio as __must_check

2023-05-31 Thread Johannes Thumshirn
Now that all callers of bio_add_folio() check the return value, mark it as __must_check. Reviewed-by: Matthew Wilcox (Oracle) Signed-off-by: Johannes Thumshirn --- include/linux/bio.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/include/linux/bio.h b/include/linux

[Cluster-devel] [PATCH v7 07/20] md: raid5: use __bio_add_page to add single page to new bio

2023-05-31 Thread Johannes Thumshirn
a single page to a newly created bio is guaranteed to succeed. This brings us a step closer to marking bio_add_page() as __must_check. Reviewed-by: Christoph Hellwig Reviewed-by: Damien Le Moal Acked-by: Song Liu Signed-off-by: Johannes Thumshirn --- drivers/md/raid5-ppl.c | 4 ++-- 1 file

[Cluster-devel] [PATCH v7 12/20] floppy: use __bio_add_page for adding single page to bio

2023-05-31 Thread Johannes Thumshirn
() as __must_check. Reviewed-by: Christoph Hellwig Reviewed-by: Damien Le Moal Signed-off-by: Johannes Thumshirn --- drivers/block/floppy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index cec2c20f5e59..28ec6b442e9c 100644

[Cluster-devel] [PATCH v7 11/20] zram: use __bio_add_page for adding single page to bio

2023-05-31 Thread Johannes Thumshirn
() as __must_check. Reviewed-by: Damien Le Moal Reviewed-by: Sergey Senozhatsky Reviewed-by: Christoph Hellwig Signed-off-by: Johannes Thumshirn --- drivers/block/zram/zram_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram

[Cluster-devel] [PATCH v7 01/20] swap: use __bio_add_page to add page to bio

2023-05-31 Thread Johannes Thumshirn
The swap code only adds a single page to a newly created bio. So use __bio_add_page() to add the page which is guaranteed to succeed in this case. This brings us closer to marking bio_add_page() as __must_check. Reviewed-by: Damien Le Moal Reviewed-by: Christoph Hellwig Signed-off-by: Johannes

Re: [Cluster-devel] [PATCH 01/12] backing_dev: remove current->backing_dev_info

2023-05-31 Thread Johannes Thumshirn
Looks good, Reviewed-by: Johannes Thumshirn

Re: [Cluster-devel] [PATCH v6 16/20] dm-crypt: check if adding pages to clone bio fails

2023-05-30 Thread Johannes Thumshirn
On 30.05.23 18:10, Mike Snitzer wrote: > On Tue, May 30 2023 at 11:49P -0400, > Johannes Thumshirn wrote: > >> Check if adding pages to clone bio fails and if it does retry with >> reclaim. This mirrors the behaviour of page allocation in >> crypt_alloc_buffer(). >

[Cluster-devel] [PATCH v6 20/20] block: mark bio_add_folio as __must_check

2023-05-30 Thread Johannes Thumshirn
Now that all callers of bio_add_folio() check the return value, mark it as __must_check. Signed-off-by: Johannes Thumshirn --- include/linux/bio.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/bio.h b/include/linux/bio.h index 4232a17e6b10..fef9f3085a02

[Cluster-devel] [PATCH v6 18/20] block: add __bio_add_folio

2023-05-30 Thread Johannes Thumshirn
Just like for bio_add_pages() add a no-fail variant for bio_add_folio(). Signed-off-by: Johannes Thumshirn --- block/bio.c | 8 include/linux/bio.h | 1 + 2 files changed, 9 insertions(+) diff --git a/block/bio.c b/block/bio.c index 043944fd46eb..350c653d4a57 100644

[Cluster-devel] [PATCH v6 19/20] fs: iomap: use __bio_add_folio where possible

2023-05-30 Thread Johannes Thumshirn
-off-by: Johannes Thumshirn --- fs/iomap/buffered-io.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c index 063133ec77f4..42c5fc0ad329 100644 --- a/fs/iomap/buffered-io.c +++ b/fs/iomap/buffered-io.c @@ -312,7 +312,7 @@ static

[Cluster-devel] [PATCH v6 15/20] md: raid1: check if adding pages to resync bio fails

2023-05-30 Thread Johannes Thumshirn
Check if adding pages to resync bio fails and if bail out. As the comment above suggests this cannot happen, WARN if it actually happens. This way we can mark bio_add_pages as __must_check. Reviewed-by: Damien Le Moal Acked-by: Song Liu Signed-off-by: Johannes Thumshirn --- drivers/md/raid1

[Cluster-devel] [PATCH v6 13/20] md: check for failure when adding pages in alloc_behind_master_bio

2023-05-30 Thread Johannes Thumshirn
alloc_behind_master_bio() can possibly add multiple pages to a bio, but it is not checking for the return value of bio_add_page() if adding really succeeded. Check if the page adding succeeded and if not bail out. Reviewed-by: Damien Le Moal Signed-off-by: Johannes Thumshirn --- drivers/md

[Cluster-devel] [PATCH v6 14/20] md: raid1: use __bio_add_page for adding single page to bio

2023-05-30 Thread Johannes Thumshirn
() as __must_check. Reviewed-by: Damien Le Moal Acked-by: Song Liu Signed-off-by: Johannes Thumshirn --- drivers/md/raid1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c index 8283ef177f6c..ff89839455ec 100644 --- a/drivers/md/raid1.c

[Cluster-devel] [PATCH v6 17/20] block: mark bio_add_page as __must_check

2023-05-30 Thread Johannes Thumshirn
Now that all users of bio_add_page check for the return value, mark bio_add_page as __must_check. Reviewed-by: Damien Le Moal Signed-off-by: Johannes Thumshirn --- include/linux/bio.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/bio.h b/include/linux/bio.h

[Cluster-devel] [PATCH v6 12/20] floppy: use __bio_add_page for adding single page to bio

2023-05-30 Thread Johannes Thumshirn
() as __must_check. Reviewed-by: Damien Le Moal Signed-off-by: Johannes Thumshirn --- drivers/block/floppy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index cec2c20f5e59..28ec6b442e9c 100644 --- a/drivers/block/floppy.c +++ b/drivers

[Cluster-devel] [PATCH v6 07/20] md: raid5: use __bio_add_page to add single page to new bio

2023-05-30 Thread Johannes Thumshirn
a single page to a newly created bio is guaranteed to succeed. This brings us a step closer to marking bio_add_page() as __must_check. Reviewed-by: Damien Le Moal Acked-by: Song Liu Signed-off-by: Johannes Thumshirn --- drivers/md/raid5-ppl.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[Cluster-devel] [PATCH v6 16/20] dm-crypt: check if adding pages to clone bio fails

2023-05-30 Thread Johannes Thumshirn
Check if adding pages to clone bio fails and if it does retry with reclaim. This mirrors the behaviour of page allocation in crypt_alloc_buffer(). This way we can mark bio_add_pages as __must_check. Reviewed-by: Damien Le Moal Signed-off-by: Johannes Thumshirn --- drivers/md/dm-crypt.c | 5

[Cluster-devel] [PATCH v6 06/20] md: raid5-log: use __bio_add_page to add single page

2023-05-30 Thread Johannes Thumshirn
bio_add_page() as __must_check. Reviewed-by: Damien Le Moal Acked-by: Song Liu Signed-off-by: Johannes Thumshirn --- drivers/md/raid5-cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/md/raid5-cache.c b/drivers/md/raid5-cache.c index 46182b955aef..852b265c5db4

[Cluster-devel] [PATCH v6 11/20] zram: use __bio_add_page for adding single page to bio

2023-05-30 Thread Johannes Thumshirn
() as __must_check. Reviewed-by: Damien Le Moal Reviewed-by: Sergey Senozhatsky Signed-off-by: Johannes Thumshirn --- drivers/block/zram/zram_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c index f6d90f1ba5cf

[Cluster-devel] [PATCH v6 09/20] gfs2: use __bio_add_page for adding single page to bio

2023-05-30 Thread Johannes Thumshirn
bio_add_page() as __must_check. Reviewed-by: Damien Le Moal Reviewed-by: Andreas Gruenbacher Signed-off-by: Johannes Thumshirn --- fs/gfs2/ops_fstype.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c index 9af9ddb61ca0..cd962985b058

[Cluster-devel] [PATCH v6 10/20] zonefs: use __bio_add_page for adding single page to bio

2023-05-30 Thread Johannes Thumshirn
bio_add_page() as __must_check. Acked-by: Damien Le Moal Signed-off-by: Johannes Thumshirn --- fs/zonefs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/zonefs/super.c b/fs/zonefs/super.c index 23b8b299c64e..9350221abfc5 100644 --- a/fs/zonefs/super.c +++ b/fs/zonefs

[Cluster-devel] [PATCH v6 05/20] md: use __bio_add_page to add single page

2023-05-30 Thread Johannes Thumshirn
bio_add_page() as __must_check. Signed-of_-by: Johannes Thumshirn Reviewed-by: Damien Le Moal Acked-by: Song Liu --- drivers/md/md.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/md/md.c b/drivers/md/md.c index 8e344b4b3444..6a559a7e89c0 100644 --- a/drivers/md

[Cluster-devel] [PATCH v6 08/20] jfs: logmgr: use __bio_add_page to add single page to bio

2023-05-30 Thread Johannes Thumshirn
() as __must_check. Reviewed-by: Damien Le Moal Acked-by: Dave Kleikamp Signed-off-by: Johannes Thumshirn --- fs/jfs/jfs_logmgr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/jfs/jfs_logmgr.c b/fs/jfs/jfs_logmgr.c index 695415cbfe98..15c645827dec 100644 --- a/fs/jfs

[Cluster-devel] [PATCH v6 03/20] dm: dm-zoned: use __bio_add_page for adding single metadata page

2023-05-30 Thread Johannes Thumshirn
-by: Johannes Thumshirn --- drivers/md/dm-zoned-metadata.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/md/dm-zoned-metadata.c b/drivers/md/dm-zoned-metadata.c index 8f0896a6990b..9d3cca8e3dc9 100644 --- a/drivers/md/dm-zoned-metadata.c +++ b/drivers/md/dm

[Cluster-devel] [PATCH v6 04/20] fs: buffer: use __bio_add_page to add single page to bio

2023-05-30 Thread Johannes Thumshirn
bio_add_page() as __must_check. Reviewed-by: Damien Le Moal Signed-off-by: Johannes Thumshirn --- fs/buffer.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs/buffer.c b/fs/buffer.c index a7fc561758b1..63da30ce946a 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -2760,8 +2760,7

[Cluster-devel] [PATCH v6 02/20] drbd: use __bio_add_page to add page to bio

2023-05-30 Thread Johannes Thumshirn
The drbd code only adds a single page to a newly created bio. So use __bio_add_page() to add the page which is guaranteed to succeed in this case. This brings us closer to marking bio_add_page() as __must_check. Reviewed-by: Damien Le Moal Signed-off-by: Johannes Thumshirn --- drivers/block

[Cluster-devel] [PATCH v6 01/20] swap: use __bio_add_page to add page to bio

2023-05-30 Thread Johannes Thumshirn
The swap code only adds a single page to a newly created bio. So use __bio_add_page() to add the page which is guaranteed to succeed in this case. This brings us closer to marking bio_add_page() as __must_check. Reviewed-by: Damien Le Moal Signed-off-by: Johannes Thumshirn --- mm/page_io.c

[Cluster-devel] [PATCH v6 00/20] bio: check return values of bio_add_page

2023-05-30 Thread Johannes Thumshirn
(Willy) - Mark bio_add_folio must check (Willy) - s/GFS/GFS2/ (Andreas) Changes to v2: - Removed 'wont fail' comments pointed out by Song Changes to v1: - Removed pointless comment pointed out by Willy - Changed commit messages pointed out by Damien - Colledted Damien's Reviews and Acks Johannes

Re: [Cluster-devel] [PATCH v5 00/20] bio: check return values of bio_add_page

2023-05-26 Thread Johannes Thumshirn
On 24.05.23 17:02, Jens Axboe wrote: > On 5/2/23 4:19?AM, Johannes Thumshirn wrote: >> We have two functions for adding a page to a bio, __bio_add_page() which is >> used to add a single page to a freshly created bio and bio_add_page() which >> is >> used to ad

Re: [Cluster-devel] [PATCH v5 00/20] bio: check return values of bio_add_page

2023-05-24 Thread Johannes Thumshirn
On 05.05.23 16:12, Jens Axboe wrote: > On 5/5/23 2:09?AM, Johannes Thumshirn wrote: >> On 02.05.23 12:20, Johannes Thumshirn wrote: >>> We have two functions for adding a page to a bio, __bio_add_page() which is >>> used to add a single page to a freshly created b

Re: [Cluster-devel] [PATCH v5 00/20] bio: check return values of bio_add_page

2023-05-05 Thread Johannes Thumshirn
On 02.05.23 12:20, Johannes Thumshirn wrote: > We have two functions for adding a page to a bio, __bio_add_page() which is > used to add a single page to a freshly created bio and bio_add_page() which is > used to add a page to an existing bio. > > While __bio_add_page() is expe

Re: [Cluster-devel] [PATCH v5 09/20] gfs2: use __bio_add_page for adding single page to bio

2023-05-02 Thread Johannes Thumshirn
On 02.05.23 13:51, Bob Peterson wrote: > On 5/2/23 6:19 AM, Johannes Thumshirn wrote: >> The GFS2 superblock reading code uses bio_add_page() to add a page to a >> newly created bio. bio_add_page() can fail, but the return value is never >> checked. >> >> Use __

[Cluster-devel] [PATCH v5 20/20] block: mark bio_add_folio as __must_check

2023-05-02 Thread Johannes Thumshirn
Now that all callers of bio_add_folio() check the return value, mark it as __must_check. Signed-off-by: Johannes Thumshirn --- include/linux/bio.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/bio.h b/include/linux/bio.h index 4232a17e6b10..fef9f3085a02

[Cluster-devel] [PATCH v5 19/20] fs: iomap: use __bio_add_folio where possible

2023-05-02 Thread Johannes Thumshirn
-off-by: Johannes Thumshirn --- fs/iomap/buffered-io.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c index 063133ec77f4..42c5fc0ad329 100644 --- a/fs/iomap/buffered-io.c +++ b/fs/iomap/buffered-io.c @@ -312,7 +312,7 @@ static

[Cluster-devel] [PATCH v5 16/20] dm-crypt: check if adding pages to clone bio fails

2023-05-02 Thread Johannes Thumshirn
Check if adding pages to clone bio fails and if it does retry with reclaim. This mirrors the behaviour of page allocation in crypt_alloc_buffer(). This way we can mark bio_add_pages as __must_check. Reviewed-by: Damien Le Moal Signed-off-by: Johannes Thumshirn --- drivers/md/dm-crypt.c | 9

[Cluster-devel] [PATCH v5 18/20] block: add __bio_add_folio

2023-05-02 Thread Johannes Thumshirn
Just like for bio_add_pages() add a no-fail variant for bio_add_folio(). Signed-off-by: Johannes Thumshirn --- block/bio.c | 8 include/linux/bio.h | 1 + 2 files changed, 9 insertions(+) diff --git a/block/bio.c b/block/bio.c index 043944fd46eb..350c653d4a57 100644

[Cluster-devel] [PATCH v5 17/20] block: mark bio_add_page as __must_check

2023-05-02 Thread Johannes Thumshirn
Now that all users of bio_add_page check for the return value, mark bio_add_page as __must_check. Reviewed-by: Damien Le Moal Signed-off-by: Johannes Thumshirn --- include/linux/bio.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/bio.h b/include/linux/bio.h

[Cluster-devel] [PATCH v5 15/20] md: raid1: check if adding pages to resync bio fails

2023-05-02 Thread Johannes Thumshirn
Check if adding pages to resync bio fails and if bail out. As the comment above suggests this cannot happen, WARN if it actually happens. This way we can mark bio_add_pages as __must_check. Reviewed-by: Damien Le Moal Acked-by: Song Liu Signed-off-by: Johannes Thumshirn --- drivers/md/raid1

[Cluster-devel] [PATCH v5 14/20] md: raid1: use __bio_add_page for adding single page to bio

2023-05-02 Thread Johannes Thumshirn
() as __must_check. Reviewed-by: Damien Le Moal Acked-by: Song Liu Signed-off-by: Johannes Thumshirn --- drivers/md/raid1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/md/raid1.c b/drivers/md/raid1.c index 8283ef177f6c..ff89839455ec 100644 --- a/drivers/md/raid1.c

[Cluster-devel] [PATCH v5 13/20] md: check for failure when adding pages in alloc_behind_master_bio

2023-05-02 Thread Johannes Thumshirn
alloc_behind_master_bio() can possibly add multiple pages to a bio, but it is not checking for the return value of bio_add_page() if adding really succeeded. Check if the page adding succeeded and if not bail out. Reviewed-by: Damien Le Moal Signed-off-by: Johannes Thumshirn --- drivers/md

[Cluster-devel] [PATCH v5 12/20] floppy: use __bio_add_page for adding single page to bio

2023-05-02 Thread Johannes Thumshirn
() as __must_check. Reviewed-by: Damien Le Moal Signed-off-by: Johannes Thumshirn --- drivers/block/floppy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c index cec2c20f5e59..28ec6b442e9c 100644 --- a/drivers/block/floppy.c +++ b/drivers

[Cluster-devel] [PATCH v5 11/20] zram: use __bio_add_page for adding single page to bio

2023-05-02 Thread Johannes Thumshirn
() as __must_check. Reviewed-by: Damien Le Moal Reviewed-by: Sergey Senozhatsky Signed-off-by: Johannes Thumshirn --- drivers/block/zram/zram_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/block/zram/zram_drv.c b/drivers/block/zram/zram_drv.c index a84c4268257a

[Cluster-devel] [PATCH v5 10/20] zonefs: use __bio_add_page for adding single page to bio

2023-05-02 Thread Johannes Thumshirn
bio_add_page() as __must_check. Acked-by: Damien Le Moal Signed-off-by: Johannes Thumshirn --- fs/zonefs/super.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/zonefs/super.c b/fs/zonefs/super.c index 23b8b299c64e..9350221abfc5 100644 --- a/fs/zonefs/super.c +++ b/fs/zonefs

[Cluster-devel] [PATCH v5 09/20] gfs2: use __bio_add_page for adding single page to bio

2023-05-02 Thread Johannes Thumshirn
bio_add_page() as __must_check. Reviewed-by: Damien Le Moal Reviewed-by: Andreas Gruenbacher Signed-off-by: Johannes Thumshirn --- fs/gfs2/ops_fstype.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c index 9af9ddb61ca0..cd962985b058

[Cluster-devel] [PATCH v5 06/20] md: raid5-log: use __bio_add_page to add single page

2023-05-02 Thread Johannes Thumshirn
bio_add_page() as __must_check. Reviewed-by: Damien Le Moal Acked-by: Song Liu Signed-off-by: Johannes Thumshirn --- drivers/md/raid5-cache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/md/raid5-cache.c b/drivers/md/raid5-cache.c index 46182b955aef..852b265c5db4

[Cluster-devel] [PATCH v5 08/20] jfs: logmgr: use __bio_add_page to add single page to bio

2023-05-02 Thread Johannes Thumshirn
() as __must_check. Reviewed-by: Damien Le Moal Acked-by: Dave Kleikamp Signed-off-by: Johannes Thumshirn --- fs/jfs/jfs_logmgr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fs/jfs/jfs_logmgr.c b/fs/jfs/jfs_logmgr.c index 695415cbfe98..15c645827dec 100644 --- a/fs/jfs

[Cluster-devel] [PATCH v5 07/20] md: raid5: use __bio_add_page to add single page to new bio

2023-05-02 Thread Johannes Thumshirn
a single page to a newly created bio is guaranteed to succeed. This brings us a step closer to marking bio_add_page() as __must_check. Reviewed-by: Damien Le Moal Acked-by: Song Liu Signed-off-by: Johannes Thumshirn --- drivers/md/raid5-ppl.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[Cluster-devel] [PATCH v5 05/20] md: use __bio_add_page to add single page

2023-05-02 Thread Johannes Thumshirn
bio_add_page() as __must_check. Signed-of_-by: Johannes Thumshirn Reviewed-by: Damien Le Moal Acked-by: Song Liu --- drivers/md/md.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/md/md.c b/drivers/md/md.c index 8e344b4b3444..6a559a7e89c0 100644 --- a/drivers/md

[Cluster-devel] [PATCH v5 04/20] fs: buffer: use __bio_add_page to add single page to bio

2023-05-02 Thread Johannes Thumshirn
bio_add_page() as __must_check. Reviewed-by: Damien Le Moal Signed-off-by: Johannes Thumshirn --- fs/buffer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/buffer.c b/fs/buffer.c index a7fc561758b1..5abc26d8399d 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -2760,7 +2760,7

[Cluster-devel] [PATCH v5 03/20] dm: dm-zoned: use __bio_add_page for adding single metadata page

2023-05-02 Thread Johannes Thumshirn
-by: Johannes Thumshirn --- drivers/md/dm-zoned-metadata.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/md/dm-zoned-metadata.c b/drivers/md/dm-zoned-metadata.c index 8f0896a6990b..9d3cca8e3dc9 100644 --- a/drivers/md/dm-zoned-metadata.c +++ b/drivers/md/dm

[Cluster-devel] [PATCH v5 02/20] drbd: use __bio_add_page to add page to bio

2023-05-02 Thread Johannes Thumshirn
The drbd code only adds a single page to a newly created bio. So use __bio_add_page() to add the page which is guaranteed to succeed in this case. This brings us closer to marking bio_add_page() as __must_check. Reviewed-by: Damien Le Moal Signed-off-by: Johannes Thumshirn --- drivers/block

[Cluster-devel] [PATCH v5 01/20] swap: use __bio_add_page to add page to bio

2023-05-02 Thread Johannes Thumshirn
The swap code only adds a single page to a newly created bio. So use __bio_add_page() to add the page which is guaranteed to succeed in this case. This brings us closer to marking bio_add_page() as __must_check. Reviewed-by: Damien Le Moal Signed-off-by: Johannes Thumshirn --- mm/page_io.c

[Cluster-devel] [PATCH v5 00/20] bio: check return values of bio_add_page

2023-05-02 Thread Johannes Thumshirn
: - Removed pointless comment pointed out by Willy - Changed commit messages pointed out by Damien - Colledted Damien's Reviews and Acks Johannes Thumshirn (20): swap: use __bio_add_page to add page to bio drbd: use __bio_add_page to add page to bio dm: dm-zoned: use __bio_add_page for adding single

[Cluster-devel] [PATCH v4 21/22] fs: iomap: use __bio_add_folio where possible

2023-04-20 Thread Johannes Thumshirn
From: Johannes Thumshirn When the iomap buffered-io code can't add a folio to a bio, it allocates a new bio and adds the folio to that one. This is done using bio_add_folio(), but doesn't check for errors. As adding a folio to a newly created bio can't fail, use the newly introduced

[Cluster-devel] [PATCH v4 15/22] md: check for failure when adding pages in alloc_behind_master_bio

2023-04-20 Thread Johannes Thumshirn
From: Johannes Thumshirn alloc_behind_master_bio() can possibly add multiple pages to a bio, but it is not checking for the return value of bio_add_page() if adding really succeeded. Check if the page adding succeeded and if not bail out. Signed-off-by: Johannes Thumshirn Reviewed-by: Damien

[Cluster-devel] [PATCH v4 11/22] gfs2: use __bio_add_page for adding single page to bio

2023-04-20 Thread Johannes Thumshirn
From: Johannes Thumshirn The GFS2 superblock reading code uses bio_add_page() to add a page to a newly created bio. bio_add_page() can fail, but the return value is never checked. Use __bio_add_page() as adding a single page to a newly created bio is guaranteed to succeed. This brings us

[Cluster-devel] [PATCH v4 08/22] btrfs: repair: use __bio_add_page for adding single page

2023-04-20 Thread Johannes Thumshirn
From: Johannes Thumshirn The btrfs repair bio submission code uses bio_add_page() to add a page to a newly created bio. bio_add_page() can fail, but the return value is never checked. Use __bio_add_page() as adding a single page to a newly created bio is guaranteed to succeed. This brings us

[Cluster-devel] [PATCH v4 19/22] block: mark bio_add_page as __must_check

2023-04-20 Thread Johannes Thumshirn
From: Johannes Thumshirn Now that all users of bio_add_page check for the return value, mark bio_add_page as __must_check. Signed-off-by: Johannes Thumshirn Reviewed-by: Damien Le Moal --- include/linux/bio.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux

[Cluster-devel] [PATCH v4 17/22] md: raid1: check if adding pages to resync bio fails

2023-04-20 Thread Johannes Thumshirn
From: Johannes Thumshirn Check if adding pages to resync bio fails and if bail out. As the comment above suggests this cannot happen, WARN if it actually happens. This way we can mark bio_add_pages as __must_check. Signed-off-by: Johannes Thumshirn Reviewed-by: Damien Le Moal Acked-by: Song

[Cluster-devel] [PATCH v4 07/22] md: raid5: use __bio_add_page to add single page to new bio

2023-04-20 Thread Johannes Thumshirn
From: Johannes Thumshirn The raid5-ppl submission code uses bio_add_page() to add a page to a newly created bio. bio_add_page() can fail, but the return value is never checked. For adding consecutive pages, the return is actually checked and a new bio is allocated if adding the page fails. Use

[Cluster-devel] [PATCH v4 22/22] block: mark bio_add_folio as __must_check

2023-04-20 Thread Johannes Thumshirn
From: Johannes Thumshirn Now that all callers of bio_add_folio() check the return value, mark it as __must_check. Signed-off-by: Johannes Thumshirn --- include/linux/bio.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/bio.h b/include/linux/bio.h index

[Cluster-devel] [PATCH v4 18/22] dm-crypt: check if adding pages to clone bio fails

2023-04-20 Thread Johannes Thumshirn
From: Johannes Thumshirn Check if adding pages to clone bio fails and if it does retry with reclaim. This mirrors the behaviour of page allocation in crypt_alloc_buffer(). This way we can mark bio_add_pages as __must_check. Signed-off-by: Johannes Thumshirn Reviewed-by: Damien Le Moal

[Cluster-devel] [PATCH v4 02/22] drbd: use __bio_add_page to add page to bio

2023-04-20 Thread Johannes Thumshirn
From: Johannes Thumshirn The drbd code only adds a single page to a newly created bio. So use __bio_add_page() to add the page which is guaranteed to succeed in this case. This brings us closer to marking bio_add_page() as __must_check. Signed-off-by: Johannes Thumshirn Reviewed-by: Damien Le

[Cluster-devel] [PATCH v4 20/22] block: add __bio_add_folio

2023-04-20 Thread Johannes Thumshirn
From: Johannes Thumshirn Just like for bio_add_pages() add a no-fail variant for bio_add_folio(). Signed-off-by: Johannes Thumshirn --- block/bio.c | 8 include/linux/bio.h | 1 + 2 files changed, 9 insertions(+) diff --git a/block/bio.c b/block/bio.c index fd11614bba4d

[Cluster-devel] [PATCH v4 14/22] floppy: use __bio_add_page for adding single page to bio

2023-04-20 Thread Johannes Thumshirn
From: Johannes Thumshirn The floppy code uses bio_add_page() to add a page to a newly created bio. bio_add_page() can fail, but the return value is never checked. Use __bio_add_page() as adding a single page to a newly created bio is guaranteed to succeed. This brings us a step closer

[Cluster-devel] [PATCH v4 12/22] zonefs: use __bio_add_page for adding single page to bio

2023-04-20 Thread Johannes Thumshirn
From: Johannes Thumshirn The zonefs superblock reading code uses bio_add_page() to add a page to a newly created bio. bio_add_page() can fail, but the return value is never checked. Use __bio_add_page() as adding a single page to a newly created bio is guaranteed to succeed. This brings us

[Cluster-devel] [PATCH v4 16/22] md: raid1: use __bio_add_page for adding single page to bio

2023-04-20 Thread Johannes Thumshirn
From: Johannes Thumshirn The sync request code uses bio_add_page() to add a page to a newly created bio. bio_add_page() can fail, but the return value is never checked. Use __bio_add_page() as adding a single page to a newly created bio is guaranteed to succeed. This brings us a step closer

[Cluster-devel] [PATCH v4 05/22] md: use __bio_add_page to add single page

2023-04-20 Thread Johannes Thumshirn
From: Johannes Thumshirn The md-raid superblock writing code uses bio_add_page() to add a page to a newly created bio. bio_add_page() can fail, but the return value is never checked. Use __bio_add_page() as adding a single page to a newly created bio is guaranteed to succeed. This brings us

[Cluster-devel] [PATCH v4 04/22] fs: buffer: use __bio_add_page to add single page to bio

2023-04-20 Thread Johannes Thumshirn
From: Johannes Thumshirn The buffer_head submission code uses bio_add_page() to add a page to a newly created bio. bio_add_page() can fail, but the return value is never checked. Use __bio_add_page() as adding a single page to a newly created bio is guaranteed to succeed. This brings us a step

[Cluster-devel] [PATCH v4 13/22] zram: use __bio_add_page for adding single page to bio

2023-04-20 Thread Johannes Thumshirn
From: Johannes Thumshirn The zram writeback code uses bio_add_page() to add a page to a newly created bio. bio_add_page() can fail, but the return value is never checked. Use __bio_add_page() as adding a single page to a newly created bio is guaranteed to succeed. This brings us a step closer

[Cluster-devel] [PATCH v4 10/22] jfs: logmgr: use __bio_add_page to add single page to bio

2023-04-20 Thread Johannes Thumshirn
From: Johannes Thumshirn The JFS IO code uses bio_add_page() to add a page to a newly created bio. bio_add_page() can fail, but the return value is never checked. Use __bio_add_page() as adding a single page to a newly created bio is guaranteed to succeed. This brings us a step closer

[Cluster-devel] [PATCH v4 00/22] bio: check return values of bio_add_page

2023-04-20 Thread Johannes Thumshirn
to v1: - Removed pointless comment pointed out by Willy - Changed commit messages pointed out by Damien - Colledted Damien's Reviews and Acks Johannes Thumshirn (22): swap: use __bio_add_page to add page to bio drbd: use __bio_add_page to add page to bio dm: dm-zoned: use __bio_add_page

[Cluster-devel] [PATCH v4 01/22] swap: use __bio_add_page to add page to bio

2023-04-20 Thread Johannes Thumshirn
From: Johannes Thumshirn The swap code only adds a single page to a newly created bio. So use __bio_add_page() to add the page which is guaranteed to succeed in this case. This brings us closer to marking bio_add_page() as __must_check. Signed-off-by: Johannes Thumshirn Reviewed-by: Damien Le

[Cluster-devel] [PATCH v4 03/22] dm: dm-zoned: use __bio_add_page for adding single metadata page

2023-04-20 Thread Johannes Thumshirn
From: Johannes Thumshirn dm-zoned uses bio_add_page() for adding a single page to a freshly created metadata bio. Use __bio_add_page() instead as adding a single page to a new bio is always guaranteed to succeed. This brings us a step closer to marking bio_add_page() __must_check Signed-off

[Cluster-devel] [PATCH v4 09/22] btrfs: raid56: use __bio_add_page to add single page

2023-04-20 Thread Johannes Thumshirn
From: Johannes Thumshirn The btrfs raid58 sector submission code uses bio_add_page() to add a page to a newly created bio. bio_add_page() can fail, but the return value is never checked. Use __bio_add_page() as adding a single page to a newly created bio is guaranteed to succeed. This brings

[Cluster-devel] [PATCH v4 06/22] md: raid5-log: use __bio_add_page to add single page

2023-04-20 Thread Johannes Thumshirn
From: Johannes Thumshirn The raid5 log metadata submission code uses bio_add_page() to add a page to a newly created bio. bio_add_page() can fail, but the return value is never checked. Use __bio_add_page() as adding a single page to a newly created bio is guaranteed to succeed. This brings us

Re: [Cluster-devel] [PATCH v3 11/19] gfs: use __bio_add_page for adding single page to bio

2023-04-20 Thread Johannes Thumshirn
On 19/04/2023 17:19, Andreas Gruenbacher wrote: On Wed, Apr 19, 2023 at 4:10 PM Johannes Thumshirn wrote: From: Johannes Thumshirn The GFS superblock reading code uses bio_add_page() to add a page to a newly created bio. bio_add_page() can fail, but the return value is never checked. It's

Re: [Cluster-devel] [PATCH v3 19/19] block: mark bio_add_page as __must_check

2023-04-19 Thread Johannes Thumshirn
On 19/04/2023 16:19, Matthew Wilcox wrote: On Wed, Apr 19, 2023 at 04:09:29PM +0200, Johannes Thumshirn wrote: Now that all users of bio_add_page check for the return value, mark bio_add_page as __must_check. Should probably add __must_check to bio_add_folio too? If this is really the way

[Cluster-devel] [PATCH v3 14/19] floppy: use __bio_add_page for adding single page to bio

2023-04-19 Thread Johannes Thumshirn
From: Johannes Thumshirn The floppy code uses bio_add_page() to add a page to a newly created bio. bio_add_page() can fail, but the return value is never checked. Use __bio_add_page() as adding a single page to a newly created bio is guaranteed to succeed. This brings us a step closer

[Cluster-devel] [PATCH v3 02/19] drbd: use __bio_add_page to add page to bio

2023-04-19 Thread Johannes Thumshirn
From: Johannes Thumshirn The drbd code only adds a single page to a newly created bio. So use __bio_add_page() to add the page which is guaranteed to succeed in this case. This brings us closer to marking bio_add_page() as __must_check. Signed-off-by: Johannes Thumshirn Reviewed-by: Damien Le

[Cluster-devel] [PATCH v3 05/19] md: use __bio_add_page to add single page

2023-04-19 Thread Johannes Thumshirn
From: Johannes Thumshirn The md-raid superblock writing code uses bio_add_page() to add a page to a newly created bio. bio_add_page() can fail, but the return value is never checked. Use __bio_add_page() as adding a single page to a newly created bio is guaranteed to succeed. This brings us

[Cluster-devel] [PATCH v3 12/19] zonefs: use __bio_add_page for adding single page to bio

2023-04-19 Thread Johannes Thumshirn
From: Johannes Thumshirn The zonefs superblock reading code uses bio_add_page() to add a page to a newly created bio. bio_add_page() can fail, but the return value is never checked. Use __bio_add_page() as adding a single page to a newly created bio is guaranteed to succeed. This brings us

[Cluster-devel] [PATCH v3 06/19] md: raid5-log: use __bio_add_page to add single page

2023-04-19 Thread Johannes Thumshirn
From: Johannes Thumshirn The raid5 log metadata submission code uses bio_add_page() to add a page to a newly created bio. bio_add_page() can fail, but the return value is never checked. Use __bio_add_page() as adding a single page to a newly created bio is guaranteed to succeed. This brings us

  1   2   >