Message ID | 1381203700-17558-2-git-send-email-anand.jain@oracle.com (mailing list archive) |
---|---|
State | Under Review, archived |
Headers | show |
On Tue, Oct 08, 2013 at 11:41:39AM +0800, Anand Jain wrote: > for mounted btrfs filesystem this patch proposes to add > mount point and group profile to the filesystem show output. > this helps user to quickly understand short details of the > btrfs filesystem quickly. > > end user using this new btrfs fi show would surely notice this > will reduce other commands normally used following the current > btrfs fi show command. (like mount and btrfs fi df). of course > user should use fi df to know detailed info about the sizes. > > preview as below.. > > Label: none uuid: 26d539a5-8968-4cf0-b4b5-5fd50105f8a0 mounted: /btrfs > Group profile: Metadata: single Metadata: DUP Data: single It would look better if the profile types are grouped together, otherwise it can drift to the right quite far. Why is Sytem not listed here? The 'fi show' command is kind of high-level overview, so I'm kind of ok to print the group profiles here. david -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
>> preview as below.. >> >> Label: none uuid: 26d539a5-8968-4cf0-b4b5-5fd50105f8a0 mounted: /btrfs >> Group profile: Metadata: single Metadata: DUP Data: single > > It would look better if the profile types are grouped together, As of now mkfs.btrfs and balance don't agree on the same set of default group profiles. When we fix mkfs.btrfs (and for now when user run balance) we won't see multiple profile for Metadata/Data. So grouping them isn't needed, rather we should fix mkfs and balance to be inline. For now (in the FS which contains some data) after the balance we won't see multiple group-profile for same group-type. pls comment / let me know. > otherwise it can drift to the right quite far. as of now do we practicality use/support multiple groups for the same type (metadata/data), if not the content will be always 6 words here (I am considering a system which is balanced). > Why is Sytem not listed here? System is not an user choice (?), So users won't be keen to know at least in this high-level display. IMO. Thanks, Anand -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/cmds-filesystem.c b/cmds-filesystem.c index 9e0c8b9..74b7a06 100644 --- a/cmds-filesystem.c +++ b/cmds-filesystem.c @@ -273,10 +273,21 @@ static int print_one_fs(struct btrfs_ioctl_fs_info_args *fs_info, int i; char uuidbuf[37]; struct btrfs_ioctl_dev_info_args *tmp_dev_info; + u64 flags; uuid_unparse(fs_info->fsid, uuidbuf); - printf("Label: %s uuid: %s\n", - strlen(label) ? label : "none", uuidbuf); + printf("Label: %s uuid: %s mounted: %s\n", + strlen(label) ? label : "none", uuidbuf, path); + printf("\tGroup profile:"); + for (i = space_info->total_spaces - 1; i >= 0; i--) { + flags = space_info->spaces[i].flags; + if (flags & BTRFS_BLOCK_GROUP_SYSTEM) + continue; + printf(" %s: %s", group_type_str(flags), + group_profile_str(flags)); + printf(" "); + } + printf("\n"); printf("\tTotal devices %llu FS bytes used %s\n", fs_info->num_devices,
for mounted btrfs filesystem this patch proposes to add mount point and group profile to the filesystem show output. this helps user to quickly understand short details of the btrfs filesystem quickly. end user using this new btrfs fi show would surely notice this will reduce other commands normally used following the current btrfs fi show command. (like mount and btrfs fi df). of course user should use fi df to know detailed info about the sizes. preview as below.. Label: none uuid: 26d539a5-8968-4cf0-b4b5-5fd50105f8a0 mounted: /btrfs Group profile: Metadata: single Metadata: DUP Data: single Total devices 1 FS bytes used 28.00KiB devid 1 size 1.98GiB used 238.25MiB path /dev/mapper/mpatha v2: commit message edited. Signed-off-by: Anand Jain <anand.jain@oracle.com> --- cmds-filesystem.c | 15 +++++++++++++-- 1 files changed, 13 insertions(+), 2 deletions(-)