From: Steven Whitehouse <swhiteho@redhat.com>
To: linux-kernel@vger.kernel.org, cluster-devel@redhat.com
Cc: Steven Whitehouse <swhiteho@redhat.com>
Subject: [PATCH 13/24] GFS2: Be more aggressive in reclaiming unlinked inodes
Date: Wed, 10 Jun 2009 09:30:54 +0100 [thread overview]
Message-ID: <1244622665-7470-14-git-send-email-swhiteho@redhat.com> (raw)
In-Reply-To: <1244622665-7470-13-git-send-email-swhiteho@redhat.com>
This patch increases the frequency with which gfs2 looks
for unlinked, but still allocated inodes. Its the equivalent
operation to ext3's orphan list, but done with bitmaps in
the resource groups.
This also fixes a bug where a field in the rgrp was too small.
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h
index dd87379..225347f 100644
--- a/fs/gfs2/incore.h
+++ b/fs/gfs2/incore.h
@@ -94,7 +94,7 @@ struct gfs2_rgrpd {
struct gfs2_sbd *rd_sbd;
unsigned int rd_bh_count;
u32 rd_last_alloc;
- unsigned char rd_flags;
+ u32 rd_flags;
#define GFS2_RDF_CHECK 0x10000000 /* check for unlinked inodes */
#define GFS2_RDF_UPTODATE 0x20000000 /* rg is up to date */
#define GFS2_RDF_ERROR 0x40000000 /* error in rg */
diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c
index 23637b9..ee3d5c1 100644
--- a/fs/gfs2/rgrp.c
+++ b/fs/gfs2/rgrp.c
@@ -581,7 +581,6 @@ static int read_rindex_entry(struct gfs2_inode *ip,
rgd->rd_gl->gl_object = rgd;
rgd->rd_flags &= ~GFS2_RDF_UPTODATE;
- rgd->rd_flags |= GFS2_RDF_CHECK;
return error;
}
@@ -703,6 +702,8 @@ static void gfs2_rgrp_in(struct gfs2_rgrpd *rgd, const void *buf)
rg_flags = be32_to_cpu(str->rg_flags);
rg_flags &= ~GFS2_RDF_MASK;
+ rgd->rd_flags &= GFS2_RDF_MASK;
+ rgd->rd_flags |= rg_flags;
rgd->rd_free = be32_to_cpu(str->rg_free);
rgd->rd_dinodes = be32_to_cpu(str->rg_dinodes);
rgd->rd_igeneration = be64_to_cpu(str->rg_igeneration);
@@ -773,7 +774,7 @@ int gfs2_rgrp_bh_get(struct gfs2_rgrpd *rgd)
for (x = 0; x < length; x++)
clear_bit(GBF_FULL, &rgd->rd_bits[x].bi_flags);
gfs2_rgrp_in(rgd, (rgd->rd_bits[0].bi_bh)->b_data);
- rgd->rd_flags |= GFS2_RDF_UPTODATE;
+ rgd->rd_flags |= (GFS2_RDF_UPTODATE | GFS2_RDF_CHECK);
}
spin_lock(&sdp->sd_rindex_spin);
--
1.6.0.6
next prev parent reply other threads:[~2009-06-10 9:41 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-10 8:30 GFS2: Pre-pull patch posting Steven Whitehouse
2009-06-10 8:30 ` [PATCH 01/24] GFS2: Update the rw flags Steven Whitehouse
2009-06-10 8:30 ` [PATCH 02/24] GFS2: Optimise writepage for metadata Steven Whitehouse
2009-06-10 8:30 ` [PATCH 03/24] GFS2: Something nonlinear this way comes! Steven Whitehouse
2009-06-10 8:30 ` [PATCH 04/24] GFS2: Fix timestamps on write Steven Whitehouse
2009-06-10 8:30 ` [PATCH 05/24] GFS2: Move journal live test at transaction start Steven Whitehouse
2009-06-10 8:30 ` [PATCH 06/24] GFS2: Add commit= mount option Steven Whitehouse
2009-06-10 8:30 ` [PATCH 07/24] GFS2: Remove a couple of unused sysfs entries Steven Whitehouse
2009-06-10 8:30 ` [PATCH 08/24] GFS2: Umount recovery race fix Steven Whitehouse
2009-06-10 8:30 ` [PATCH 09/24] GFS2: Update docs Steven Whitehouse
2009-06-10 8:30 ` [PATCH 10/24] GFS2: Don't warn when delete inode fails on ro filesystem Steven Whitehouse
2009-06-10 8:30 ` [PATCH 11/24] GFS2: Improve resource group error handling Steven Whitehouse
2009-06-10 8:30 ` [PATCH 12/24] GFS2: Add a rgrp bitmap full flag Steven Whitehouse
2009-06-10 8:30 ` Steven Whitehouse [this message]
2009-06-10 8:30 ` [PATCH 14/24] GFS2: Clean up some file names Steven Whitehouse
2009-06-10 8:30 ` [PATCH 15/24] GFS2: Merge mount.c and ops_super.c into super.c Steven Whitehouse
2009-06-10 8:30 ` [PATCH 16/24] GFS2: Move gfs2_rmdiri into ops_inode.c Steven Whitehouse
2009-06-10 8:30 ` [PATCH 17/24] GFS2: Move gfs2_readlinki " Steven Whitehouse
2009-06-10 8:30 ` [PATCH 18/24] GFS2: Move gfs2_unlink_ok " Steven Whitehouse
2009-06-10 8:31 ` [PATCH 19/24] GFS2: Remove lockstruct subdir from gfs2 sysfs files Steven Whitehouse
2009-06-10 8:31 ` [PATCH 20/24] GFS2: Remove args " Steven Whitehouse
2009-06-10 8:31 ` [PATCH 21/24] GFS2: smbd proccess hangs with flock() call Steven Whitehouse
2009-06-10 8:31 ` [PATCH 22/24] GFS2: Remove unused variable Steven Whitehouse
2009-06-10 8:31 ` [PATCH 23/24] GFS2: Fix locking issue mounting gfs2meta fs Steven Whitehouse
2009-06-10 8:31 ` [PATCH 24/24] GFS2: Fix cache coherency between truncate and O_DIRECT read Steven Whitehouse
2009-06-10 9:53 ` [PATCH 23/24] GFS2: Fix locking issue mounting gfs2meta fs Christoph Hellwig
2009-06-10 10:06 ` Steven Whitehouse
2009-06-10 10:43 ` GFS2: Merge gfs2_get_sb into gfs2_get_sb_meta Steven Whitehouse
2009-06-10 9:49 ` [PATCH 10/24] GFS2: Don't warn when delete inode fails on ro filesystem Christoph Hellwig
2009-06-10 10:03 ` Steven Whitehouse
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1244622665-7470-14-git-send-email-swhiteho@redhat.com \
--to=swhiteho@redhat.com \
--cc=cluster-devel@redhat.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).