aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/super.c
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2006-02-27 12:00:42 -0500
committerSteven Whitehouse <swhiteho@redhat.com>2006-02-27 12:00:42 -0500
commit568f4c9659a2225b0d29cf86feecbcf25c9045c8 (patch)
tree8ec0fee12313f88a195e0b90924f6b7633ba29f1 /fs/gfs2/super.c
parent3a8fe9be6c9794e55ac2253eab91d42b28a9dab6 (diff)
[GFS2] 80 Column audit of GFS2
Requested by: Prarit Bhargava <prarit@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/super.c')
-rw-r--r--fs/gfs2/super.c30
1 files changed, 20 insertions, 10 deletions
diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c
index 60e266618729..2c1c6aa1c077 100644
--- a/fs/gfs2/super.c
+++ b/fs/gfs2/super.c
@@ -110,36 +110,43 @@ int gfs2_check_sb(struct gfs2_sbd *sdp, struct gfs2_sb *sb, int silent)
110 break; 110 break;
111 111
112 if (!gfs2_old_fs_formats[x]) { 112 if (!gfs2_old_fs_formats[x]) {
113 printk(KERN_WARNING "GFS2: code version (%u, %u) is incompatible " 113 printk(KERN_WARNING
114 "GFS2: code version (%u, %u) is incompatible "
114 "with ondisk format (%u, %u)\n", 115 "with ondisk format (%u, %u)\n",
115 GFS2_FORMAT_FS, GFS2_FORMAT_MULTI, 116 GFS2_FORMAT_FS, GFS2_FORMAT_MULTI,
116 sb->sb_fs_format, sb->sb_multihost_format); 117 sb->sb_fs_format, sb->sb_multihost_format);
117 printk(KERN_WARNING "GFS2: I don't know how to upgrade this FS\n"); 118 printk(KERN_WARNING
119 "GFS2: I don't know how to upgrade this FS\n");
118 return -EINVAL; 120 return -EINVAL;
119 } 121 }
120 } 122 }
121 123
122 if (sb->sb_multihost_format != GFS2_FORMAT_MULTI) { 124 if (sb->sb_multihost_format != GFS2_FORMAT_MULTI) {
123 for (x = 0; gfs2_old_multihost_formats[x]; x++) 125 for (x = 0; gfs2_old_multihost_formats[x]; x++)
124 if (gfs2_old_multihost_formats[x] == sb->sb_multihost_format) 126 if (gfs2_old_multihost_formats[x] ==
127 sb->sb_multihost_format)
125 break; 128 break;
126 129
127 if (!gfs2_old_multihost_formats[x]) { 130 if (!gfs2_old_multihost_formats[x]) {
128 printk(KERN_WARNING "GFS2: code version (%u, %u) is incompatible " 131 printk(KERN_WARNING
132 "GFS2: code version (%u, %u) is incompatible "
129 "with ondisk format (%u, %u)\n", 133 "with ondisk format (%u, %u)\n",
130 GFS2_FORMAT_FS, GFS2_FORMAT_MULTI, 134 GFS2_FORMAT_FS, GFS2_FORMAT_MULTI,
131 sb->sb_fs_format, sb->sb_multihost_format); 135 sb->sb_fs_format, sb->sb_multihost_format);
132 printk(KERN_WARNING "GFS2: I don't know how to upgrade this FS\n"); 136 printk(KERN_WARNING
137 "GFS2: I don't know how to upgrade this FS\n");
133 return -EINVAL; 138 return -EINVAL;
134 } 139 }
135 } 140 }
136 141
137 if (!sdp->sd_args.ar_upgrade) { 142 if (!sdp->sd_args.ar_upgrade) {
138 printk(KERN_WARNING "GFS2: code version (%u, %u) is incompatible " 143 printk(KERN_WARNING
144 "GFS2: code version (%u, %u) is incompatible "
139 "with ondisk format (%u, %u)\n", 145 "with ondisk format (%u, %u)\n",
140 GFS2_FORMAT_FS, GFS2_FORMAT_MULTI, 146 GFS2_FORMAT_FS, GFS2_FORMAT_MULTI,
141 sb->sb_fs_format, sb->sb_multihost_format); 147 sb->sb_fs_format, sb->sb_multihost_format);
142 printk(KERN_INFO "GFS2: Use the \"upgrade\" mount option to upgrade " 148 printk(KERN_INFO
149 "GFS2: Use the \"upgrade\" mount option to upgrade "
143 "the FS\n"); 150 "the FS\n");
144 printk(KERN_INFO "GFS2: See the manual for more details\n"); 151 printk(KERN_INFO "GFS2: See the manual for more details\n");
145 return -EINVAL; 152 return -EINVAL;
@@ -289,7 +296,8 @@ int gfs2_jindex_hold(struct gfs2_sbd *sdp, struct gfs2_holder *ji_gh)
289 296
290 name.len = sprintf(buf, "journal%u", sdp->sd_journals); 297 name.len = sprintf(buf, "journal%u", sdp->sd_journals);
291 298
292 error = gfs2_dir_search(get_v2ip(sdp->sd_jindex), &name, NULL, NULL); 299 error = gfs2_dir_search(get_v2ip(sdp->sd_jindex),
300 &name, NULL, NULL);
293 if (error == -ENOENT) { 301 if (error == -ENOENT) {
294 error = 0; 302 error = 0;
295 break; 303 break;
@@ -445,7 +453,8 @@ int gfs2_lookup_master_dir(struct gfs2_sbd *sdp)
445 sdp->sd_sb.sb_master_dir.no_addr, 453 sdp->sd_sb.sb_master_dir.no_addr,
446 &gfs2_inode_glops, CREATE, &gl); 454 &gfs2_inode_glops, CREATE, &gl);
447 if (!error) { 455 if (!error) {
448 error = gfs2_lookup_simple(sdp->sd_root_dir, ".gfs2_admin", &inode); 456 error = gfs2_lookup_simple(sdp->sd_root_dir, ".gfs2_admin",
457 &inode);
449 sdp->sd_master_dir = inode; 458 sdp->sd_master_dir = inode;
450 gfs2_glock_put(gl); 459 gfs2_glock_put(gl);
451 } 460 }
@@ -854,7 +863,8 @@ int gfs2_lock_fs_check_clean(struct gfs2_sbd *sdp, struct gfs2_holder *t_gh)
854 error = -ENOMEM; 863 error = -ENOMEM;
855 goto out; 864 goto out;
856 } 865 }
857 error = gfs2_glock_nq_init(get_v2ip(jd->jd_inode)->i_gl, LM_ST_SHARED, 0, 866 error = gfs2_glock_nq_init(get_v2ip(jd->jd_inode)->i_gl,
867 LM_ST_SHARED, 0,
858 &lfcc->gh); 868 &lfcc->gh);
859 if (error) { 869 if (error) {
860 kfree(lfcc); 870 kfree(lfcc);