[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [dm-devel] [PATCH 11/24] dm table: print error on preresume failure

On Thu, Oct 24, 2013 at 02:30:24PM -0400, Mike Snitzer wrote:
> If preresume fails it is worth logging an error given that a device is
> left suspended due to the failure.

> This change was motivated by local preresume error logging that was
> added to the cache target.  Elevating this error logging to DM core
> makes sense.
But here I disagree: I think it makes more sense not to elevate this
logging, but to leave the responsibility for it with the targets

> +			DMERR("%s: %s: preresume failed, error = %d",
> +			      dm_device_name(t->md), ti->type->name, r);

Elevated, you're only getting a single number displayed.

If the targets retain the responsibility, then you should get a
more-detailed error message such as:

                DMERR("aborting resume - crypt key is not set.");

                        DMERR("Unable to resume snapshot source until "
                              "handover completes.");

                        DMERR("Unable to perform snapshot handover until "
                              "source is suspended.");

                        DMERR("could not resize cache metadata");
                        DMERR("could not load cache mappings");
                        DMERR("could not load origin discards");

I think we should retain the requirement that each target must log
a meaningful message whenever preresume fails.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]