On Fri, Jan 14, 2011 at 16:07, Karel Zak <kzak@xxxxxxxxxx> wrote: > On Thu, Jan 13, 2011 at 05:10:02PM +0100, Kay Sievers wrote: >> On Thu, Jan 13, 2011 at 16:59, Karel Zak <kzak@xxxxxxxxxx> wrote: >> > On Thu, Jan 13, 2011 at 03:43:38PM +0100, Kay Sievers wrote: >> >> On Thu, Jan 13, 2011 at 15:30, Tejun Heo <tj@xxxxxxxxxx> wrote: >> >> > On Thu, Jan 13, 2011 at 3:25 PM, Milan Broz <mbroz@xxxxxxxxxx> wrote: >> >> >> Maybe, but this was not invented in DM/MD camp:-) >> >> >> Probably Kay or Greg can answer why it was done this way? >> >> >> >> It's not from Greg or Kay. It just appeared some day in the context of dm. :) >> >> >> >> And yes, symlinks *look* nice and simple for the outside, but they are >> >> not, and have all sorts of problems like non-atomic updates, make it >> > >> > ÂSounds like sysfs implementation problem, right? >> >> It's a normal multi-file problem. It can by-definition not be atomic >> without doing really weird locking things. > > ÂBTW, lsblk(8) and libblkid don't depend on the fact that slaves/holders > Âfiles are symlinks. > > ÂThe important thing is the filename (/sys/block/.../slaves/<name>) > Âonly. We don't follow the symlinks and we don't use readlink() there. > > ÂIt means that you can replace the symlinks with regular files where > Âin the file contents is for example maj:min, etc. I don't think we really can change anything here, there are more users of it. If we would go changing things here, the file names should never be the device name but the format "b8:32" for blockdevs, "n22" for the network ifindex, ... which is the unchangeable unique kernel id -- not depending on any possible device rename, or fast destroy/re-create or anything like that. Kay -- dm-devel mailing list dm-devel@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/dm-devel