Skip to content

Btrfs-progs: Add support for subvol label

Anand Jain linux-btrfs 4 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest2 patches 0 repliesNew
  2. v311 patches 7 repliesSuperseded
  3. v28 patches 0 repliesSuperseded
Earlier versions · 1
VersionPostedPatchesRepliesStatus
v13 patches0 repliesSuperseded

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2Btrfs-progs: move open_file_or_dir() to utils.cMakefile btrfsctl.c cmds-balance.c +8 more+42 -560 replies
1/2Btrfs-progs: add feature to label subvol and snapshotbtrfslabel.c btrfslabel.h ctree.h +2 more+55 -20 replies
2/2Btrfs-progs: add feature to label subvol and snapshotbtrfslabel.c btrfslabel.h cmds-filesystem.c +1 more+74 -60 replies
2/2Btrfs-progs: cmd option to show or set the subvol labelcmds-subvolume.c man/btrfs.8.in+43 -00 replies

Reviews trailers per patch

None of the 4 patches has a Reviewed-by or Acked-by.

PatchStefan Behrens
1/2Original-Signed-off-by
1/2Original-Signed-off-by
2/2
2/2

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH 0/2 v4] Btrfs-progs: Add support for subvol label

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(-)
Signature · 1 line
1.8.1.227.g44fe835