diff options
author | Xavier Hernandez <xhernandez@datalab.es> | 2017-01-10 11:21:06 +0100 |
---|---|---|
committer | Atin Mukherjee <amukherj@redhat.com> | 2017-01-24 23:50:01 -0500 |
commit | 644ca6d8656e323a142c0a3cd2942ff5ce718785 (patch) | |
tree | 2ba49355a10cf777b3a6e02d87886b2fc08a8bcb /cli/src/cli-xml-output.c | |
parent | dcfdad0036f121b26da1e9ef479f5dbe32765cb7 (diff) |
cli: keep 'gluster volume status detail' consistent
The output of the command 'gluster volume status <volname> detail' is
not consistent between operating systems. On linux hosts it shows the
file system type, the device name, mount options and inode size of each
brick. However the same command executed on a FreeBSD host doesn't show
all this information, even for bricks stored on a linux.
Additionally, for hosts other than linux, this information is shown as
'N/A' many times. This has been fixed to show as much information as it
can be retrieved from the operating system.
The file contrib/mount/mntent.c has been mostly rewriten because it
contained many errors that caused mount information to not be retrieved
on some operating systems.
> Change-Id: Icb6e19e8af6ec82255e7792ad71914ef679fc316
> BUG: 1411334
> Signed-off-by: Xavier Hernandez <xhernandez@datalab.es>
> Reviewed-on: http://review.gluster.org/16371
> Smoke: Gluster Build System <jenkins@build.gluster.org>
> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
> Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
> Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Change-Id: I01f99562dddff5d5cb6974df44d1b6366faf05dc
BUG: 1415132
Signed-off-by: Xavier Hernandez <xhernandez@datalab.es>
Reviewed-on: https://review.gluster.org/16442
Smoke: Gluster Build System <jenkins@build.gluster.org>
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Kaleb KEITHLEY <kkeithle@redhat.com>
Diffstat (limited to 'cli/src/cli-xml-output.c')
-rw-r--r-- | cli/src/cli-xml-output.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/cli/src/cli-xml-output.c b/cli/src/cli-xml-output.c index dbc8aa7b848..4eafc0b5e68 100644 --- a/cli/src/cli-xml-output.c +++ b/cli/src/cli-xml-output.c @@ -438,12 +438,6 @@ cli_xml_output_vol_status_detail (xmlTextWriterPtr writer, dict_t *dict, (xmlChar *)"fsName", "%s", fs_name); - /* inode details are only available for ext 2/3/4 & xfs */ - if (!fs_name || !IS_EXT_FS(fs_name) || strcmp (fs_name, "xfs")) { - ret = 0; - goto out; - } - memset (key, 0, sizeof (key)); snprintf (key, sizeof (key), "brick%d.inode_size", brick_index); ret = dict_get_str (dict, key, &inode_size); @@ -467,6 +461,8 @@ cli_xml_output_vol_status_detail (xmlTextWriterPtr writer, dict_t *dict, ret = xmlTextWriterWriteFormatElement (writer, (xmlChar *)"inodesFree", "%"PRIu64, inodes_free); + else + ret = 0; out: gf_log ("cli", GF_LOG_DEBUG, "Returning %d", ret); |