Re: [PATCH] rbd: replace the rbd sysfs interface

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Greg KH
Date: Wednesday, December 1, 2010 - 12:47 pm

On Wed, Dec 01, 2010 at 11:25:16AM -0800, Sage Weil wrote:

Sorry, I got distracted by a snowstorm knocking out my power for a few
days and then a holliday :)


What's wrong with:
	for snap in `ls /sys/bus/rbd/devices/$id/snap_*`; do ...
instead?

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.


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
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] rbd: replace the rbd sysfs interface, Yehuda Sadeh, (Tue Nov 16, 5:32 pm)
Re: [PATCH] rbd: replace the rbd sysfs interface, Greg KH, (Wed Nov 17, 10:19 am)
Re: [PATCH] rbd: replace the rbd sysfs interface, Yehuda Sadeh Weinraub, (Wed Nov 17, 4:00 pm)
Re: [PATCH] rbd: replace the rbd sysfs interface, Greg KH, (Wed Nov 17, 6:30 pm)
Re: [PATCH] rbd: replace the rbd sysfs interface, Yehuda Sadeh Weinraub, (Thu Nov 18, 3:53 pm)
Re: [PATCH] rbd: replace the rbd sysfs interface, Greg KH, (Thu Nov 18, 7:08 pm)
Re: [PATCH] rbd: replace the rbd sysfs interface, Yehuda Sadeh Weinraub, (Fri Nov 19, 1:42 pm)
Re: [PATCH] rbd: replace the rbd sysfs interface, Yehuda Sadeh, (Mon Nov 22, 4:33 pm)
Re: [PATCH] rbd: replace the rbd sysfs interface, Greg KH, (Mon Nov 22, 5:14 pm)
Re: [PATCH] rbd: replace the rbd sysfs interface, Greg KH, (Mon Nov 22, 5:14 pm)
Re: [PATCH] rbd: replace the rbd sysfs interface, Sage Weil, (Mon Nov 22, 5:45 pm)
Re: [PATCH] rbd: replace the rbd sysfs interface, Yehuda Sadeh Weinraub, (Mon Nov 22, 5:48 pm)
Re: [PATCH] rbd: replace the rbd sysfs interface, Greg KH, (Mon Nov 22, 5:56 pm)
Re: [PATCH] rbd: replace the rbd sysfs interface, Greg KH, (Mon Nov 22, 5:58 pm)
Re: [PATCH] rbd: replace the rbd sysfs interface, Yehuda Sadeh Weinraub, (Mon Nov 22, 6:19 pm)
Re: [PATCH] rbd: replace the rbd sysfs interface, Yehuda Sadeh, (Tue Nov 23, 5:23 pm)
Re: [PATCH] rbd: replace the rbd sysfs interface, Sage Weil, (Wed Dec 1, 12:25 pm)
Re: [PATCH] rbd: replace the rbd sysfs interface, Greg KH, (Wed Dec 1, 12:47 pm)
Re: [PATCH] rbd: replace the rbd sysfs interface, Sage Weil, (Wed Dec 1, 1:08 pm)
Re: [PATCH] rbd: replace the rbd sysfs interface, Sage Weil, (Wed Dec 1, 5:11 pm)