summaryrefslogtreecommitdiffstats
path: root/xlators/performance/symlink-cache/src
diff options
context:
space:
mode:
authorAnand V. Avati <avati@blackhole.gluster.com>2010-03-16 09:46:33 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-03-16 08:31:32 -0700
commit283ec9608e6cbc9393941d5fae901e558360d2bd (patch)
tree5d90ea94d5df8fd542b30d6e88f44b940133d9b2 /xlators/performance/symlink-cache/src
parentcc7515fc3db005383ffa575236ec29c212ed1e48 (diff)
iatt: changes across the codebase
- libglusterfs -- call-stub -- inode -- protocol - libglusterfsclient - cluster/replicate - cluster/{dht,nufa,switch} - cluster/unify - cluster/HA - cluster/map - cluster/stripe - debug/error-gen - debug/trace - debug/io-stats - encryption/rot-13 - features/filter - features/locks - features/path-converter - features/quota - features/trash - mount/fuse - performance/io-threads - performance/io-cache - performance/quick-read - performance/read-ahead - performance/stat-prefetch - performance/symlink-cache - performance/write-behind - protocol/client - protocol/server - storage-posix Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 361 (GlusterFS 3.0 should work on Mac OS/X) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=361
Diffstat (limited to 'xlators/performance/symlink-cache/src')
-rw-r--r--xlators/performance/symlink-cache/src/symlink-cache.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/xlators/performance/symlink-cache/src/symlink-cache.c b/xlators/performance/symlink-cache/src/symlink-cache.c
index 22b1c5482ea..a8c89b8640d 100644
--- a/xlators/performance/symlink-cache/src/symlink-cache.c
+++ b/xlators/performance/symlink-cache/src/symlink-cache.c
@@ -90,7 +90,7 @@ sc_cache_update (xlator_t *this, inode_t *inode, const char *link)
int
-sc_cache_set (xlator_t *this, inode_t *inode, struct stat *buf,
+sc_cache_set (xlator_t *this, inode_t *inode, struct iatt *buf,
const char *link)
{
struct symlink_cache *sc = NULL;
@@ -126,7 +126,7 @@ sc_cache_set (xlator_t *this, inode_t *inode, struct stat *buf,
}
}
- sc->ctime = buf->st_ctime;
+ sc->ctime = buf->ia_ctime;
gf_log (this->name, GF_LOG_DEBUG,
"setting symlink cache: %s", link);
@@ -180,12 +180,12 @@ sc_cache_flush (xlator_t *this, inode_t *inode)
int
-sc_cache_validate (xlator_t *this, inode_t *inode, struct stat *buf)
+sc_cache_validate (xlator_t *this, inode_t *inode, struct iatt *buf)
{
struct symlink_cache *sc = NULL;
uint64_t tmp_sc = 0;
- if (!S_ISLNK (buf->st_mode)) {
+ if (!IA_ISLNK (buf->ia_type)) {
sc_cache_flush (this, inode);
return 0;
}
@@ -204,7 +204,7 @@ sc_cache_validate (xlator_t *this, inode_t *inode, struct stat *buf)
sc = (struct symlink_cache *)(long)tmp_sc;
}
- if (sc->ctime == buf->st_ctime)
+ if (sc->ctime == buf->ia_ctime)
return 0;
/* STALE */
@@ -216,7 +216,7 @@ sc_cache_validate (xlator_t *this, inode_t *inode, struct stat *buf)
sc->readlink = NULL;
}
- sc->ctime = buf->st_ctime;
+ sc->ctime = buf->ia_ctime;
return 0;
}
@@ -242,7 +242,7 @@ sc_cache_get (xlator_t *this, inode_t *inode, char **link)
int
sc_readlink_cbk (call_frame_t *frame, void *cookie,
xlator_t *this, int op_ret, int op_errno,
- const char *link, struct stat *sbuf)
+ const char *link, struct iatt *sbuf)
{
if (op_ret > 0)
sc_cache_update (this, frame->local, link);
@@ -260,7 +260,7 @@ sc_readlink (call_frame_t *frame, xlator_t *this,
loc_t *loc, size_t size)
{
char *link = NULL;
- struct stat buf = {0, };
+ struct iatt buf = {0, };
sc_cache_get (this, loc->inode, &link);
@@ -294,8 +294,8 @@ sc_readlink (call_frame_t *frame, xlator_t *this,
int
sc_symlink_cbk (call_frame_t *frame, void *cookie,
xlator_t *this, int op_ret, int op_errno,
- inode_t *inode, struct stat *buf, struct stat *preparent,
- struct stat *postparent)
+ inode_t *inode, struct iatt *buf, struct iatt *preparent,
+ struct iatt *postparent)
{
if (op_ret == 0) {
if (frame->local) {
@@ -327,8 +327,8 @@ sc_symlink (call_frame_t *frame, xlator_t *this,
int
sc_lookup_cbk (call_frame_t *frame, void *cookie,
xlator_t *this, int op_ret, int op_errno,
- inode_t *inode, struct stat *buf, dict_t *xattr,
- struct stat *postparent)
+ inode_t *inode, struct iatt *buf, dict_t *xattr,
+ struct iatt *postparent)
{
if (op_ret == 0)
sc_cache_validate (this, inode, buf);