Looks good to me,
Reviewed-by: Johannes Thumshirn
Looks good,
Reviewed-by: Johannes Thumshirn
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel
Looks good,
Reviewed-by: Johannes Thumshirn
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel
Looks good,
Reviewed-by: Johannes Thumshirn
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel
() 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
() 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
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
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
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
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
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
() 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
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
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
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
Oops I've accidentally re-send v6 instead of v7.
My apologies.
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel
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
- 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
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
-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
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
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
() 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
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
.
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
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
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().
>
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
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
-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
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
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
() 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
() 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
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
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
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
() 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
() 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
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
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
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
-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
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
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
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
(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
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
On 26.05.23 09:33, Luis Chamberlain wrote:
> A bit of block drivers have their own incantations with
> PAGE_SHIFT - SECTOR_SHIFT. Just simplfy and use PAGE_SECTORS_SHIFT
> all over.
>
>
On 26.05.23 09:34, Luis Chamberlain wrote:
> + u32 index = bio->bi_iter.bi_sector >> PAGE_SECTORS_SHIFT;
> + u32 offset = (bio->bi_iter.bi_sector & (PAGE_SECTORS - 1)) <<
> SECTOR_SHIFT;
(PAGE_SECTORS - 1) is SECTOR_MASK, please use this.
Thanks,
Johannes
--
On 26.05.23 09:33, Luis Chamberlain wrote:
> *data_mode = DATA_MODE_GET_FREE_PAGES;
> return (void *)__get_free_pages(gfp_mask,
> - c->sectors_per_block_bits -
> (PAGE_SHIFT - SECTOR_SHIFT));
> +
Looks good,
Reviewed-by: Johannes Thumshirn
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel
Looks good,
Reviewed-by: Johannes Thumshirn
--
dm-devel mailing list
dm-devel@redhat.com
https://listman.redhat.com/mailman/listinfo/dm-devel
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
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
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
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 __
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
-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
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
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
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
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
() 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
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
() 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
() 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
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
() 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
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
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
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
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
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
-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
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
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
:
- 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
1 - 100 of 297 matches
Mail list logo