Lines Matching refs:bd
75 void gfs2_remove_from_ail(struct gfs2_bufdata *bd) in gfs2_remove_from_ail() argument
77 bd->bd_tr = NULL; in gfs2_remove_from_ail()
78 list_del_init(&bd->bd_ail_st_list); in gfs2_remove_from_ail()
79 list_del_init(&bd->bd_ail_gl_list); in gfs2_remove_from_ail()
80 atomic_dec(&bd->bd_gl->gl_ail_count); in gfs2_remove_from_ail()
81 brelse(bd->bd_bh); in gfs2_remove_from_ail()
100 struct gfs2_bufdata *bd, *s; in gfs2_ail1_start_one() local
103 list_for_each_entry_safe_reverse(bd, s, &tr->tr_ail1_list, bd_ail_st_list) { in gfs2_ail1_start_one()
104 bh = bd->bd_bh; in gfs2_ail1_start_one()
106 gfs2_assert(sdp, bd->bd_tr == tr); in gfs2_ail1_start_one()
111 list_move(&bd->bd_ail_st_list, &tr->tr_ail2_list); in gfs2_ail1_start_one()
117 if (gl == bd->bd_gl) in gfs2_ail1_start_one()
119 gl = bd->bd_gl; in gfs2_ail1_start_one()
120 list_move(&bd->bd_ail_st_list, &tr->tr_ail1_list); in gfs2_ail1_start_one()
192 struct gfs2_bufdata *bd, *s; in gfs2_ail1_empty_one() local
195 list_for_each_entry_safe_reverse(bd, s, &tr->tr_ail1_list, in gfs2_ail1_empty_one()
197 bh = bd->bd_bh; in gfs2_ail1_empty_one()
198 gfs2_assert(sdp, bd->bd_tr == tr); in gfs2_ail1_empty_one()
203 list_move(&bd->bd_ail_st_list, &tr->tr_ail2_list); in gfs2_ail1_empty_one()
238 struct gfs2_bufdata *bd; in gfs2_ail1_wait() local
243 list_for_each_entry(bd, &tr->tr_ail1_list, bd_ail_st_list) { in gfs2_ail1_wait()
244 bh = bd->bd_bh; in gfs2_ail1_wait()
267 struct gfs2_bufdata *bd; in gfs2_ail2_empty_one() local
270 bd = list_entry(head->prev, struct gfs2_bufdata, in gfs2_ail2_empty_one()
272 gfs2_assert(sdp, bd->bd_tr == tr); in gfs2_ail2_empty_one()
273 gfs2_remove_from_ail(bd); in gfs2_ail2_empty_one()
578 void gfs2_add_revoke(struct gfs2_sbd *sdp, struct gfs2_bufdata *bd) in gfs2_add_revoke() argument
580 struct buffer_head *bh = bd->bd_bh; in gfs2_add_revoke()
581 struct gfs2_glock *gl = bd->bd_gl; in gfs2_add_revoke()
584 bd->bd_blkno = bh->b_blocknr; in gfs2_add_revoke()
585 gfs2_remove_from_ail(bd); /* drops ref on bh */ in gfs2_add_revoke()
586 bd->bd_bh = NULL; in gfs2_add_revoke()
587 bd->bd_ops = &gfs2_revoke_lops; in gfs2_add_revoke()
591 list_add(&bd->bd_list, &sdp->sd_log_le_revoke); in gfs2_add_revoke()
597 struct gfs2_bufdata *bd, *tmp; in gfs2_write_revokes() local
604 list_for_each_entry(bd, &tr->tr_ail2_list, bd_ail_st_list) { in gfs2_write_revokes()
605 if (list_empty(&bd->bd_list)) { in gfs2_write_revokes()
628 list_for_each_entry_safe(bd, tmp, &tr->tr_ail2_list, bd_ail_st_list) { in gfs2_write_revokes()
631 if (!list_empty(&bd->bd_list)) in gfs2_write_revokes()
633 gfs2_add_revoke(sdp, bd); in gfs2_write_revokes()