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()
469 static void gfs2_jhead_process_page(struct gfs2_jdesc *jd, unsigned long index, in gfs2_jhead_process_page() argument
475 folio = filemap_get_folio(jd->jd_inode->i_mapping, index); in gfs2_jhead_process_page()
482 *done = gfs2_jhead_pg_srch(jd, head, &folio->page); in gfs2_jhead_process_page()
511 int gfs2_find_jhead(struct gfs2_jdesc *jd, struct gfs2_log_header_host *head, in gfs2_find_jhead() argument
514 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode); in gfs2_find_jhead()
515 struct address_space *mapping = jd->jd_inode->i_mapping; in gfs2_find_jhead()
529 if (list_empty(&jd->extent_list)) in gfs2_find_jhead()
530 gfs2_map_journal_extents(sdp, jd); in gfs2_find_jhead()
533 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()
749 static void buf_lo_before_scan(struct gfs2_jdesc *jd, in buf_lo_before_scan() argument
755 jd->jd_found_blocks = 0; in buf_lo_before_scan()
756 jd->jd_replayed_blocks = 0; in buf_lo_before_scan()
764 static void obsolete_rgrp(struct gfs2_jdesc *jd, struct buffer_head *bh_log, in obsolete_rgrp() argument
767 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode); in obsolete_rgrp()
775 jd->jd_jid, bh_log->b_blocknr); in obsolete_rgrp()
785 static int buf_lo_scan_elements(struct gfs2_jdesc *jd, u32 start, in buf_lo_scan_elements() argument
789 struct gfs2_inode *ip = GFS2_I(jd->jd_inode); in buf_lo_scan_elements()
790 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode); in buf_lo_scan_elements()
800 gfs2_replay_incr_blk(jd, &start); in buf_lo_scan_elements()
802 for (; blks; gfs2_replay_incr_blk(jd, &start), blks--) { in buf_lo_scan_elements()
805 jd->jd_found_blocks++; in buf_lo_scan_elements()
807 if (gfs2_revoke_check(jd, blkno, start)) in buf_lo_scan_elements()
810 error = gfs2_replay_read_block(jd, start, &bh_log); in buf_lo_scan_elements()
824 obsolete_rgrp(jd, bh_log, blkno); in buf_lo_scan_elements()
834 jd->jd_replayed_blocks++; in buf_lo_scan_elements()
840 static void buf_lo_after_scan(struct gfs2_jdesc *jd, int error, int pass) in buf_lo_after_scan() argument
842 struct gfs2_inode *ip = GFS2_I(jd->jd_inode); in buf_lo_after_scan()
843 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode); in buf_lo_after_scan()
855 jd->jd_jid, jd->jd_replayed_blocks, jd->jd_found_blocks); in buf_lo_after_scan()
917 static void revoke_lo_before_scan(struct gfs2_jdesc *jd, in revoke_lo_before_scan() argument
923 jd->jd_found_revokes = 0; in revoke_lo_before_scan()
924 jd->jd_replay_tail = head->lh_tail; in revoke_lo_before_scan()
927 static int revoke_lo_scan_elements(struct gfs2_jdesc *jd, u32 start, in revoke_lo_scan_elements() argument
931 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode); in revoke_lo_scan_elements()
945 for (; blks; gfs2_replay_incr_blk(jd, &start), blks--) { in revoke_lo_scan_elements()
946 error = gfs2_replay_read_block(jd, start, &bh); in revoke_lo_scan_elements()
956 error = gfs2_revoke_add(jd, blkno, start); in revoke_lo_scan_elements()
962 jd->jd_found_revokes++; in revoke_lo_scan_elements()
977 static void revoke_lo_after_scan(struct gfs2_jdesc *jd, int error, int pass) in revoke_lo_after_scan() argument
979 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode); in revoke_lo_after_scan()
982 gfs2_revoke_clean(jd); in revoke_lo_after_scan()
989 jd->jd_jid, jd->jd_found_revokes); in revoke_lo_after_scan()
991 gfs2_revoke_clean(jd); in revoke_lo_after_scan()
1010 static int databuf_lo_scan_elements(struct gfs2_jdesc *jd, u32 start, in databuf_lo_scan_elements() argument
1014 struct gfs2_inode *ip = GFS2_I(jd->jd_inode); in databuf_lo_scan_elements()
1025 gfs2_replay_incr_blk(jd, &start); in databuf_lo_scan_elements()
1026 for (; blks; gfs2_replay_incr_blk(jd, &start), blks--) { in databuf_lo_scan_elements()
1030 jd->jd_found_blocks++; in databuf_lo_scan_elements()
1032 if (gfs2_revoke_check(jd, blkno, start)) in databuf_lo_scan_elements()
1035 error = gfs2_replay_read_block(jd, start, &bh_log); in databuf_lo_scan_elements()
1052 jd->jd_replayed_blocks++; in databuf_lo_scan_elements()
1060 static void databuf_lo_after_scan(struct gfs2_jdesc *jd, int error, int pass) in databuf_lo_after_scan() argument
1062 struct gfs2_inode *ip = GFS2_I(jd->jd_inode); in databuf_lo_after_scan()
1063 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode); in databuf_lo_after_scan()
1076 jd->jd_jid, jd->jd_replayed_blocks, jd->jd_found_blocks); in databuf_lo_after_scan()