diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2013-12-06 10:16:14 +0000 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2014-01-03 10:00:31 +0000 |
commit | 7005c3e4ae42858dbb695b2d03d340af799b1f1b (patch) | |
tree | 25e3ce7a1dccb1784ca1b09f03a0382265b82370 /fs/gfs2/incore.h | |
parent | 7de41d36ff5885141a16c74a044936cf878c770f (diff) | |
download | linux-7005c3e4ae42858dbb695b2d03d340af799b1f1b.tar.gz linux-7005c3e4ae42858dbb695b2d03d340af799b1f1b.tar.bz2 linux-7005c3e4ae42858dbb695b2d03d340af799b1f1b.zip |
GFS2: Use range based functions for rgrp sync/invalidation
Each rgrp header is represented as a single extent on disk, so we
can calculate the position within the address space, since we are
using address spaces mapped 1:1 to the disk. This means that it
is possible to use the range based versions of filemap_fdatawrite/wait
and for invalidating the page cache.
Our eventual intent is to then be able to merge the address spaces
used for rgrps into a single address space, rather than to have
one for each glock, saving memory and reducing complexity.
Since during umount, the rgrp structures are disposed of before
the glocks, we need to store the extent information in the glock
so that is is available for a final invalidation. This patch uses
a field which is otherwise unused in rgrp glocks to do that, so
that we do not have to expand the size of a glock.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/incore.h')
-rw-r--r-- | fs/gfs2/incore.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h index 01328162c952..e6544ee0c137 100644 --- a/fs/gfs2/incore.h +++ b/fs/gfs2/incore.h @@ -351,7 +351,15 @@ struct gfs2_glock { atomic_t gl_ail_count; atomic_t gl_revokes; struct delayed_work gl_work; - struct work_struct gl_delete; + union { + /* For inode and iopen glocks only */ + struct work_struct gl_delete; + /* For rgrp glocks only */ + struct { + loff_t start; + loff_t end; + } gl_vm; + }; struct rcu_head gl_rcu; }; |