On Thu, Oct 15, 2015 at 06:17:06PM +0200, Arvin Schnell wrote:
> On Thu, Oct 15, 2015 at 05:30:15PM +0200, Martin Vidner wrote:

> > What is a Holder? It seems to be characterized by having a source
> > sid and a target sid, which still does not give me a hint.
> > Its subclasses Subdevice and User are even more opaque to me.
> 
> Technical it's the edge in the graph, so it expresses what device
> is linked what device. The name I have borrowed from sysfs (but
> it's not the same as in sysfs), e.g. on my system I have
> (simplified)
> 
> # ll /sys/block/sda/sda2/holders/
> lrwxrwxrwx 1 root root 0 Oct 15 17:17 dm-0 -> 
> ../../../../../../../../../../virtual/block/dm-0
> lrwxrwxrwx 1 root root 0 Oct 15 17:17 dm-1 -> 
> ../../../../../../../../../../virtual/block/dm-1
> 
> In the graph there are different holders.
> 
> - Subdevice: E.g. a partition is the subdevice of a Disk and a
>   logical volume is the subdevice of a volume group.
> 
> - User: E.g. a partition is used by a volume group (the case on
>   my system), a disk is used by a RAID, a logical volume is used
>   by a filesystem.
> 
> So far the distinction is not really important so it could
> change.

The idea is of course to have more Holder classes that even have
data. E.g. a RaidUser which has a "spare device" flag or a
FilesystemUser which has a "journal/log device" flag.

By keeping that data in the holders you don't need special care
when manipulating the graph, e.g. removing a device or copying
the graph.

With extra lists in the Raid or Filesystem object such special
care would be needed.

ciao Arvin

-- 
Arvin Schnell, <[email protected]>
Senior Software Engineer, Research & Development
SUSE Linux GmbH, GF: Felix Imendörffer, Jane Smithard, Graham Norton, HRB 21284 
(AG Nürnberg)
Maxfeldstraße 5
90409 Nürnberg
Germany
-- 
To unsubscribe, e-mail: [email protected]
To contact the owner, e-mail: [email protected]

Reply via email to