]> git.baikalelectronics.ru Git - kernel.git/commit
GFS2: keep statfs info in sync on grows
authorBenjamin Marzinski <bmarzins@redhat.com>
Thu, 25 Jun 2009 20:09:51 +0000 (15:09 -0500)
committerSteven Whitehouse <swhiteho@redhat.com>
Thu, 30 Jul 2009 09:52:33 +0000 (10:52 +0100)
commit69d0eb26915e82f8340385216e62c941ffb204d0
tree91cc1850c7777d5cdea8713710081f70bb63a202
parentff83ea14f246eddb0a8781085522e0cd7524079d
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>
fs/gfs2/aops.c
fs/gfs2/super.c
fs/gfs2/super.h