Re: [PATCH v4] Btrfs: ability to add label to snapshot and subvol

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Feb 25, 2013 at 01:31:45PM +0800, Anand Jain wrote:
> Generally snapshots are machine generated, so at any point in time
> if a sysadmin looks at a list of snapshots there should be some
> info about the snapshots to indicate purpose of it being created.

   I still can't see what benefits you get from having this extra
metadata that you couldn't put in a filename -- particularly in the
case of a scripted snapshot. However, assuming that you can bend the
argument to needing this feature...

> With this patch and along with the corresponding btrfs-progs patch
> a 32byte info can be added to the snapshots/subvol.

   How is this any different to using extended attributes to store the
same information? With the exception that xattrs:

 - can store more than 32 bytes
 - can store an arbitrary number of items 
 - have already been implemented
 - don't introduce more FS-specific ioctls
 - don't take up valuable extra space in metadata structures

> Further, ioctl is preferred over the attribute to write the label
> since btrfs-progs is not only the application which might be
> interacting with the subvol to write the label, for example
> btrfs-gui might as well write the label, so that needs an
> additional efforts to maintain a consistent keyword across the
> applications is difficult in the long run.

   As long as there's a well-known xattr name that's written by
btrfs-progs, that'll become the de-facto standard. If any other system
fails to use that attribute name, it becomes non-interoperable with
the default tools. This is probably enough to ensure that it'll get
fixed fairly quickly in this case (because the users that care about
the feature will complain it's not working right).

   My conclusion: go with user xattrs.

   Hugo.

-- 
=== Hugo Mills: hugo@... carfax.org.uk | darksatanic.net | lug.org.uk ===
  PGP key: 515C238D from wwwkeys.eu.pgp.net or http://www.carfax.org.uk
         --- Welcome to Hollywood, a land just off the coast ---         
                            of Planet Earth.                             

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux