mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 01:04:41 +01:00
xfs: Add comments for usages of some macros.
Add comments explaining when to use XFS_IS_CORRUPT() and ASSERT() Suggested-by: Darrick J. Wong <djwong@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Nirjhar Roy (IBM) <nirjhar.roy.lists@gmail.com> Signed-off-by: Carlos Maiolino <cem@kernel.org>
This commit is contained in:
parent
c2368fc89a
commit
9a654a8fa3
1 changed files with 9 additions and 0 deletions
|
|
@ -235,6 +235,10 @@ 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 +249,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 block or
|
||||
* structure verifiers. The reason is that the verifiers check corruptions only
|
||||
* within the scope of the object being verified.
|
||||
*/
|
||||
#define XFS_IS_CORRUPT(mp, expr) \
|
||||
(unlikely(expr) ? xfs_corruption_error(#expr, XFS_ERRLEVEL_LOW, (mp), \
|
||||
NULL, 0, __FILE__, __LINE__, \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue