Lines Matching refs:jd

145 u64 gfs2_log_bmap(struct gfs2_jdesc *jd, unsigned int lblock)  in gfs2_log_bmap()  argument
149 list_for_each_entry(je, &jd->extent_list, list) { in gfs2_log_bmap()
329 void gfs2_log_write(struct gfs2_sbd *sdp, struct gfs2_jdesc *jd, in gfs2_log_write() argument
336 bio = gfs2_log_get_bio(sdp, blkno, &jd->jd_log_bio, REQ_OP_WRITE, in gfs2_log_write()
340 bio = gfs2_log_get_bio(sdp, blkno, &jd->jd_log_bio, in gfs2_log_write()
425 static bool gfs2_jhead_pg_srch(struct gfs2_jdesc *jd, in gfs2_jhead_pg_srch() argument
429 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode); in gfs2_jhead_pg_srch()
469 static void gfs2_jhead_process_page(struct gfs2_jdesc *jd, unsigned long index, in gfs2_jhead_process_page() argument
475 page = find_get_page(jd->jd_inode->i_mapping, index); in gfs2_jhead_process_page()
482 *done = gfs2_jhead_pg_srch(jd, head, page); in gfs2_jhead_process_page()
513 int gfs2_find_jhead(struct gfs2_jdesc *jd, struct gfs2_log_header_host *head, in gfs2_find_jhead() argument
516 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode); in gfs2_find_jhead()
517 struct address_space *mapping = jd->jd_inode->i_mapping; in gfs2_find_jhead()
531 if (list_empty(&jd->extent_list)) in gfs2_find_jhead()
532 gfs2_map_journal_extents(sdp, jd); in gfs2_find_jhead()
535 list_for_each_entry(je, &jd->extent_list, list) { in gfs2_find_jhead()
586 gfs2_jhead_process_page(jd, blocks_read >> shift, head, &done); in gfs2_find_jhead()
597 gfs2_jhead_process_page(jd, blocks_read >> shift, head, &done); in gfs2_find_jhead()
754 static void buf_lo_before_scan(struct gfs2_jdesc *jd, in buf_lo_before_scan() argument
760 jd->jd_found_blocks = 0; in buf_lo_before_scan()
761 jd->jd_replayed_blocks = 0; in buf_lo_before_scan()
769 static void obsolete_rgrp(struct gfs2_jdesc *jd, struct buffer_head *bh_log, in obsolete_rgrp() argument
772 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode); in obsolete_rgrp()
780 jd->jd_jid, bh_log->b_blocknr); in obsolete_rgrp()
790 static int buf_lo_scan_elements(struct gfs2_jdesc *jd, u32 start, in buf_lo_scan_elements() argument
794 struct gfs2_inode *ip = GFS2_I(jd->jd_inode); in buf_lo_scan_elements()
795 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode); in buf_lo_scan_elements()
805 gfs2_replay_incr_blk(jd, &start); in buf_lo_scan_elements()
807 for (; blks; gfs2_replay_incr_blk(jd, &start), blks--) { in buf_lo_scan_elements()
810 jd->jd_found_blocks++; in buf_lo_scan_elements()
812 if (gfs2_revoke_check(jd, blkno, start)) in buf_lo_scan_elements()
815 error = gfs2_replay_read_block(jd, start, &bh_log); in buf_lo_scan_elements()
829 obsolete_rgrp(jd, bh_log, blkno); in buf_lo_scan_elements()
839 jd->jd_replayed_blocks++; in buf_lo_scan_elements()
845 static void buf_lo_after_scan(struct gfs2_jdesc *jd, int error, int pass) in buf_lo_after_scan() argument
847 struct gfs2_inode *ip = GFS2_I(jd->jd_inode); in buf_lo_after_scan()
848 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode); in buf_lo_after_scan()
860 jd->jd_jid, jd->jd_replayed_blocks, jd->jd_found_blocks); in buf_lo_after_scan()
922 static void revoke_lo_before_scan(struct gfs2_jdesc *jd, in revoke_lo_before_scan() argument
928 jd->jd_found_revokes = 0; in revoke_lo_before_scan()
929 jd->jd_replay_tail = head->lh_tail; in revoke_lo_before_scan()
932 static int revoke_lo_scan_elements(struct gfs2_jdesc *jd, u32 start, in revoke_lo_scan_elements() argument
936 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode); in revoke_lo_scan_elements()
950 for (; blks; gfs2_replay_incr_blk(jd, &start), blks--) { in revoke_lo_scan_elements()
951 error = gfs2_replay_read_block(jd, start, &bh); in revoke_lo_scan_elements()
961 error = gfs2_revoke_add(jd, blkno, start); in revoke_lo_scan_elements()
967 jd->jd_found_revokes++; in revoke_lo_scan_elements()
982 static void revoke_lo_after_scan(struct gfs2_jdesc *jd, int error, int pass) in revoke_lo_after_scan() argument
984 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode); in revoke_lo_after_scan()
987 gfs2_revoke_clean(jd); in revoke_lo_after_scan()
994 jd->jd_jid, jd->jd_found_revokes); in revoke_lo_after_scan()
996 gfs2_revoke_clean(jd); in revoke_lo_after_scan()
1015 static int databuf_lo_scan_elements(struct gfs2_jdesc *jd, u32 start, in databuf_lo_scan_elements() argument
1019 struct gfs2_inode *ip = GFS2_I(jd->jd_inode); in databuf_lo_scan_elements()
1030 gfs2_replay_incr_blk(jd, &start); in databuf_lo_scan_elements()
1031 for (; blks; gfs2_replay_incr_blk(jd, &start), blks--) { in databuf_lo_scan_elements()
1035 jd->jd_found_blocks++; in databuf_lo_scan_elements()
1037 if (gfs2_revoke_check(jd, blkno, start)) in databuf_lo_scan_elements()
1040 error = gfs2_replay_read_block(jd, start, &bh_log); in databuf_lo_scan_elements()
1057 jd->jd_replayed_blocks++; in databuf_lo_scan_elements()
1065 static void databuf_lo_after_scan(struct gfs2_jdesc *jd, int error, int pass) in databuf_lo_after_scan() argument
1067 struct gfs2_inode *ip = GFS2_I(jd->jd_inode); in databuf_lo_after_scan()
1068 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode); in databuf_lo_after_scan()
1081 jd->jd_jid, jd->jd_replayed_blocks, jd->jd_found_blocks); in databuf_lo_after_scan()