Lines Matching +full:len +full:- +full:or +full:- +full:define
1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Copyright (C) 2017-2023 Oracle. All Rights Reserved.
7 #define __XFS_SCRUB_SCRUB_H__
18 #define XCHK_RELAX_NEXT (jiffies + (HZ / 10))
20 #define INIT_XCHK_RELAX \
31 * then so that we don't run afoul of the soft lockup watchdog or RCU stall
39 if (likely(++widget->resched_nr < 100)) in xchk_maybe_relax()
41 widget->resched_nr = 0; in xchk_maybe_relax()
43 if (unlikely(widget->next_resched <= jiffies)) { in xchk_maybe_relax()
45 widget->next_resched = XCHK_RELAX_NEXT; in xchk_maybe_relax()
48 if (widget->interruptible && fatal_signal_pending(current)) in xchk_maybe_relax()
49 return -EINTR; in xchk_maybe_relax()
57 * to back out gracefully if there isn't enough memory. Force-cast to avoid
60 #define XCHK_GFP_FLAGS ((__force gfp_t)(GFP_KERNEL | __GFP_NOWARN | \
65 * or the allocation state; therefore, perform an untrusted lookup. We don't
68 #define XCHK_IGET_FLAGS (XFS_IGET_UNTRUSTED | XFS_IGET_DONTCACHE)
73 ST_PERAG, /* per-AG metadata */
74 ST_FS, /* per-FS metadata */
75 ST_INODE, /* per-inode metadata */
87 /* Repair or optimize the metadata. */
91 * Re-scrub the metadata we repaired, in case there's extra work that
93 * the ->scrub function pointer, assuming that the regular scrub is
147 * the file that scrub was called with if we're checking file-based fs
148 * metadata (e.g. rt bitmaps) or if we're doing a scrub-by-handle for
167 /* buffer target for in-memory btrees; also freed at teardown. */
186 * or repaired. We will use this mask to update the in-core fs health
200 /* State tracking for single-AG operations. */
208 #define XCHK_TRY_HARDER (1U << 0) /* can't get resources, try again */
209 #define XCHK_HAVE_FREEZE_PROT (1U << 1) /* do we have freeze protection? */
210 #define XCHK_FSGATES_DRAIN (1U << 2) /* defer ops draining enabled */
211 #define XCHK_NEED_DRAIN (1U << 3) /* scrub needs to drain defer ops */
212 #define XCHK_FSGATES_QUOTA (1U << 4) /* quota live update enabled */
213 #define XCHK_FSGATES_DIRENTS (1U << 5) /* directory live update enabled */
214 #define XCHK_FSGATES_RMAP (1U << 6) /* rmapbt live update enabled */
215 #define XREP_RESET_PERAG_RESV (1U << 30) /* must reset AG space reservation */
216 #define XREP_ALREADY_FIXED (1U << 31) /* checking our repair work */
224 #define XCHK_FSGATES_ALL (XCHK_FSGATES_DRAIN | \
250 if (xchk_maybe_relax(&sc->relax)) { in xchk_should_terminate()
252 *error = -EINTR; in xchk_should_terminate()
260 return -ENOENT; in xchk_nothing()
290 # define xchk_rtbitmap xchk_nothing
291 # define xchk_rtsummary xchk_nothing
292 # define xchk_rgsuperblock xchk_nothing
293 # define xchk_rtrmapbt xchk_nothing
294 # define xchk_rtrefcountbt xchk_nothing
300 # define xchk_quota xchk_nothing
301 # define xchk_quotacheck xchk_nothing
306 /* cross-referencing helpers */
308 xfs_extlen_t len);
310 xfs_extlen_t len);
312 xfs_extlen_t len);
314 xfs_extlen_t len, const struct xfs_owner_info *oinfo);
316 xfs_extlen_t len, const struct xfs_owner_info *oinfo);
318 xfs_extlen_t len);
320 xfs_extlen_t len);
322 xfs_extlen_t len);
324 xfs_extlen_t len);
327 xfs_extlen_t len);
329 xfs_extlen_t len);
331 xfs_extlen_t len);
333 xfs_extlen_t len, const struct xfs_owner_info *oinfo);
335 xfs_extlen_t len);
337 xfs_extlen_t len);
339 xfs_extlen_t len);
341 # define xchk_xref_is_used_rt_space(sc, rtbno, len) do { } while (0) argument
342 # define xchk_xref_has_no_rt_owner(sc, rtbno, len) do { } while (0) argument
343 # define xchk_xref_has_rt_owner(sc, rtbno, len) do { } while (0) argument
344 # define xchk_xref_is_only_rt_owned_by(sc, bno, len, oinfo) do { } while (0) argument
345 # define xchk_xref_is_rt_cow_staging(sc, bno, len) do { } while (0) argument
346 # define xchk_xref_is_not_rt_shared(sc, bno, len) do { } while (0) argument
347 # define xchk_xref_is_not_rt_cow_staging(sc, bno, len) do { } while (0) argument