summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/defaults.c
diff options
context:
space:
mode:
authorVikas Gorur <vikas@zresearch.com>2009-03-03 16:00:58 +0530
committerAnand V. Avati <avati@amp.gluster.com>2009-03-07 02:08:41 +0530
commit0991858fca6dc93de685e9527fb9ff47d77f616f (patch)
treeadcdf627d40c1fe90a8535c7b0bc27d057901788 /libglusterfs/src/defaults.c
parentd092dff9a6e23d5fdef64154b6f3d6211f7482a6 (diff)
added fgetxattr and fsetxattr FOPs
Signed-off-by: Anand V. Avati <avati@amp.gluster.com>
Diffstat (limited to 'libglusterfs/src/defaults.c')
-rw-r--r--libglusterfs/src/defaults.c73
1 files changed, 68 insertions, 5 deletions
diff --git a/libglusterfs/src/defaults.c b/libglusterfs/src/defaults.c
index 69d03160..dc290863 100644
--- a/libglusterfs/src/defaults.c
+++ b/libglusterfs/src/defaults.c
@@ -974,13 +974,76 @@ default_setxattr (call_frame_t *frame,
return 0;
}
+
+static int32_t
+default_fsetxattr_cbk (call_frame_t *frame,
+ void *cookie,
+ xlator_t *this,
+ int32_t op_ret,
+ int32_t op_errno)
+{
+ STACK_UNWIND (frame,
+ op_ret,
+ op_errno);
+ return 0;
+}
+
+int32_t
+default_fsetxattr (call_frame_t *frame,
+ xlator_t *this,
+ fd_t *fd,
+ dict_t *dict,
+ int32_t flags)
+{
+ STACK_WIND (frame,
+ default_fsetxattr_cbk,
+ FIRST_CHILD(this),
+ FIRST_CHILD(this)->fops->fsetxattr,
+ fd,
+ dict,
+ flags);
+ return 0;
+}
+
+
+static int32_t
+default_fgetxattr_cbk (call_frame_t *frame,
+ void *cookie,
+ xlator_t *this,
+ int32_t op_ret,
+ int32_t op_errno,
+ dict_t *dict)
+{
+ STACK_UNWIND (frame,
+ op_ret,
+ op_errno,
+ dict);
+ return 0;
+}
+
+
+int32_t
+default_fgetxattr (call_frame_t *frame,
+ xlator_t *this,
+ fd_t *fd,
+ const char *name)
+{
+ STACK_WIND (frame,
+ default_fgetxattr_cbk,
+ FIRST_CHILD(this),
+ FIRST_CHILD(this)->fops->fgetxattr,
+ fd,
+ name);
+ return 0;
+}
+
static int32_t
default_getxattr_cbk (call_frame_t *frame,
- void *cookie,
- xlator_t *this,
- int32_t op_ret,
- int32_t op_errno,
- dict_t *dict)
+ void *cookie,
+ xlator_t *this,
+ int32_t op_ret,
+ int32_t op_errno,
+ dict_t *dict)
{
STACK_UNWIND (frame,
op_ret,