summaryrefslogtreecommitdiffstats
path: root/xlators/performance
diff options
context:
space:
mode:
authorRaghavendra G <raghavendra@gluster.com>2012-03-30 10:04:45 +0530
committerVijay Bellur <vijay@gluster.com>2012-04-02 02:38:24 -0700
commit0f3b55be4376c1c59131d999469d3b3c6aaddd87 (patch)
tree628c5f71c5391403ebaa48a1e56a830d89739016 /xlators/performance
parent67450da471307d1c09bd21694a76fb12b2fcd405 (diff)
performance/quick-read: open shouldn't be worried about checking
whether it is being done on a deleted dentry. lookup would've taken care of sending ENOENT, in case the entry was already deleted. Change-Id: I79c51e34ae3a202eb04123a2a58d0e819b6e94fa BUG: 808017 Signed-off-by: Raghavendra G <raghavendra@gluster.com> Reviewed-on: http://review.gluster.com/3044 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'xlators/performance')
-rw-r--r--xlators/performance/quick-read/src/quick-read.c65
-rw-r--r--xlators/performance/quick-read/src/quick-read.h8
2 files changed, 0 insertions, 73 deletions
diff --git a/xlators/performance/quick-read/src/quick-read.c b/xlators/performance/quick-read/src/quick-read.c
index dfe13997afa..6476ec5f5a8 100644
--- a/xlators/performance/quick-read/src/quick-read.c
+++ b/xlators/performance/quick-read/src/quick-read.c
@@ -241,7 +241,6 @@ __qr_inode_alloc (xlator_t *this, char *path, inode_t *inode)
}
INIT_LIST_HEAD (&qr_inode->lru);
- INIT_LIST_HEAD (&qr_inode->unlinked_dentries);
INIT_LIST_HEAD (&qr_inode->fd_list);
priority = qr_get_priority (&priv->conf, path);
@@ -259,7 +258,6 @@ out:
void
__qr_inode_free (qr_inode_t *qr_inode)
{
- qr_dentry_t *dentry = NULL, *tmp_dentry = NULL;
qr_fd_ctx_t *fdctx = NULL, *tmp_fdctx = NULL;
GF_VALIDATE_OR_GOTO ("quick-read", qr_inode, out);
@@ -272,14 +270,6 @@ __qr_inode_free (qr_inode_t *qr_inode)
LOCK (&qr_inode->inode->lock);
{
- list_for_each_entry_safe (dentry, tmp_dentry,
- &qr_inode->unlinked_dentries,
- unlink_list) {
- list_del_init (&dentry->unlink_list);
- GF_FREE (dentry->name);
- mem_put (dentry);
- }
-
list_for_each_entry_safe (fdctx, tmp_fdctx, &qr_inode->fd_list,
inode_list) {
list_del_init (&fdctx->inode_list);
@@ -690,7 +680,6 @@ qr_open (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t flags,
qr_local_t *local = NULL;
qr_private_t *priv = NULL;
qr_inode_table_t *table = NULL;
- qr_dentry_t *dentry = NULL;
GF_ASSERT (frame);
GF_VALIDATE_OR_GOTO (frame->this->name, this, unwind);
@@ -791,22 +780,9 @@ qr_open (call_frame_t *frame, xlator_t *this, loc_t *loc, int32_t flags,
LOCK (&fd->inode->lock);
{
- list_for_each_entry (dentry,
- &qr_inode->unlinked_dentries,
- unlink_list) {
- if ((strcmp (dentry->name, loc->name) == 0)
- && (uuid_compare (dentry->pargfid,
- loc->pargfid) == 0)) {
- op_ret = -1;
- op_errno = ENOENT;
- goto unlock;
- }
- }
-
list_add_tail (&qr_fd_ctx->inode_list,
&qr_inode->fd_list);
}
- unlock:
UNLOCK (&fd->inode->lock);
}
@@ -3174,26 +3150,6 @@ ret:
}
-static qr_dentry_t *
-qr_dentry_new (xlator_t *this)
-{
- qr_dentry_t *dentry = NULL;
- qr_private_t *priv = NULL;
-
- priv = this->private;
-
- dentry = mem_get0 (priv->dentry_pool);
- if (dentry == NULL) {
- goto out;
- }
-
- INIT_LIST_HEAD (&dentry->unlink_list);
-
-out:
- return dentry;
-}
-
-
int32_t
qr_unlink_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int32_t op_ret, int32_t op_errno, struct iatt *preparent,
@@ -3241,7 +3197,6 @@ int32_t
qr_unlink (call_frame_t *frame, xlator_t *this, loc_t *loc, int xflag,
dict_t *xdata)
{
- qr_dentry_t *dentry = NULL;
int32_t op_errno = -1, ret = -1, op_ret = -1;
uint64_t value = 0;
struct list_head fd_list = {0, };
@@ -3271,20 +3226,8 @@ qr_unlink (call_frame_t *frame, xlator_t *this, loc_t *loc, int xflag,
frame->local = local;
- dentry = qr_dentry_new (this);
- if (dentry == NULL) {
- op_errno = ENOMEM;
- goto unwind;
- }
-
- dentry->name = gf_strdup (loc->name);
- uuid_copy (dentry->pargfid, loc->pargfid);
-
LOCK (&loc->inode->lock);
{
- list_add_tail (&dentry->unlink_list,
- &qr_inode->unlinked_dentries);
-
list_for_each_entry (fdctx, &qr_inode->fd_list, inode_list) {
__fd_ref (fdctx->fd);
list_add_tail (&fdctx->tmp_list, &fd_list);
@@ -3863,14 +3806,6 @@ init (xlator_t *this)
goto out;
}
- priv->dentry_pool = mem_pool_new (qr_dentry_t, 1024);
- if (priv->dentry_pool == NULL) {
- ret = -1;
- gf_log (this->name, GF_LOG_ERROR,
- "failed to create dentry memory pool");
- goto out;
- }
-
ret = 0;
this->private = priv;
diff --git a/xlators/performance/quick-read/src/quick-read.h b/xlators/performance/quick-read/src/quick-read.h
index 6058d523b63..41ac4887bc6 100644
--- a/xlators/performance/quick-read/src/quick-read.h
+++ b/xlators/performance/quick-read/src/quick-read.h
@@ -74,13 +74,6 @@ struct qr_local {
};
typedef struct qr_local qr_local_t;
-struct qr_dentry {
- char *name;
- uuid_t pargfid;
- struct list_head unlink_list;
-};
-typedef struct qr_dentry qr_dentry_t;
-
struct qr_inode {
dict_t *xattr;
inode_t *inode;
@@ -119,7 +112,6 @@ typedef struct qr_inode_table qr_inode_table_t;
struct qr_private {
qr_conf_t conf;
qr_inode_table_t table;
- struct mem_pool *dentry_pool;
};
typedef struct qr_private qr_private_t;