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()
328 void gfs2_log_write(struct gfs2_sbd *sdp, struct gfs2_jdesc *jd, in gfs2_log_write() argument
335 bio = gfs2_log_get_bio(sdp, blkno, &jd->jd_log_bio, REQ_OP_WRITE, in gfs2_log_write()
339 bio = gfs2_log_get_bio(sdp, blkno, &jd->jd_log_bio, in gfs2_log_write()
424 static bool gfs2_jhead_pg_srch(struct gfs2_jdesc *jd, in gfs2_jhead_pg_srch() argument
428 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode); in gfs2_jhead_pg_srch()
468 static void gfs2_jhead_process_page(struct gfs2_jdesc *jd, unsigned long index, in gfs2_jhead_process_page() argument
474 folio = filemap_get_folio(jd->jd_inode->i_mapping, index); in gfs2_jhead_process_page()
481 *done = gfs2_jhead_pg_srch(jd, head, &folio->page); in gfs2_jhead_process_page()
510 int gfs2_find_jhead(struct gfs2_jdesc *jd, struct gfs2_log_header_host *head, in gfs2_find_jhead() argument
513 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode); in gfs2_find_jhead()
514 struct address_space *mapping = jd->jd_inode->i_mapping; in gfs2_find_jhead()
528 if (list_empty(&jd->extent_list)) in gfs2_find_jhead()
529 gfs2_map_journal_extents(sdp, jd); in gfs2_find_jhead()
532 list_for_each_entry(je, &jd->extent_list, list) { in gfs2_find_jhead()
583 gfs2_jhead_process_page(jd, blocks_read >> shift, head, &done); in gfs2_find_jhead()
594 gfs2_jhead_process_page(jd, blocks_read >> shift, head, &done); in gfs2_find_jhead()
751 static void buf_lo_before_scan(struct gfs2_jdesc *jd, in buf_lo_before_scan() argument
757 jd->jd_found_blocks = 0; in buf_lo_before_scan()
758 jd->jd_replayed_blocks = 0; in buf_lo_before_scan()
766 static void obsolete_rgrp(struct gfs2_jdesc *jd, struct buffer_head *bh_log, in obsolete_rgrp() argument
769 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode); in obsolete_rgrp()
777 jd->jd_jid, bh_log->b_blocknr); in obsolete_rgrp()
787 static int buf_lo_scan_elements(struct gfs2_jdesc *jd, u32 start, in buf_lo_scan_elements() argument
791 struct gfs2_inode *ip = GFS2_I(jd->jd_inode); in buf_lo_scan_elements()
792 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode); in buf_lo_scan_elements()
802 gfs2_replay_incr_blk(jd, &start); in buf_lo_scan_elements()
804 for (; blks; gfs2_replay_incr_blk(jd, &start), blks--) { in buf_lo_scan_elements()
807 jd->jd_found_blocks++; in buf_lo_scan_elements()
809 if (gfs2_revoke_check(jd, blkno, start)) in buf_lo_scan_elements()
812 error = gfs2_replay_read_block(jd, start, &bh_log); in buf_lo_scan_elements()
826 obsolete_rgrp(jd, bh_log, blkno); in buf_lo_scan_elements()
836 jd->jd_replayed_blocks++; in buf_lo_scan_elements()
842 static void buf_lo_after_scan(struct gfs2_jdesc *jd, int error, int pass) in buf_lo_after_scan() argument
844 struct gfs2_inode *ip = GFS2_I(jd->jd_inode); in buf_lo_after_scan()
845 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode); in buf_lo_after_scan()
857 jd->jd_jid, jd->jd_replayed_blocks, jd->jd_found_blocks); in buf_lo_after_scan()
919 static void revoke_lo_before_scan(struct gfs2_jdesc *jd, in revoke_lo_before_scan() argument
925 jd->jd_found_revokes = 0; in revoke_lo_before_scan()
926 jd->jd_replay_tail = head->lh_tail; in revoke_lo_before_scan()
929 static int revoke_lo_scan_elements(struct gfs2_jdesc *jd, u32 start, in revoke_lo_scan_elements() argument
933 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode); in revoke_lo_scan_elements()
947 for (; blks; gfs2_replay_incr_blk(jd, &start), blks--) { in revoke_lo_scan_elements()
948 error = gfs2_replay_read_block(jd, start, &bh); in revoke_lo_scan_elements()
958 error = gfs2_revoke_add(jd, blkno, start); in revoke_lo_scan_elements()
964 jd->jd_found_revokes++; in revoke_lo_scan_elements()
979 static void revoke_lo_after_scan(struct gfs2_jdesc *jd, int error, int pass) in revoke_lo_after_scan() argument
981 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode); in revoke_lo_after_scan()
984 gfs2_revoke_clean(jd); in revoke_lo_after_scan()
991 jd->jd_jid, jd->jd_found_revokes); in revoke_lo_after_scan()
993 gfs2_revoke_clean(jd); in revoke_lo_after_scan()
1012 static int databuf_lo_scan_elements(struct gfs2_jdesc *jd, u32 start, in databuf_lo_scan_elements() argument
1016 struct gfs2_inode *ip = GFS2_I(jd->jd_inode); in databuf_lo_scan_elements()
1027 gfs2_replay_incr_blk(jd, &start); in databuf_lo_scan_elements()
1028 for (; blks; gfs2_replay_incr_blk(jd, &start), blks--) { in databuf_lo_scan_elements()
1032 jd->jd_found_blocks++; in databuf_lo_scan_elements()
1034 if (gfs2_revoke_check(jd, blkno, start)) in databuf_lo_scan_elements()
1037 error = gfs2_replay_read_block(jd, start, &bh_log); in databuf_lo_scan_elements()
1054 jd->jd_replayed_blocks++; in databuf_lo_scan_elements()
1062 static void databuf_lo_after_scan(struct gfs2_jdesc *jd, int error, int pass) in databuf_lo_after_scan() argument
1064 struct gfs2_inode *ip = GFS2_I(jd->jd_inode); in databuf_lo_after_scan()
1065 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode); in databuf_lo_after_scan()
1078 jd->jd_jid, jd->jd_replayed_blocks, jd->jd_found_blocks); in databuf_lo_after_scan()