On Thu, Feb 18, 2010 at 12:46:56PM -0800, Mike Fedyk wrote: > On Thu, Feb 18, 2010 at 11:59 AM, Goffredo Baroncelli > <kreij...@gmail.com> wrote: > > On Thursday 18 February 2010, Chris Mason wrote: > >> I do like the subcommand method, more details below. > >> > > > > I try to summarise your suggestions. But there are some cases not to clear > > for > > me. > > I grouped the commands in three categories: subvolume, devices, and > > filesystem. > > > > > > devices scan > > devices show > > devices balance > > devices add > > devices remove > > > > subvolume snapshot > > subvolume delete > > subvolume create > > [subvolume list] > > > > filesystem resize > > [filesystem label] > > > > ??? defrag > > ??? sync > > > > > > > > For the first two categories both Chris and Mike agreed; but IMHO there are > > some commands that don't fit nor in devices, nor subvolume, like resize (we > > resize a filesystem) and label (not available now). > > > > A btrfs filesystem can span multiple devices. Resize resizes how big > of a chunk of one device btrfs uses.
Right, resize is actually always per device. When there is one device resizing the FS and the device are the same thing. > This would be used by > partitioning programs for instance. zfs uses the term "pool" instead > of filesystem to solve this ambiguous use of the term "filesystem" > since btrfs and zfs break people's existing definition of the word > "filesystem". > > > I don't know how classify defrag (per file / directory level ?) and sync > > (filesystem ?) > > It turns out that defrag is per file, which seems most cumbersome. > Maybe since it will probably eventually work against several types of > objects we could have: > > btrfs defrag file <file> > btrfs defrag directory <directory> > btrfs defrag subvol <subvol> I like these, although we don't currently support the directory/subvol side. But we can leave the option open to add these later. > btrfs defrag pool <pool> I don't think we'll need defrag pool. > > > > > An option is to consider commands without classification. For examples: > > > > $ btrfs subvolume create [path/]<subvolname> > > $ btrfs sync <path> > > $ btrfs defrag <file> > > Maybe if the btrfs developers are agreeable, we could do this as well: > > btrfs sync file <file> > btrfs sync directory <directory> fsync on files and dirs already does this, we don't need a btrfsctl for it. > btrfs sync subvol <subvol> btrfs sync subvol is nice. > btrfs sync pool <pool> > I don't think we need sync pool. -chris -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html