From 55feb734c757cdf64e356afb7b6e36f98f4b5c19 Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Wed, 6 Feb 2013 07:12:40 +0530 Subject: storage/posix: Fix open-fd-count virtual xattr Send open-fd-count maintained in inode. Change-Id: I23db5d052bdeb4f67978ff618ed5a0bed7d1592d BUG: 908146 Signed-off-by: Pranith Kumar K Reviewed-on: http://review.gluster.org/4469 Tested-by: Gluster Build System Reviewed-by: Anand Avati --- xlators/storage/posix/src/posix-helpers.c | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'xlators/storage') diff --git a/xlators/storage/posix/src/posix-helpers.c b/xlators/storage/posix/src/posix-helpers.c index 7e8d5838c..f8284d335 100644 --- a/xlators/storage/posix/src/posix-helpers.c +++ b/xlators/storage/posix/src/posix-helpers.c @@ -173,14 +173,9 @@ _posix_xattr_get_set (dict_t *xattr_req, } } else if (!strcmp (key, GLUSTERFS_OPEN_FD_COUNT)) { loc = filler->loc; - if (loc && !list_empty (&loc->inode->fd_list)) { - ret = dict_set_uint32 (filler->xattr, key, 1); - if (ret < 0) - gf_log (filler->this->name, GF_LOG_WARNING, - "Failed to set dictionary value for %s", - key); - } else { - ret = dict_set_uint32 (filler->xattr, key, 0); + if (loc) { + ret = dict_set_uint32 (filler->xattr, key, + loc->inode->fd_count); if (ret < 0) gf_log (filler->this->name, GF_LOG_WARNING, "Failed to set dictionary value for %s", -- cgit