summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/client/src/client.c
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2012-01-17 05:57:24 +0530
committerAnand Avati <avati@gluster.com>2012-01-25 02:24:20 -0800
commitd7ecaaa1ed0f88869812ea17cb64a102a74c8c1c (patch)
tree4293106362bf9dec2e6260a4062239a9b7340cc0 /xlators/protocol/client/src/client.c
parent6c54022f1b1c7f5f458f6a7e783203d11e7f89b5 (diff)
core: add 'fremovexattr()' fop
so operations can be done on fd for extended attribute removal Change-Id: Ie026f1b53793aeb4ae33e96ea5408c7a97f34bf6 Signed-off-by: Amar Tumballi <amar@gluster.com> BUG: 766571 Reviewed-on: http://review.gluster.com/778 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
Diffstat (limited to 'xlators/protocol/client/src/client.c')
-rw-r--r--xlators/protocol/client/src/client.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/xlators/protocol/client/src/client.c b/xlators/protocol/client/src/client.c
index 8e823bec4..5f1198703 100644
--- a/xlators/protocol/client/src/client.c
+++ b/xlators/protocol/client/src/client.c
@@ -1421,6 +1421,38 @@ out:
return 0;
}
+int32_t
+client_fremovexattr (call_frame_t *frame, xlator_t *this, fd_t *fd,
+ const char *name)
+{
+ int ret = -1;
+ clnt_conf_t *conf = NULL;
+ rpc_clnt_procedure_t *proc = NULL;
+ clnt_args_t args = {0,};
+
+ conf = this->private;
+ if (!conf || !conf->fops)
+ goto out;
+
+ args.name = name;
+ args.fd = fd;
+
+ proc = &conf->fops->proctable[GF_FOP_FREMOVEXATTR];
+ if (!proc) {
+ gf_log (this->name, GF_LOG_ERROR,
+ "rpc procedure not found for %s",
+ gf_fop_list[GF_FOP_FREMOVEXATTR]);
+ goto out;
+ }
+ if (proc->fn)
+ ret = proc->fn (frame, this, &args);
+out:
+ if (ret)
+ STACK_UNWIND_STRICT (fremovexattr, frame, -1, ENOTCONN);
+
+ return 0;
+}
+
int32_t
client_lk (call_frame_t *frame, xlator_t *this, fd_t *fd, int32_t cmd,
@@ -2303,6 +2335,7 @@ struct xlator_fops fops = {
.fsetxattr = client_fsetxattr,
.fgetxattr = client_fgetxattr,
.removexattr = client_removexattr,
+ .fremovexattr = client_fremovexattr,
.opendir = client_opendir,
.readdir = client_readdir,
.readdirp = client_readdirp,