Skip to contentSkip to conversation

Review: Fix inverted quiet mount logic

DISCUSSION David Chinner 4 participants 4 messages Nov 22, 2006

lore
Share & tools
lore
#0 lore raw

Simple problem Noticed by Eric Sandeen at about the same time I did
- we are not getting error messages in dmesg when certain checks fail during mount. Turns out the XFS_MFSI_QUIET flag usage is inverted, so we suppress messages when we should be noisy and shout when we should be silent....

Cheers,

Dave.

Signature · 20 lines
Dave Chinner
Principal Engineer
SGI Australian Software Group

---
 fs/xfs/xfs_error.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: 2.6.x-xfs-new/fs/xfs/xfs_error.h
===================================================================
--- 2.6.x-xfs-new.orig/fs/xfs/xfs_error.h	2006-10-17 12:17:25.000000000 +1000
+++ 2.6.x-xfs-new/fs/xfs/xfs_error.h	2006-11-16 09:45:03.444451972 +1100
@@ -180,6 +180,6 @@ extern void xfs_fs_cmn_err(int level, st
 	xfs_fs_cmn_err(level, mp, fmt "  Unmount and run xfs_repair.", ## args)
 
 #define xfs_fs_mount_cmn_err(f, fmt, args...) \
-	((f & XFS_MFSI_QUIET)? cmn_err(CE_WARN, "XFS: " fmt, ## args) : (void)0)
+	((f & XFS_MFSI_QUIET)? (void)0 : cmn_err(CE_WARN, "XFS: " fmt, ## args))
 
 #endif	/* __XFS_ERROR_H__ */
#1 lore raw

Add me to the reviewer list :)
--Tim

Quoted 31 lines · --On 22 November 2006 3:46:56 PM +1100 David Chinner <[email protected]> wrote:

Simple problem Noticed by Eric Sandeen at about the same time I did
- we are not getting error messages in dmesg when certain checks fail during mount. Turns out the XFS_MFSI_QUIET flag usage is inverted, so we suppress messages when we should be noisy and shout when we should be silent....

Cheers,

Dave.
--
Dave Chinner
Principal Engineer
SGI Australian Software Group

---
 fs/xfs/xfs_error.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: 2.6.x-xfs-new/fs/xfs/xfs_error.h
===================================================================

fs/xfs/xfs_error.h +1 -1
@@ -180,6 +180,6 @@ extern void xfs_fs_cmn_err(int level, st
 	xfs_fs_cmn_err(level, mp, fmt "  Unmount and run xfs_repair.", ## args)
 
 #define xfs_fs_mount_cmn_err(f, fmt, args...) \
-	((f & XFS_MFSI_QUIET)? cmn_err(CE_WARN, "XFS: " fmt, ## args) : (void)0)
+	((f & XFS_MFSI_QUIET)? (void)0 : cmn_err(CE_WARN, "XFS: " fmt, ## args))
 
 #endif	/* __XFS_ERROR_H__ */
#2 lore raw

One of the bugs we found on the training course that I had not raised yet...thanks!

Quoted 45 lines · Timothy Shimmin

Add me to the reviewer list :)
--Tim

Quoted 36 lines · --On 22 November 2006 3:46:56 PM +1100 David Chinner <[email protected]> wrote:

Simple problem Noticed by Eric Sandeen at about the same time I did
- we are not getting error messages in dmesg when certain checks fail during mount. Turns out the XFS_MFSI_QUIET flag usage is inverted, so we suppress messages when we should be noisy and shout when we should be silent....

Cheers,

Dave.

Signature · 14 lines
Dave Chinner
Principal Engineer
SGI Australian Software Group

---
 fs/xfs/xfs_error.h |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Index: 2.6.x-xfs-new/fs/xfs/xfs_error.h
===================================================================
--- 2.6.x-xfs-new.orig/fs/xfs/xfs_error.h    2006-10-17
12:17:25.000000000 +1000
+++ 2.6.x-xfs-new/fs/xfs/xfs_error.h    2006-11-16 09:45:03.444451972
+1100
(quoted diff) +1 -1
@@ -180,6 +180,6 @@ extern void xfs_fs_cmn_err(int level, st
     xfs_fs_cmn_err(level, mp, fmt "  Unmount and run xfs_repair.", ##
 args)
 
 #define xfs_fs_mount_cmn_err(f, fmt, args...) \
-    ((f & XFS_MFSI_QUIET)? cmn_err(CE_WARN, "XFS: " fmt, ## args) :
 (void)0)
+    ((f & XFS_MFSI_QUIET)? (void)0 : cmn_err(CE_WARN, "XFS: " fmt, ##

args))

#endif /* __XFS_ERROR_H__ */

Signature · 3 lines
David Chatterton
XFS Engineering Manager
SGI Australia
#3 lore raw
In reply to David Chinner
Quoted 9 lines · David Chinner

Simple problem Noticed by Eric Sandeen at about the same time I did
- we are not getting error messages in dmesg when certain checks fail during mount. Turns out the XFS_MFSI_QUIET flag usage is inverted, so we suppress messages when we should be noisy and shout when we should be silent....

Cheers,

Dave.

ACK.

-Eric