> -----Original Message----- > From: Mike Snitzer [mailto:snitzer@xxxxxxxxxx] > Sent: Thursday, October 31, 2013 9:48 AM > To: Junichi Nomura; Merla, ShivaKrishna > Cc: device-mapper development; agk@xxxxxxxxxx > Subject: [PATCH v2] dm mpath: fix race condition between multipath_dtr > and pg_init_done > > On Thu, Oct 31 2013 at 5:03am -0400, > Junichi Nomura <j-nomura@xxxxxxxxxxxxx> wrote: > > > > > Hi, > > > > how about moving this to flush_multipath_work(), which is supposed > > to silence background activities? > > I.e. > > flush_multipath_work() { > > <disable pg_init retry> > > ... > > <enable pg_init retry> > > } > > > > Then it not only fixes the crash you hit, it also fixes the hidden bug > > that pg_init continues retrying while the device is suspended. > > I ran with your suggestion. Please see below. > > To be clear, pg_init isn't disabled while mpath device is suspended > (meaning m->pg_init_disabled isn't set until the device is resumed). > But flush_multipath_work() will no longer start pg_init during suspend > -- which could otherwise occur while the mpath device is suspended. So > in practice it accomplishes the stated goal. > > Thanks for the suggestion Junichi. Are you OK with this? If so please > provide your Ack. > > Shiva, can you please verify that this patch resolves the race, should > accomplish the same: just pushes the disabling of pg_init inside > flush_multipath_work(). Yes Mike, This looks good. Thanks Junichi for the suggestion. -- dm-devel mailing list dm-devel@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/dm-devel