2006-01-16 17:50:04 +01:00
|
|
|
/*
|
|
|
|
* Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved.
|
[GFS2] kernel changes to support new gfs2_grow command
This is another revision of my gfs2 kernel patch that allows
gfs2_grow to function properly.
Steve Whitehouse expressed some concerns about the previous
patch and I restructured it based on his comments.
The previous patch was doing the statfs_change at file close time,
under its own transaction. The current patch does the statfs_change
inside the gfs2_commit_write function, which keeps it under the
umbrella of the inode transaction.
I can't call ri_update to re-read the rindex file during the
transaction because the transaction may have outstanding unwritten
buffers attached to the rgrps that would be otherwise blown away.
So instead, I created a new function, gfs2_ri_total, that will
re-read the rindex file just to total the file system space
for the sake of the statfs_change. The ri_update will happen
later, when gfs2 realizes the version number has changed, as it
happened before my patch.
Since the statfs_change is happening at write_commit time and there
may be multiple writes to the rindex file for one grow operation.
So one consequence of this restructuring is that instead of getting
one kernel message to indicate the change, you may see several.
For example, before when you did a gfs2_grow, you'd get a single
message like:
GFS2: File system extended by 247876 blocks (968MB)
Now you get something like:
GFS2: File system extended by 207896 blocks (812MB)
GFS2: File system extended by 39980 blocks (156MB)
This version has also been successfully run against the hours-long
"gfs2_fsck_hellfire" test that does several gfs2_grow and gfs2_fsck
while interjecting file system damage. It does this repeatedly
under a variety Resource Group conditions.
Signed-off-By: Bob Peterson <rpeterso@redhat.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
2007-05-09 16:37:57 +02:00
|
|
|
* Copyright (C) 2004-2007 Red Hat, Inc. All rights reserved.
|
2006-01-16 17:50:04 +01:00
|
|
|
*
|
|
|
|
* This copyrighted material is made available to anyone wishing to use,
|
|
|
|
* modify, copy, or redistribute it subject to the terms and conditions
|
2006-09-01 17:05:15 +02:00
|
|
|
* of the GNU General Public License version 2.
|
2006-01-16 17:50:04 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __OPS_ADDRESS_DOT_H__
|
|
|
|
#define __OPS_ADDRESS_DOT_H__
|
|
|
|
|
2006-09-05 16:39:21 +02:00
|
|
|
#include <linux/fs.h>
|
|
|
|
#include <linux/buffer_head.h>
|
|
|
|
#include <linux/mm.h>
|
|
|
|
|
2006-07-11 15:46:33 +02:00
|
|
|
extern int gfs2_releasepage(struct page *page, gfp_t gfp_mask);
|
2007-10-15 15:42:35 +02:00
|
|
|
extern int gfs2_internal_read(struct gfs2_inode *ip,
|
|
|
|
struct file_ra_state *ra_state,
|
|
|
|
char *buf, loff_t *pos, unsigned size);
|
2007-10-17 09:47:38 +02:00
|
|
|
extern void gfs2_set_aops(struct inode *inode);
|
2006-01-16 17:50:04 +01:00
|
|
|
|
|
|
|
#endif /* __OPS_ADDRESS_DOT_H__ */
|