Lines Matching refs:jd
142 u64 gfs2_log_bmap(struct gfs2_jdesc *jd, unsigned int lblock)
146 list_for_each_entry(je, &jd->extent_list, list) {
412 * @jd: The journal descriptor
418 static bool gfs2_jhead_pg_srch(struct gfs2_jdesc *jd,
422 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode);
444 * @jd: The journal descriptor
461 static void gfs2_jhead_process_page(struct gfs2_jdesc *jd, unsigned long index,
467 page = find_get_page(jd->jd_inode->i_mapping, index);
474 *done = gfs2_jhead_pg_srch(jd, head, page);
496 * @jd: The journal descriptor
504 int gfs2_find_jhead(struct gfs2_jdesc *jd, struct gfs2_log_header_host *head,
507 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode);
508 struct address_space *mapping = jd->jd_inode->i_mapping;
522 if (list_empty(&jd->extent_list))
523 gfs2_map_journal_extents(sdp, jd);
526 list_for_each_entry(je, &jd->extent_list, list) {
577 gfs2_jhead_process_page(jd, blocks_read >> shift, head, &done);
588 gfs2_jhead_process_page(jd, blocks_read >> shift, head, &done);
745 static void buf_lo_before_scan(struct gfs2_jdesc *jd,
751 jd->jd_found_blocks = 0;
752 jd->jd_replayed_blocks = 0;
755 static int buf_lo_scan_elements(struct gfs2_jdesc *jd, u32 start,
759 struct gfs2_inode *ip = GFS2_I(jd->jd_inode);
760 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode);
770 gfs2_replay_incr_blk(jd, &start);
772 for (; blks; gfs2_replay_incr_blk(jd, &start), blks--) {
775 jd->jd_found_blocks++;
777 if (gfs2_revoke_check(jd, blkno, start))
780 error = gfs2_replay_read_block(jd, start, &bh_log);
816 jd->jd_replayed_blocks++;
822 static void buf_lo_after_scan(struct gfs2_jdesc *jd, int error, int pass)
824 struct gfs2_inode *ip = GFS2_I(jd->jd_inode);
825 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode);
837 jd->jd_jid, jd->jd_replayed_blocks, jd->jd_found_blocks);
895 static void revoke_lo_before_scan(struct gfs2_jdesc *jd,
901 jd->jd_found_revokes = 0;
902 jd->jd_replay_tail = head->lh_tail;
905 static int revoke_lo_scan_elements(struct gfs2_jdesc *jd, u32 start,
909 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode);
923 for (; blks; gfs2_replay_incr_blk(jd, &start), blks--) {
924 error = gfs2_replay_read_block(jd, start, &bh);
934 error = gfs2_revoke_add(jd, blkno, start);
940 jd->jd_found_revokes++;
955 static void revoke_lo_after_scan(struct gfs2_jdesc *jd, int error, int pass)
957 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode);
960 gfs2_revoke_clean(jd);
967 jd->jd_jid, jd->jd_found_revokes);
969 gfs2_revoke_clean(jd);
987 static int databuf_lo_scan_elements(struct gfs2_jdesc *jd, u32 start,
991 struct gfs2_inode *ip = GFS2_I(jd->jd_inode);
1002 gfs2_replay_incr_blk(jd, &start);
1003 for (; blks; gfs2_replay_incr_blk(jd, &start), blks--) {
1007 jd->jd_found_blocks++;
1009 if (gfs2_revoke_check(jd, blkno, start))
1012 error = gfs2_replay_read_block(jd, start, &bh_log);
1029 jd->jd_replayed_blocks++;
1037 static void databuf_lo_after_scan(struct gfs2_jdesc *jd, int error, int pass)
1039 struct gfs2_inode *ip = GFS2_I(jd->jd_inode);
1040 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode);
1053 jd->jd_jid, jd->jd_replayed_blocks, jd->jd_found_blocks);