ACK On Thu, Feb 20, 2014 at 09:55:58PM -0500, Mike Snitzer wrote: > Commit b5330655 ("dm thin: handle metadata failures more consistently") > increased potential for the pool's mode to be changed in response to > metadata operation failures. > > When the pool mode is changed it isn't synchronized with the mode in > pool_features stored in the target's context (ti->private) that is used > as the basis for (re)establishing the pool mode during resume via > bind_control_target. > > It is important that we synchronize the pool mode when suspending > otherwise the pool may experience and unexpected mode transition on the > next resume (especially if there was no new table load). > > Signed-off-by: Mike Snitzer <snitzer@xxxxxxxxxx> > --- > drivers/md/dm-thin.c | 6 ++++++ > 1 file changed, 6 insertions(+) > > diff --git a/drivers/md/dm-thin.c b/drivers/md/dm-thin.c > index d501e43..9facc6f 100644 > --- a/drivers/md/dm-thin.c > +++ b/drivers/md/dm-thin.c > @@ -2364,6 +2364,12 @@ static void pool_postsuspend(struct dm_target *ti) > cancel_delayed_work(&pool->waker); > flush_workqueue(pool->wq); > (void) commit(pool); > + > + /* > + * The pool mode may have changed, sync it so bind_control_target() > + * doesn't cause an unexpected mode transition on resume. > + */ > + pt->adjusted_pf.mode = get_pool_mode(pool); > } > > static int check_arg_count(unsigned argc, unsigned args_required) > -- > 1.8.3.1 > -- dm-devel mailing list dm-devel@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/dm-devel