From: "Darrick J. Wong" <djwong@kernel.org>
To: "Nirjhar Roy (IBM)" <nirjhar@linux.ibm.com>
Cc: hch@infradead.org, cem@kernel.org, linux-xfs@vger.kernel.org,
ritesh.list@gmail.com, ojaswin@linux.ibm.com,
nirjhar.roy.lists@gmail.com
Subject: Re: [PATCH v3 4/4] xfs: Add comments for usages of some macros.
Date: Thu, 19 Feb 2026 07:54:09 -0800 [thread overview]
Message-ID: <20260219155409.GG6490@frogsfrogsfrogs> (raw)
In-Reply-To: <ed78cfaa48058b00bc93cff93994cfbe0d4ef503.1771512159.git.nirjhar.roy.lists@gmail.com>
On Thu, Feb 19, 2026 at 08:16:50PM +0530, Nirjhar Roy (IBM) wrote:
> From: "Nirjhar Roy (IBM)" <nirjhar.roy.lists@gmail.com>
>
> Add comments explaining when to use XFS_IS_CORRUPT() and ASSERT()
>
> Reviewed-by: Christoph Hellwig <hch@lst.de>
> Signed-off-by: Nirjhar Roy (IBM) <nirjhar.roy.lists@gmail.com>
> ---
> fs/xfs/xfs_platform.h | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/fs/xfs/xfs_platform.h b/fs/xfs/xfs_platform.h
> index 1e59bf94d1f2..c9ce0450cf7a 100644
> --- a/fs/xfs/xfs_platform.h
> +++ b/fs/xfs/xfs_platform.h
> @@ -235,6 +235,7 @@ int xfs_rw_bdev(struct block_device *bdev, sector_t sector, unsigned int count,
>
> #ifdef XFS_WARN
>
> +/* Please note that this ASSERT doesn't kill the kernel */
It will if the kernel has panic_on_warn set.
> #define ASSERT(expr) \
> (likely(expr) ? (void)0 : asswarn(NULL, #expr, __FILE__, __LINE__))
>
> @@ -245,6 +246,11 @@ int xfs_rw_bdev(struct block_device *bdev, sector_t sector, unsigned int count,
> #endif /* XFS_WARN */
> #endif /* DEBUG */
>
> +/*
> + * Use this to catch metadata corruptions that are not caught by the regular
"...not caught by the block or structure verifiers."
> + * verifiers. The reason is that the verifiers check corruptions only within
> + * the block.
"...only within the scope of the object being verified."
> + */
Other than that, I agree with this comment.
--D
> #define XFS_IS_CORRUPT(mp, expr) \
> (unlikely(expr) ? xfs_corruption_error(#expr, XFS_ERRLEVEL_LOW, (mp), \
> NULL, 0, __FILE__, __LINE__, \
> --
> 2.43.5
>
>
next prev parent reply other threads:[~2026-02-19 15:54 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-02-19 14:46 [PATCH v3 0/4] xfs: Misc changes to XFS realtime Nirjhar Roy (IBM)
2026-02-19 14:46 ` [PATCH v3 1/4] xfs: Fix xfs_last_rt_bmblock() Nirjhar Roy (IBM)
2026-02-19 21:42 ` Darrick J. Wong
2026-02-20 6:33 ` Nirjhar Roy (IBM)
2026-02-19 14:46 ` [PATCH v3 2/4] xfs: Add a comment in xfs_log_sb() Nirjhar Roy (IBM)
2026-02-19 15:57 ` Darrick J. Wong
2026-02-19 14:46 ` [PATCH v3 3/4] xfs: Update lazy counters in xfs_growfs_rt_bmblock() Nirjhar Roy (IBM)
2026-02-19 15:57 ` Darrick J. Wong
2026-02-19 14:46 ` [PATCH v3 4/4] xfs: Add comments for usages of some macros Nirjhar Roy (IBM)
2026-02-19 15:54 ` Darrick J. Wong [this message]
2026-02-20 6:38 ` Nirjhar Roy (IBM)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260219155409.GG6490@frogsfrogsfrogs \
--to=djwong@kernel.org \
--cc=cem@kernel.org \
--cc=hch@infradead.org \
--cc=linux-xfs@vger.kernel.org \
--cc=nirjhar.roy.lists@gmail.com \
--cc=nirjhar@linux.ibm.com \
--cc=ojaswin@linux.ibm.com \
--cc=ritesh.list@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.