From: Filipe David Borba Manana <fdmanana@gmail.com>
To: linux-btrfs@vger.kernel.org
Cc: Filipe David Borba Manana <fdmanana@gmail.com>
Subject: [PATCH 4/5] Btrfs-progs: add type root to label property
Date: Tue, 12 Nov 2013 13:41:45 +0000 [thread overview]
Message-ID: <1384263706-25549-5-git-send-email-fdmanana@gmail.com> (raw)
In-Reply-To: <1384263706-25549-1-git-send-email-fdmanana@gmail.com>
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@gmail.com>
---
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
next prev parent reply other threads:[~2013-11-12 13:42 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-11-12 13:41 [PATCH 0/5] Add support for object properties Filipe David Borba Manana
2013-11-12 13:41 ` [PATCH 1/5] Btrfs-progs: let get_label return the label instead of printing it Filipe David Borba Manana
2013-11-13 15:43 ` David Sterba
2013-11-12 13:41 ` [PATCH 2/5] Btrfs-progs: introduce btrfs property subgroup Filipe David Borba Manana
2013-11-12 13:41 ` [PATCH 3/5] Btrfs-progs: fix detection of root objects in cmds-property.c Filipe David Borba Manana
2013-11-12 13:41 ` Filipe David Borba Manana [this message]
2013-11-12 13:41 ` [PATCH 5/5] Btrfs-progs: add support for the compression property Filipe David Borba Manana
2013-11-13 1:22 ` [PATCH 5/5 V2] " Filipe David Borba Manana
2013-11-13 16:15 ` [PATCH 0/5] Add support for object properties David Sterba
2013-11-23 0:52 ` David Sterba
2013-11-23 10:45 ` Goffredo Baroncelli
2014-01-07 11:51 ` Filipe David Manana
2014-01-23 17:47 ` David Sterba
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1384263706-25549-5-git-send-email-fdmanana@gmail.com \
--to=fdmanana@gmail.com \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).