* [PATCH] libxfs: fix xfs_extent_busy_flush macro definition
@ 2017-04-08 2:52 Darrick J. Wong
2017-04-08 14:26 ` Eric Sandeen
0 siblings, 1 reply; 5+ messages in thread
From: Darrick J. Wong @ 2017-04-08 2:52 UTC (permalink / raw)
To: Eric Sandeen; +Cc: xfs
xfs_extent_busy_flush is a void function, so don't reduce it to zero.
This shuts up gcc warnings about do-nothing statements.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
libxfs/libxfs_priv.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libxfs/libxfs_priv.h b/libxfs/libxfs_priv.h
index c2d4494..167786e 100644
--- a/libxfs/libxfs_priv.h
+++ b/libxfs/libxfs_priv.h
@@ -419,7 +419,7 @@ roundup_64(__uint64_t x, __uint32_t y)
*(busy_gen) = __foo; \
false; \
})
-#define xfs_extent_busy_flush(mp,pag,busy_gen) (0)
+#define xfs_extent_busy_flush(mp,pag,busy_gen) do { } while(0)
/* avoid unused variable warning */
#define xfs_alloc_busy_insert(tp,ag,b,len) ({ \
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] libxfs: fix xfs_extent_busy_flush macro definition
2017-04-08 2:52 [PATCH] libxfs: fix xfs_extent_busy_flush macro definition Darrick J. Wong
@ 2017-04-08 14:26 ` Eric Sandeen
2017-04-08 14:41 ` Eric Sandeen
0 siblings, 1 reply; 5+ messages in thread
From: Eric Sandeen @ 2017-04-08 14:26 UTC (permalink / raw)
To: Darrick J. Wong, Eric Sandeen; +Cc: xfs
On 4/7/17 9:52 PM, Darrick J. Wong wrote:
> xfs_extent_busy_flush is a void function, so don't reduce it to zero.
> This shuts up gcc warnings about do-nothing statements.
>
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Whoops, thanks. Need to test w/ newer gcc I guess, sorry!
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
> ---
> libxfs/libxfs_priv.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libxfs/libxfs_priv.h b/libxfs/libxfs_priv.h
> index c2d4494..167786e 100644
> --- a/libxfs/libxfs_priv.h
> +++ b/libxfs/libxfs_priv.h
> @@ -419,7 +419,7 @@ roundup_64(__uint64_t x, __uint32_t y)
> *(busy_gen) = __foo; \
> false; \
> })
> -#define xfs_extent_busy_flush(mp,pag,busy_gen) (0)
> +#define xfs_extent_busy_flush(mp,pag,busy_gen) do { } while(0)
>
> /* avoid unused variable warning */
> #define xfs_alloc_busy_insert(tp,ag,b,len) ({ \
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] libxfs: fix xfs_extent_busy_flush macro definition
2017-04-08 14:26 ` Eric Sandeen
@ 2017-04-08 14:41 ` Eric Sandeen
2017-04-08 16:05 ` Darrick J. Wong
0 siblings, 1 reply; 5+ messages in thread
From: Eric Sandeen @ 2017-04-08 14:41 UTC (permalink / raw)
To: Darrick J. Wong, Eric Sandeen; +Cc: xfs
On 4/8/17 9:26 AM, Eric Sandeen wrote:
> On 4/7/17 9:52 PM, Darrick J. Wong wrote:
>> xfs_extent_busy_flush is a void function, so don't reduce it to zero.
>> This shuts up gcc warnings about do-nothing statements.
>>
>> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
>
> Whoops, thanks. Need to test w/ newer gcc I guess, sorry!
>
> Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Oh, actually it seems that we use ((void) 0) pretty consistently
for these, i.e. -
#define xfs_extent_busy_reuse(mp,ag,bno,len,user) ((void) 0)
and many others. Probably best to be consistent; I may "fix" it to
that on commit, ok?
-Eric
>> ---
>> libxfs/libxfs_priv.h | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/libxfs/libxfs_priv.h b/libxfs/libxfs_priv.h
>> index c2d4494..167786e 100644
>> --- a/libxfs/libxfs_priv.h
>> +++ b/libxfs/libxfs_priv.h
>> @@ -419,7 +419,7 @@ roundup_64(__uint64_t x, __uint32_t y)
>> *(busy_gen) = __foo; \
>> false; \
>> })
>> -#define xfs_extent_busy_flush(mp,pag,busy_gen) (0)
>> +#define xfs_extent_busy_flush(mp,pag,busy_gen) do { } while(0)
>>
>> /* avoid unused variable warning */
>> #define xfs_alloc_busy_insert(tp,ag,b,len) ({ \
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] libxfs: fix xfs_extent_busy_flush macro definition
2017-04-08 14:41 ` Eric Sandeen
@ 2017-04-08 16:05 ` Darrick J. Wong
2017-04-08 16:07 ` Darrick J. Wong
0 siblings, 1 reply; 5+ messages in thread
From: Darrick J. Wong @ 2017-04-08 16:05 UTC (permalink / raw)
To: Eric Sandeen; +Cc: Eric Sandeen, xfs
On Sat, Apr 08, 2017 at 09:41:54AM -0500, Eric Sandeen wrote:
> On 4/8/17 9:26 AM, Eric Sandeen wrote:
> > On 4/7/17 9:52 PM, Darrick J. Wong wrote:
> >> xfs_extent_busy_flush is a void function, so don't reduce it to zero.
> >> This shuts up gcc warnings about do-nothing statements.
> >>
> >> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> >
> > Whoops, thanks. Need to test w/ newer gcc I guess, sorry!
> >
> > Reviewed-by: Eric Sandeen <sandeen@redhat.com>
>
> Oh, actually it seems that we use ((void) 0) pretty consistently
> for these, i.e. -
>
> #define xfs_extent_busy_reuse(mp,ag,bno,len,user) ((void) 0)
>
> and many others. Probably best to be consistent; I may "fix" it to
> that on commit, ok?
That works too.
You might consider fixing xfs_icsb_reinit_counters while you're at it,
because that's where I picked up that idio[mt].
Oh, nobody calls xfs_icsb_reinit_counters. Get rid of it then.
--D
>
> -Eric
>
> >> ---
> >> libxfs/libxfs_priv.h | 2 +-
> >> 1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/libxfs/libxfs_priv.h b/libxfs/libxfs_priv.h
> >> index c2d4494..167786e 100644
> >> --- a/libxfs/libxfs_priv.h
> >> +++ b/libxfs/libxfs_priv.h
> >> @@ -419,7 +419,7 @@ roundup_64(__uint64_t x, __uint32_t y)
> >> *(busy_gen) = __foo; \
> >> false; \
> >> })
> >> -#define xfs_extent_busy_flush(mp,pag,busy_gen) (0)
> >> +#define xfs_extent_busy_flush(mp,pag,busy_gen) do { } while(0)
> >>
> >> /* avoid unused variable warning */
> >> #define xfs_alloc_busy_insert(tp,ag,b,len) ({ \
> >> --
> >> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> >> the body of a message to majordomo@vger.kernel.org
> >> More majordomo info at http://vger.kernel.org/majordomo-info.html
> >>
> > --
> > To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
> >
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] libxfs: fix xfs_extent_busy_flush macro definition
2017-04-08 16:05 ` Darrick J. Wong
@ 2017-04-08 16:07 ` Darrick J. Wong
0 siblings, 0 replies; 5+ messages in thread
From: Darrick J. Wong @ 2017-04-08 16:07 UTC (permalink / raw)
To: Eric Sandeen; +Cc: Eric Sandeen, xfs
On Sat, Apr 08, 2017 at 09:05:33AM -0700, Darrick J. Wong wrote:
> On Sat, Apr 08, 2017 at 09:41:54AM -0500, Eric Sandeen wrote:
> > On 4/8/17 9:26 AM, Eric Sandeen wrote:
> > > On 4/7/17 9:52 PM, Darrick J. Wong wrote:
> > >> xfs_extent_busy_flush is a void function, so don't reduce it to zero.
> > >> This shuts up gcc warnings about do-nothing statements.
> > >>
> > >> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
> > >
> > > Whoops, thanks. Need to test w/ newer gcc I guess, sorry!
> > >
> > > Reviewed-by: Eric Sandeen <sandeen@redhat.com>
> >
> > Oh, actually it seems that we use ((void) 0) pretty consistently
> > for these, i.e. -
> >
> > #define xfs_extent_busy_reuse(mp,ag,bno,len,user) ((void) 0)
> >
> > and many others. Probably best to be consistent; I may "fix" it to
> > that on commit, ok?
>
> That works too.
>
> You might consider fixing xfs_icsb_reinit_counters while you're at it,
> because that's where I picked up that idio[mt].
>
> Oh, nobody calls xfs_icsb_reinit_counters. Get rid of it then.
Oh, you already did. Ho hum.
--D
>
> --D
>
> >
> > -Eric
> >
> > >> ---
> > >> libxfs/libxfs_priv.h | 2 +-
> > >> 1 file changed, 1 insertion(+), 1 deletion(-)
> > >>
> > >> diff --git a/libxfs/libxfs_priv.h b/libxfs/libxfs_priv.h
> > >> index c2d4494..167786e 100644
> > >> --- a/libxfs/libxfs_priv.h
> > >> +++ b/libxfs/libxfs_priv.h
> > >> @@ -419,7 +419,7 @@ roundup_64(__uint64_t x, __uint32_t y)
> > >> *(busy_gen) = __foo; \
> > >> false; \
> > >> })
> > >> -#define xfs_extent_busy_flush(mp,pag,busy_gen) (0)
> > >> +#define xfs_extent_busy_flush(mp,pag,busy_gen) do { } while(0)
> > >>
> > >> /* avoid unused variable warning */
> > >> #define xfs_alloc_busy_insert(tp,ag,b,len) ({ \
> > >> --
> > >> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> > >> the body of a message to majordomo@vger.kernel.org
> > >> More majordomo info at http://vger.kernel.org/majordomo-info.html
> > >>
> > > --
> > > To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> > > the body of a message to majordomo@vger.kernel.org
> > > More majordomo info at http://vger.kernel.org/majordomo-info.html
> > >
> --
> To unsubscribe from this list: send the line "unsubscribe linux-xfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2017-04-08 16:08 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-04-08 2:52 [PATCH] libxfs: fix xfs_extent_busy_flush macro definition Darrick J. Wong
2017-04-08 14:26 ` Eric Sandeen
2017-04-08 14:41 ` Eric Sandeen
2017-04-08 16:05 ` Darrick J. Wong
2017-04-08 16:07 ` Darrick J. Wong
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.