diff options
author | Steven Whitehouse <swhiteho@redhat.com> | 2009-05-21 10:18:19 -0400 |
---|---|---|
committer | Steven Whitehouse <swhiteho@redhat.com> | 2009-05-21 10:18:19 -0400 |
commit | 1ce97e564b628bee30b8dbb64e5e653a484308f6 (patch) | |
tree | 1c46105bb5bd29e0970afa2693e09654bef89164 /fs/gfs2/rgrp.c | |
parent | 60a0b8f93664621a07b93273fc8ebc29590c62f5 (diff) |
GFS2: Be more aggressive in reclaiming unlinked inodes
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>
Diffstat (limited to 'fs/gfs2/rgrp.c')
-rw-r--r-- | fs/gfs2/rgrp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/gfs2/rgrp.c b/fs/gfs2/rgrp.c index 23637b9d1c73..ee3d5c1876a3 100644 --- a/fs/gfs2/rgrp.c +++ b/fs/gfs2/rgrp.c | |||
@@ -581,7 +581,6 @@ static int read_rindex_entry(struct gfs2_inode *ip, | |||
581 | 581 | ||
582 | rgd->rd_gl->gl_object = rgd; | 582 | rgd->rd_gl->gl_object = rgd; |
583 | rgd->rd_flags &= ~GFS2_RDF_UPTODATE; | 583 | rgd->rd_flags &= ~GFS2_RDF_UPTODATE; |
584 | rgd->rd_flags |= GFS2_RDF_CHECK; | ||
585 | return error; | 584 | return error; |
586 | } | 585 | } |
587 | 586 | ||
@@ -703,6 +702,8 @@ static void gfs2_rgrp_in(struct gfs2_rgrpd *rgd, const void *buf) | |||
703 | 702 | ||
704 | rg_flags = be32_to_cpu(str->rg_flags); | 703 | rg_flags = be32_to_cpu(str->rg_flags); |
705 | rg_flags &= ~GFS2_RDF_MASK; | 704 | rg_flags &= ~GFS2_RDF_MASK; |
705 | rgd->rd_flags &= GFS2_RDF_MASK; | ||
706 | rgd->rd_flags |= rg_flags; | ||
706 | rgd->rd_free = be32_to_cpu(str->rg_free); | 707 | rgd->rd_free = be32_to_cpu(str->rg_free); |
707 | rgd->rd_dinodes = be32_to_cpu(str->rg_dinodes); | 708 | rgd->rd_dinodes = be32_to_cpu(str->rg_dinodes); |
708 | rgd->rd_igeneration = be64_to_cpu(str->rg_igeneration); | 709 | rgd->rd_igeneration = be64_to_cpu(str->rg_igeneration); |
@@ -773,7 +774,7 @@ int gfs2_rgrp_bh_get(struct gfs2_rgrpd *rgd) | |||
773 | for (x = 0; x < length; x++) | 774 | for (x = 0; x < length; x++) |
774 | clear_bit(GBF_FULL, &rgd->rd_bits[x].bi_flags); | 775 | clear_bit(GBF_FULL, &rgd->rd_bits[x].bi_flags); |
775 | gfs2_rgrp_in(rgd, (rgd->rd_bits[0].bi_bh)->b_data); | 776 | gfs2_rgrp_in(rgd, (rgd->rd_bits[0].bi_bh)->b_data); |
776 | rgd->rd_flags |= GFS2_RDF_UPTODATE; | 777 | rgd->rd_flags |= (GFS2_RDF_UPTODATE | GFS2_RDF_CHECK); |
777 | } | 778 | } |
778 | 779 | ||
779 | spin_lock(&sdp->sd_rindex_spin); | 780 | spin_lock(&sdp->sd_rindex_spin); |