On Fri, Jan 22 2021 at 10:25am -0500, Nikos Tsironis <ntsironis@xxxxxxxxxxx> wrote: > The device metadata are resized in era_ctr(), so the metadata resize > operation in era_preresume() never runs. > > Also, note, that if the operation did ever run it would deadlock, since > the worker has not been started at this point. > > Fixes: eec40579d84873 ("dm: add era target") > Cc: stable@xxxxxxxxxxxxxxx # v3.15+ > Signed-off-by: Nikos Tsironis <ntsironis@xxxxxxxxxxx> > --- > drivers/md/dm-era-target.c | 9 --------- > 1 file changed, 9 deletions(-) > > diff --git a/drivers/md/dm-era-target.c b/drivers/md/dm-era-target.c > index 104fb110cd4e..c40e132e50cd 100644 > --- a/drivers/md/dm-era-target.c > +++ b/drivers/md/dm-era-target.c > @@ -1567,15 +1567,6 @@ static int era_preresume(struct dm_target *ti) > { > int r; > struct era *era = ti->private; > - dm_block_t new_size = calc_nr_blocks(era); > - > - if (era->nr_blocks != new_size) { > - r = in_worker1(era, metadata_resize, &new_size); > - if (r) > - return r; > - > - era->nr_blocks = new_size; > - } > > start_worker(era); > > -- > 2.11.0 > Resize shouldn't actually happen in the ctr. The ctr loads a temporary (inactive) table that will only become active upon resume. That is why resize should always be done in terms of resume. I'll look closer but ctr shouldn't do the actual resize, and the start_worker() should be moved above the resize code you've removed above. Mike -- dm-devel mailing list dm-devel@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/dm-devel