diff options
author | Raghavendra G <raghavendra@gluster.com> | 2010-04-06 02:11:48 +0000 |
---|---|---|
committer | Anand V. Avati <avati@dev.gluster.com> | 2010-04-08 03:09:04 -0700 |
commit | cc581c33e8fce44e2feac37118e8712dced6992b (patch) | |
tree | 7bde1bb235ef8e4868b2e0e568d4beadf2eeb36e /libglusterfs/src/protocol.h | |
parent | 832fedddd215d8902b8a7fba1e06b4329ea2e651 (diff) |
core/protocol.h: add nanosecond resolution handling while converting to/from gf_stat_t and stat.
Signed-off-by: Raghavendra G <raghavendra@gluster.com>
Signed-off-by: Anand V. Avati <avati@dev.gluster.com>
BUG: 801 (Direct io-mode support and related changes in caching translators.)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=801
Diffstat (limited to 'libglusterfs/src/protocol.h')
-rw-r--r-- | libglusterfs/src/protocol.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libglusterfs/src/protocol.h b/libglusterfs/src/protocol.h index 67595179a..6a10812f3 100644 --- a/libglusterfs/src/protocol.h +++ b/libglusterfs/src/protocol.h @@ -75,8 +75,11 @@ gf_stat_to_stat (struct gf_stat *gf_stat, struct stat *stat) stat->st_blksize = ntoh32 (gf_stat->blksize); stat->st_blocks = ntoh64 (gf_stat->blocks); stat->st_atime = ntoh32 (gf_stat->atime); + ST_ATIM_NSEC_SET(stat, gf_stat->atime_nsec); stat->st_mtime = ntoh32 (gf_stat->mtime); + ST_MTIM_NSEC_SET(stat, gf_stat->mtime_nsec); stat->st_ctime = ntoh32 (gf_stat->ctime); + ST_CTIM_NSEC_SET(stat, gf_stat->ctime_nsec); } @@ -94,8 +97,11 @@ gf_stat_from_stat (struct gf_stat *gf_stat, struct stat *stat) gf_stat->blksize = hton32 (stat->st_blksize); gf_stat->blocks = hton64 (stat->st_blocks); gf_stat->atime = hton32 (stat->st_atime); + gf_stat->atime_nsec = hton32 (ST_ATIM_NSEC(stat)); gf_stat->mtime = hton32 (stat->st_mtime); + gf_stat->mtime_nsec = hton32 (ST_MTIM_NSEC(stat)); gf_stat->ctime = hton32 (stat->st_ctime); + gf_stat->ctime_nsec = hton32 (ST_CTIM_NSEC(stat)); } |