On Fri, Sep 28, 2018 at 8:30 PM Shaohua Li <shli@xxxxxxxxxx> wrote: > > On Thu, Sep 27, 2018 at 10:07:57AM +0200, Jack Wang wrote: > > From: Jack Wang <jinpu.wang@xxxxxxxxxxxxxxxx> > > > > After 9e1cc0a54556 ("md: use mddev_suspend/resume instead of ->quiesce()") > > We still have similar left in bitmap functions. > > > > Replace quiesce() with mddev_suspend/resume. > > > > Also move md_bitmap_create out of mddev_suspend. and move mddev_resume > > after md_bitmap_destroy. as we did in set_bitmap_file. > > > > Signed-off-by: Jack Wang <jinpu.wang@xxxxxxxxxxxxxxxx> > > Reviewed-by: Gioh Kim <gi-oh.kim@xxxxxxxxxxxxxxxx> > > > > --- > > v2->v1: add reviewed-by. > > --- > > drivers/md/md-bitmap.c | 13 +++++++------ > > 1 file changed, 7 insertions(+), 6 deletions(-) > > > > diff --git a/drivers/md/md-bitmap.c b/drivers/md/md-bitmap.c > > index 2fc8c113977f..c369f1753ea6 100644 > > --- a/drivers/md/md-bitmap.c > > +++ b/drivers/md/md-bitmap.c > > @@ -2123,7 +2123,7 @@ int md_bitmap_resize(struct bitmap *bitmap, sector_t blocks, > > } > > > > if (!init) > > - bitmap->mddev->pers->quiesce(bitmap->mddev, 1); > > + mddev_suspend(bitmap->mddev); > > > mddev_suspend is supposed to be called with reconfig_mutex hold. At least one > place this isn't true with this change, for example, raid_preresume doesn't > call md_bitmap_resize with the lock hold. Could you please double check the > lock usage? You're right, I missed this one, will double check. Thanks for review! -- Jack Wang Linux Kernel Developer ProfitBricks GmbH Greifswalder Str. 207 D - 10405 Berlin Tel: +49 30 577 008 042 Fax: +49 30 577 008 299 Email: jinpu.wang@xxxxxxxxxxxxxxxx URL: https://www.profitbricks.de Sitz der Gesellschaft: Berlin Registergericht: Amtsgericht Charlottenburg, HRB 125506 B Geschäftsführer: Achim Weiss, Matthias Steinberg, Christoph Steffens