diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2011-05-09 09:11:40 -0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2011-05-09 11:45:38 -0400 |
commit | 9eed04cd99b0a497cf0da22658808a7f5b10d734 (patch) | |
tree | 42d8655ac9523ddd19bda5621de58b22a2a1de07 /fs | |
parent | 194c011fc4650d0dd1eecbc35bc26045108aca51 (diff) |
GFS2: Move final part of inode.c into super.c
Now inode.c is empty.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs')
-rw-r--r-- | fs/gfs2/inode.c | 36 | ||||
-rw-r--r-- | fs/gfs2/super.c | 36 |
2 files changed, 36 insertions, 36 deletions
diff --git a/fs/gfs2/inode.c b/fs/gfs2/inode.c index b95ee5dc46ca..9076fbe23416 100644 --- a/fs/gfs2/inode.c +++ b/fs/gfs2/inode.c | |||
@@ -36,39 +36,3 @@ | |||
36 | #include "util.h" | 36 | #include "util.h" |
37 | 37 | ||
38 | 38 | ||
39 | void gfs2_dinode_out(const struct gfs2_inode *ip, void *buf) | ||
40 | { | ||
41 | struct gfs2_dinode *str = buf; | ||
42 | |||
43 | str->di_header.mh_magic = cpu_to_be32(GFS2_MAGIC); | ||
44 | str->di_header.mh_type = cpu_to_be32(GFS2_METATYPE_DI); | ||
45 | str->di_header.mh_format = cpu_to_be32(GFS2_FORMAT_DI); | ||
46 | str->di_num.no_addr = cpu_to_be64(ip->i_no_addr); | ||
47 | str->di_num.no_formal_ino = cpu_to_be64(ip->i_no_formal_ino); | ||
48 | str->di_mode = cpu_to_be32(ip->i_inode.i_mode); | ||
49 | str->di_uid = cpu_to_be32(ip->i_inode.i_uid); | ||
50 | str->di_gid = cpu_to_be32(ip->i_inode.i_gid); | ||
51 | str->di_nlink = cpu_to_be32(ip->i_inode.i_nlink); | ||
52 | str->di_size = cpu_to_be64(i_size_read(&ip->i_inode)); | ||
53 | str->di_blocks = cpu_to_be64(gfs2_get_inode_blocks(&ip->i_inode)); | ||
54 | str->di_atime = cpu_to_be64(ip->i_inode.i_atime.tv_sec); | ||
55 | str->di_mtime = cpu_to_be64(ip->i_inode.i_mtime.tv_sec); | ||
56 | str->di_ctime = cpu_to_be64(ip->i_inode.i_ctime.tv_sec); | ||
57 | |||
58 | str->di_goal_meta = cpu_to_be64(ip->i_goal); | ||
59 | str->di_goal_data = cpu_to_be64(ip->i_goal); | ||
60 | str->di_generation = cpu_to_be64(ip->i_generation); | ||
61 | |||
62 | str->di_flags = cpu_to_be32(ip->i_diskflags); | ||
63 | str->di_height = cpu_to_be16(ip->i_height); | ||
64 | str->di_payload_format = cpu_to_be32(S_ISDIR(ip->i_inode.i_mode) && | ||
65 | !(ip->i_diskflags & GFS2_DIF_EXHASH) ? | ||
66 | GFS2_FORMAT_DE : 0); | ||
67 | str->di_depth = cpu_to_be16(ip->i_depth); | ||
68 | str->di_entries = cpu_to_be32(ip->i_entries); | ||
69 | |||
70 | str->di_eattr = cpu_to_be64(ip->i_eattr); | ||
71 | str->di_atime_nsec = cpu_to_be32(ip->i_inode.i_atime.tv_nsec); | ||
72 | str->di_mtime_nsec = cpu_to_be32(ip->i_inode.i_mtime.tv_nsec); | ||
73 | str->di_ctime_nsec = cpu_to_be32(ip->i_inode.i_ctime.tv_nsec); | ||
74 | } | ||
diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c index 3061ac64f81e..ed540e7018be 100644 --- a/fs/gfs2/super.c +++ b/fs/gfs2/super.c | |||
@@ -701,6 +701,42 @@ void gfs2_unfreeze_fs(struct gfs2_sbd *sdp) | |||
701 | mutex_unlock(&sdp->sd_freeze_lock); | 701 | mutex_unlock(&sdp->sd_freeze_lock); |
702 | } | 702 | } |
703 | 703 | ||
704 | void gfs2_dinode_out(const struct gfs2_inode *ip, void *buf) | ||
705 | { | ||
706 | struct gfs2_dinode *str = buf; | ||
707 | |||
708 | str->di_header.mh_magic = cpu_to_be32(GFS2_MAGIC); | ||
709 | str->di_header.mh_type = cpu_to_be32(GFS2_METATYPE_DI); | ||
710 | str->di_header.mh_format = cpu_to_be32(GFS2_FORMAT_DI); | ||
711 | str->di_num.no_addr = cpu_to_be64(ip->i_no_addr); | ||
712 | str->di_num.no_formal_ino = cpu_to_be64(ip->i_no_formal_ino); | ||
713 | str->di_mode = cpu_to_be32(ip->i_inode.i_mode); | ||
714 | str->di_uid = cpu_to_be32(ip->i_inode.i_uid); | ||
715 | str->di_gid = cpu_to_be32(ip->i_inode.i_gid); | ||
716 | str->di_nlink = cpu_to_be32(ip->i_inode.i_nlink); | ||
717 | str->di_size = cpu_to_be64(i_size_read(&ip->i_inode)); | ||
718 | str->di_blocks = cpu_to_be64(gfs2_get_inode_blocks(&ip->i_inode)); | ||
719 | str->di_atime = cpu_to_be64(ip->i_inode.i_atime.tv_sec); | ||
720 | str->di_mtime = cpu_to_be64(ip->i_inode.i_mtime.tv_sec); | ||
721 | str->di_ctime = cpu_to_be64(ip->i_inode.i_ctime.tv_sec); | ||
722 | |||
723 | str->di_goal_meta = cpu_to_be64(ip->i_goal); | ||
724 | str->di_goal_data = cpu_to_be64(ip->i_goal); | ||
725 | str->di_generation = cpu_to_be64(ip->i_generation); | ||
726 | |||
727 | str->di_flags = cpu_to_be32(ip->i_diskflags); | ||
728 | str->di_height = cpu_to_be16(ip->i_height); | ||
729 | str->di_payload_format = cpu_to_be32(S_ISDIR(ip->i_inode.i_mode) && | ||
730 | !(ip->i_diskflags & GFS2_DIF_EXHASH) ? | ||
731 | GFS2_FORMAT_DE : 0); | ||
732 | str->di_depth = cpu_to_be16(ip->i_depth); | ||
733 | str->di_entries = cpu_to_be32(ip->i_entries); | ||
734 | |||
735 | str->di_eattr = cpu_to_be64(ip->i_eattr); | ||
736 | str->di_atime_nsec = cpu_to_be32(ip->i_inode.i_atime.tv_nsec); | ||
737 | str->di_mtime_nsec = cpu_to_be32(ip->i_inode.i_mtime.tv_nsec); | ||
738 | str->di_ctime_nsec = cpu_to_be32(ip->i_inode.i_ctime.tv_nsec); | ||
739 | } | ||
704 | 740 | ||
705 | /** | 741 | /** |
706 | * gfs2_write_inode - Make sure the inode is stable on the disk | 742 | * gfs2_write_inode - Make sure the inode is stable on the disk |