diff options
Diffstat (limited to 'fs/gfs2/ops_fstype.c')
-rw-r--r-- | fs/gfs2/ops_fstype.c | 60 |
1 files changed, 2 insertions, 58 deletions
diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c index 558bba493cc..5b11f376814 100644 --- a/fs/gfs2/ops_fstype.c +++ b/fs/gfs2/ops_fstype.c | |||
@@ -38,14 +38,6 @@ | |||
38 | #define DO 0 | 38 | #define DO 0 |
39 | #define UNDO 1 | 39 | #define UNDO 1 |
40 | 40 | ||
41 | static const u32 gfs2_old_fs_formats[] = { | ||
42 | 0 | ||
43 | }; | ||
44 | |||
45 | static const u32 gfs2_old_multihost_formats[] = { | ||
46 | 0 | ||
47 | }; | ||
48 | |||
49 | /** | 41 | /** |
50 | * gfs2_tune_init - Fill a gfs2_tune structure with default values | 42 | * gfs2_tune_init - Fill a gfs2_tune structure with default values |
51 | * @gt: tune | 43 | * @gt: tune |
@@ -135,8 +127,6 @@ static struct gfs2_sbd *init_sbd(struct super_block *sb) | |||
135 | 127 | ||
136 | static int gfs2_check_sb(struct gfs2_sbd *sdp, struct gfs2_sb_host *sb, int silent) | 128 | static int gfs2_check_sb(struct gfs2_sbd *sdp, struct gfs2_sb_host *sb, int silent) |
137 | { | 129 | { |
138 | unsigned int x; | ||
139 | |||
140 | if (sb->sb_magic != GFS2_MAGIC || | 130 | if (sb->sb_magic != GFS2_MAGIC || |
141 | sb->sb_type != GFS2_METATYPE_SB) { | 131 | sb->sb_type != GFS2_METATYPE_SB) { |
142 | if (!silent) | 132 | if (!silent) |
@@ -150,55 +140,9 @@ static int gfs2_check_sb(struct gfs2_sbd *sdp, struct gfs2_sb_host *sb, int sile | |||
150 | sb->sb_multihost_format == GFS2_FORMAT_MULTI) | 140 | sb->sb_multihost_format == GFS2_FORMAT_MULTI) |
151 | return 0; | 141 | return 0; |
152 | 142 | ||
153 | if (sb->sb_fs_format != GFS2_FORMAT_FS) { | 143 | fs_warn(sdp, "Unknown on-disk format, unable to mount\n"); |
154 | for (x = 0; gfs2_old_fs_formats[x]; x++) | ||
155 | if (gfs2_old_fs_formats[x] == sb->sb_fs_format) | ||
156 | break; | ||
157 | |||
158 | if (!gfs2_old_fs_formats[x]) { | ||
159 | printk(KERN_WARNING | ||
160 | "GFS2: code version (%u, %u) is incompatible " | ||
161 | "with ondisk format (%u, %u)\n", | ||
162 | GFS2_FORMAT_FS, GFS2_FORMAT_MULTI, | ||
163 | sb->sb_fs_format, sb->sb_multihost_format); | ||
164 | printk(KERN_WARNING | ||
165 | "GFS2: I don't know how to upgrade this FS\n"); | ||
166 | return -EINVAL; | ||
167 | } | ||
168 | } | ||
169 | |||
170 | if (sb->sb_multihost_format != GFS2_FORMAT_MULTI) { | ||
171 | for (x = 0; gfs2_old_multihost_formats[x]; x++) | ||
172 | if (gfs2_old_multihost_formats[x] == | ||
173 | sb->sb_multihost_format) | ||
174 | break; | ||
175 | |||
176 | if (!gfs2_old_multihost_formats[x]) { | ||
177 | printk(KERN_WARNING | ||
178 | "GFS2: code version (%u, %u) is incompatible " | ||
179 | "with ondisk format (%u, %u)\n", | ||
180 | GFS2_FORMAT_FS, GFS2_FORMAT_MULTI, | ||
181 | sb->sb_fs_format, sb->sb_multihost_format); | ||
182 | printk(KERN_WARNING | ||
183 | "GFS2: I don't know how to upgrade this FS\n"); | ||
184 | return -EINVAL; | ||
185 | } | ||
186 | } | ||
187 | 144 | ||
188 | if (!sdp->sd_args.ar_upgrade) { | 145 | return -EINVAL; |
189 | printk(KERN_WARNING | ||
190 | "GFS2: code version (%u, %u) is incompatible " | ||
191 | "with ondisk format (%u, %u)\n", | ||
192 | GFS2_FORMAT_FS, GFS2_FORMAT_MULTI, | ||
193 | sb->sb_fs_format, sb->sb_multihost_format); | ||
194 | printk(KERN_INFO | ||
195 | "GFS2: Use the \"upgrade\" mount option to upgrade " | ||
196 | "the FS\n"); | ||
197 | printk(KERN_INFO "GFS2: See the manual for more details\n"); | ||
198 | return -EINVAL; | ||
199 | } | ||
200 | |||
201 | return 0; | ||
202 | } | 146 | } |
203 | 147 | ||
204 | static void end_bio_io_page(struct bio *bio, int error) | 148 | static void end_bio_io_page(struct bio *bio, int error) |