diff options
author | Pavan Sondur <pavan@gluster.com> | 2009-10-05 09:45:52 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2009-10-06 07:22:16 -0700 |
commit | 29f81133a6cd95ebc9fac627a4fb0da73977f5a8 (patch) | |
tree | bf5a633b59b8bce4a28023f39a35fb5d89dcf4bd /libglusterfs | |
parent | f3e46f2cb44e95c453bfa20c870dca6e42fc9a7a (diff) |
Removed remaining references to chmod, chown and utimens as part of setattr changes.
Removed references to chmod, chown and utimes. Removed utimes references in AFR and writebehind.
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')
-rw-r--r-- | libglusterfs/src/call-stub.c | 414 | ||||
-rw-r--r-- | libglusterfs/src/call-stub.h | 124 | ||||
-rw-r--r-- | libglusterfs/src/common-utils.c | 29 | ||||
-rw-r--r-- | libglusterfs/src/defaults.c | 156 | ||||
-rw-r--r-- | libglusterfs/src/defaults.h | 27 | ||||
-rw-r--r-- | libglusterfs/src/glusterfs.h | 7 | ||||
-rw-r--r-- | libglusterfs/src/protocol.h | 54 | ||||
-rw-r--r-- | libglusterfs/src/xlator.c | 5 | ||||
-rw-r--r-- | libglusterfs/src/xlator.h | 72 |
9 files changed, 14 insertions, 874 deletions
diff --git a/libglusterfs/src/call-stub.c b/libglusterfs/src/call-stub.c index a56ed95f02d..cdbbcfae1f9 100644 --- a/libglusterfs/src/call-stub.c +++ b/libglusterfs/src/call-stub.c @@ -198,194 +198,6 @@ out: } -call_stub_t * -fop_chmod_stub (call_frame_t *frame, - fop_chmod_t fn, - loc_t *loc, - mode_t mode) -{ - call_stub_t *stub = NULL; - - GF_VALIDATE_OR_GOTO ("call-stub", frame, out); - GF_VALIDATE_OR_GOTO ("call-stub", loc, out); - - stub = stub_new (frame, 1, GF_FOP_CHMOD); - GF_VALIDATE_OR_GOTO ("call-stub", stub, out); - - stub->args.chmod.fn = fn; - loc_copy (&stub->args.chmod.loc, loc); - stub->args.chmod.mode = mode; -out: - return stub; -} - - -call_stub_t * -fop_chmod_cbk_stub (call_frame_t *frame, - fop_chmod_cbk_t fn, - int32_t op_ret, - int32_t op_errno, - struct stat *buf) -{ - call_stub_t *stub = NULL; - - GF_VALIDATE_OR_GOTO ("call-stub", frame, out); - - stub = stub_new (frame, 0, GF_FOP_CHMOD); - GF_VALIDATE_OR_GOTO ("call-stub", stub, out); - - stub->args.chmod_cbk.fn = fn; - stub->args.chmod_cbk.op_ret = op_ret; - stub->args.chmod_cbk.op_errno = op_errno; - if (buf) - stub->args.chmod_cbk.buf = *buf; -out: - return stub; -} - - -call_stub_t * -fop_fchmod_stub (call_frame_t *frame, - fop_fchmod_t fn, - fd_t *fd, - mode_t mode) -{ - call_stub_t *stub = NULL; - - GF_VALIDATE_OR_GOTO ("call-stub", frame, out); - - stub = stub_new (frame, 1, GF_FOP_FCHMOD); - GF_VALIDATE_OR_GOTO ("call-stub", stub, out); - - stub->args.fchmod.fn = fn; - if (fd) - stub->args.fchmod.fd = fd_ref (fd); - stub->args.fchmod.mode = mode; -out: - return stub; -} - - -call_stub_t * -fop_fchmod_cbk_stub (call_frame_t *frame, - fop_fchmod_cbk_t fn, - int32_t op_ret, - int32_t op_errno, - struct stat *buf) -{ - call_stub_t *stub = NULL; - - GF_VALIDATE_OR_GOTO ("call-stub", frame, out); - - stub = stub_new (frame, 0, GF_FOP_FCHMOD); - GF_VALIDATE_OR_GOTO ("call-stub", stub, out); - - stub->args.fchmod_cbk.fn = fn; - stub->args.fchmod_cbk.op_ret = op_ret; - stub->args.fchmod_cbk.op_errno = op_errno; - if (buf) - stub->args.fchmod_cbk.buf = *buf; -out: - return stub; -} - - -call_stub_t * -fop_chown_stub (call_frame_t *frame, - fop_chown_t fn, - loc_t *loc, - uid_t uid, - gid_t gid) -{ - call_stub_t *stub = NULL; - - GF_VALIDATE_OR_GOTO ("call-stub", frame, out); - GF_VALIDATE_OR_GOTO ("call-stub", loc, out); - - stub = stub_new (frame, 1, GF_FOP_CHOWN); - GF_VALIDATE_OR_GOTO ("call-stub", stub, out); - - stub->args.chown.fn = fn; - loc_copy (&stub->args.chown.loc, loc); - stub->args.chown.uid = uid; - stub->args.chown.gid = gid; -out: - return stub; -} - - -call_stub_t * -fop_chown_cbk_stub (call_frame_t *frame, - fop_chown_cbk_t fn, - int32_t op_ret, - int32_t op_errno, - struct stat *buf) -{ - call_stub_t *stub = NULL; - - GF_VALIDATE_OR_GOTO ("call-stub", frame, out); - - stub = stub_new (frame, 0, GF_FOP_CHOWN); - GF_VALIDATE_OR_GOTO ("call-stub", stub, out); - - stub->args.chown_cbk.fn = fn; - stub->args.chown_cbk.op_ret = op_ret; - stub->args.chown_cbk.op_errno = op_errno; - if (buf) - stub->args.chown_cbk.buf = *buf; -out: - return stub; -} - - -call_stub_t * -fop_fchown_stub (call_frame_t *frame, - fop_fchown_t fn, - fd_t *fd, - uid_t uid, - gid_t gid) -{ - call_stub_t *stub = NULL; - - GF_VALIDATE_OR_GOTO ("call-stub", frame, out); - - stub = stub_new (frame, 1, GF_FOP_FCHOWN); - GF_VALIDATE_OR_GOTO ("call-stub", stub, out); - - stub->args.fchown.fn = fn; - if (fd) - stub->args.fchown.fd = fd_ref (fd); - stub->args.fchown.uid = uid; - stub->args.fchown.gid = gid; -out: - return stub; -} - - -call_stub_t * -fop_fchown_cbk_stub (call_frame_t *frame, - fop_fchown_cbk_t fn, - int32_t op_ret, - int32_t op_errno, - struct stat *buf) -{ - call_stub_t *stub = NULL; - - GF_VALIDATE_OR_GOTO ("call-stub", frame, out); - - stub = stub_new (frame, 0, GF_FOP_FCHOWN); - GF_VALIDATE_OR_GOTO ("call-stub", stub, out); - - stub->args.fchown_cbk.fn = fn; - stub->args.fchown_cbk.op_ret = op_ret; - stub->args.fchown_cbk.op_errno = op_errno; - if (buf) - stub->args.fchown_cbk.buf = *buf; -out: - return stub; -} - - /* truncate */ call_stub_t * @@ -488,53 +300,6 @@ out: call_stub_t * -fop_utimens_stub (call_frame_t *frame, - fop_utimens_t fn, - loc_t *loc, - struct timespec tv[2]) -{ - call_stub_t *stub = NULL; - - GF_VALIDATE_OR_GOTO ("call-stub", frame, out); - GF_VALIDATE_OR_GOTO ("call-stub", loc, out); - - stub = stub_new (frame, 1, GF_FOP_UTIMENS); - GF_VALIDATE_OR_GOTO ("call-stub", stub, out); - - stub->args.utimens.fn = fn; - loc_copy (&stub->args.utimens.loc, loc); - stub->args.utimens.tv[0] = tv[0]; - stub->args.utimens.tv[1] = tv[1]; -out: - return stub; -} - - -call_stub_t * -fop_utimens_cbk_stub (call_frame_t *frame, - fop_utimens_cbk_t fn, - int32_t op_ret, - int32_t op_errno, - struct stat *buf) -{ - call_stub_t *stub = NULL; - - GF_VALIDATE_OR_GOTO ("call-stub", frame, out); - - stub = stub_new (frame, 0, GF_FOP_UTIMENS); - GF_VALIDATE_OR_GOTO ("call-stub", stub, out); - - stub->args.utimens_cbk.fn = fn; - stub->args.utimens_cbk.op_ret = op_ret; - stub->args.utimens_cbk.op_errno = op_errno; - if (buf) - stub->args.utimens_cbk.buf = *buf; -out: - return stub; -} - - -call_stub_t * fop_access_stub (call_frame_t *frame, fop_access_t fn, loc_t *loc, @@ -2688,24 +2453,6 @@ call_resume_wind (call_stub_t *stub) } break; - case GF_FOP_CHMOD: - { - stub->args.chmod.fn (stub->frame, - stub->frame->this, - &stub->args.chmod.loc, - stub->args.chmod.mode); - } - break; - - case GF_FOP_CHOWN: - { - stub->args.chown.fn (stub->frame, - stub->frame->this, - &stub->args.chown.loc, - stub->args.chown.uid, - stub->args.chown.gid); - break; - } case GF_FOP_TRUNCATE: { stub->args.truncate.fn (stub->frame, @@ -2919,35 +2666,7 @@ call_resume_wind (call_stub_t *stub) break; } - case GF_FOP_UTIMENS: - { - stub->args.utimens.fn (stub->frame, - stub->frame->this, - &stub->args.utimens.loc, - stub->args.utimens.tv); - break; - } - - break; - case GF_FOP_FCHMOD: - { - stub->args.fchmod.fn (stub->frame, - stub->frame->this, - stub->args.fchmod.fd, - stub->args.fchmod.mode); - break; - } - - case GF_FOP_FCHOWN: - { - stub->args.fchown.fn (stub->frame, - stub->frame->this, - stub->args.fchown.fd, - stub->args.fchown.uid, - stub->args.fchown.gid); - break; - } case GF_FOP_LOOKUP: { @@ -3322,40 +3041,6 @@ call_resume_unwind (call_stub_t *stub) break; } - case GF_FOP_CHMOD: - { - if (!stub->args.chmod_cbk.fn) - STACK_UNWIND (stub->frame, - stub->args.chmod_cbk.op_ret, - stub->args.chmod_cbk.op_errno, - &stub->args.chmod_cbk.buf); - else - stub->args.chmod_cbk.fn (stub->frame, - stub->frame->cookie, - stub->frame->this, - stub->args.chmod_cbk.op_ret, - stub->args.chmod_cbk.op_errno, - &stub->args.chmod_cbk.buf); - break; - } - - case GF_FOP_CHOWN: - { - if (!stub->args.chown_cbk.fn) - STACK_UNWIND (stub->frame, - stub->args.chown_cbk.op_ret, - stub->args.chown_cbk.op_errno, - &stub->args.chown_cbk.buf); - else - stub->args.chown_cbk.fn (stub->frame, - stub->frame->cookie, - stub->frame->this, - stub->args.chown_cbk.op_ret, - stub->args.chown_cbk.op_errno, - &stub->args.chown_cbk.buf); - break; - } - case GF_FOP_TRUNCATE: { if (!stub->args.truncate_cbk.fn) @@ -3738,60 +3423,6 @@ call_resume_unwind (call_stub_t *stub) break; } - case GF_FOP_UTIMENS: - { - if (!stub->args.utimens_cbk.fn) - STACK_UNWIND (stub->frame, - stub->args.utimens_cbk.op_ret, - stub->args.utimens_cbk.op_errno, - &stub->args.utimens_cbk.buf); - else - stub->args.utimens_cbk.fn (stub->frame, - stub->frame->cookie, - stub->frame->this, - stub->args.utimens_cbk.op_ret, - stub->args.utimens_cbk.op_errno, - &stub->args.utimens_cbk.buf); - - break; - } - - - break; - case GF_FOP_FCHMOD: - { - if (!stub->args.fchmod_cbk.fn) - STACK_UNWIND (stub->frame, - stub->args.fchmod_cbk.op_ret, - stub->args.fchmod_cbk.op_errno, - &stub->args.fchmod_cbk.buf); - else - stub->args.fchmod_cbk.fn (stub->frame, - stub->frame->cookie, - stub->frame->this, - stub->args.fchmod_cbk.op_ret, - stub->args.fchmod_cbk.op_errno, - &stub->args.fchmod_cbk.buf); - break; - } - - case GF_FOP_FCHOWN: - { - if (!stub->args.fchown_cbk.fn) - STACK_UNWIND (stub->frame, - stub->args.fchown_cbk.op_ret, - stub->args.fchown_cbk.op_errno, - &stub->args.fchown_cbk.buf); - else - stub->args.fchown_cbk.fn (stub->frame, - stub->frame->cookie, - stub->frame->this, - stub->args.fchown_cbk.op_ret, - stub->args.fchown_cbk.op_errno, - &stub->args.fchown_cbk.buf); - break; - } - case GF_FOP_LOOKUP: { if (!stub->args.lookup_cbk.fn) @@ -4118,17 +3749,6 @@ call_stub_destroy_wind (call_stub_t *stub) } break; - case GF_FOP_CHMOD: - { - loc_wipe (&stub->args.chmod.loc); - } - break; - - case GF_FOP_CHOWN: - { - loc_wipe (&stub->args.chown.loc); - break; - } case GF_FOP_TRUNCATE: { loc_wipe (&stub->args.truncate.loc); @@ -4299,25 +3919,6 @@ call_stub_destroy_wind (call_stub_t *stub) fd_unref (stub->args.fentrylk.fd); break; } - case GF_FOP_UTIMENS: - { - loc_wipe (&stub->args.utimens.loc); - break; - } - break; - case GF_FOP_FCHMOD: - { - if (stub->args.fchmod.fd) - fd_unref (stub->args.fchmod.fd); - break; - } - - case GF_FOP_FCHOWN: - { - if (stub->args.fchown.fd) - fd_unref (stub->args.fchown.fd); - break; - } case GF_FOP_LOOKUP: { @@ -4485,12 +4086,6 @@ call_stub_destroy_unwind (call_stub_t *stub) } break; - case GF_FOP_CHMOD: - break; - - case GF_FOP_CHOWN: - break; - case GF_FOP_TRUNCATE: break; @@ -4592,15 +4187,6 @@ call_stub_destroy_unwind (call_stub_t *stub) case GF_FOP_FENTRYLK: break; - case GF_FOP_UTIMENS: - break; - - case GF_FOP_FCHMOD: - break; - - case GF_FOP_FCHOWN: - break; - case GF_FOP_LOOKUP: { if (stub->args.lookup_cbk.inode) diff --git a/libglusterfs/src/call-stub.h b/libglusterfs/src/call-stub.h index ae414026fe4..649f9c64a8c 100644 --- a/libglusterfs/src/call-stub.h +++ b/libglusterfs/src/call-stub.h @@ -73,56 +73,6 @@ typedef struct { struct stat buf; } fstat_cbk; - /* chmod */ - struct { - fop_chmod_t fn; - loc_t loc; - mode_t mode; - } chmod; - struct { - fop_chmod_cbk_t fn; - int32_t op_ret, op_errno; - struct stat buf; - } chmod_cbk; - - /* fchmod */ - struct { - fop_fchmod_t fn; - fd_t *fd; - mode_t mode; - } fchmod; - struct { - fop_fchmod_cbk_t fn; - int32_t op_ret, op_errno; - struct stat buf; - } fchmod_cbk; - - /* chown */ - struct { - fop_chown_t fn; - loc_t loc; - uid_t uid; - gid_t gid; - } chown; - struct { - fop_chown_cbk_t fn; - int32_t op_ret, op_errno; - struct stat buf; - } chown_cbk; - - /* fchown */ - struct { - fop_fchown_t fn; - fd_t *fd; - uid_t uid; - gid_t gid; - } fchown; - struct { - fop_fchown_cbk_t fn; - int32_t op_ret, op_errno; - struct stat buf; - } fchown_cbk; - /* truncate */ struct { fop_truncate_t fn; @@ -149,18 +99,6 @@ typedef struct { struct stat postbuf; } ftruncate_cbk; - /* utimens */ - struct { - fop_utimens_t fn; - loc_t loc; - struct timespec tv[2]; - } utimens; - struct { - fop_utimens_cbk_t fn; - int32_t op_ret, op_errno; - struct stat buf; - } utimens_cbk; - /* access */ struct { fop_access_t fn; @@ -739,55 +677,6 @@ fop_fstat_cbk_stub (call_frame_t *frame, int32_t op_ret, int32_t op_errno, struct stat *buf); -call_stub_t * -fop_chmod_stub (call_frame_t *frame, - fop_chmod_t fn, - loc_t *loc, - mode_t mode); -call_stub_t * -fop_chmod_cbk_stub (call_frame_t *frame, - fop_chmod_cbk_t fn, - int32_t op_ret, - int32_t op_errno, - struct stat *buf); -call_stub_t * -fop_fchmod_stub (call_frame_t *frame, - fop_fchmod_t fn, - fd_t *fd, - mode_t mode); -call_stub_t * -fop_fchmod_cbk_stub (call_frame_t *frame, - fop_fchmod_cbk_t fn, - int32_t op_ret, - int32_t op_errno, - struct stat *buf); -call_stub_t * -fop_chown_stub (call_frame_t *frame, - fop_chown_t fn, - loc_t *loc, - uid_t uid, - gid_t gid); - -call_stub_t * -fop_chown_cbk_stub (call_frame_t *frame, - fop_chown_cbk_t fn, - int32_t op_ret, - int32_t op_errno, - struct stat *buf); - -call_stub_t * -fop_fchown_stub (call_frame_t *frame, - fop_fchown_t fn, - fd_t *fd, - uid_t uid, - gid_t gid); - -call_stub_t * -fop_fchown_cbk_stub (call_frame_t *frame, - fop_fchown_cbk_t fn, - int32_t op_ret, - int32_t op_errno, - struct stat *buf); call_stub_t * fop_truncate_stub (call_frame_t *frame, @@ -818,19 +707,6 @@ fop_ftruncate_cbk_stub (call_frame_t *frame, struct stat *postbuf); call_stub_t * -fop_utimens_stub (call_frame_t *frame, - fop_utimens_t fn, - loc_t *loc, - struct timespec tv[2]); - -call_stub_t * -fop_utimens_cbk_stub (call_frame_t *frame, - fop_utimens_cbk_t fn, - int32_t op_ret, - int32_t op_errno, - struct stat *buf); - -call_stub_t * fop_access_stub (call_frame_t *frame, fop_access_t fn, loc_t *loc, diff --git a/libglusterfs/src/common-utils.c b/libglusterfs/src/common-utils.c index 59ac5386e4a..30c92d43a2d 100644 --- a/libglusterfs/src/common-utils.c +++ b/libglusterfs/src/common-utils.c @@ -179,37 +179,32 @@ gf_global_variable_init() gf_fop_list[GF_FOP_SYMLINK] = "SYMLINK"; gf_fop_list[GF_FOP_RENAME] = "RENAME"; gf_fop_list[GF_FOP_LINK] = "LINK"; - gf_fop_list[GF_FOP_CHMOD] = "CHMOD"; - gf_fop_list[GF_FOP_CHOWN] = "CHOWN"; /* 10 */ gf_fop_list[GF_FOP_TRUNCATE] = "TRUNCATE"; - gf_fop_list[GF_FOP_OPEN] = "OPEN"; + gf_fop_list[GF_FOP_OPEN] = "OPEN"; /* 10 */ gf_fop_list[GF_FOP_READ] = "READ"; gf_fop_list[GF_FOP_WRITE] = "WRITE"; - gf_fop_list[GF_FOP_STATFS] = "STATFS"; /* 15 */ + gf_fop_list[GF_FOP_STATFS] = "STATFS"; gf_fop_list[GF_FOP_FLUSH] = "FLUSH"; - gf_fop_list[GF_FOP_FSYNC] = "FSYNC"; + gf_fop_list[GF_FOP_FSYNC] = "FSYNC"; /* 15 */ gf_fop_list[GF_FOP_SETXATTR] = "SETXATTR"; - gf_fop_list[GF_FOP_GETXATTR] = "GETXATTR"; /* 20 */ + gf_fop_list[GF_FOP_GETXATTR] = "GETXATTR"; gf_fop_list[GF_FOP_REMOVEXATTR] = "REMOVEXATTR"; gf_fop_list[GF_FOP_OPENDIR] = "OPENDIR"; - gf_fop_list[GF_FOP_GETDENTS] = "GETDENTS"; - gf_fop_list[GF_FOP_FSYNCDIR] = "FSYNCDIR"; /* 25 */ + gf_fop_list[GF_FOP_GETDENTS] = "GETDENTS"; /* 20 */ + gf_fop_list[GF_FOP_FSYNCDIR] = "FSYNCDIR"; gf_fop_list[GF_FOP_ACCESS] = "ACCESS"; gf_fop_list[GF_FOP_CREATE] = "CREATE"; gf_fop_list[GF_FOP_FTRUNCATE] = "FTRUNCATE"; - gf_fop_list[GF_FOP_FSTAT] = "FSTAT"; - gf_fop_list[GF_FOP_LK] = "LK"; /* 30 */ - gf_fop_list[GF_FOP_UTIMENS] = "UTIMENS"; - gf_fop_list[GF_FOP_FCHMOD] = "FCHMOD"; - gf_fop_list[GF_FOP_FCHOWN] = "FCHOWN"; + gf_fop_list[GF_FOP_FSTAT] = "FSTAT"; /* 25 */ + gf_fop_list[GF_FOP_LK] = "LK"; gf_fop_list[GF_FOP_LOOKUP] = "LOOKUP"; - gf_fop_list[GF_FOP_SETDENTS] = "SETDENTS"; /* 35 */ + gf_fop_list[GF_FOP_SETDENTS] = "SETDENTS"; gf_fop_list[GF_FOP_READDIR] = "READDIR"; - gf_fop_list[GF_FOP_INODELK] = "INODELK"; + gf_fop_list[GF_FOP_INODELK] = "INODELK"; /* 30 */ gf_fop_list[GF_FOP_FINODELK] = "FINODELK"; gf_fop_list[GF_FOP_ENTRYLK] = "ENTRYLK"; - gf_fop_list[GF_FOP_FENTRYLK] = "FENTRYLK"; /* 40 */ - gf_fop_list[GF_FOP_CHECKSUM] = "CHECKSUM"; /* 41 */ + gf_fop_list[GF_FOP_FENTRYLK] = "FENTRYLK"; /* 35 */ + gf_fop_list[GF_FOP_CHECKSUM] = "CHECKSUM"; /* 36 */ gf_fop_list[GF_FOP_XATTROP] = "XATTROP"; gf_fop_list[GF_FOP_FXATTROP] = "FXATTROP"; gf_fop_list[GF_FOP_LOCK_NOTIFY] = "LOCK_NOTIFY"; diff --git a/libglusterfs/src/defaults.c b/libglusterfs/src/defaults.c index 89c010cd39e..053b8fb388a 100644 --- a/libglusterfs/src/defaults.c +++ b/libglusterfs/src/defaults.c @@ -106,131 +106,6 @@ default_stat (call_frame_t *frame, } static int32_t -default_chmod_cbk (call_frame_t *frame, - void *cookie, - xlator_t *this, - int32_t op_ret, - int32_t op_errno, - struct stat *buf) -{ - STACK_UNWIND (frame, - op_ret, - op_errno, - buf); - return 0; -} - -int32_t -default_chmod (call_frame_t *frame, - xlator_t *this, - loc_t *loc, - mode_t mode) -{ - STACK_WIND (frame, - default_chmod_cbk, - FIRST_CHILD(this), - FIRST_CHILD(this)->fops->chmod, - loc, - mode); - return 0; -} - - -static int32_t -default_fchmod_cbk (call_frame_t *frame, - void *cookie, - xlator_t *this, - int32_t op_ret, - int32_t op_errno, - struct stat *buf) -{ - STACK_UNWIND (frame, - op_ret, - op_errno, - buf); - return 0; -} - -int32_t -default_fchmod (call_frame_t *frame, - xlator_t *this, - fd_t *fd, - mode_t mode) -{ - STACK_WIND (frame, - default_fchmod_cbk, - FIRST_CHILD(this), - FIRST_CHILD(this)->fops->fchmod, - fd, - mode); - return 0; -} - -static int32_t -default_chown_cbk (call_frame_t *frame, - void *cookie, - xlator_t *this, - int32_t op_ret, - int32_t op_errno, - struct stat *buf) -{ - STACK_UNWIND (frame, - op_ret, - op_errno, - buf); - return 0; -} - -int32_t -default_chown (call_frame_t *frame, - xlator_t *this, - loc_t *loc, - uid_t uid, - gid_t gid) -{ - STACK_WIND (frame, - default_chown_cbk, - FIRST_CHILD(this), - FIRST_CHILD(this)->fops->chown, - loc, - uid, - gid); - return 0; -} - -static int32_t -default_fchown_cbk (call_frame_t *frame, - void *cookie, - xlator_t *this, - int32_t op_ret, - int32_t op_errno, - struct stat *buf) -{ - STACK_UNWIND (frame, - op_ret, - op_errno, - buf); - return 0; -} - -int32_t -default_fchown (call_frame_t *frame, - xlator_t *this, - fd_t *fd, - uid_t uid, - gid_t gid) -{ - STACK_WIND (frame, - default_fchown_cbk, - FIRST_CHILD(this), - FIRST_CHILD(this)->fops->fchown, - fd, - uid, - gid); - return 0; -} - -static int32_t default_truncate_cbk (call_frame_t *frame, void *cookie, xlator_t *this, @@ -294,37 +169,6 @@ default_ftruncate (call_frame_t *frame, return 0; } -int32_t -default_utimens_cbk (call_frame_t *frame, - void *cookie, - xlator_t *this, - int32_t op_ret, - int32_t op_errno, - struct stat *buf) -{ - STACK_UNWIND (frame, - op_ret, - op_errno, - buf); - return 0; -} - - -int32_t -default_utimens (call_frame_t *frame, - xlator_t *this, - loc_t *loc, - struct timespec tv[2]) -{ - STACK_WIND (frame, - default_utimens_cbk, - FIRST_CHILD(this), - FIRST_CHILD(this)->fops->utimens, - loc, - tv); - return 0; -} - static int32_t default_access_cbk (call_frame_t *frame, void *cookie, diff --git a/libglusterfs/src/defaults.h b/libglusterfs/src/defaults.h index 6ef9cf571dd..7e9dee17c8b 100644 --- a/libglusterfs/src/defaults.h +++ b/libglusterfs/src/defaults.h @@ -71,28 +71,6 @@ int32_t default_fstat (call_frame_t *frame, xlator_t *this, fd_t *fd); -int32_t default_chmod (call_frame_t *frame, - xlator_t *this, - loc_t *loc, - mode_t mode); - -int32_t default_fchmod (call_frame_t *frame, - xlator_t *this, - fd_t *fd, - mode_t mode); - -int32_t default_chown (call_frame_t *frame, - xlator_t *this, - loc_t *loc, - uid_t uid, - gid_t gid); - -int32_t default_fchown (call_frame_t *frame, - xlator_t *this, - fd_t *fd, - uid_t uid, - gid_t gid); - int32_t default_truncate (call_frame_t *frame, xlator_t *this, loc_t *loc, @@ -103,11 +81,6 @@ int32_t default_ftruncate (call_frame_t *frame, fd_t *fd, off_t offset); -int32_t default_utimens (call_frame_t *frame, - xlator_t *this, - loc_t *loc, - struct timespec tv[2]); - int32_t default_access (call_frame_t *frame, xlator_t *this, loc_t *loc, diff --git a/libglusterfs/src/glusterfs.h b/libglusterfs/src/glusterfs.h index bea33f81ac7..2bc21b0f56f 100644 --- a/libglusterfs/src/glusterfs.h +++ b/libglusterfs/src/glusterfs.h @@ -86,10 +86,8 @@ typedef enum { GF_FOP_SYMLINK, GF_FOP_RENAME, GF_FOP_LINK, - GF_FOP_CHMOD, - GF_FOP_CHOWN, /* 10 */ GF_FOP_TRUNCATE, - GF_FOP_OPEN, + GF_FOP_OPEN, /* 10 */ GF_FOP_READ, GF_FOP_WRITE, GF_FOP_STATFS, /* 15 */ @@ -106,9 +104,6 @@ typedef enum { GF_FOP_FTRUNCATE, GF_FOP_FSTAT, GF_FOP_LK, - GF_FOP_UTIMENS, - GF_FOP_FCHMOD, /* 30 */ - GF_FOP_FCHOWN, GF_FOP_LOOKUP, GF_FOP_SETDENTS, GF_FOP_READDIR, diff --git a/libglusterfs/src/protocol.h b/libglusterfs/src/protocol.h index f163d0ed4de..38eaadc62b6 100644 --- a/libglusterfs/src/protocol.h +++ b/libglusterfs/src/protocol.h @@ -54,7 +54,7 @@ struct gf_stat { uint32_t blksize; uint32_t atime; uint32_t atime_nsec; - uint32_t mtime; + uint32_t mtime ; uint32_t mtime_nsec; uint32_t ctime; uint32_t ctime_nsec; @@ -434,28 +434,6 @@ typedef struct { struct gf_stat postparent; } __attribute__((packed)) gf_fop_link_rsp_t; - -typedef struct { - uint64_t ino; - uint32_t mode; - char path[0]; -} __attribute__((packed)) gf_fop_chmod_req_t; -typedef struct { - struct gf_stat stat; -} __attribute__((packed)) gf_fop_chmod_rsp_t; - - -typedef struct { - uint64_t ino; - uint32_t uid; - uint32_t gid; - char path[0]; -} __attribute__((packed)) gf_fop_chown_req_t; -typedef struct { - struct gf_stat stat; -} __attribute__((packed)) gf_fop_chown_rsp_t; - - typedef struct { uint64_t ino; uint64_t offset; @@ -754,36 +732,6 @@ typedef struct { } __attribute__((packed)) gf_fop_fentrylk_rsp_t; typedef struct { - uint64_t ino; - struct gf_timespec tv[2]; - char path[0]; -} __attribute__((packed)) gf_fop_utimens_req_t; -typedef struct { - struct gf_stat stat; -} __attribute__((packed)) gf_fop_utimens_rsp_t; - -typedef struct { - uint64_t ino; - uint64_t fd; - uint32_t mode; -} __attribute__((packed)) gf_fop_fchmod_req_t; -typedef struct { - struct gf_stat stat; -} __attribute__((packed)) gf_fop_fchmod_rsp_t; - - -typedef struct { - uint64_t ino; - int64_t fd; - uint32_t uid; - uint32_t gid; -} __attribute__((packed)) gf_fop_fchown_req_t; -typedef struct { - struct gf_stat stat; -} __attribute__((packed)) gf_fop_fchown_rsp_t; - - -typedef struct { uint64_t ino; /* NOTE: used only in case of 'root' lookup */ uint64_t par; uint32_t flags; diff --git a/libglusterfs/src/xlator.c b/libglusterfs/src/xlator.c index 879ddd76d70..20ee3da4ab6 100644 --- a/libglusterfs/src/xlator.c +++ b/libglusterfs/src/xlator.c @@ -66,10 +66,7 @@ fill_defaults (xlator_t *xl) SET_DEFAULT_FOP (symlink); SET_DEFAULT_FOP (rename); SET_DEFAULT_FOP (link); - SET_DEFAULT_FOP (chmod); - SET_DEFAULT_FOP (chown); SET_DEFAULT_FOP (truncate); - SET_DEFAULT_FOP (utimens); SET_DEFAULT_FOP (readv); SET_DEFAULT_FOP (writev); SET_DEFAULT_FOP (statfs); @@ -93,8 +90,6 @@ fill_defaults (xlator_t *xl) SET_DEFAULT_FOP (entrylk); SET_DEFAULT_FOP (fentrylk); SET_DEFAULT_FOP (lookup); - SET_DEFAULT_FOP (fchown); - SET_DEFAULT_FOP (fchmod); SET_DEFAULT_FOP (setdents); SET_DEFAULT_FOP (getdents); SET_DEFAULT_FOP (checksum); diff --git a/libglusterfs/src/xlator.h b/libglusterfs/src/xlator.h index f71d5dea9bd..3bacf3c72e6 100644 --- a/libglusterfs/src/xlator.h +++ b/libglusterfs/src/xlator.h @@ -189,34 +189,6 @@ typedef int32_t (*fop_fstat_cbk_t) (call_frame_t *frame, int32_t op_errno, struct stat *buf); -typedef int32_t (*fop_chmod_cbk_t) (call_frame_t *frame, - void *cookie, - xlator_t *this, - int32_t op_ret, - int32_t op_errno, - struct stat *buf); - -typedef int32_t (*fop_fchmod_cbk_t) (call_frame_t *frame, - void *cookie, - xlator_t *this, - int32_t op_ret, - int32_t op_errno, - struct stat *buf); - -typedef int32_t (*fop_chown_cbk_t) (call_frame_t *frame, - void *cookie, - xlator_t *this, - int32_t op_ret, - int32_t op_errno, - struct stat *buf); - -typedef int32_t (*fop_fchown_cbk_t) (call_frame_t *frame, - void *cookie, - xlator_t *this, - int32_t op_ret, - int32_t op_errno, - struct stat *buf); - typedef int32_t (*fop_truncate_cbk_t) (call_frame_t *frame, void *cookie, xlator_t *this, @@ -233,13 +205,6 @@ typedef int32_t (*fop_ftruncate_cbk_t) (call_frame_t *frame, struct stat *prebuf, struct stat *postbuf); -typedef int32_t (*fop_utimens_cbk_t) (call_frame_t *frame, - void *cookie, - xlator_t *this, - int32_t op_ret, - int32_t op_errno, - struct stat *buf); - typedef int32_t (*fop_access_cbk_t) (call_frame_t *frame, void *cookie, xlator_t *this, @@ -537,28 +502,6 @@ typedef int32_t (*fop_fstat_t) (call_frame_t *frame, xlator_t *this, fd_t *fd); -typedef int32_t (*fop_chmod_t) (call_frame_t *frame, - xlator_t *this, - loc_t *loc, - mode_t mode); - -typedef int32_t (*fop_fchmod_t) (call_frame_t *frame, - xlator_t *this, - fd_t *fd, - mode_t mode); - -typedef int32_t (*fop_chown_t) (call_frame_t *frame, - xlator_t *this, - loc_t *loc, - uid_t uid, - gid_t gid); - -typedef int32_t (*fop_fchown_t) (call_frame_t *frame, - xlator_t *this, - fd_t *fd, - uid_t uid, - gid_t gid); - typedef int32_t (*fop_truncate_t) (call_frame_t *frame, xlator_t *this, loc_t *loc, @@ -569,11 +512,6 @@ typedef int32_t (*fop_ftruncate_t) (call_frame_t *frame, fd_t *fd, off_t offset); -typedef int32_t (*fop_utimens_t) (call_frame_t *frame, - xlator_t *this, - loc_t *loc, - struct timespec tv[2]); - typedef int32_t (*fop_access_t) (call_frame_t *frame, xlator_t *this, loc_t *loc, @@ -800,13 +738,8 @@ struct xlator_fops { fop_lookup_t lookup; fop_stat_t stat; fop_fstat_t fstat; - fop_chmod_t chmod; - fop_fchmod_t fchmod; - fop_chown_t chown; - fop_fchown_t fchown; fop_truncate_t truncate; fop_ftruncate_t ftruncate; - fop_utimens_t utimens; fop_access_t access; fop_readlink_t readlink; fop_mknod_t mknod; @@ -852,13 +785,8 @@ struct xlator_fops { fop_lookup_cbk_t lookup_cbk; fop_stat_cbk_t stat_cbk; fop_fstat_cbk_t fstat_cbk; - fop_chmod_cbk_t chmod_cbk; - fop_fchmod_cbk_t fchmod_cbk; - fop_chown_cbk_t chown_cbk; - fop_fchown_cbk_t fchown_cbk; fop_truncate_cbk_t truncate_cbk; fop_ftruncate_cbk_t ftruncate_cbk; - fop_utimens_cbk_t utimens_cbk; fop_access_cbk_t access_cbk; fop_readlink_cbk_t readlink_cbk; fop_mknod_cbk_t mknod_cbk; |