summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/server/src/server-helpers.c
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/protocol/server/src/server-helpers.c
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/protocol/server/src/server-helpers.c')
-rw-r--r--xlators/protocol/server/src/server-helpers.c48
1 files changed, 24 insertions, 24 deletions
diff --git a/xlators/protocol/server/src/server-helpers.c b/xlators/protocol/server/src/server-helpers.c
index f627b6b530e..dc2620c9055 100644
--- a/xlators/protocol/server/src/server-helpers.c
+++ b/xlators/protocol/server/src/server-helpers.c
@@ -112,34 +112,34 @@ out:
}
/*
- * stat_to_str - convert struct stat to a ASCII string
- * @stbuf: struct stat pointer
+ * stat_to_str - convert struct iatt to a ASCII string
+ * @stbuf: struct iatt pointer
*
* not for external reference
*/
char *
-stat_to_str (struct stat *stbuf)
+stat_to_str (struct iatt *stbuf)
{
int ret = 0;
char *tmp_buf = NULL;
- uint64_t dev = stbuf->st_dev;
- uint64_t ino = stbuf->st_ino;
- uint32_t mode = stbuf->st_mode;
- uint32_t nlink = stbuf->st_nlink;
- uint32_t uid = stbuf->st_uid;
- uint32_t gid = stbuf->st_gid;
- uint64_t rdev = stbuf->st_rdev;
- uint64_t size = stbuf->st_size;
- uint32_t blksize = stbuf->st_blksize;
- uint64_t blocks = stbuf->st_blocks;
- uint32_t atime = stbuf->st_atime;
- uint32_t mtime = stbuf->st_mtime;
- uint32_t ctime = stbuf->st_ctime;
-
- uint32_t atime_nsec = ST_ATIM_NSEC(stbuf);
- uint32_t mtime_nsec = ST_MTIM_NSEC(stbuf);
- uint32_t ctime_nsec = ST_CTIM_NSEC(stbuf);
+ uint64_t dev = stbuf->ia_gen;
+ uint64_t ino = stbuf->ia_ino;
+ uint32_t mode = st_mode_from_ia (stbuf->ia_prot, stbuf->ia_type);
+ uint32_t nlink = stbuf->ia_nlink;
+ uint32_t uid = stbuf->ia_uid;
+ uint32_t gid = stbuf->ia_gid;
+ uint64_t rdev = stbuf->ia_rdev;
+ uint64_t size = stbuf->ia_size;
+ uint32_t blksize = stbuf->ia_blksize;
+ uint64_t blocks = stbuf->ia_blocks;
+ uint32_t atime = stbuf->ia_atime;
+ uint32_t mtime = stbuf->ia_mtime;
+ uint32_t ctime = stbuf->ia_ctime;
+
+ uint32_t atime_nsec = stbuf->ia_atime_nsec;
+ uint32_t mtime_nsec = stbuf->ia_mtime_nsec;
+ uint32_t ctime_nsec = stbuf->ia_ctime_nsec;
ret = asprintf (&tmp_buf,
@@ -307,10 +307,10 @@ gf_add_locker (struct _lock_table *table, const char *volume,
if (fd == NULL) {
loc_copy (&new->loc, loc);
- dir = S_ISDIR (new->loc.inode->st_mode);
+ dir = IA_ISDIR (new->loc.inode->ia_type);
} else {
new->fd = fd_ref (fd);
- dir = S_ISDIR (fd->inode->st_mode);
+ dir = IA_ISDIR (fd->inode->ia_type);
}
new->pid = pid;
@@ -342,9 +342,9 @@ gf_del_locker (struct _lock_table *table, const char *volume,
INIT_LIST_HEAD (&del);
if (fd) {
- dir = S_ISDIR (fd->inode->st_mode);
+ dir = IA_ISDIR (fd->inode->ia_type);
} else {
- dir = S_ISDIR (loc->inode->st_mode);
+ dir = IA_ISDIR (loc->inode->ia_type);
}
LOCK (&table->lock);