This is the Btrfs-progs changes to add support for the subvol label.
As discussed in the mailing-list there are two ways we could get the
label attached to the subvol, using kernel-ioctl method and the
other method is by using attributes.

I preferred kernel-ioctl method over the attribute since
there might be more than just the btrfs-progs which is reading and
writing the label, if used attributes, the keyword is defined and
used at the application level, which will be difficult to publicize
and maintain the consistent keyword across any application in the
long run.  In the kernel-ioctl method we don't have this problem.

For kernel-ioctl method you need the below two Btrfs-progs 
patches and the following kernel patch which is posted to
mailing-list

 --------
  Btrfs: ability to add label to snapshot and subvol

 fs/btrfs/ctree.h           | 12 +++++++++-
 fs/btrfs/ioctl.c           | 58 ++++++++++++++++++++++++++++++++++++++++++++++
 fs/btrfs/transaction.c     |  1 +
 include/uapi/linux/btrfs.h |  2 ++
 4 files changed, 72 insertions(+), 1 deletion(-)
 --------

Still in any case if we decide to use the attributes method
over the kernel-ioctl method, then following btrfs-progs patch
  Btrfs-progs: add feature to label subvol and snapshot
should be replaced with
  Btrfs-progs: add attribute label for subvol and snapshot
  (also posted in the mailing-list)
and the above kernel patch should be removed.

v4: rebased to David's integration-20130219 branch

Anand Jain (2):
  Btrfs-progs: add feature to label subvol and snapshot
  Btrfs-progs: cmd option to show or set the subvol label

 btrfslabel.c     | 45 +++++++++++++++++++++++++++++++++++++++++++++
 btrfslabel.h     |  4 +++-
 cmds-subvolume.c | 37 +++++++++++++++++++++++++++++++++++++
 ctree.h          |  4 +++-
 ioctl.h          |  2 ++
 man/btrfs.8.in   |  6 ++++++
 print-tree.c     |  2 ++
 7 files changed, 98 insertions(+), 2 deletions(-)

-- 
1.8.1.227.g44fe835

--
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

Reply via email to