summaryrefslogtreecommitdiffstats
path: root/libglusterfs/src/xlator.h
diff options
context:
space:
mode:
authorShehjar Tikoo <shehjart@gluster.com>2009-10-01 06:58:46 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-10-01 07:22:42 -0700
commit186a86f342625a9dce53fe537f8237c6099d5c54 (patch)
tree63ee2f3def75293b9f50acf9e49081fb1caad8ae /libglusterfs/src/xlator.h
parentdca4b2a23cb55e1e15fb393e7cbfd39b59280c9c (diff)
Global: Introduce setattr and fsetattr fops
Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 146 (Add setattr FOP) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=146
Diffstat (limited to 'libglusterfs/src/xlator.h')
-rw-r--r--libglusterfs/src/xlator.h42
1 files changed, 42 insertions, 0 deletions
diff --git a/libglusterfs/src/xlator.h b/libglusterfs/src/xlator.h
index ff6768035fd..afaaed4a4d8 100644
--- a/libglusterfs/src/xlator.h
+++ b/libglusterfs/src/xlator.h
@@ -37,8 +37,17 @@
#include "compat.h"
#include "list.h"
+#include <fuse/fuse_lowlevel.h>
+
#define FIRST_CHILD(xl) (xl->children->xlator)
+#define GF_SET_ATTR_MODE 0x1
+#define GF_SET_ATTR_UID 0x2
+#define GF_SET_ATTR_GID 0x4
+#define GF_SET_ATTR_SIZE 0x8
+#define GF_SET_ATTR_ATIME 0x10
+#define GF_SET_ATTR_MTIME 0x20
+
struct _xlator;
typedef struct _xlator xlator_t;
struct _dir_entry_t;
@@ -467,6 +476,22 @@ typedef int32_t (*fop_lock_fnotify_cbk_t) (call_frame_t *frame,
int32_t op_ret,
int32_t op_errno);
+typedef int32_t (*fop_setattr_cbk_t) (call_frame_t *frame,
+ void *cookie,
+ xlator_t *this,
+ int32_t op_ret,
+ int32_t op_errno,
+ struct stat *preop_stbuf,
+ struct stat *postop_stbuf);
+
+typedef int32_t (*fop_fsetattr_cbk_t) (call_frame_t *frame,
+ void *cookie,
+ xlator_t *this,
+ int32_t op_ret,
+ int32_t op_errno,
+ struct stat *preop_stbuf,
+ struct stat *postop_stbuf);
+
typedef int32_t (*fop_lookup_t) (call_frame_t *frame,
xlator_t *this,
loc_t *loc,
@@ -710,6 +735,19 @@ typedef int32_t (*fop_lock_fnotify_t) (call_frame_t *frame,
xlator_t *this, fd_t *fd,
int32_t timeout);
+typedef int32_t (*fop_setattr_t) (call_frame_t *frame,
+ xlator_t *this,
+ loc_t *loc,
+ struct stat *stbuf,
+ int32_t valid);
+
+typedef int32_t (*fop_fsetattr_t) (call_frame_t *frame,
+ xlator_t *this,
+ fd_t *fd,
+ struct stat *stbuf,
+ int32_t valid);
+
+
struct xlator_fops {
fop_lookup_t lookup;
fop_stat_t stat;
@@ -758,6 +796,8 @@ struct xlator_fops {
fop_fxattrop_t fxattrop;
fop_lock_notify_t lock_notify;
fop_lock_fnotify_t lock_fnotify;
+ fop_setattr_t setattr;
+ fop_fsetattr_t fsetattr;
/* these entries are used for a typechecking hack in STACK_WIND _only_ */
fop_lookup_cbk_t lookup_cbk;
@@ -807,6 +847,8 @@ struct xlator_fops {
fop_fxattrop_cbk_t fxattrop_cbk;
fop_lock_notify_cbk_t lock_notify_cbk;
fop_lock_fnotify_cbk_t lock_fnotify_cbk;
+ fop_setattr_cbk_t setattr_cbk;
+ fop_fsetattr_cbk_t fsetattr_cbk;
};
typedef int32_t (*cbk_forget_t) (xlator_t *this,