summaryrefslogtreecommitdiffstats
path: root/xlators/storage/posix/src/posix-inode-fd-ops.c
diff options
context:
space:
mode:
authorNigel Babu <nigelb@redhat.com>2018-04-18 10:37:46 +0530
committerNigel Babu <nigelb@redhat.com>2018-04-18 10:39:34 +0530
commite96695de4354fb58775d5baa50f07651c0592f0f (patch)
tree7c2cd23bfe4ea810383772762fcb79db8ad5248e /xlators/storage/posix/src/posix-inode-fd-ops.c
parentb2f94254cdba07658efb9052ba585ca83d7f1cfe (diff)
Revert "storage/posix: add pgfid in readdirp if needed"
This reverts commit d206fab73f6815c927a84171ee9361c9b31557b1. Change-Id: I5b43fdcf916bc844437c9d60f6957bc40936e3c2 Updates: bz#1560319 Signed-off-by: Nigel Babu <nigelb@redhat.com>
Diffstat (limited to 'xlators/storage/posix/src/posix-inode-fd-ops.c')
-rw-r--r--xlators/storage/posix/src/posix-inode-fd-ops.c46
1 files changed, 8 insertions, 38 deletions
diff --git a/xlators/storage/posix/src/posix-inode-fd-ops.c b/xlators/storage/posix/src/posix-inode-fd-ops.c
index ff82eb19f2d..fc7375e43ff 100644
--- a/xlators/storage/posix/src/posix-inode-fd-ops.c
+++ b/xlators/storage/posix/src/posix-inode-fd-ops.c
@@ -4910,22 +4910,14 @@ posix_d_type_from_ia_type (ia_type_t type)
int
posix_readdirp_fill (xlator_t *this, fd_t *fd, gf_dirent_t *entries, dict_t *dict)
{
- struct posix_private *priv = NULL;
- char *pgfid_xattr_key = NULL;
- posix_inode_ctx_t *ctx = NULL;
- gf_dirent_t *entry = NULL;
- inode_table_t *itable = NULL;
- inode_t *inode = NULL;
- char *hpath = NULL;
- int len = 0;
- struct iatt stbuf = {0, };
- uuid_t gfid;
- int ret = -1;
- int32_t op_ret = -1;
- int32_t op_errno = 0;
- int32_t nlink_samepgfid = 0;
-
- priv = this->private;
+ gf_dirent_t *entry = NULL;
+ inode_table_t *itable = NULL;
+ inode_t *inode = NULL;
+ char *hpath = NULL;
+ int len = 0;
+ struct iatt stbuf = {0, };
+ uuid_t gfid;
+ int ret = -1;
if (list_empty(&entries->list))
return 0;
@@ -4987,28 +4979,6 @@ posix_readdirp_fill (xlator_t *this, fd_t *fd, gf_dirent_t *entries, dict_t *dic
}
#endif
- if (priv->update_pgfid_nlinks && !IA_ISDIR (stbuf.ia_type)) {
- MAKE_PGFID_XATTR_KEY (pgfid_xattr_key,
- PGFID_XATTR_KEY_PREFIX,
- fd->inode->gfid);
-
- op_ret = posix_inode_ctx_get_all (entry->inode, this,
- &ctx);
- if (op_ret < 0)
- continue;
-
- pthread_mutex_lock (&ctx->pgfid_lock);
- {
- SET_PGFID_XATTR_IF_ABSENT (hpath,
- pgfid_xattr_key,
- nlink_samepgfid,
- XATTR_CREATE, op_ret,
- this, unlock);
- }
-unlock:
- pthread_mutex_unlock (&ctx->pgfid_lock);
- }
-
inode = NULL;
}