blob: 0d30f8e804f497b1170660f6611f008bbf4a1286 [file] [log] [blame]
Thomas Gleixner7336d0e2019-05-31 01:09:56 -07001/* SPDX-License-Identifier: GPL-2.0-only */
David Teiglandb3b94fa2006-01-16 16:50:04 +00002/*
3 * Copyright (C) Sistina Software, Inc. 1997-2003 All rights reserved.
Steven Whitehouse3a8a9a12006-05-18 15:09:15 -04004 * Copyright (C) 2004-2006 Red Hat, Inc. All rights reserved.
David Teiglandb3b94fa2006-01-16 16:50:04 +00005 */
6
7#ifndef __RECOVERY_DOT_H__
8#define __RECOVERY_DOT_H__
9
Steven Whitehousef2f7ba52006-09-05 10:39:21 -040010#include "incore.h"
11
Tejun Heo6ecd7c22010-07-20 22:09:02 +020012extern struct workqueue_struct *gfs_recovery_wq;
13
Bob Peterson7c70b892019-03-25 09:34:19 -060014static inline void gfs2_replay_incr_blk(struct gfs2_jdesc *jd, u32 *blk)
David Teiglandb3b94fa2006-01-16 16:50:04 +000015{
Bob Petersone1cb6be2016-07-21 13:02:44 -050016 if (++*blk == jd->jd_blocks)
David Teiglandb3b94fa2006-01-16 16:50:04 +000017 *blk = 0;
18}
19
Steven Whitehouse9ac1b4d2008-11-19 10:08:22 +000020extern int gfs2_replay_read_block(struct gfs2_jdesc *jd, unsigned int blk,
David Teiglandb3b94fa2006-01-16 16:50:04 +000021 struct buffer_head **bh);
22
Bob Petersona17d758b2014-03-06 17:19:15 -050023extern int gfs2_revoke_add(struct gfs2_jdesc *jd, u64 blkno, unsigned int where);
24extern int gfs2_revoke_check(struct gfs2_jdesc *jd, u64 blkno, unsigned int where);
25extern void gfs2_revoke_clean(struct gfs2_jdesc *jd);
David Teiglandb3b94fa2006-01-16 16:50:04 +000026
Tejun Heo6ecd7c22010-07-20 22:09:02 +020027extern int gfs2_recover_journal(struct gfs2_jdesc *gfs2_jd, bool wait);
28extern void gfs2_recover_func(struct work_struct *work);
Abhi Das40e0e612018-11-09 09:54:18 -060029extern int __get_log_header(struct gfs2_sbd *sdp,
30 const struct gfs2_log_header *lh, unsigned int blkno,
31 struct gfs2_log_header_host *head);
David Teiglandb3b94fa2006-01-16 16:50:04 +000032
33#endif /* __RECOVERY_DOT_H__ */
34