On Sat, Oct 30, 2010 at 07:44:35PM +0200, Goffredo Baroncelli wrote: > On Saturday, 30 October, 2010, Hugo Mills wrote: > > One fundamental question, though -- is the progress monitor > > function best implemented as an ioctl, as I've done here, or should it > > be two or three sysfs files? I'm thinking of /proc/mdstat... > > Obviously, /proc/mdstat would never get into /sys, but exposing the > > "expected" and "remaining" values as files has an attractive > > simplicity to it. > > I like the idea that these info should be put under sysfs. Something like > > /sys/btrfs/<filesystem-uuid>/
/sys/fs/btrfs/<uuid> I think. Also: /sys/fs/btrfs/<label> as a symlink to the <uuid> directory. > balance -> info on balancing For the one-value-per-file rule of sysfs, this should probably be balance_expected and balance_completed, each holding a count of block groups. > devices -> list of device (a directory of > links or a file which contains > the list of devices) > subvolumes/ -> info on subvolume(s) > label -> label of the filesystem > <other btrfs filesystem related knoba> The other one that struck me earlier today as being useful was tracking the progress of a dev delete operation. But that'll come later. > Obviously we need another btrfs command to extract an uuid from a btrfs > filesystem like: > > # btrfs filesystem get-uuid /path/to/a/btrfs/filesystem > f9b9c413-0dc8-4e3f-94f2-86faa702f519 Possibly a slightly more general "fi metadata" with switches for UUID and label? # btrfs fi metadata [-u|--uuid] /path # btrfs fi metadata [-l|--label] /path Hugo. -- === Hugo Mills: h...@... carfax.org.uk | darksatanic.net | lug.org.uk === PGP key: 515C238D from wwwkeys.eu.pgp.net or http://www.carfax.org.uk --- Is a diversity twice as good as a university? ---
signature.asc
Description: Digital signature