[lkml]   [2006]   [Feb]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 0/3] sysfs representation of stacked devices (dm/md)
On Fri, Feb 17, 2006 at 01:00:17PM -0500, Jun'ichi Nomura wrote:
> These patches provide common representation of dependencies
> between stacked devices (dm and md) in sysfs.

I'm neutral on this change so long as it can be done without
introducing problems for device-mapper.

> Though md0, dm-0, dm-1 and sd[a-d] contain same LVM2 meta data,
> LVM2 should pick up md0 as PV, not dm-0, dm-1 and sdXs.
> mdadm should build md0 from dm-0 and dm-1, not from sdXs.
> Similar things will happen on 'mount' and 'fsck' if we use
> file system labels instead of LVM2.

I can't speak for the 'mount' code base, but I don't think it'll
make any significant difference to LVM2 - we'd still have to do
all the same device scanning as we do now because we have to be
aware of md devices defined in on-disk metadata regardless of
whether or not the kernel knows about them at the time the
command is run.

> Currently, these relationships are determined by each tool
> combining information like the existence of md metadata
> and dm dependency ioctl.

And attempts to open a device exclusively. That's one check LVM2
does before running 'pvcreate' on a device.

> thus we only need to check "holders" directory of the device
> to decide whether the device is used by dm/md.
> Also we can walk down the "slaves" directories to collect
> the devices conposing the given dm/md device.

For device-mapper devices, 'dmsetup deps' and ls --tree already
gives you this information reasonably efficiently.

Would others find the proposal useful for non-dm devices?

And rather than adding code just to dm and md, would it be better
to implement it by enhancing bd_claim()?

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2006-02-17 20:45    [W:0.478 / U:0.044 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site