[RFC][PATCH] never scan a device which is using the error target

Mike Snitzer <[email protected]>
Newsgroups dev.linux.lists.lvm-devel
Message-ID <[email protected]>
On Sun, Oct 24 2010 at 12:43pm -0400,
Milan Broz <[email protected]> wrote:

> On 10/24/2010 02:55 AM, Mike Snitzer wrote:
> > A merged snapshot's DM device is made to use the "error" target as part
> > of lvm's transaction to merge a snapshot.  This snapshot merge use-case
> > aside, any device using the error target shouldn't be scanned.
> > 
> > NOTE: I'm not using an ignore_suspended_devices() check like other
> > target checks in device_is_usable() -- its not clear to me what such a
> 
> IIRC scan for mirrors, snapshots etc is OK.
> But during mirror repair or conversion some devices in the middle of stack
> can be suspended, so the ignore_suspended_devices() says when it is safe to
> scan it. (see that it is set during conversions etc)
> IMHO it is quite hack (mainly for clusters where one node runs the conversion
> or repair and other just follows the state).

OK, thanks for the info.

> For error device it makes no sense - it is unusable all the time:-)

Right.

> > +		if (target_type && !strcmp(target_type, "error")) {
> 
> Do we have some #define for the error target name?

I don't think we have a #define for any target names.  Target names are
open coded strings throughout the lvm2 codebase.  Certainly a candidate
for cleanup.

> Anyway, ack.

Thanks,
Mike
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.