Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 67676
b: refs/heads/master
c: 1e1a3d0
h: refs/heads/master
v: v3
  • Loading branch information
Steven Whitehouse committed Oct 10, 2007
1 parent b45b245 commit 07dcea2
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 16 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8497a46e178addb27ad1c981befaa17ca788b5c3
refs/heads/master: 1e1a3d03e927d39282208aed676e49d25129feea
6 changes: 1 addition & 5 deletions trunk/fs/gfs2/glops.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,11 +60,7 @@ static void gfs2_ail_empty_gl(struct gfs2_glock *gl)
blkno = bh->b_blocknr;
gfs2_assert_withdraw(sdp, !buffer_busy(bh));

bd->bd_ail = NULL;
list_del(&bd->bd_ail_st_list);
list_del(&bd->bd_ail_gl_list);
atomic_dec(&gl->gl_ail_count);
brelse(bh);
gfs2_remove_from_ail(NULL, bd);
gfs2_log_unlock(sdp);

gfs2_trans_add_revoke(sdp, blkno);
Expand Down
31 changes: 21 additions & 10 deletions trunk/fs/gfs2/log.c
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,26 @@ unsigned int gfs2_struct2blk(struct gfs2_sbd *sdp, unsigned int nstruct,
return blks;
}

/**
* gfs2_remove_from_ail - Remove an entry from the ail lists, updating counters
* @mapping: The associated mapping (maybe NULL)
* @bd: The gfs2_bufdata to remove
*
* The log lock _must_ be held when calling this function
*
*/

void gfs2_remove_from_ail(struct address_space *mapping, struct gfs2_bufdata *bd)
{
bd->bd_ail = NULL;
list_del(&bd->bd_ail_st_list);
list_del(&bd->bd_ail_gl_list);
atomic_dec(&bd->bd_gl->gl_ail_count);
if (mapping)
gfs2_meta_cache_flush(GFS2_I(mapping->host));
brelse(bd->bd_bh);
}

/**
* gfs2_ail1_start_one - Start I/O on a part of the AIL
* @sdp: the filesystem
Expand Down Expand Up @@ -219,21 +239,12 @@ static void gfs2_ail2_empty_one(struct gfs2_sbd *sdp, struct gfs2_ail *ai)
{
struct list_head *head = &ai->ai_ail2_list;
struct gfs2_bufdata *bd;
struct gfs2_inode *bh_ip;

while (!list_empty(head)) {
bd = list_entry(head->prev, struct gfs2_bufdata,
bd_ail_st_list);
gfs2_assert(sdp, bd->bd_ail == ai);
bd->bd_ail = NULL;
list_del(&bd->bd_ail_st_list);
list_del(&bd->bd_ail_gl_list);
atomic_dec(&bd->bd_gl->gl_ail_count);
if (bd->bd_bh->b_page->mapping) {
bh_ip = GFS2_I(bd->bd_bh->b_page->mapping->host);
gfs2_meta_cache_flush(bh_ip);
}
brelse(bd->bd_bh);
gfs2_remove_from_ail(bd->bd_bh->b_page->mapping, bd);
}
}

Expand Down
1 change: 1 addition & 0 deletions trunk/fs/gfs2/log.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ struct buffer_head *gfs2_log_fake_buf(struct gfs2_sbd *sdp,
struct buffer_head *real);
void gfs2_log_flush(struct gfs2_sbd *sdp, struct gfs2_glock *gl);
void gfs2_log_commit(struct gfs2_sbd *sdp, struct gfs2_trans *trans);
void gfs2_remove_from_ail(struct address_space *mapping, struct gfs2_bufdata *bd);

void gfs2_log_shutdown(struct gfs2_sbd *sdp);
void gfs2_meta_syncfs(struct gfs2_sbd *sdp);
Expand Down

0 comments on commit 07dcea2

Please sign in to comment.