Lines Matching refs:jd
145 u64 gfs2_log_bmap(struct gfs2_jdesc *jd, unsigned int lblock)
149 list_for_each_entry(je, &jd->extent_list, list) {
317 * @jd: The journal descriptor
328 void gfs2_log_write(struct gfs2_sbd *sdp, struct gfs2_jdesc *jd,
335 bio = gfs2_log_get_bio(sdp, blkno, &jd->jd_log_bio, REQ_OP_WRITE,
339 bio = gfs2_log_get_bio(sdp, blkno, &jd->jd_log_bio,
417 * @jd: The journal descriptor
424 static bool gfs2_jhead_pg_srch(struct gfs2_jdesc *jd,
428 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode);
451 * @jd: The journal descriptor
469 static void gfs2_jhead_process_page(struct gfs2_jdesc *jd, unsigned long index,
475 folio = filemap_get_folio(jd->jd_inode->i_mapping, index);
482 *done = gfs2_jhead_pg_srch(jd, head, &folio->page);
502 * @jd: The journal descriptor
511 int gfs2_find_jhead(struct gfs2_jdesc *jd, struct gfs2_log_header_host *head,
514 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode);
515 struct address_space *mapping = jd->jd_inode->i_mapping;
529 if (list_empty(&jd->extent_list))
530 gfs2_map_journal_extents(sdp, jd);
533 list_for_each_entry(je, &jd->extent_list, list) {
583 gfs2_jhead_process_page(jd, blocks_read >> shift, head, &done);
594 gfs2_jhead_process_page(jd, blocks_read >> shift, head, &done);
749 static void buf_lo_before_scan(struct gfs2_jdesc *jd,
755 jd->jd_found_blocks = 0;
756 jd->jd_replayed_blocks = 0;
764 static void obsolete_rgrp(struct gfs2_jdesc *jd, struct buffer_head *bh_log,
767 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode);
775 jd->jd_jid, bh_log->b_blocknr);
785 static int buf_lo_scan_elements(struct gfs2_jdesc *jd, u32 start,
789 struct gfs2_inode *ip = GFS2_I(jd->jd_inode);
790 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode);
800 gfs2_replay_incr_blk(jd, &start);
802 for (; blks; gfs2_replay_incr_blk(jd, &start), blks--) {
805 jd->jd_found_blocks++;
807 if (gfs2_revoke_check(jd, blkno, start))
810 error = gfs2_replay_read_block(jd, start, &bh_log);
824 obsolete_rgrp(jd, bh_log, blkno);
834 jd->jd_replayed_blocks++;
840 static void buf_lo_after_scan(struct gfs2_jdesc *jd, int error, int pass)
842 struct gfs2_inode *ip = GFS2_I(jd->jd_inode);
843 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode);
855 jd->jd_jid, jd->jd_replayed_blocks, jd->jd_found_blocks);
917 static void revoke_lo_before_scan(struct gfs2_jdesc *jd,
923 jd->jd_found_revokes = 0;
924 jd->jd_replay_tail = head->lh_tail;
927 static int revoke_lo_scan_elements(struct gfs2_jdesc *jd, u32 start,
931 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode);
945 for (; blks; gfs2_replay_incr_blk(jd, &start), blks--) {
946 error = gfs2_replay_read_block(jd, start, &bh);
956 error = gfs2_revoke_add(jd, blkno, start);
962 jd->jd_found_revokes++;
977 static void revoke_lo_after_scan(struct gfs2_jdesc *jd, int error, int pass)
979 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode);
982 gfs2_revoke_clean(jd);
989 jd->jd_jid, jd->jd_found_revokes);
991 gfs2_revoke_clean(jd);
1010 static int databuf_lo_scan_elements(struct gfs2_jdesc *jd, u32 start,
1014 struct gfs2_inode *ip = GFS2_I(jd->jd_inode);
1025 gfs2_replay_incr_blk(jd, &start);
1026 for (; blks; gfs2_replay_incr_blk(jd, &start), blks--) {
1030 jd->jd_found_blocks++;
1032 if (gfs2_revoke_check(jd, blkno, start))
1035 error = gfs2_replay_read_block(jd, start, &bh_log);
1052 jd->jd_replayed_blocks++;
1060 static void databuf_lo_after_scan(struct gfs2_jdesc *jd, int error, int pass)
1062 struct gfs2_inode *ip = GFS2_I(jd->jd_inode);
1063 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode);
1076 jd->jd_jid, jd->jd_replayed_blocks, jd->jd_found_blocks);