* [PATCH] xfs: be more explicit if RT mount fails due to config
@ 2010-04-30 3:55 Eric Sandeen
2010-04-30 16:40 ` Christoph Hellwig
0 siblings, 1 reply; 4+ messages in thread
From: Eric Sandeen @ 2010-04-30 3:55 UTC (permalink / raw)
To: xfs-oss
Recent testers were slightly confused that a realtime
mount failed due to missing CONFIG_XFS_RT; we can make
that a little more obvious.
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
---
diff --git a/fs/xfs/xfs_rtalloc.h b/fs/xfs/xfs_rtalloc.h
index b2d67ad..d280ca7 100644
--- a/fs/xfs/xfs_rtalloc.h
+++ b/fs/xfs/xfs_rtalloc.h
@@ -147,7 +147,17 @@ 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;
+ else {
+ 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 */
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] xfs: be more explicit if RT mount fails due to config
2010-04-30 3:55 [PATCH] xfs: be more explicit if RT mount fails due to config Eric Sandeen
@ 2010-04-30 16:40 ` Christoph Hellwig
2010-04-30 16:43 ` [PATCH V2] " Eric Sandeen
0 siblings, 1 reply; 4+ messages in thread
From: Christoph Hellwig @ 2010-04-30 16:40 UTC (permalink / raw)
To: Eric Sandeen; +Cc: xfs-oss
> + if (mp->m_sb.sb_rblocks == 0)
> + return 0;
> + else {
> + cmn_err(CE_WARN, "XFS: Not built with CONFIG_XFS_RT");
> + return ENOSYS;
> + }
No need for the else if you return anyway.
Looks good either way,
Reviewed-by: Christoph Hellwig <hch@lst.de>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH V2] xfs: be more explicit if RT mount fails due to config
2010-04-30 16:40 ` Christoph Hellwig
@ 2010-04-30 16:43 ` Eric Sandeen
2010-04-30 16:45 ` Christoph Hellwig
0 siblings, 1 reply; 4+ messages in thread
From: Eric Sandeen @ 2010-04-30 16:43 UTC (permalink / raw)
To: Christoph Hellwig; +Cc: xfs-oss
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@sandeen.net>
---
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 */
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH V2] xfs: be more explicit if RT mount fails due to config
2010-04-30 16:43 ` [PATCH V2] " Eric Sandeen
@ 2010-04-30 16:45 ` Christoph Hellwig
0 siblings, 0 replies; 4+ messages in thread
From: Christoph Hellwig @ 2010-04-30 16:45 UTC (permalink / raw)
To: Eric Sandeen; +Cc: Christoph Hellwig, xfs-oss
On Fri, Apr 30, 2010 at 11:43:48AM -0500, Eric Sandeen wrote:
> 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@sandeen.net>
Looks good,
Reviewed-by: Christoph Hellwig <hch@lst.de>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2010-04-30 16:43 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-30 3:55 [PATCH] xfs: be more explicit if RT mount fails due to config Eric Sandeen
2010-04-30 16:40 ` Christoph Hellwig
2010-04-30 16:43 ` [PATCH V2] " Eric Sandeen
2010-04-30 16:45 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox