summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNiels de Vos <ndevos@redhat.com>2017-03-07 18:01:25 +0100
committerNiels de Vos <ndevos@redhat.com>2017-04-07 07:57:22 -0400
commitabe5b927878bb72e177942a79586300d98ac44f8 (patch)
tree9f69028f777cd81511cf40e1ad457cda1612a2fa
parent50ac9c87020d0e9712491c04afbb208a01c6ecbd (diff)
glusterd: support filesystems with dynamic inode sizes
btrfs and zfs are two filesystems that do not have fixed sizes for inodes. Instead of logging an error, skip checking and mark the size as "N/A" like other properties that can not be reported. The error message that was reported by users on the mailinglist shows up like: [glusterd-utils.c:5458:glusterd_add_inode_size_to_dict] 0-management: could not find (null) to getinode size for /dev/vdb (btrfs): (null) package missing? Cherry picked from commit 12921693b572f642156d3167d1c92d3449dfc8ec: > Change-Id: Ib10b7a3669f2f4221075715d9fd44ce1ffc35324 > Reported-by: Arman Khalatyan <arm2arm@gmail.com> > URL: http://lists.gluster.org/pipermail/gluster-users/2017-March/030189.html > BUG: 1433425 > Signed-off-by: Niels de Vos <ndevos@redhat.com> > Reviewed-on: https://review.gluster.org/16867 > Smoke: Gluster Build System <jenkins@build.gluster.org> > Reviewed-by: Atin Mukherjee <amukherj@redhat.com> > Reviewed-by: Prashanth Pai <ppai@redhat.com> > NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> > CentOS-regression: Gluster Build System <jenkins@build.gluster.org> Change-Id: Ib10b7a3669f2f4221075715d9fd44ce1ffc35324 Reported-by: Arman Khalatyan <arm2arm@gmail.com> BUG: 1436412 Signed-off-by: Niels de Vos <ndevos@redhat.com> Reviewed-on: https://review.gluster.org/16960 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: Zhou Zhengping <johnzzpcrystal@gmail.com>
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-utils.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
index 46d932bbc2e..931683486ab 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
@@ -5382,6 +5382,7 @@ static struct fs_info {
{ "ext3", "tune2fs", "-l", "Inode size:", "e2fsprogs" },
{ "ext4", "tune2fs", "-l", "Inode size:", "e2fsprogs" },
{ "btrfs", NULL, NULL, NULL, NULL },
+ { "zfs", NULL, NULL, NULL, NULL },
{ NULL, NULL, NULL, NULL, NULL}
};
@@ -5426,6 +5427,16 @@ glusterd_add_inode_size_to_dict (dict_t *dict, int count)
for (fs = glusterd_fs ; fs->fs_type_name; fs++) {
if (strcmp (fs_name, fs->fs_type_name) == 0) {
+ if (!fs->fs_tool_name) {
+ /* dynamic inodes */
+ gf_msg (THIS->name, GF_LOG_INFO, 0,
+ GD_MSG_INODE_SIZE_GET_FAIL, "the "
+ "brick on %s (%s) uses dynamic inode "
+ "sizes", device, fs_name);
+ cur_word = "N/A";
+ goto cached;
+ }
+
snprintf (fs_tool_name, sizeof (fs_tool_name),
"/usr/sbin/%s", fs->fs_tool_name);
if (sys_access (fs_tool_name, R_OK|X_OK) == 0)