summaryrefslogtreecommitdiffstats
path: root/cli/src/cli-cmd-volume.c
diff options
context:
space:
mode:
authorKaushal M <kaushal@redhat.com>2012-03-29 18:18:50 +0530
committerVijay Bellur <vijay@gluster.com>2012-03-29 07:57:37 -0700
commit33bbab6ff9b34b1e623a53cc0c3483563f2aeace (patch)
treea78ee9e4cc629824f0a0dfab77376c7fdb8100fa /cli/src/cli-cmd-volume.c
parent7cc52b98a54ef29844a302f2d4f129adcaefcbf3 (diff)
cli, glusterd : "volume status detail" fixes
Use _PATH_MOUNTED, which refers to /etc/mtab, in glusterd_add_brick_mount_details(), instead of _PATH_MNTTAB, which refers to /etc/fstab. More changes to cli to show available information. Change-Id: I9da97c0fec14b3372f281efc0be37b2799bc2d0d BUG: 808044 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.com/3037 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Jeff Darcy <jdarcy@redhat.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'cli/src/cli-cmd-volume.c')
-rw-r--r--cli/src/cli-cmd-volume.c48
1 files changed, 17 insertions, 31 deletions
diff --git a/cli/src/cli-cmd-volume.c b/cli/src/cli-cmd-volume.c
index c54cf8ec2..7ba4e838f 100644
--- a/cli/src/cli-cmd-volume.c
+++ b/cli/src/cli-cmd-volume.c
@@ -1439,7 +1439,6 @@ cli_get_detail_status (dict_t *dict, int i, cli_volume_status_t *status)
status->block_size = 0;
}
-#ifdef GF_LINUX_HOST_OS
memset (key, 0, sizeof (key));
snprintf (key, sizeof (key), "brick%d.mnt_options", i);
ret = dict_get_str (dict, key, &(status->mount_options));
@@ -1453,42 +1452,29 @@ cli_get_detail_status (dict_t *dict, int i, cli_volume_status_t *status)
ret = 0;
status->fs_name = NULL;
}
-#endif
-
- if (status->fs_name && (IS_EXT_FS(status->fs_name) ||
- !strcmp (status->fs_name, "xfs"))) {
-
-#ifdef GF_LINUX_HOST_OS
- memset (key, 0, sizeof (key));
- snprintf (key, sizeof (key), "brick%d.inode_size", i);
- ret = dict_get_str (dict, key, &(status->inode_size));
- if (ret)
- status->inode_size = NULL;
-#endif
-
- memset (key, 0, sizeof (key));
- snprintf (key, sizeof (key), "brick%d.total_inodes", i);
- ret = dict_get_uint64 (dict, key,
- &(status->total_inodes));
- if (ret)
- status->total_inodes = 0;
-
- memset (key, 0, sizeof (key));
- snprintf (key, sizeof (key), "brick%d.free_inodes", i);
- ret = dict_get_uint64 (dict, key, &(status->free_inodes));
- if (ret) {
- ret = 0;
- status->free_inodes = 0;
- }
- } else {
-#ifdef GF_LINUX_HOST_OS
+ memset (key, 0, sizeof (key));
+ snprintf (key, sizeof (key), "brick%d.inode_size", i);
+ ret = dict_get_str (dict, key, &(status->inode_size));
+ if (ret)
status->inode_size = NULL;
-#endif
+
+ memset (key, 0, sizeof (key));
+ snprintf (key, sizeof (key), "brick%d.total_inodes", i);
+ ret = dict_get_uint64 (dict, key,
+ &(status->total_inodes));
+ if (ret)
status->total_inodes = 0;
+
+ memset (key, 0, sizeof (key));
+ snprintf (key, sizeof (key), "brick%d.free_inodes", i);
+ ret = dict_get_uint64 (dict, key, &(status->free_inodes));
+ if (ret) {
+ ret = 0;
status->free_inodes = 0;
}
+
out:
return ret;
}