linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] xfs: include QUOTA, FATAL ASSERT build options in XFS_BUILD_OPTIONS
@ 2019-09-06  6:26 yu kuai
  2019-09-16 16:24 ` Darrick J. Wong
  0 siblings, 1 reply; 4+ messages in thread
From: yu kuai @ 2019-09-06  6:26 UTC (permalink / raw)
  To: darrick.wong, sandeen, billodo
  Cc: linux-xfs, linux-kernel, yukuai3, yi.zhang, zhengbin13

In commit d03a2f1b9fa8 ("xfs: include WARN, REPAIR build options in
XFS_BUILD_OPTIONS"), Eric pointed out that the XFS_BUILD_OPTIONS string,
shown at module init time and in modinfo output, does not currently
include all available build options. So, he added in CONFIG_XFS_WARN and
CONFIG_XFS_REPAIR. However, this is not enough, add in CONFIG_XFS_QUOTA
and CONFIG_XFS_ASSERT_FATAL. 

Signed-off-by: yu kuai <yukuai3@huawei.com>
---
 fs/xfs/xfs_super.h | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/fs/xfs/xfs_super.h b/fs/xfs/xfs_super.h
index 763e43d..b552cf6 100644
--- a/fs/xfs/xfs_super.h
+++ b/fs/xfs/xfs_super.h
@@ -11,9 +11,11 @@
 #ifdef CONFIG_XFS_QUOTA
 extern int xfs_qm_init(void);
 extern void xfs_qm_exit(void);
+# define XFS_QUOTA_STRING	"quota, "
 #else
 # define xfs_qm_init()	(0)
 # define xfs_qm_exit()	do { } while (0)
+# define XFS_QUOTA_STRING
 #endif
 
 #ifdef CONFIG_XFS_POSIX_ACL
@@ -50,6 +52,12 @@ extern void xfs_qm_exit(void);
 # define XFS_WARN_STRING
 #endif
 
+#ifdef CONFIG_XFS_ASSERT_FATAL
+# define XFS_ASSERT_FATAL_STRING	"fatal assert, "
+#else
+# define XFS_ASSERT_FATAL_STRING
+#endif
+
 #ifdef DEBUG
 # define XFS_DBG_STRING		"debug"
 #else
@@ -63,6 +71,8 @@ extern void xfs_qm_exit(void);
 				XFS_SCRUB_STRING \
 				XFS_REPAIR_STRING \
 				XFS_WARN_STRING \
+				XFS_QUOTA_STRING \
+				XFS_ASSERT_FATAL_STRING \
 				XFS_DBG_STRING /* DBG must be last */
 
 struct xfs_inode;
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] xfs: include QUOTA, FATAL ASSERT build options in XFS_BUILD_OPTIONS
  2019-09-06  6:26 [PATCH] xfs: include QUOTA, FATAL ASSERT build options in XFS_BUILD_OPTIONS yu kuai
@ 2019-09-16 16:24 ` Darrick J. Wong
  2019-09-16 17:16   ` Eric Sandeen
  2019-10-14 17:34   ` Darrick J. Wong
  0 siblings, 2 replies; 4+ messages in thread
From: Darrick J. Wong @ 2019-09-16 16:24 UTC (permalink / raw)
  To: yu kuai; +Cc: sandeen, billodo, linux-xfs, linux-kernel, yi.zhang, zhengbin13

On Fri, Sep 06, 2019 at 02:26:46PM +0800, yu kuai wrote:
> In commit d03a2f1b9fa8 ("xfs: include WARN, REPAIR build options in
> XFS_BUILD_OPTIONS"), Eric pointed out that the XFS_BUILD_OPTIONS string,
> shown at module init time and in modinfo output, does not currently
> include all available build options. So, he added in CONFIG_XFS_WARN and
> CONFIG_XFS_REPAIR. However, this is not enough, add in CONFIG_XFS_QUOTA
> and CONFIG_XFS_ASSERT_FATAL. 
> 
> Signed-off-by: yu kuai <yukuai3@huawei.com>
> ---
>  fs/xfs/xfs_super.h | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/fs/xfs/xfs_super.h b/fs/xfs/xfs_super.h
> index 763e43d..b552cf6 100644
> --- a/fs/xfs/xfs_super.h
> +++ b/fs/xfs/xfs_super.h
> @@ -11,9 +11,11 @@
>  #ifdef CONFIG_XFS_QUOTA
>  extern int xfs_qm_init(void);
>  extern void xfs_qm_exit(void);
> +# define XFS_QUOTA_STRING	"quota, "
>  #else
>  # define xfs_qm_init()	(0)
>  # define xfs_qm_exit()	do { } while (0)
> +# define XFS_QUOTA_STRING
>  #endif
>  
>  #ifdef CONFIG_XFS_POSIX_ACL
> @@ -50,6 +52,12 @@ extern void xfs_qm_exit(void);
>  # define XFS_WARN_STRING
>  #endif
>  
> +#ifdef CONFIG_XFS_ASSERT_FATAL
> +# define XFS_ASSERT_FATAL_STRING	"fatal assert, "

/me wonders if the space here will screw up any scripts that try to
parse the logging string, but OTOH that seems pretty questionable to me.

Also, whatever happened to adding a sysfs file so that scripts (ok let's
be honest, xfstests) could programmatically figure out the capabilities
of the running xfs module?

--D

> +#else
> +# define XFS_ASSERT_FATAL_STRING
> +#endif
> +
>  #ifdef DEBUG
>  # define XFS_DBG_STRING		"debug"
>  #else
> @@ -63,6 +71,8 @@ extern void xfs_qm_exit(void);
>  				XFS_SCRUB_STRING \
>  				XFS_REPAIR_STRING \
>  				XFS_WARN_STRING \
> +				XFS_QUOTA_STRING \
> +				XFS_ASSERT_FATAL_STRING \
>  				XFS_DBG_STRING /* DBG must be last */
>  
>  struct xfs_inode;
> -- 
> 2.7.4
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] xfs: include QUOTA, FATAL ASSERT build options in XFS_BUILD_OPTIONS
  2019-09-16 16:24 ` Darrick J. Wong
@ 2019-09-16 17:16   ` Eric Sandeen
  2019-10-14 17:34   ` Darrick J. Wong
  1 sibling, 0 replies; 4+ messages in thread
From: Eric Sandeen @ 2019-09-16 17:16 UTC (permalink / raw)
  To: Darrick J. Wong, yu kuai
  Cc: sandeen, billodo, linux-xfs, linux-kernel, yi.zhang, zhengbin13

On 9/16/19 11:24 AM, Darrick J. Wong wrote:
> On Fri, Sep 06, 2019 at 02:26:46PM +0800, yu kuai wrote:
>> In commit d03a2f1b9fa8 ("xfs: include WARN, REPAIR build options in
>> XFS_BUILD_OPTIONS"), Eric pointed out that the XFS_BUILD_OPTIONS string,
>> shown at module init time and in modinfo output, does not currently
>> include all available build options. So, he added in CONFIG_XFS_WARN and
>> CONFIG_XFS_REPAIR. However, this is not enough, add in CONFIG_XFS_QUOTA
>> and CONFIG_XFS_ASSERT_FATAL. 
>>
>> Signed-off-by: yu kuai <yukuai3@huawei.com>
>> ---
>>  fs/xfs/xfs_super.h | 10 ++++++++++
>>  1 file changed, 10 insertions(+)
>>
>> diff --git a/fs/xfs/xfs_super.h b/fs/xfs/xfs_super.h
>> index 763e43d..b552cf6 100644
>> --- a/fs/xfs/xfs_super.h
>> +++ b/fs/xfs/xfs_super.h
>> @@ -11,9 +11,11 @@
>>  #ifdef CONFIG_XFS_QUOTA
>>  extern int xfs_qm_init(void);
>>  extern void xfs_qm_exit(void);
>> +# define XFS_QUOTA_STRING	"quota, "
>>  #else
>>  # define xfs_qm_init()	(0)
>>  # define xfs_qm_exit()	do { } while (0)
>> +# define XFS_QUOTA_STRING
>>  #endif
>>  
>>  #ifdef CONFIG_XFS_POSIX_ACL
>> @@ -50,6 +52,12 @@ extern void xfs_qm_exit(void);
>>  # define XFS_WARN_STRING
>>  #endif
>>  
>> +#ifdef CONFIG_XFS_ASSERT_FATAL
>> +# define XFS_ASSERT_FATAL_STRING	"fatal assert, "
> 
> /me wonders if the space here will screw up any scripts that try to
> parse the logging string, but OTOH that seems pretty questionable to me.
> 
> Also, whatever happened to adding a sysfs file so that scripts (ok let's
> be honest, xfstests) could programmatically figure out the capabilities
> of the running xfs module?


I sent it ([PATCH] xfs: show build options in sysfs) but it was met with some
IMHO nonspecific commentary but never received a review, so was never merged.

-Eric

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] xfs: include QUOTA, FATAL ASSERT build options in XFS_BUILD_OPTIONS
  2019-09-16 16:24 ` Darrick J. Wong
  2019-09-16 17:16   ` Eric Sandeen
@ 2019-10-14 17:34   ` Darrick J. Wong
  1 sibling, 0 replies; 4+ messages in thread
From: Darrick J. Wong @ 2019-10-14 17:34 UTC (permalink / raw)
  To: yu kuai; +Cc: sandeen, billodo, linux-xfs, linux-kernel, yi.zhang, zhengbin13

On Mon, Sep 16, 2019 at 09:24:06AM -0700, Darrick J. Wong wrote:
> On Fri, Sep 06, 2019 at 02:26:46PM +0800, yu kuai wrote:
> > In commit d03a2f1b9fa8 ("xfs: include WARN, REPAIR build options in
> > XFS_BUILD_OPTIONS"), Eric pointed out that the XFS_BUILD_OPTIONS string,
> > shown at module init time and in modinfo output, does not currently
> > include all available build options. So, he added in CONFIG_XFS_WARN and
> > CONFIG_XFS_REPAIR. However, this is not enough, add in CONFIG_XFS_QUOTA
> > and CONFIG_XFS_ASSERT_FATAL. 
> > 
> > Signed-off-by: yu kuai <yukuai3@huawei.com>
> > ---
> >  fs/xfs/xfs_super.h | 10 ++++++++++
> >  1 file changed, 10 insertions(+)
> > 
> > diff --git a/fs/xfs/xfs_super.h b/fs/xfs/xfs_super.h
> > index 763e43d..b552cf6 100644
> > --- a/fs/xfs/xfs_super.h
> > +++ b/fs/xfs/xfs_super.h
> > @@ -11,9 +11,11 @@
> >  #ifdef CONFIG_XFS_QUOTA
> >  extern int xfs_qm_init(void);
> >  extern void xfs_qm_exit(void);
> > +# define XFS_QUOTA_STRING	"quota, "
> >  #else
> >  # define xfs_qm_init()	(0)
> >  # define xfs_qm_exit()	do { } while (0)
> > +# define XFS_QUOTA_STRING
> >  #endif
> >  
> >  #ifdef CONFIG_XFS_POSIX_ACL
> > @@ -50,6 +52,12 @@ extern void xfs_qm_exit(void);
> >  # define XFS_WARN_STRING
> >  #endif
> >  
> > +#ifdef CONFIG_XFS_ASSERT_FATAL
> > +# define XFS_ASSERT_FATAL_STRING	"fatal assert, "
> 
> /me wonders if the space here will screw up any scripts that try to
> parse the logging string, but OTOH that seems pretty questionable to me.

Answer: There are already string components with spaces.

Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>

--D


> Also, whatever happened to adding a sysfs file so that scripts (ok let's
> be honest, xfstests) could programmatically figure out the capabilities
> of the running xfs module?
> 
> --D
> 
> > +#else
> > +# define XFS_ASSERT_FATAL_STRING
> > +#endif
> > +
> >  #ifdef DEBUG
> >  # define XFS_DBG_STRING		"debug"
> >  #else
> > @@ -63,6 +71,8 @@ extern void xfs_qm_exit(void);
> >  				XFS_SCRUB_STRING \
> >  				XFS_REPAIR_STRING \
> >  				XFS_WARN_STRING \
> > +				XFS_QUOTA_STRING \
> > +				XFS_ASSERT_FATAL_STRING \
> >  				XFS_DBG_STRING /* DBG must be last */
> >  
> >  struct xfs_inode;
> > -- 
> > 2.7.4
> > 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-10-14 17:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-06  6:26 [PATCH] xfs: include QUOTA, FATAL ASSERT build options in XFS_BUILD_OPTIONS yu kuai
2019-09-16 16:24 ` Darrick J. Wong
2019-09-16 17:16   ` Eric Sandeen
2019-10-14 17:34   ` Darrick J. Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).