diff options
Diffstat (limited to 'fs/gfs2/super.c')
-rw-r--r-- | fs/gfs2/super.c | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c index 77cb9f830ee4..047d1176096c 100644 --- a/fs/gfs2/super.c +++ b/fs/gfs2/super.c | |||
@@ -85,6 +85,7 @@ static const match_table_t tokens = { | |||
85 | {Opt_locktable, "locktable=%s"}, | 85 | {Opt_locktable, "locktable=%s"}, |
86 | {Opt_hostdata, "hostdata=%s"}, | 86 | {Opt_hostdata, "hostdata=%s"}, |
87 | {Opt_spectator, "spectator"}, | 87 | {Opt_spectator, "spectator"}, |
88 | {Opt_spectator, "norecovery"}, | ||
88 | {Opt_ignore_local_fs, "ignore_local_fs"}, | 89 | {Opt_ignore_local_fs, "ignore_local_fs"}, |
89 | {Opt_localflocks, "localflocks"}, | 90 | {Opt_localflocks, "localflocks"}, |
90 | {Opt_localcaching, "localcaching"}, | 91 | {Opt_localcaching, "localcaching"}, |
@@ -159,13 +160,13 @@ int gfs2_mount_args(struct gfs2_args *args, char *options) | |||
159 | args->ar_spectator = 1; | 160 | args->ar_spectator = 1; |
160 | break; | 161 | break; |
161 | case Opt_ignore_local_fs: | 162 | case Opt_ignore_local_fs: |
162 | args->ar_ignore_local_fs = 1; | 163 | /* Retained for backwards compat only */ |
163 | break; | 164 | break; |
164 | case Opt_localflocks: | 165 | case Opt_localflocks: |
165 | args->ar_localflocks = 1; | 166 | args->ar_localflocks = 1; |
166 | break; | 167 | break; |
167 | case Opt_localcaching: | 168 | case Opt_localcaching: |
168 | args->ar_localcaching = 1; | 169 | /* Retained for backwards compat only */ |
169 | break; | 170 | break; |
170 | case Opt_debug: | 171 | case Opt_debug: |
171 | if (args->ar_errors == GFS2_ERRORS_PANIC) { | 172 | if (args->ar_errors == GFS2_ERRORS_PANIC) { |
@@ -179,7 +180,7 @@ int gfs2_mount_args(struct gfs2_args *args, char *options) | |||
179 | args->ar_debug = 0; | 180 | args->ar_debug = 0; |
180 | break; | 181 | break; |
181 | case Opt_upgrade: | 182 | case Opt_upgrade: |
182 | args->ar_upgrade = 1; | 183 | /* Retained for backwards compat only */ |
183 | break; | 184 | break; |
184 | case Opt_acl: | 185 | case Opt_acl: |
185 | args->ar_posix_acl = 1; | 186 | args->ar_posix_acl = 1; |
@@ -342,15 +343,14 @@ int gfs2_jdesc_check(struct gfs2_jdesc *jd) | |||
342 | { | 343 | { |
343 | struct gfs2_inode *ip = GFS2_I(jd->jd_inode); | 344 | struct gfs2_inode *ip = GFS2_I(jd->jd_inode); |
344 | struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode); | 345 | struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode); |
346 | u64 size = i_size_read(jd->jd_inode); | ||
345 | 347 | ||
346 | if (ip->i_disksize < (8 << 20) || ip->i_disksize > (1 << 30) || | 348 | if (gfs2_check_internal_file_size(jd->jd_inode, 8 << 20, 1 << 30)) |
347 | (ip->i_disksize & (sdp->sd_sb.sb_bsize - 1))) { | ||
348 | gfs2_consist_inode(ip); | ||
349 | return -EIO; | 349 | return -EIO; |
350 | } | ||
351 | jd->jd_blocks = ip->i_disksize >> sdp->sd_sb.sb_bsize_shift; | ||
352 | 350 | ||
353 | if (gfs2_write_alloc_required(ip, 0, ip->i_disksize)) { | 351 | jd->jd_blocks = size >> sdp->sd_sb.sb_bsize_shift; |
352 | |||
353 | if (gfs2_write_alloc_required(ip, 0, size)) { | ||
354 | gfs2_consist_inode(ip); | 354 | gfs2_consist_inode(ip); |
355 | return -EIO; | 355 | return -EIO; |
356 | } | 356 | } |
@@ -1129,9 +1129,7 @@ static int gfs2_remount_fs(struct super_block *sb, int *flags, char *data) | |||
1129 | 1129 | ||
1130 | /* Some flags must not be changed */ | 1130 | /* Some flags must not be changed */ |
1131 | if (args_neq(&args, &sdp->sd_args, spectator) || | 1131 | if (args_neq(&args, &sdp->sd_args, spectator) || |
1132 | args_neq(&args, &sdp->sd_args, ignore_local_fs) || | ||
1133 | args_neq(&args, &sdp->sd_args, localflocks) || | 1132 | args_neq(&args, &sdp->sd_args, localflocks) || |
1134 | args_neq(&args, &sdp->sd_args, localcaching) || | ||
1135 | args_neq(&args, &sdp->sd_args, meta)) | 1133 | args_neq(&args, &sdp->sd_args, meta)) |
1136 | return -EINVAL; | 1134 | return -EINVAL; |
1137 | 1135 | ||
@@ -1234,16 +1232,10 @@ static int gfs2_show_options(struct seq_file *s, struct vfsmount *mnt) | |||
1234 | seq_printf(s, ",hostdata=%s", args->ar_hostdata); | 1232 | seq_printf(s, ",hostdata=%s", args->ar_hostdata); |
1235 | if (args->ar_spectator) | 1233 | if (args->ar_spectator) |
1236 | seq_printf(s, ",spectator"); | 1234 | seq_printf(s, ",spectator"); |
1237 | if (args->ar_ignore_local_fs) | ||
1238 | seq_printf(s, ",ignore_local_fs"); | ||
1239 | if (args->ar_localflocks) | 1235 | if (args->ar_localflocks) |
1240 | seq_printf(s, ",localflocks"); | 1236 | seq_printf(s, ",localflocks"); |
1241 | if (args->ar_localcaching) | ||
1242 | seq_printf(s, ",localcaching"); | ||
1243 | if (args->ar_debug) | 1237 | if (args->ar_debug) |
1244 | seq_printf(s, ",debug"); | 1238 | seq_printf(s, ",debug"); |
1245 | if (args->ar_upgrade) | ||
1246 | seq_printf(s, ",upgrade"); | ||
1247 | if (args->ar_posix_acl) | 1239 | if (args->ar_posix_acl) |
1248 | seq_printf(s, ",acl"); | 1240 | seq_printf(s, ",acl"); |
1249 | if (args->ar_quota != GFS2_QUOTA_DEFAULT) { | 1241 | if (args->ar_quota != GFS2_QUOTA_DEFAULT) { |