So that we can get the label of a mounted filesystem.
Before this change:
$ btrfs prop get /mnt/btrfs label
ERROR: object is not compatible with property
$ btrfs prop get /dev/sdb3 label
ERROR: dev /dev/sdb3 is mounted, use mount point
ERROR: failed to set/get property for object.
After this change:
$ btrfs prop get /mnt/btrfs label
label=foobar
Signed-off-by: Filipe David Borba Manana <fdmanana@xxxxxxxxx>
---
props.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/props.c b/props.c
index 763fd57..12fdc52 100644
--- a/props.c
+++ b/props.c
@@ -105,6 +105,7 @@ static int prop_label(enum prop_object_type type,
const struct prop_handler prop_handlers[] = {
{"ro", "Set/get read-only flag of subvolume.", 0, prop_object_subvol,
prop_read_only},
- {"label", "Set/get label of device.", 0, prop_object_dev, prop_label},
+ {"label", "Set/get label of device.", 0,
+ prop_object_dev | prop_object_root, prop_label},
{0, 0, 0, 0, 0}
};
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html