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

Re: [dm-devel] Bug? Determining the holders of partitions shadowed by dm-multipath.



Hi Joel,

Joel Becker wrote:
On Wed, Feb 11, 2009 at 08:32:20AM +0100, Hannes Reinecke wrote:
Hi Joel,

[ .. ]
Well, yes.
That's because you have _two_ parent-child relationship in sysfs.

The one (as you already noted) is the holders / slaves directories in sysfs.
However, partitions are handled differently; they are listed under

/sys/block/sda/sda2

(note the subdir) and do not appear under holders / slaves. So the correct algorithm
is to
a) check the holders / slaves
and
b) check if the parent directory starts with the same name and if so, check for
the holders / slaves relationship there.

	Why not just setup holders in sda2?  It's held, after all.
It's just very counterintuitive to look at an empty holders and discover
that it's empty yet held.

We don't need to, as sda2 is by definition held by sda.
So adding a 'holders' directory here which just points to the parent
directory is quite pointless.
(And it will become even more absurd for the 'slaves' directory in sda ...)

Remember, partitions precede the holders / slaves abstraction by years.
The former abstraction was only introduced to map device-mapper / md
device relationships onto sysfs.

	Btw, do we absolutely guarantee that all block devices, forever,
will have partitions in sysfs named
"/sys/block/<parent>/<parent><more>"?

Yes, quite so. This is one relationship I would _not_ touch.

However, I'm all for it to optionally disable the partitions detection
within the kernel and have it all done in userspace by kpartx.
Then we'll be getting the 'holders/slave' relationship automatically
and won't be bothered by a separate partition scheme anymore.

Looks like it's time to dig out the patch again.

Cheers,

Hannes
--
Dr. Hannes Reinecke		      zSeries & Storage
hare suse de			      +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Markus Rex, HRB 16746 (AG Nürnberg)


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