Messages in this thread | | | Date | Fri, 17 Feb 2006 19:42:49 +0000 | From | Alasdair G Kergon <> | Subject | Re: [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()?
Alasdair -- agk@redhat.com - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |