diff options
author | Benjamin Marzinski <bmarzins@redhat.com> | 2012-05-30 08:01:09 +0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2012-06-08 14:50:01 +0400 |
commit | 90306c41dc3d8e5f12ecd0193dae99e0e7f6e896 (patch) | |
tree | 344d0e0f62620dee784a824f30679e9a5d87696d /include/linux/gfs2_ondisk.h | |
parent | ba1ddcb6ca0c46edd275790d1e4e2cfd6219ce19 (diff) | |
download | linux-90306c41dc3d8e5f12ecd0193dae99e0e7f6e896.tar.xz |
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 'include/linux/gfs2_ondisk.h')
-rw-r--r-- | include/linux/gfs2_ondisk.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/gfs2_ondisk.h b/include/linux/gfs2_ondisk.h index e8ccf6ff3b4d..b2de1f9a88d6 100644 --- a/include/linux/gfs2_ondisk.h +++ b/include/linux/gfs2_ondisk.h @@ -170,6 +170,16 @@ struct gfs2_rindex { #define GFS2_RGF_NOALLOC 0x00000008 #define GFS2_RGF_TRIMMED 0x00000010 +struct gfs2_rgrp_lvb { + __be32 rl_magic; + __be32 rl_flags; + __be32 rl_free; + __be32 rl_dinodes; + __be64 rl_igeneration; + __be32 rl_unlinked; + __be32 __pad; +}; + struct gfs2_rgrp { struct gfs2_meta_header rg_header; |