Lines Matching refs:bd
73 static void gfs2_remove_from_ail(struct gfs2_bufdata *bd) in gfs2_remove_from_ail() argument
75 bd->bd_tr = NULL; in gfs2_remove_from_ail()
76 list_del_init(&bd->bd_ail_st_list); in gfs2_remove_from_ail()
77 list_del_init(&bd->bd_ail_gl_list); in gfs2_remove_from_ail()
78 atomic_dec(&bd->bd_gl->gl_ail_count); in gfs2_remove_from_ail()
79 brelse(bd->bd_bh); in gfs2_remove_from_ail()
99 struct gfs2_bufdata *bd, *s; in gfs2_ail1_start_one() local
102 list_for_each_entry_safe_reverse(bd, s, &tr->tr_ail1_list, bd_ail_st_list) { in gfs2_ail1_start_one()
103 bh = bd->bd_bh; in gfs2_ail1_start_one()
105 gfs2_assert(sdp, bd->bd_tr == tr); in gfs2_ail1_start_one()
114 list_move(&bd->bd_ail_st_list, &tr->tr_ail2_list); in gfs2_ail1_start_one()
120 if (gl == bd->bd_gl) in gfs2_ail1_start_one()
122 gl = bd->bd_gl; in gfs2_ail1_start_one()
123 list_move(&bd->bd_ail_st_list, &tr->tr_ail1_list); in gfs2_ail1_start_one()
199 struct gfs2_bufdata *bd, *s; in gfs2_ail1_empty_one() local
202 list_for_each_entry_safe_reverse(bd, s, &tr->tr_ail1_list, in gfs2_ail1_empty_one()
204 bh = bd->bd_bh; in gfs2_ail1_empty_one()
205 gfs2_assert(sdp, bd->bd_tr == tr); in gfs2_ail1_empty_one()
213 list_move(&bd->bd_ail_st_list, &tr->tr_ail2_list); in gfs2_ail1_empty_one()
251 struct gfs2_bufdata *bd; in gfs2_ail1_wait() local
256 list_for_each_entry(bd, &tr->tr_ail1_list, bd_ail_st_list) { in gfs2_ail1_wait()
257 bh = bd->bd_bh; in gfs2_ail1_wait()
280 struct gfs2_bufdata *bd; in gfs2_ail2_empty_one() local
283 bd = list_entry(head->prev, struct gfs2_bufdata, in gfs2_ail2_empty_one()
285 gfs2_assert(sdp, bd->bd_tr == tr); in gfs2_ail2_empty_one()
286 gfs2_remove_from_ail(bd); in gfs2_ail2_empty_one()
596 void gfs2_add_revoke(struct gfs2_sbd *sdp, struct gfs2_bufdata *bd) in gfs2_add_revoke() argument
598 struct buffer_head *bh = bd->bd_bh; in gfs2_add_revoke()
599 struct gfs2_glock *gl = bd->bd_gl; in gfs2_add_revoke()
602 bd->bd_blkno = bh->b_blocknr; in gfs2_add_revoke()
603 gfs2_remove_from_ail(bd); /* drops ref on bh */ in gfs2_add_revoke()
604 bd->bd_bh = NULL; in gfs2_add_revoke()
609 list_add(&bd->bd_list, &sdp->sd_log_revokes); in gfs2_add_revoke()
623 struct gfs2_bufdata *bd, *tmp; in gfs2_write_revokes() local
630 list_for_each_entry(bd, &tr->tr_ail2_list, bd_ail_st_list) { in gfs2_write_revokes()
631 if (list_empty(&bd->bd_list)) { in gfs2_write_revokes()
654 list_for_each_entry_safe(bd, tmp, &tr->tr_ail2_list, bd_ail_st_list) { in gfs2_write_revokes()
657 if (!list_empty(&bd->bd_list)) in gfs2_write_revokes()
659 gfs2_add_revoke(sdp, bd); in gfs2_write_revokes()