Lines Matching refs:bd
44 struct gfs2_bufdata *bd; in gfs2_pin() local
53 bd = bh->b_private; in gfs2_pin()
58 if (bd->bd_tr) in gfs2_pin()
59 list_move(&bd->bd_ail_st_list, &bd->bd_tr->tr_ail2_list); in gfs2_pin()
63 trace_gfs2_pin(bd, 1); in gfs2_pin()
66 static bool buffer_is_rgrp(const struct gfs2_bufdata *bd) in buffer_is_rgrp() argument
68 return bd->bd_gl->gl_name.ln_type == LM_TYPE_RGRP; in buffer_is_rgrp()
71 static void maybe_release_space(struct gfs2_bufdata *bd) in maybe_release_space() argument
73 struct gfs2_glock *gl = bd->bd_gl; in maybe_release_space()
76 unsigned int index = bd->bd_bh->b_blocknr - gl->gl_name.ln_number; in maybe_release_space()
82 gfs2_rgrp_send_discards(sdp, rgd->rd_data0, bd->bd_bh, bi, 1, NULL); in maybe_release_space()
84 bd->bd_bh->b_data + bi->bi_offset, bi->bi_len); in maybe_release_space()
102 struct gfs2_bufdata *bd = bh->b_private; in gfs2_unpin() local
111 if (buffer_is_rgrp(bd)) in gfs2_unpin()
112 maybe_release_space(bd); in gfs2_unpin()
115 if (bd->bd_tr) { in gfs2_unpin()
116 list_del(&bd->bd_ail_st_list); in gfs2_unpin()
119 struct gfs2_glock *gl = bd->bd_gl; in gfs2_unpin()
120 list_add(&bd->bd_ail_gl_list, &gl->gl_ail_list); in gfs2_unpin()
123 bd->bd_tr = tr; in gfs2_unpin()
124 list_add(&bd->bd_ail_st_list, &tr->tr_ail1_list); in gfs2_unpin()
127 clear_bit(GLF_LFLUSH, &bd->bd_gl->gl_flags); in gfs2_unpin()
128 trace_gfs2_pin(bd, 0); in gfs2_unpin()
503 struct gfs2_bufdata *bd; in buf_lo_after_commit() local
510 bd = list_entry(head->next, struct gfs2_bufdata, bd_list); in buf_lo_after_commit()
511 list_del_init(&bd->bd_list); in buf_lo_after_commit()
512 gfs2_unpin(sdp, bd->bd_bh, tr); in buf_lo_after_commit()
620 struct gfs2_bufdata *bd; in revoke_lo_before_commit() local
632 list_for_each_entry(bd, head, bd_list) { in revoke_lo_before_commit()
647 *(__be64 *)(page_address(page) + offset) = cpu_to_be64(bd->bd_blkno); in revoke_lo_before_commit()
658 struct gfs2_bufdata *bd; in revoke_lo_after_commit() local
662 bd = list_entry(head->next, struct gfs2_bufdata, bd_list); in revoke_lo_after_commit()
663 list_del_init(&bd->bd_list); in revoke_lo_after_commit()
664 gl = bd->bd_gl; in revoke_lo_after_commit()
666 kmem_cache_free(gfs2_bufdata_cachep, bd); in revoke_lo_after_commit()
834 struct gfs2_bufdata *bd; in databuf_lo_after_commit() local
841 bd = list_entry(head->next, struct gfs2_bufdata, bd_list); in databuf_lo_after_commit()
842 list_del_init(&bd->bd_list); in databuf_lo_after_commit()
843 gfs2_unpin(sdp, bd->bd_bh, tr); in databuf_lo_after_commit()