summaryrefslogtreecommitdiffstats
path: root/xlators/cluster/afr/src/afr-self-heal-data.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/cluster/afr/src/afr-self-heal-data.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/cluster/afr/src/afr-self-heal-data.c')
-rw-r--r--xlators/cluster/afr/src/afr-self-heal-data.c31
1 files changed, 12 insertions, 19 deletions
diff --git a/xlators/cluster/afr/src/afr-self-heal-data.c b/xlators/cluster/afr/src/afr-self-heal-data.c
index 75090ad79ae..5711c89cf66 100644
--- a/xlators/cluster/afr/src/afr-self-heal-data.c
+++ b/xlators/cluster/afr/src/afr-self-heal-data.c
@@ -124,7 +124,7 @@ afr_sh_data_flush_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
int
afr_sh_data_setattr_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno, struct stat *statpre, struct stat *statpost)
+ int32_t op_ret, int32_t op_errno, struct iatt *statpre, struct iatt *statpost)
{
afr_sh_data_flush_cbk (frame, cookie, this, op_ret, op_errno);
@@ -145,7 +145,7 @@ afr_sh_data_close (call_frame_t *frame, xlator_t *this)
int active_sinks = 0;
int32_t valid = 0;
- struct stat stbuf = {0,};
+ struct iatt stbuf = {0,};
local = frame->local;
sh = &local->self_heal;
@@ -156,17 +156,10 @@ afr_sh_data_close (call_frame_t *frame, xlator_t *this)
valid |= (GF_SET_ATTR_ATIME | GF_SET_ATTR_MTIME);
-#ifdef HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC
- stbuf.st_atim = sh->buf[source].st_atim;
- stbuf.st_mtim = sh->buf[source].st_mtim;
-
-#elif HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC
- stbuf.st_atimespec = sh->buf[source].st_atimespec;
- stbuf.st_mtimespec = sh->buf[source].st_mtimespec;
-#else
- stbuf.st_atime = sh->buf[source].st_atime;
- stbuf.st_mtime = sh->buf[source].st_mtime;
-#endif
+ stbuf.ia_atime = sh->buf[source].ia_atime;
+ stbuf.ia_atime_nsec = sh->buf[source].ia_atime_nsec;
+ stbuf.ia_mtime = sh->buf[source].ia_mtime;
+ stbuf.ia_mtime_nsec = sh->buf[source].ia_mtime_nsec;
if (sh->healing_fd_opened) {
/* not our job to close the fd */
@@ -440,8 +433,8 @@ afr_sh_data_erase_pending (call_frame_t *frame, xlator_t *this)
int
afr_sh_data_trim_cbk (call_frame_t *frame, void *cookie, xlator_t *this,
- int32_t op_ret, int32_t op_errno, struct stat *prebuf,
- struct stat *postbuf)
+ int32_t op_ret, int32_t op_errno, struct iatt *prebuf,
+ struct iatt *postbuf)
{
afr_private_t * priv = NULL;
afr_local_t * local = NULL;
@@ -543,7 +536,7 @@ sh_zero_byte_files_exist (afr_self_heal_t *sh, int child_count)
int ret = 0;
for (i = 0; i < child_count; i++) {
- if (sh->buf[i].st_size == 0) {
+ if (sh->buf[i].ia_size == 0) {
ret = 1;
break;
}
@@ -722,13 +715,13 @@ afr_sh_data_fix (call_frame_t *frame, xlator_t *this)
sh->source = source;
sh->block_size = 65536;
- sh->file_size = sh->buf[source].st_size;
+ sh->file_size = sh->buf[source].ia_size;
if (FILE_HAS_HOLES (&sh->buf[source]))
sh->file_has_holes = 1;
orig_local = sh->orig_frame->local;
- orig_local->cont.lookup.buf.st_size = sh->buf[source].st_size;
+ orig_local->cont.lookup.buf.ia_size = sh->buf[source].ia_size;
/* detect changes not visible through pending flags -- JIC */
for (i = 0; i < priv->child_count; i++) {
@@ -788,7 +781,7 @@ afr_self_heal_get_source (xlator_t *this, afr_local_t *local, dict_t **xattr)
int
afr_sh_data_fstat_cbk (call_frame_t *frame, void *cookie,
xlator_t *this, int32_t op_ret, int32_t op_errno,
- struct stat *buf)
+ struct iatt *buf)
{
afr_private_t *priv = NULL;
afr_local_t *local = NULL;