diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2007-06-05 04:39:18 -0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2007-07-09 03:23:12 -0400 |
commit | 4bd91ba18198eee42c39d4c334c825d1a0a4b445 (patch) | |
tree | f385969756303a17a7ce3d24280fc6bd64063c87 /fs/gfs2/bmap.c | |
parent | bb8d8a6f54c1c84d7c74623491bab043b36a38c5 (diff) |
[GFS2] Add nanosecond timestamp feature
This adds a nanosecond timestamp feature to the GFS2 filesystem. Due
to the way that the on-disk format works, older filesystems will just
appear to have this field set to zero. When mounted by an older version
of GFS2, the filesystem will simply ignore the extra fields so that
it will again appear to have whole second resolution, so that its
trivially backward compatible.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/bmap.c')
-rw-r--r-- | fs/gfs2/bmap.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/gfs2/bmap.c b/fs/gfs2/bmap.c index b784cf3c6482..d16044cb023a 100644 --- a/fs/gfs2/bmap.c +++ b/fs/gfs2/bmap.c | |||
@@ -772,7 +772,7 @@ static int do_strip(struct gfs2_inode *ip, struct buffer_head *dibh, | |||
772 | gfs2_free_data(ip, bstart, blen); | 772 | gfs2_free_data(ip, bstart, blen); |
773 | } | 773 | } |
774 | 774 | ||
775 | ip->i_inode.i_mtime = ip->i_inode.i_ctime = CURRENT_TIME_SEC; | 775 | ip->i_inode.i_mtime = ip->i_inode.i_ctime = CURRENT_TIME; |
776 | 776 | ||
777 | gfs2_dinode_out(ip, dibh->b_data); | 777 | gfs2_dinode_out(ip, dibh->b_data); |
778 | 778 | ||
@@ -847,7 +847,7 @@ static int do_grow(struct gfs2_inode *ip, u64 size) | |||
847 | } | 847 | } |
848 | 848 | ||
849 | ip->i_di.di_size = size; | 849 | ip->i_di.di_size = size; |
850 | ip->i_inode.i_mtime = ip->i_inode.i_ctime = CURRENT_TIME_SEC; | 850 | ip->i_inode.i_mtime = ip->i_inode.i_ctime = CURRENT_TIME; |
851 | 851 | ||
852 | error = gfs2_meta_inode_buffer(ip, &dibh); | 852 | error = gfs2_meta_inode_buffer(ip, &dibh); |
853 | if (error) | 853 | if (error) |
@@ -958,7 +958,7 @@ static int trunc_start(struct gfs2_inode *ip, u64 size) | |||
958 | 958 | ||
959 | if (gfs2_is_stuffed(ip)) { | 959 | if (gfs2_is_stuffed(ip)) { |
960 | ip->i_di.di_size = size; | 960 | ip->i_di.di_size = size; |
961 | ip->i_inode.i_mtime = ip->i_inode.i_ctime = CURRENT_TIME_SEC; | 961 | ip->i_inode.i_mtime = ip->i_inode.i_ctime = CURRENT_TIME; |
962 | gfs2_trans_add_bh(ip->i_gl, dibh, 1); | 962 | gfs2_trans_add_bh(ip->i_gl, dibh, 1); |
963 | gfs2_dinode_out(ip, dibh->b_data); | 963 | gfs2_dinode_out(ip, dibh->b_data); |
964 | gfs2_buffer_clear_tail(dibh, sizeof(struct gfs2_dinode) + size); | 964 | gfs2_buffer_clear_tail(dibh, sizeof(struct gfs2_dinode) + size); |
@@ -970,7 +970,7 @@ static int trunc_start(struct gfs2_inode *ip, u64 size) | |||
970 | 970 | ||
971 | if (!error) { | 971 | if (!error) { |
972 | ip->i_di.di_size = size; | 972 | ip->i_di.di_size = size; |
973 | ip->i_inode.i_mtime = ip->i_inode.i_ctime = CURRENT_TIME_SEC; | 973 | ip->i_inode.i_mtime = ip->i_inode.i_ctime = CURRENT_TIME; |
974 | ip->i_di.di_flags |= GFS2_DIF_TRUNC_IN_PROG; | 974 | ip->i_di.di_flags |= GFS2_DIF_TRUNC_IN_PROG; |
975 | gfs2_trans_add_bh(ip->i_gl, dibh, 1); | 975 | gfs2_trans_add_bh(ip->i_gl, dibh, 1); |
976 | gfs2_dinode_out(ip, dibh->b_data); | 976 | gfs2_dinode_out(ip, dibh->b_data); |
@@ -1043,7 +1043,7 @@ static int trunc_end(struct gfs2_inode *ip) | |||
1043 | ip->i_no_addr; | 1043 | ip->i_no_addr; |
1044 | gfs2_buffer_clear_tail(dibh, sizeof(struct gfs2_dinode)); | 1044 | gfs2_buffer_clear_tail(dibh, sizeof(struct gfs2_dinode)); |
1045 | } | 1045 | } |
1046 | ip->i_inode.i_mtime = ip->i_inode.i_ctime = CURRENT_TIME_SEC; | 1046 | ip->i_inode.i_mtime = ip->i_inode.i_ctime = CURRENT_TIME; |
1047 | ip->i_di.di_flags &= ~GFS2_DIF_TRUNC_IN_PROG; | 1047 | ip->i_di.di_flags &= ~GFS2_DIF_TRUNC_IN_PROG; |
1048 | 1048 | ||
1049 | gfs2_trans_add_bh(ip->i_gl, dibh, 1); | 1049 | gfs2_trans_add_bh(ip->i_gl, dibh, 1); |