diff options
author | Benjamin Marzinski <bmarzins@redhat.com> | 2009-06-25 15:09:51 -0500 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2009-07-30 10:52:33 +0100 |
commit | 1946f70ab5e4eb8b54a8eaaedba2293a3750ab7e (patch) | |
tree | 91cc1850c7777d5cdea8713710081f70bb63a202 /fs/gfs2/super.h | |
parent | 2163b1e616c41c286f5ab79912671cd4bf52057c (diff) | |
download | linux-1946f70ab5e4eb8b54a8eaaedba2293a3750ab7e.tar.gz linux-1946f70ab5e4eb8b54a8eaaedba2293a3750ab7e.tar.bz2 linux-1946f70ab5e4eb8b54a8eaaedba2293a3750ab7e.zip |
GFS2: keep statfs info in sync on grows
GFS2 wasn't syncing its statfs info on grows. This causes a problem
when you grow the filesystem on multiple nodes. GFS2 would calculate
the new space based on the resource groups (which are always current),
and then assume that the filesystem had grown the from the existing
statfs size. If you grew the filesystem on two different nodes in a
short time, the second node wouldn't see the statfs size change from the
first node, and would assume that it was grown by a larger amount than
it was. When all these changes were synced out, the total fileystem
size would be incorrect (the first grow would be counted twice).
This patch syncs makes GFS2 read in the statfs changes from disk before
a grow, and write them out after the grow, while the master statfs inode
is locked.
Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/super.h')
-rw-r--r-- | fs/gfs2/super.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/gfs2/super.h b/fs/gfs2/super.h index b56413e3e40d..22e0417ed996 100644 --- a/fs/gfs2/super.h +++ b/fs/gfs2/super.h @@ -40,6 +40,10 @@ extern int gfs2_make_fs_rw(struct gfs2_sbd *sdp); extern int gfs2_statfs_init(struct gfs2_sbd *sdp); extern void gfs2_statfs_change(struct gfs2_sbd *sdp, s64 total, s64 free, s64 dinodes); +extern void gfs2_statfs_change_in(struct gfs2_statfs_change_host *sc, + const void *buf); +extern void update_statfs(struct gfs2_sbd *sdp, struct buffer_head *m_bh, + struct buffer_head *l_bh); extern int gfs2_statfs_sync(struct gfs2_sbd *sdp); extern int gfs2_freeze_fs(struct gfs2_sbd *sdp); |