aboutsummaryrefslogtreecommitdiffstats
path: root/fs/gfs2/super.c
diff options
context:
space:
mode:
authorBenjamin Marzinski <bmarzins@redhat.com>2012-05-30 00:01:09 -0400
committerSteven Whitehouse <swhiteho@redhat.com>2012-06-08 06:50:01 -0400
commit90306c41dc3d8e5f12ecd0193dae99e0e7f6e896 (patch)
tree344d0e0f62620dee784a824f30679e9a5d87696d /fs/gfs2/super.c
parentba1ddcb6ca0c46edd275790d1e4e2cfd6219ce19 (diff)
GFS2: Use lvbs for storing rgrp information with mount option
Instead of reading in the resource groups when gfs2 is checking for free space to allocate from, gfs2 can store the necessary infromation in the resource group's lvb. Also, instead of searching for unlinked inodes in every resource group that's checked for free space, gfs2 can store the number of unlinked but inodes in the lvb, and only check for unlinked inodes if it will find some. The first time a resource group is locked, the lvb must initialized. Since this involves counting the unlinked inodes in the resource group, this takes a little extra time. But after that, if the resource group is locked with GL_SKIP, the buffer head won't be read in unless it's actually needed. Enabling the resource groups lvbs is done via the rgrplvb mount option. If this option isn't set, the lvbs will still be set and updated, but they won't be verfied or used by the filesystem. To safely turn on this option, all of the nodes mounting the filesystem must be running code with this patch, and the filesystem must have been completely unmounted since they were updated. Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com> Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/super.c')
-rw-r--r--fs/gfs2/super.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/fs/gfs2/super.c b/fs/gfs2/super.c
index 81fc76264ed4..788068758f3a 100644
--- a/fs/gfs2/super.c
+++ b/fs/gfs2/super.c
@@ -78,6 +78,8 @@ enum {
78 Opt_quota_quantum, 78 Opt_quota_quantum,
79 Opt_barrier, 79 Opt_barrier,
80 Opt_nobarrier, 80 Opt_nobarrier,
81 Opt_rgrplvb,
82 Opt_norgrplvb,
81 Opt_error, 83 Opt_error,
82}; 84};
83 85
@@ -115,6 +117,8 @@ static const match_table_t tokens = {
115 {Opt_quota_quantum, "quota_quantum=%d"}, 117 {Opt_quota_quantum, "quota_quantum=%d"},
116 {Opt_barrier, "barrier"}, 118 {Opt_barrier, "barrier"},
117 {Opt_nobarrier, "nobarrier"}, 119 {Opt_nobarrier, "nobarrier"},
120 {Opt_rgrplvb, "rgrplvb"},
121 {Opt_norgrplvb, "norgrplvb"},
118 {Opt_error, NULL} 122 {Opt_error, NULL}
119}; 123};
120 124
@@ -267,6 +271,12 @@ int gfs2_mount_args(struct gfs2_args *args, char *options)
267 case Opt_nobarrier: 271 case Opt_nobarrier:
268 args->ar_nobarrier = 1; 272 args->ar_nobarrier = 1;
269 break; 273 break;
274 case Opt_rgrplvb:
275 args->ar_rgrplvb = 1;
276 break;
277 case Opt_norgrplvb:
278 args->ar_rgrplvb = 0;
279 break;
270 case Opt_error: 280 case Opt_error:
271 default: 281 default:
272 printk(KERN_WARNING "GFS2: invalid mount option: %s\n", o); 282 printk(KERN_WARNING "GFS2: invalid mount option: %s\n", o);
@@ -1379,6 +1389,8 @@ static int gfs2_show_options(struct seq_file *s, struct dentry *root)
1379 seq_printf(s, ",nobarrier"); 1389 seq_printf(s, ",nobarrier");
1380 if (test_bit(SDF_DEMOTE, &sdp->sd_flags)) 1390 if (test_bit(SDF_DEMOTE, &sdp->sd_flags))
1381 seq_printf(s, ",demote_interface_used"); 1391 seq_printf(s, ",demote_interface_used");
1392 if (args->ar_rgrplvb)
1393 seq_printf(s, ",rgrplvb");
1382 return 0; 1394 return 0;
1383} 1395}
1384 1396