Lines Matching refs:bd
39 struct gfs2_bufdata *bd; in gfs2_pin() local
48 bd = bh->b_private; in gfs2_pin()
52 if (bd->bd_ail) in gfs2_pin()
53 list_move(&bd->bd_ail_st_list, &bd->bd_ail->ai_ail2_list); in gfs2_pin()
68 struct gfs2_bufdata *bd = bh->b_private; in gfs2_unpin() local
80 if (bd->bd_ail) { in gfs2_unpin()
81 list_del(&bd->bd_ail_st_list); in gfs2_unpin()
84 struct gfs2_glock *gl = bd->bd_gl; in gfs2_unpin()
85 list_add(&bd->bd_ail_gl_list, &gl->gl_ail_list); in gfs2_unpin()
88 bd->bd_ail = ai; in gfs2_unpin()
89 list_add(&bd->bd_ail_st_list, &ai->ai_ail1_list); in gfs2_unpin()
90 clear_bit(GLF_LFLUSH, &bd->bd_gl->gl_flags); in gfs2_unpin()
130 struct gfs2_bufdata *bd = container_of(le, struct gfs2_bufdata, bd_le); in buf_lo_add() local
133 lock_buffer(bd->bd_bh); in buf_lo_add()
135 if (!list_empty(&bd->bd_list_tr)) in buf_lo_add()
140 list_add(&bd->bd_list_tr, &tr->tr_list_buf); in buf_lo_add()
143 set_bit(GLF_LFLUSH, &bd->bd_gl->gl_flags); in buf_lo_add()
144 set_bit(GLF_DIRTY, &bd->bd_gl->gl_flags); in buf_lo_add()
145 gfs2_meta_check(sdp, bd->bd_bh); in buf_lo_add()
146 gfs2_pin(sdp, bd->bd_bh); in buf_lo_add()
152 unlock_buffer(bd->bd_bh); in buf_lo_add()
218 struct gfs2_bufdata *bd; in buf_lo_after_commit() local
221 bd = list_entry(head->next, struct gfs2_bufdata, bd_le.le_list); in buf_lo_after_commit()
222 list_del_init(&bd->bd_le.le_list); in buf_lo_after_commit()
225 gfs2_unpin(sdp, bd->bd_bh, ai); in buf_lo_after_commit()
327 struct gfs2_bufdata *bd; in revoke_lo_before_commit() local
340 bd = list_entry(head->next, struct gfs2_bufdata, bd_le.le_list); in revoke_lo_before_commit()
341 list_del_init(&bd->bd_le.le_list); in revoke_lo_before_commit()
355 *(__be64 *)(bh->b_data + offset) = cpu_to_be64(bd->bd_blkno); in revoke_lo_before_commit()
356 kmem_cache_free(gfs2_bufdata_cachep, bd); in revoke_lo_before_commit()
498 struct gfs2_bufdata *bd = container_of(le, struct gfs2_bufdata, bd_le); in databuf_lo_add() local
500 struct address_space *mapping = bd->bd_bh->b_page->mapping; in databuf_lo_add()
503 lock_buffer(bd->bd_bh); in databuf_lo_add()
506 if (!list_empty(&bd->bd_list_tr)) in databuf_lo_add()
511 list_add(&bd->bd_list_tr, &tr->tr_list_buf); in databuf_lo_add()
517 set_bit(GLF_LFLUSH, &bd->bd_gl->gl_flags); in databuf_lo_add()
518 set_bit(GLF_DIRTY, &bd->bd_gl->gl_flags); in databuf_lo_add()
520 gfs2_pin(sdp, bd->bd_bh); in databuf_lo_add()
529 unlock_buffer(bd->bd_bh); in databuf_lo_add()
551 struct gfs2_bufdata *bd; in gfs2_write_blocks() local
567 bd = list_entry(list->next, struct gfs2_bufdata, bd_le.le_list); in gfs2_write_blocks()
568 list_move_tail(&bd->bd_le.le_list, done); in gfs2_write_blocks()
569 get_bh(bd->bd_bh); in gfs2_write_blocks()
570 while (be64_to_cpu(*ptr) != bd->bd_bh->b_blocknr) { in gfs2_write_blocks()
575 lock_buffer(bd->bd_bh); in gfs2_write_blocks()
576 if (buffer_escaped(bd->bd_bh)) { in gfs2_write_blocks()
579 kaddr = kmap_atomic(bd->bd_bh->b_page, KM_USER0); in gfs2_write_blocks()
580 memcpy(bh1->b_data, kaddr + bh_offset(bd->bd_bh), in gfs2_write_blocks()
584 clear_buffer_escaped(bd->bd_bh); in gfs2_write_blocks()
585 unlock_buffer(bd->bd_bh); in gfs2_write_blocks()
586 brelse(bd->bd_bh); in gfs2_write_blocks()
588 bh1 = gfs2_log_fake_buf(sdp, bd->bd_bh); in gfs2_write_blocks()
605 struct gfs2_bufdata *bd = NULL; in databuf_lo_before_commit() local
624 bd = list_entry(sdp->sd_log_le_databuf.next, struct gfs2_bufdata, bd_le.le_list); in databuf_lo_before_commit()
625 list_move_tail(&bd->bd_le.le_list, &in_progress); in databuf_lo_before_commit()
626 gfs2_check_magic(bd->bd_bh); in databuf_lo_before_commit()
627 *ptr++ = cpu_to_be64(bd->bd_bh->b_blocknr); in databuf_lo_before_commit()
713 struct gfs2_bufdata *bd; in databuf_lo_after_commit() local
716 bd = list_entry(head->next, struct gfs2_bufdata, bd_le.le_list); in databuf_lo_after_commit()
717 list_del_init(&bd->bd_le.le_list); in databuf_lo_after_commit()
719 gfs2_unpin(sdp, bd->bd_bh, ai); in databuf_lo_after_commit()