Lines Matching refs:sdp

118 int __get_log_header(struct gfs2_sbd *sdp, const struct gfs2_log_header *lh,  in __get_log_header()  argument
135 sdp->sd_sb.sb_bsize - LH_V1_SIZE - 4); in __get_log_header()
168 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode); in get_log_header() local
176 error = __get_log_header(sdp, (const struct gfs2_log_header *)bh->b_data, in get_log_header()
199 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode); in foreach_descriptor() local
213 if (gfs2_meta_check(sdp, bh)) { in foreach_descriptor()
234 } else if (gfs2_metatype_check(sdp, bh, GFS2_METATYPE_LD)) { in foreach_descriptor()
265 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode); in clean_journal() local
269 gfs2_write_log_header(sdp, jd, head->lh_sequence + 1, 0, lblock, in clean_journal()
272 if (jd->jd_jid == sdp->sd_lockstruct.ls_jid) { in clean_journal()
273 sdp->sd_log_flush_head = lblock; in clean_journal()
274 gfs2_log_incr_head(sdp); in clean_journal()
279 static void gfs2_recovery_done(struct gfs2_sbd *sdp, unsigned int jid, in gfs2_recovery_done() argument
285 struct lm_lockstruct *ls = &sdp->sd_lockstruct; in gfs2_recovery_done()
292 kobject_uevent_env(&sdp->sd_kobj, KOBJ_CHANGE, envp); in gfs2_recovery_done()
294 if (sdp->sd_lockstruct.ls_ops->lm_recovery_result) in gfs2_recovery_done()
295 sdp->sd_lockstruct.ls_ops->lm_recovery_result(sdp, jid, message); in gfs2_recovery_done()
311 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode); in update_statfs_inode() local
324 spin_lock(&sdp->sd_statfs_spin); in update_statfs_inode()
333 fs_info(sdp, "jid=%u: Updated master statfs Total:%lld, " in update_statfs_inode()
342 if (jd->jd_jid == sdp->sd_lockstruct.ls_jid) { in update_statfs_inode()
343 memset(&sdp->sd_statfs_local, 0, in update_statfs_inode()
347 spin_unlock(&sdp->sd_statfs_spin); in update_statfs_inode()
380 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode); in recover_local_statfs() local
388 error = update_statfs_inode(jd, head, sdp->sd_statfs_inode); in recover_local_statfs()
396 find_local_statfs_inode(sdp, jd->jd_jid)); in recover_local_statfs()
405 struct gfs2_sbd *sdp = GFS2_SB(jd->jd_inode); in gfs2_recover_func() local
414 if (gfs2_withdrawn(sdp)) { in gfs2_recover_func()
415 fs_err(sdp, "jid=%u: Recovery not attempted due to withdraw.\n", in gfs2_recover_func()
420 if (sdp->sd_args.ar_spectator) in gfs2_recover_func()
422 if (jd->jd_jid != sdp->sd_lockstruct.ls_jid) { in gfs2_recover_func()
423 fs_info(sdp, "jid=%u: Trying to acquire journal lock...\n", in gfs2_recover_func()
428 error = gfs2_glock_nq_num(sdp, jd->jd_jid, &gfs2_journal_glops, in gfs2_recover_func()
437 fs_info(sdp, "jid=%u: Busy\n", jd->jd_jid); in gfs2_recover_func()
450 fs_info(sdp, "jid=%u, already locked for use\n", jd->jd_jid); in gfs2_recover_func()
454 fs_info(sdp, "jid=%u: Looking at journal...\n", jd->jd_jid); in gfs2_recover_func()
464 fs_info(sdp, "jid=%u: Journal head lookup took %lldms\n", jd->jd_jid, in gfs2_recover_func()
468 fs_info(sdp, "jid=%u: Acquiring the transaction lock...\n", in gfs2_recover_func()
473 error = gfs2_freeze_lock(sdp, &thaw_gh, LM_FLAG_PRIORITY); in gfs2_recover_func()
477 if (test_bit(SDF_RORECOVERY, &sdp->sd_flags)) { in gfs2_recover_func()
479 } else if (test_bit(SDF_JOURNAL_CHECKED, &sdp->sd_flags)) { in gfs2_recover_func()
480 if (!test_bit(SDF_JOURNAL_LIVE, &sdp->sd_flags)) in gfs2_recover_func()
483 if (sb_rdonly(sdp->sd_vfs)) { in gfs2_recover_func()
485 ro = bdev_read_only(sdp->sd_vfs->s_bdev); in gfs2_recover_func()
487 fs_info(sdp, "recovery required on " in gfs2_recover_func()
489 fs_info(sdp, "write access will be " in gfs2_recover_func()
496 fs_warn(sdp, "jid=%u: Can't replay: read-only block " in gfs2_recover_func()
503 fs_info(sdp, "jid=%u: Replaying journal...0x%x to 0x%x\n", in gfs2_recover_func()
509 down_read(&sdp->sd_log_flush_lock); in gfs2_recover_func()
516 up_read(&sdp->sd_log_flush_lock); in gfs2_recover_func()
523 up_read(&sdp->sd_log_flush_lock); in gfs2_recover_func()
527 fs_info(sdp, "jid=%u: Journal replayed in %lldms [jlck:%lldms, " in gfs2_recover_func()
536 gfs2_recovery_done(sdp, jd->jd_jid, LM_RD_SUCCESS); in gfs2_recover_func()
543 fs_info(sdp, "jid=%u: Done\n", jd->jd_jid); in gfs2_recover_func()
555 fs_info(sdp, "jid=%u: %s\n", jd->jd_jid, (error) ? "Failed" : "Done"); in gfs2_recover_func()
558 gfs2_recovery_done(sdp, jd->jd_jid, LM_RD_GAVEUP); in gfs2_recover_func()