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

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

 



On Fri, Oct 25 2013 at  3:22pm -0400,
Alasdair G Kergon <agk@xxxxxxxxxx> wrote:

> 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.
>  
> Indeed.
> 
> > 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
> themselves.
> 
> > +			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.

Elevated was over-stated, I'll revise the header.  I was trying to say
that the target shouldn't need to worry about stating that the failure
happens to be in the preresume method on the target.

> 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.

Yeah, I agree.  I just want DM core to make it clear that the target
failure resulted in preresume failing.

--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel




[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux