Re: [PATCH] dm-verity: hash blocks with shash import+finup when possible

2023-10-31 Thread Eric Biggers
On Wed, Nov 01, 2023 at 12:51:15PM +0800, Herbert Xu wrote: > Eric Biggers wrote: > > > > + driver_name = crypto_ahash_driver_name(ahash); > > + if (v->version >= 1 /* salt prepended, not appended? */ && > > + 1 << v->data_dev_block_bits <= PAGE_SIZE) { > > +

Re: [PATCH] dm-verity: hash blocks with shash import+finup when possible

2023-10-31 Thread Herbert Xu
Eric Biggers wrote: > > + driver_name = crypto_ahash_driver_name(ahash); > + if (v->version >= 1 /* salt prepended, not appended? */ && > + 1 << v->data_dev_block_bits <= PAGE_SIZE) { > + shash = crypto_alloc_shash(alg_name, 0, 0); I'm sorry but this is

[PATCH 1/1] dm verity: don't verity if readahead failed

2023-10-31 Thread Wu Bo
If the IO is marked as readahead. When it is failed, it would better to pass it to upper layer to handle it. Consender the following situation: dm-verity is built over a dm device. 'dm_submit_bio()' will return IO error when dm device is suspended. And IO get nothing, but it will goto FEC, and

Re: Intermittent storage (dm-crypt?) freeze - regression 6.4->6.5

2023-10-31 Thread Ming Lei
On Wed, Nov 01, 2023 at 03:14:22AM +0100, Marek Marczykowski-Górecki wrote: > On Wed, Nov 01, 2023 at 09:27:24AM +0800, Ming Lei wrote: > > On Tue, Oct 31, 2023 at 11:42 PM Marek Marczykowski-Górecki > > wrote: > > > > > > On Tue, Oct 31, 2023 at 03:01:36PM +0100, Jan Kara wrote: > > > > On Tue

Re: Intermittent storage (dm-crypt?) freeze - regression 6.4->6.5

2023-10-31 Thread Marek Marczykowski-Górecki
On Wed, Nov 01, 2023 at 03:15:50AM +0100, Marek Marczykowski-Górecki wrote: > And BTW, an attempt to access another partition on the same disk (not > covered with dm-crypt) hangs too. No, not sure about that part, it was rather reading /bin/ls hanging... -- Best Regards, Marek

Re: Intermittent storage (dm-crypt?) freeze - regression 6.4->6.5

2023-10-31 Thread Marek Marczykowski-Górecki
On Wed, Nov 01, 2023 at 03:14:22AM +0100, Marek Marczykowski-Górecki wrote: > On Wed, Nov 01, 2023 at 09:27:24AM +0800, Ming Lei wrote: > > On Tue, Oct 31, 2023 at 11:42 PM Marek Marczykowski-Górecki > > wrote: > > > > > > On Tue, Oct 31, 2023 at 03:01:36PM +0100, Jan Kara wrote: > > > > On Tue

Re: Intermittent storage (dm-crypt?) freeze - regression 6.4->6.5

2023-10-31 Thread Marek Marczykowski-Górecki
On Wed, Nov 01, 2023 at 09:27:24AM +0800, Ming Lei wrote: > On Tue, Oct 31, 2023 at 11:42 PM Marek Marczykowski-Górecki > wrote: > > > > On Tue, Oct 31, 2023 at 03:01:36PM +0100, Jan Kara wrote: > > > On Tue 31-10-23 04:48:44, Marek Marczykowski-Górecki wrote: > > > > Then tried: > > > > -

Re: Intermittent storage (dm-crypt?) freeze - regression 6.4->6.5

2023-10-31 Thread Ming Lei
On Tue, Oct 31, 2023 at 11:42 PM Marek Marczykowski-Górecki wrote: > > On Tue, Oct 31, 2023 at 03:01:36PM +0100, Jan Kara wrote: > > On Tue 31-10-23 04:48:44, Marek Marczykowski-Górecki wrote: > > > Then tried: > > > - PAGE_ALLOC_COSTLY_ORDER=4, order=4 - cannot reproduce, > > > -

[PATCH] dm-crypt: account large pages in cc->n_allocated_pages

2023-10-31 Thread Mikulas Patocka
The commit 5054e778fcd9c changed dm-crypt to use compound pages to improve performance. Unfortunatelly, there was an oversight - normal pages are accounted in a percpu counter cc->n_allocated_pages and dm-crypt is limited to allocate at most 2% of memory. Compound pages were not accounted at all.

Re: Intermittent storage (dm-crypt?) freeze - regression 6.4->6.5

2023-10-31 Thread Mikulas Patocka
On Tue, 31 Oct 2023, Mikulas Patocka wrote: > > > On Tue, 31 Oct 2023, Marek Marczykowski-Górecki wrote: > > > On Tue, Oct 31, 2023 at 03:01:36PM +0100, Jan Kara wrote: > > > On Tue 31-10-23 04:48:44, Marek Marczykowski-Górecki wrote: > > > > Then tried: > > > > - PAGE_ALLOC_COSTLY_ORDER=4,

Re: Intermittent storage (dm-crypt?) freeze - regression 6.4->6.5

2023-10-31 Thread Mikulas Patocka
On Tue, 31 Oct 2023, Marek Marczykowski-Górecki wrote: > On Tue, Oct 31, 2023 at 03:01:36PM +0100, Jan Kara wrote: > > On Tue 31-10-23 04:48:44, Marek Marczykowski-Górecki wrote: > > > Then tried: > > > - PAGE_ALLOC_COSTLY_ORDER=4, order=4 - cannot reproduce, > > > -

Re: Intermittent storage (dm-crypt?) freeze - regression 6.4->6.5

2023-10-31 Thread Marek Marczykowski-Górecki
On Tue, Oct 31, 2023 at 03:01:36PM +0100, Jan Kara wrote: > On Tue 31-10-23 04:48:44, Marek Marczykowski-Górecki wrote: > > Then tried: > > - PAGE_ALLOC_COSTLY_ORDER=4, order=4 - cannot reproduce, > > - PAGE_ALLOC_COSTLY_ORDER=4, order=5 - cannot reproduce, > > - PAGE_ALLOC_COSTLY_ORDER=4,

Re: Intermittent storage (dm-crypt?) freeze - regression 6.4->6.5

2023-10-31 Thread Jan Kara
On Tue 31-10-23 04:48:44, Marek Marczykowski-Górecki wrote: > On Mon, Oct 30, 2023 at 06:50:35PM +0100, Mikulas Patocka wrote: > > On Mon, 30 Oct 2023, Marek Marczykowski-Górecki wrote: > > > Then retried with order=PAGE_ALLOC_COSTLY_ORDER and > > > PAGE_ALLOC_COSTLY_ORDER back at 3, and also got

Re: [PATCH next] dm delay: Fix missing error code in delay_ctr()

2023-10-31 Thread Christian Loehle
On 31/10/2023 07:10, Harshit Mogalapalli wrote: > When worker thread allocation fails, return error instead of > zero(success). > > Also when kthread_create fails it returns ERR pointers and not NULL, so > fix that as well. > > Fixes: c1fce71d29b2 ("dm delay: for short delays, use kthread

[PATCH next] dm delay: Fix missing error code in delay_ctr()

2023-10-31 Thread Harshit Mogalapalli
When worker thread allocation fails, return error instead of zero(success). Also when kthread_create fails it returns ERR pointers and not NULL, so fix that as well. Fixes: c1fce71d29b2 ("dm delay: for short delays, use kthread instead of timers and wq") Signed-off-by: Harshit Mogalapalli ---