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

2023-06-01 Thread Mike Snitzer
On Tue, May 30 2023 at 3:43P -0400, Mikulas Patocka wrote: > > > On Tue, 30 May 2023, Mike Snitzer wrote: > > > On Tue, May 30 2023 at 11:13P -0400, > > Mikulas Patocka wrote: > > > > > Hi > > > > > > I nack this. This just adds code that can't ever be executed. > > > > > > dm-crypt alrea

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

2023-05-30 Thread Mikulas Patocka
On Tue, 30 May 2023, Mike Snitzer wrote: > On Tue, May 30 2023 at 11:13P -0400, > Mikulas Patocka wrote: > > > Hi > > > > I nack this. This just adds code that can't ever be executed. > > > > dm-crypt already allocates enough entries in the vector (see "unsigned int > > nr_iovecs = (size +

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

2023-05-30 Thread Mike Snitzer
On Tue, May 30 2023 at 11:13P -0400, Mikulas Patocka wrote: > > > On Tue, 2 May 2023, 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(). > > > > This way we

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

2023-05-30 Thread Mikulas Patocka
On Tue, 2 May 2023, 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(). > > This way we can mark bio_add_pages as __must_check. > > Reviewed-by: Damien Le Moal > Sig

[dm-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 +++