Re: [dm-devel] [PATCH 1/2] dm zoned: Fix zone reclaim trigger

2020-07-08 Thread Hannes Reinecke
On 7/8/20 2:20 AM, Damien Le Moal wrote: Triggerring reclaim only based on the percentage of unmapped cache zones can fail to detect cases where reclaim is needed, e.g. if the target has only 2 or 3 cache zones and only one unmapped cache zone, the percentage of free cache zone is higher than

[dm-devel] [PATCH] dm crypt: Enable zoned block device support

2020-07-08 Thread Damien Le Moal
Enable support for zoned block devices. This is done by: 1) implementing the target report_zones method 2) adding the DM_TARGET_ZONED_HM flag to the target features 3) Introducing inline write encryption completion to preserve write ordering The last point is implemented by introducing the

Re: [dm-devel] [PATCH 2/2] dm zoned: Remove set but unused variables

2020-07-08 Thread Hannes Reinecke
On 7/8/20 2:20 AM, Damien Le Moal wrote: In dmz_reclaim_work(), the variables nr_unmap_rnd and nr_rnd are set but unused. Remove them. Fixes: f97809aec589 ("dm zoned: per-device reclaim") Signed-off-by: Damien Le Moal --- drivers/md/dm-zoned-reclaim.c | 5 + 1 file changed, 1

[dm-devel] [PATCH] dm: use noio when sending kobject event

2020-07-08 Thread Mikulas Patocka
kobject_uevent may allocate memory and it may be called while there are dm devices suspended. The allocation may recurse into a suspended device, causing a deadlock. We must set the noio flag when sending a uevent. This is the observed deadlock: iSCSI-write holding: rx_queue_mutex

Re: [dm-devel] [PATCH 01/14] dm: use bio_uninit instead of bio_disassociate_blkg

2020-07-08 Thread Mike Snitzer
On Sat, Jun 27 2020 at 3:31am -0400, Christoph Hellwig wrote: > bio_uninit is the proper API to clean up a BIO that has been allocated > on stack or inside a structure that doesn't come from the BIO allocator. > Switch dm to use that instead of bio_disassociate_blkg, which really is > an

Re: [dm-devel] [PATCH 2/2] dm zoned: Remove set but unused variables

2020-07-08 Thread Mike Snitzer
On Tue, Jul 07 2020 at 8:20pm -0400, Damien Le Moal wrote: > In dmz_reclaim_work(), the variables nr_unmap_rnd and nr_rnd are set but > unused. Remove them. > > Fixes: f97809aec589 ("dm zoned: per-device reclaim") > Signed-off-by: Damien Le Moal > --- > drivers/md/dm-zoned-reclaim.c | 5

Re: [dm-devel] [PATCH v3] dm crypt: add flags to optionally bypass dm-crypt workqueues

2020-07-08 Thread Bob Liu
On 7/7/20 1:37 AM, Ignat Korchagin wrote: > Changes from v2: > * dropped nobacklog boolean - ciphers are OK to backlog requests > * moved some conditionals inline dropping the extra local variables > * renamed "noresched" -> "atomic" > > This is a follow up from [1]. Consider the following

Re: [dm-devel] [PATCH] dm: use noio when sending kobject event

2020-07-08 Thread Gabriel Krisman Bertazi
Mikulas Patocka writes: > kobject_uevent may allocate memory and it may be called while there are dm > devices suspended. The allocation may recurse into a suspended device, > causing a deadlock. We must set the noio flag when sending a uevent. If I understand it correctly, considering the

Re: [dm-devel] dm: use noio when sending kobject event

2020-07-08 Thread Mike Snitzer
On Wed, Jul 08 2020 at 2:26pm -0400, Gabriel Krisman Bertazi wrote: > Mikulas Patocka writes: > > > kobject_uevent may allocate memory and it may be called while there are dm > > devices suspended. The allocation may recurse into a suspended device, > > causing a deadlock. We must set the

Re: [dm-devel] dm: use noio when sending kobject event

2020-07-08 Thread Gabriel Krisman Bertazi
Mike Snitzer writes: > On Wed, Jul 08 2020 at 2:26pm -0400, > Gabriel Krisman Bertazi wrote: > >> If I understand it correctly, considering the deadlock you shared, this >> doesn't solve the entire issue. For instance, kobject_uevent_env on the >> GFP_NOIO thread waits on uevent_sock_mutex,

Re: [dm-devel] remove dead bdi congestion leftovers

2020-07-08 Thread Jens Axboe
On 7/1/20 3:06 AM, Christoph Hellwig wrote: > Hi Jens, > > we have a lot of bdi congestion related code that is left around without > any use. This series removes it in preparation of sorting out the bdi > lifetime rules properly. Please run series like this through a full compilation, for both

[dm-devel] [dm:for-next 16/21] drivers/md/dm-dust.c:307:10: warning: zero-length gnu_printf format string

2020-07-08 Thread kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git for-next head: d88c192d8c466e0d004f451091c409aa87c5ca89 commit: 20f93ea74f9c3274879328b9e1a2a85bc0cca5fd [16/21] dm dust: add interface to list all badblocks config: riscv-allyesconfig (attached as .config)

Re: [dm-devel] remove dead bdi congestion leftovers

2020-07-08 Thread Christoph Hellwig
On Wed, Jul 08, 2020 at 05:14:29PM -0600, Jens Axboe wrote: > On 7/1/20 3:06 AM, Christoph Hellwig wrote: > > Hi Jens, > > > > we have a lot of bdi congestion related code that is left around without > > any use. This series removes it in preparation of sorting out the bdi > > lifetime rules

Re: [dm-devel] [PATCH 2/6] crypto: algapi - use common mechanism for inheriting flags

2020-07-08 Thread Herbert Xu
Eric Biggers wrote: > > @@ -875,14 +873,21 @@ static void cbcmac_exit_tfm(struct crypto_tfm *tfm) > > static int cbcmac_create(struct crypto_template *tmpl, struct rtattr **tb) > { > + struct crypto_attr_type *algt; >struct shash_instance *inst; >struct crypto_cipher_spawn

Re: [dm-devel] [PATCH 2/2] dm zoned: Remove set but unused variables

2020-07-08 Thread Damien Le Moal
On 2020/07/09 0:14, Mike Snitzer wrote: > On Tue, Jul 07 2020 at 8:20pm -0400, > Damien Le Moal wrote: > >> In dmz_reclaim_work(), the variables nr_unmap_rnd and nr_rnd are set but >> unused. Remove them. >> >> Fixes: f97809aec589 ("dm zoned: per-device reclaim") >> Signed-off-by: Damien Le