>
> And you would be using libudev ideally for a .c file, and iterating over
> the devices is pretty trivial that way from what I have seen.
>
> > Adding an intermediate snaps/ subdir would let them instead do
> >
> > $ for snap in `ls /sys/bus/rbd/devices/$id/snaps/`; do ...
> >
> > without worrying about the (arbitrarily named) snaps from colliding with
> > device attributes. Assuming that is a preferable interface, is the
> > "right" way to do that to make "snaps" a struct device? Or is there a
> > good reason why that is not preferable?
>
> It's not preferable as that "snaps" directory is a "blank" in the device
> tree, not showing the heiarchy properly. You can't walk the devices
> back from the devices in snaps/ to the parent properly (i.e. you would
> get stuck at the snaps/ directory as it's not a struct device, but a
> random kobject.
>
> Hope this helps,
>
> greg k-h
> --
> To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
> the body of a message to
majordomo@vger.kernel.org
> More majordomo info at
http://vger.kernel.org/majordomo-info.html
>
>