summaryrefslogtreecommitdiffstats
path: root/xlators/performance/stat-prefetch/src/stat-prefetch.c
diff options
context:
space:
mode:
authorRaghavendra G <raghavendra@gluster.com>2009-08-23 22:36:02 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-09-08 01:42:32 -0700
commit9d30a68082659c27a9dac6e4d1a98e2be8bf5bf8 (patch)
tree166d4582740321694b5dd162660109806eba60de /xlators/performance/stat-prefetch/src/stat-prefetch.c
parenta3449caf58d7e4876cf0246e22b044a8de8bde2b (diff)
performance/stat-prefetch: implement sp_removexattr.
Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 221 (stat prefetch implementation) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=221
Diffstat (limited to 'xlators/performance/stat-prefetch/src/stat-prefetch.c')
-rw-r--r--xlators/performance/stat-prefetch/src/stat-prefetch.c74
1 files changed, 50 insertions, 24 deletions
diff --git a/xlators/performance/stat-prefetch/src/stat-prefetch.c b/xlators/performance/stat-prefetch/src/stat-prefetch.c
index 3d866b55ebe..b94451aa926 100644
--- a/xlators/performance/stat-prefetch/src/stat-prefetch.c
+++ b/xlators/performance/stat-prefetch/src/stat-prefetch.c
@@ -1468,6 +1468,31 @@ unwind:
int32_t
+sp_removexattr (call_frame_t *frame, xlator_t *this, loc_t *loc,
+ const char *name)
+{
+ sp_cache_t *cache = NULL;
+
+ GF_VALIDATE_OR_GOTO (this->name, loc, unwind);
+ GF_VALIDATE_OR_GOTO (this->name, loc->parent, unwind);
+ GF_VALIDATE_OR_GOTO (this->name, loc->name, unwind);
+
+ cache = sp_get_cache_inode (this, loc->parent, frame->root->pid);
+ if (cache) {
+ sp_cache_remove_entry (cache, (char *)loc->name, 0);
+ }
+
+ STACK_WIND (frame, sp_err_cbk, FIRST_CHILD(this),
+ FIRST_CHILD(this)->fops->removexattr, loc, name);
+ return 0;
+
+unwind:
+ SP_STACK_UNWIND (frame, -1, errno);
+ return 0;
+}
+
+
+int32_t
sp_forget (xlator_t *this, inode_t *inode)
{
struct stat *buf = NULL;
@@ -1509,30 +1534,31 @@ fini (xlator_t *this)
struct xlator_fops fops = {
- .lookup = sp_lookup,
- .readdir = sp_readdir,
- .chmod = sp_chmod,
- .open = sp_open,
- .create = sp_create,
- .opendir = sp_opendir,
- .mkdir = sp_mkdir,
- .mknod = sp_mknod,
- .symlink = sp_symlink,
- .link = sp_link,
- .fchmod = sp_fchmod,
- .chown = sp_chown,
- .fchown = sp_fchown,
- .truncate = sp_truncate,
- .ftruncate = sp_ftruncate,
- .utimens = sp_utimens,
- .readlink = sp_readlink,
- .unlink = sp_unlink,
- .rmdir = sp_rmdir,
- .readv = sp_readv,
- .writev = sp_writev,
- .fsync = sp_fsync,
- .rename = sp_rename,
- .setxattr = sp_setxattr,
+ .lookup = sp_lookup,
+ .readdir = sp_readdir,
+ .chmod = sp_chmod,
+ .open = sp_open,
+ .create = sp_create,
+ .opendir = sp_opendir,
+ .mkdir = sp_mkdir,
+ .mknod = sp_mknod,
+ .symlink = sp_symlink,
+ .link = sp_link,
+ .fchmod = sp_fchmod,
+ .chown = sp_chown,
+ .fchown = sp_fchown,
+ .truncate = sp_truncate,
+ .ftruncate = sp_ftruncate,
+ .utimens = sp_utimens,
+ .readlink = sp_readlink,
+ .unlink = sp_unlink,
+ .rmdir = sp_rmdir,
+ .readv = sp_readv,
+ .writev = sp_writev,
+ .fsync = sp_fsync,
+ .rename = sp_rename,
+ .setxattr = sp_setxattr,
+ .removexattr = sp_removexattr,
};
struct xlator_mops mops = {