xfs
[Top] [All Lists]

[PATCH V2] xfs: be more explicit if RT mount fails due to config

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: [PATCH V2] xfs: be more explicit if RT mount fails due to config
From: Eric Sandeen <sandeen@xxxxxxxxxxx>
Date: Fri, 30 Apr 2010 11:43:48 -0500
Cc: xfs-oss <xfs@xxxxxxxxxxx>
In-reply-to: <20100430164002.GC14107@xxxxxxxxxxxxx>
References: <4BDA54A4.3040204@xxxxxxxxxxx> <20100430164002.GC14107@xxxxxxxxxxxxx>
User-agent: Thunderbird 2.0.0.24 (Macintosh/20100228)
Recent testers were slightly confused that a realtime
mount failed due to missing CONFIG_XFS_RT; we can make
that a little more obvious.

V2: drop the else as suggested by Christoph

Signed-off-by: Eric Sandeen <sandeen@xxxxxxxxxxx>
---

diff --git a/fs/xfs/xfs_rtalloc.h b/fs/xfs/xfs_rtalloc.h
index b2d67ad..ff614c2 100644
--- a/fs/xfs/xfs_rtalloc.h
+++ b/fs/xfs/xfs_rtalloc.h
@@ -147,7 +147,16 @@ xfs_growfs_rt(
 # define xfs_rtfree_extent(t,b,l)                       (ENOSYS)
 # define xfs_rtpick_extent(m,t,l,rb)                    (ENOSYS)
 # define xfs_growfs_rt(mp,in)                           (ENOSYS)
-# define xfs_rtmount_init(m)    (((mp)->m_sb.sb_rblocks == 0)? 0 : (ENOSYS))
+static inline int              /* error */
+xfs_rtmount_init(
+       xfs_mount_t     *mp)    /* file system mount structure */
+{
+       if (mp->m_sb.sb_rblocks == 0)
+               return 0;
+
+       cmn_err(CE_WARN, "XFS: Not built with CONFIG_XFS_RT");
+       return ENOSYS;
+}
 # define xfs_rtmount_inodes(m)  (((mp)->m_sb.sb_rblocks == 0)? 0 : (ENOSYS))
 # define xfs_rtunmount_inodes(m)
 #endif /* CONFIG_XFS_RT */


<Prev in Thread] Current Thread [Next in Thread>