summaryrefslogtreecommitdiffstats
path: root/xlators/performance/stat-prefetch
diff options
context:
space:
mode:
authorRaghavendra G <raghavendra@gluster.com>2009-08-23 22:31:28 +0000
committerAnand V. Avati <avati@dev.gluster.com>2009-09-08 01:42:00 -0700
commit4538285776eeaa5383d7473438440d953fd9e232 (patch)
treee89cf710cef87e2cce44511f28834a249a87ed4a /xlators/performance/stat-prefetch
parent4d305aa59877b52a6818e87630c3ee7f5b050d5b (diff)
performance/stat-prefetch: implement sp_utimens.
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')
-rw-r--r--xlators/performance/stat-prefetch/src/stat-prefetch.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/xlators/performance/stat-prefetch/src/stat-prefetch.c b/xlators/performance/stat-prefetch/src/stat-prefetch.c
index 6986aa2f762..cdf6d73dece 100644
--- a/xlators/performance/stat-prefetch/src/stat-prefetch.c
+++ b/xlators/performance/stat-prefetch/src/stat-prefetch.c
@@ -1119,6 +1119,31 @@ unwind:
int32_t
+sp_utimens (call_frame_t *frame, xlator_t *this, loc_t *loc,
+ struct timespec tv[2])
+{
+ 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_stbuf_cbk, FIRST_CHILD(this),
+ FIRST_CHILD(this)->fops->utimens, loc, tv);
+ return 0;
+
+unwind:
+ SP_STACK_UNWIND (frame, -1, errno, NULL);
+ return 0;
+}
+
+
+int32_t
sp_forget (xlator_t *this, inode_t *inode)
{
struct stat *buf = NULL;
@@ -1175,6 +1200,7 @@ struct xlator_fops fops = {
.fchown = sp_fchown,
.truncate = sp_truncate,
.ftruncate = sp_ftruncate,
+ .utimens = sp_utimens,
};
struct xlator_mops mops = {