All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] btrfs-progs: cmds: Fix build for using NAME_MAX
@ 2021-07-24  7:46 Sidong Yang
  2021-07-24  7:50 ` Qu Wenruo
  0 siblings, 1 reply; 9+ messages in thread
From: Sidong Yang @ 2021-07-24  7:46 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Sidong Yang

There is some code that using NAME_MAX but it doesn't include header
that is defined. This patch adds a line that includes linux/limits.h
which defines NAME_MAX.

Signed-off-by: Sidong Yang <realwakka@gmail.com>
---
 cmds/filesystem-usage.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/cmds/filesystem-usage.c b/cmds/filesystem-usage.c
index 50d8995e..2a76e29c 100644
--- a/cmds/filesystem-usage.c
+++ b/cmds/filesystem-usage.c
@@ -24,6 +24,7 @@
 #include <stdarg.h>
 #include <getopt.h>
 #include <fcntl.h>
+#include <linux/limits.h>
 
 #include "common/utils.h"
 #include "kerncompat.h"
-- 
2.25.1


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

* Re: [PATCH] btrfs-progs: cmds: Fix build for using NAME_MAX
  2021-07-24  7:46 [PATCH] btrfs-progs: cmds: Fix build for using NAME_MAX Sidong Yang
@ 2021-07-24  7:50 ` Qu Wenruo
  2021-07-24  8:23   ` Sidong Yang
  0 siblings, 1 reply; 9+ messages in thread
From: Qu Wenruo @ 2021-07-24  7:50 UTC (permalink / raw)
  To: Sidong Yang, linux-btrfs



On 2021/7/24 下午3:46, Sidong Yang wrote:
> There is some code that using NAME_MAX but it doesn't include header
> that is defined. This patch adds a line that includes linux/limits.h
> which defines NAME_MAX.

I guess it's related to this issue?

https://github.com/kdave/btrfs-progs/issues/386

Thanks,
Qu

>
> Signed-off-by: Sidong Yang <realwakka@gmail.com>
> ---
>   cmds/filesystem-usage.c | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/cmds/filesystem-usage.c b/cmds/filesystem-usage.c
> index 50d8995e..2a76e29c 100644
> --- a/cmds/filesystem-usage.c
> +++ b/cmds/filesystem-usage.c
> @@ -24,6 +24,7 @@
>   #include <stdarg.h>
>   #include <getopt.h>
>   #include <fcntl.h>
> +#include <linux/limits.h>
>
>   #include "common/utils.h"
>   #include "kerncompat.h"
>

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

* Re: [PATCH] btrfs-progs: cmds: Fix build for using NAME_MAX
  2021-07-24  7:50 ` Qu Wenruo
@ 2021-07-24  8:23   ` Sidong Yang
  2021-07-24  9:44     ` Qu Wenruo
  2021-07-25  2:54     ` Su Yue
  0 siblings, 2 replies; 9+ messages in thread
From: Sidong Yang @ 2021-07-24  8:23 UTC (permalink / raw)
  To: Qu Wenruo; +Cc: linux-btrfs

On Sat, Jul 24, 2021 at 03:50:25PM +0800, Qu Wenruo wrote:
> 
> 
> On 2021/7/24 下午3:46, Sidong Yang wrote:
> > There is some code that using NAME_MAX but it doesn't include header
> > that is defined. This patch adds a line that includes linux/limits.h
> > which defines NAME_MAX.
> 
> I guess it's related to this issue?
> 
> https://github.com/kdave/btrfs-progs/issues/386

Yeah, It seems that there is no patch for this yet. So I sent this
patch. Is this too minor patch?

Thanks,
Sidong

> 
> Thanks,
> Qu
> 
> > 
> > Signed-off-by: Sidong Yang <realwakka@gmail.com>
> > ---
> >   cmds/filesystem-usage.c | 1 +
> >   1 file changed, 1 insertion(+)
> > 
> > diff --git a/cmds/filesystem-usage.c b/cmds/filesystem-usage.c
> > index 50d8995e..2a76e29c 100644
> > --- a/cmds/filesystem-usage.c
> > +++ b/cmds/filesystem-usage.c
> > @@ -24,6 +24,7 @@
> >   #include <stdarg.h>
> >   #include <getopt.h>
> >   #include <fcntl.h>
> > +#include <linux/limits.h>
> > 
> >   #include "common/utils.h"
> >   #include "kerncompat.h"
> > 

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

* Re: [PATCH] btrfs-progs: cmds: Fix build for using NAME_MAX
  2021-07-24  8:23   ` Sidong Yang
@ 2021-07-24  9:44     ` Qu Wenruo
  2021-07-24 15:26       ` Sidong Yang
  2021-07-25  2:54     ` Su Yue
  1 sibling, 1 reply; 9+ messages in thread
From: Qu Wenruo @ 2021-07-24  9:44 UTC (permalink / raw)
  To: Sidong Yang; +Cc: linux-btrfs



On 2021/7/24 下午4:23, Sidong Yang wrote:
> On Sat, Jul 24, 2021 at 03:50:25PM +0800, Qu Wenruo wrote:
>>
>>
>> On 2021/7/24 下午3:46, Sidong Yang wrote:
>>> There is some code that using NAME_MAX but it doesn't include header
>>> that is defined. This patch adds a line that includes linux/limits.h
>>> which defines NAME_MAX.
>>
>> I guess it's related to this issue?
>>
>> https://github.com/kdave/btrfs-progs/issues/386
>
> Yeah, It seems that there is no patch for this yet. So I sent this
> patch. Is this too minor patch?

No, I just want to mention you could add tag like the below, so David
can be more aware of the fix.
As when it merged into devel branch, github will automatically mention
it in the issue.

Issue: #386

And it looks good to me, so:

Reviewed-by: Qu Wenruo <wqu@suse.com>

Thanks,
Qu
>
> Thanks,
> Sidong
>
>>
>> Thanks,
>> Qu
>>
>>>
>>> Signed-off-by: Sidong Yang <realwakka@gmail.com>
>>> ---
>>>    cmds/filesystem-usage.c | 1 +
>>>    1 file changed, 1 insertion(+)
>>>
>>> diff --git a/cmds/filesystem-usage.c b/cmds/filesystem-usage.c
>>> index 50d8995e..2a76e29c 100644
>>> --- a/cmds/filesystem-usage.c
>>> +++ b/cmds/filesystem-usage.c
>>> @@ -24,6 +24,7 @@
>>>    #include <stdarg.h>
>>>    #include <getopt.h>
>>>    #include <fcntl.h>
>>> +#include <linux/limits.h>
>>>
>>>    #include "common/utils.h"
>>>    #include "kerncompat.h"
>>>

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

* Re: [PATCH] btrfs-progs: cmds: Fix build for using NAME_MAX
  2021-07-24  9:44     ` Qu Wenruo
@ 2021-07-24 15:26       ` Sidong Yang
  0 siblings, 0 replies; 9+ messages in thread
From: Sidong Yang @ 2021-07-24 15:26 UTC (permalink / raw)
  To: Qu Wenruo; +Cc: linux-btrfs

On Sat, Jul 24, 2021 at 05:44:00PM +0800, Qu Wenruo wrote:
> 
> 
> On 2021/7/24 下午4:23, Sidong Yang wrote:
> > On Sat, Jul 24, 2021 at 03:50:25PM +0800, Qu Wenruo wrote:
> > > 
> > > 
> > > On 2021/7/24 下午3:46, Sidong Yang wrote:
> > > > There is some code that using NAME_MAX but it doesn't include header
> > > > that is defined. This patch adds a line that includes linux/limits.h
> > > > which defines NAME_MAX.
> > > 
> > > I guess it's related to this issue?
> > > 
> > > https://github.com/kdave/btrfs-progs/issues/386
> > 
> > Yeah, It seems that there is no patch for this yet. So I sent this
> > patch. Is this too minor patch?
> 
> No, I just want to mention you could add tag like the below, so David
> can be more aware of the fix.
> As when it merged into devel branch, github will automatically mention
> it in the issue.
> 
> Issue: #386
> 
> And it looks good to me, so:

Thanks, I'll do it for next time.

Thanks,
Sidong
> 
> Reviewed-by: Qu Wenruo <wqu@suse.com>
> 
> Thanks,
> Qu
> > 
> > Thanks,
> > Sidong
> > 
> > > 
> > > Thanks,
> > > Qu
> > > 
> > > > 
> > > > Signed-off-by: Sidong Yang <realwakka@gmail.com>
> > > > ---
> > > >    cmds/filesystem-usage.c | 1 +
> > > >    1 file changed, 1 insertion(+)
> > > > 
> > > > diff --git a/cmds/filesystem-usage.c b/cmds/filesystem-usage.c
> > > > index 50d8995e..2a76e29c 100644
> > > > --- a/cmds/filesystem-usage.c
> > > > +++ b/cmds/filesystem-usage.c
> > > > @@ -24,6 +24,7 @@
> > > >    #include <stdarg.h>
> > > >    #include <getopt.h>
> > > >    #include <fcntl.h>
> > > > +#include <linux/limits.h>
> > > > 
> > > >    #include "common/utils.h"
> > > >    #include "kerncompat.h"
> > > > 

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

* Re: [PATCH] btrfs-progs: cmds: Fix build for using NAME_MAX
  2021-07-24  8:23   ` Sidong Yang
  2021-07-24  9:44     ` Qu Wenruo
@ 2021-07-25  2:54     ` Su Yue
  2021-07-25  7:29       ` Sidong Yang
                         ` (2 more replies)
  1 sibling, 3 replies; 9+ messages in thread
From: Su Yue @ 2021-07-25  2:54 UTC (permalink / raw)
  To: Sidong Yang; +Cc: Qu Wenruo, linux-btrfs


On Sat 24 Jul 2021 at 16:23, Sidong Yang <realwakka@gmail.com> 
wrote:

> On Sat, Jul 24, 2021 at 03:50:25PM +0800, Qu Wenruo wrote:
>>
>>
>> On 2021/7/24 下午3:46, Sidong Yang wrote:
>> > There is some code that using NAME_MAX but it doesn't include 
>> > header
>> > that is defined. This patch adds a line that includes 
>> > linux/limits.h
>> > which defines NAME_MAX.
>>
>> I guess it's related to this issue?
>>
>> https://github.com/kdave/btrfs-progs/issues/386
>
> Yeah, It seems that there is no patch for this yet. So I sent 
> this
> patch. Is this too minor patch?
>
Good fix. But there is one PR before the issue creation:
https://github.com/kdave/btrfs-progs/pull/385

--
Su

> Thanks,
> Sidong
>
>>
>> Thanks,
>> Qu
>>
>> >
>> > Signed-off-by: Sidong Yang <realwakka@gmail.com>
>> > ---
>> >   cmds/filesystem-usage.c | 1 +
>> >   1 file changed, 1 insertion(+)
>> >
>> > diff --git a/cmds/filesystem-usage.c 
>> > b/cmds/filesystem-usage.c
>> > index 50d8995e..2a76e29c 100644
>> > --- a/cmds/filesystem-usage.c
>> > +++ b/cmds/filesystem-usage.c
>> > @@ -24,6 +24,7 @@
>> >   #include <stdarg.h>
>> >   #include <getopt.h>
>> >   #include <fcntl.h>
>> > +#include <linux/limits.h>
>> >
>> >   #include "common/utils.h"
>> >   #include "kerncompat.h"
>> >

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

* Re: [PATCH] btrfs-progs: cmds: Fix build for using NAME_MAX
  2021-07-25  2:54     ` Su Yue
@ 2021-07-25  7:29       ` Sidong Yang
  2021-07-25  9:12       ` Qu Wenruo
  2021-07-26 11:25       ` David Sterba
  2 siblings, 0 replies; 9+ messages in thread
From: Sidong Yang @ 2021-07-25  7:29 UTC (permalink / raw)
  To: Su Yue; +Cc: Qu Wenruo, linux-btrfs

On Sun, Jul 25, 2021 at 10:54:05AM +0800, Su Yue wrote:
> 
> On Sat 24 Jul 2021 at 16:23, Sidong Yang <realwakka@gmail.com> wrote:
> 
> > On Sat, Jul 24, 2021 at 03:50:25PM +0800, Qu Wenruo wrote:
> > > 
> > > 
> > > On 2021/7/24 下午3:46, Sidong Yang wrote:
> > > > There is some code that using NAME_MAX but it doesn't include >
> > > header
> > > > that is defined. This patch adds a line that includes >
> > > linux/limits.h
> > > > which defines NAME_MAX.
> > > 
> > > I guess it's related to this issue?
> > > 
> > > https://github.com/kdave/btrfs-progs/issues/386
> > 
> > Yeah, It seems that there is no patch for this yet. So I sent this
> > patch. Is this too minor patch?
> > 
> Good fix. But there is one PR before the issue creation:
> https://github.com/kdave/btrfs-progs/pull/385

Thanks, I didn't know about this. I don't care which patch will be
committed.

Thanks,
Sidong
> 
> --
> Su
> 
> > Thanks,
> > Sidong
> > 
> > > 
> > > Thanks,
> > > Qu
> > > 
> > > >
> > > > Signed-off-by: Sidong Yang <realwakka@gmail.com>
> > > > ---
> > > >   cmds/filesystem-usage.c | 1 +
> > > >   1 file changed, 1 insertion(+)
> > > >
> > > > diff --git a/cmds/filesystem-usage.c > b/cmds/filesystem-usage.c
> > > > index 50d8995e..2a76e29c 100644
> > > > --- a/cmds/filesystem-usage.c
> > > > +++ b/cmds/filesystem-usage.c
> > > > @@ -24,6 +24,7 @@
> > > >   #include <stdarg.h>
> > > >   #include <getopt.h>
> > > >   #include <fcntl.h>
> > > > +#include <linux/limits.h>
> > > >
> > > >   #include "common/utils.h"
> > > >   #include "kerncompat.h"
> > > >

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

* Re: [PATCH] btrfs-progs: cmds: Fix build for using NAME_MAX
  2021-07-25  2:54     ` Su Yue
  2021-07-25  7:29       ` Sidong Yang
@ 2021-07-25  9:12       ` Qu Wenruo
  2021-07-26 11:25       ` David Sterba
  2 siblings, 0 replies; 9+ messages in thread
From: Qu Wenruo @ 2021-07-25  9:12 UTC (permalink / raw)
  To: Su Yue, Sidong Yang; +Cc: linux-btrfs



On 2021/7/25 上午10:54, Su Yue wrote:
>
> On Sat 24 Jul 2021 at 16:23, Sidong Yang <realwakka@gmail.com> wrote:
>
>> On Sat, Jul 24, 2021 at 03:50:25PM +0800, Qu Wenruo wrote:
>>>
>>>
>>> On 2021/7/24 下午3:46, Sidong Yang wrote:
>>> > There is some code that using NAME_MAX but it doesn't include > header
>>> > that is defined. This patch adds a line that includes > linux/limits.h
>>> > which defines NAME_MAX.
>>>
>>> I guess it's related to this issue?
>>>
>>> https://github.com/kdave/btrfs-progs/issues/386
>>
>> Yeah, It seems that there is no patch for this yet. So I sent this
>> patch. Is this too minor patch?
>>
> Good fix. But there is one PR before the issue creation:
> https://github.com/kdave/btrfs-progs/pull/385

No wonder why I didn't see any automatic mention in that issue, this fix
lacks the "Issue:" tag either...
>
> --
> Su
>
>> Thanks,
>> Sidong
>>
>>>
>>> Thanks,
>>> Qu
>>>
>>> >
>>> > Signed-off-by: Sidong Yang <realwakka@gmail.com>
>>> > ---
>>> >   cmds/filesystem-usage.c | 1 +
>>> >   1 file changed, 1 insertion(+)
>>> >
>>> > diff --git a/cmds/filesystem-usage.c > b/cmds/filesystem-usage.c
>>> > index 50d8995e..2a76e29c 100644
>>> > --- a/cmds/filesystem-usage.c
>>> > +++ b/cmds/filesystem-usage.c
>>> > @@ -24,6 +24,7 @@
>>> >   #include <stdarg.h>
>>> >   #include <getopt.h>
>>> >   #include <fcntl.h>
>>> > +#include <linux/limits.h>
>>> >
>>> >   #include "common/utils.h"
>>> >   #include "kerncompat.h"
>>> >

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

* Re: [PATCH] btrfs-progs: cmds: Fix build for using NAME_MAX
  2021-07-25  2:54     ` Su Yue
  2021-07-25  7:29       ` Sidong Yang
  2021-07-25  9:12       ` Qu Wenruo
@ 2021-07-26 11:25       ` David Sterba
  2 siblings, 0 replies; 9+ messages in thread
From: David Sterba @ 2021-07-26 11:25 UTC (permalink / raw)
  To: Su Yue; +Cc: Sidong Yang, Qu Wenruo, linux-btrfs

On Sun, Jul 25, 2021 at 10:54:05AM +0800, Su Yue wrote:
> 
> On Sat 24 Jul 2021 at 16:23, Sidong Yang <realwakka@gmail.com> 
> wrote:
> 
> > On Sat, Jul 24, 2021 at 03:50:25PM +0800, Qu Wenruo wrote:
> >>
> >>
> >> On 2021/7/24 下午3:46, Sidong Yang wrote:
> >> > There is some code that using NAME_MAX but it doesn't include 
> >> > header
> >> > that is defined. This patch adds a line that includes 
> >> > linux/limits.h
> >> > which defines NAME_MAX.
> >>
> >> I guess it's related to this issue?
> >>
> >> https://github.com/kdave/btrfs-progs/issues/386
> >
> > Yeah, It seems that there is no patch for this yet. So I sent 
> > this
> > patch. Is this too minor patch?
> >
> Good fix. But there is one PR before the issue creation:
> https://github.com/kdave/btrfs-progs/pull/385

Ah I got an email about the musl failure but was not able to find it so
I created #386 to keep track of it. While the pull request comes with a
patch it should really be linux/limits.h because it's a linux-specific
limit. Including limits.h also works but I'd prefer to pull the one that
defines it.

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

end of thread, other threads:[~2021-07-26 11:28 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-24  7:46 [PATCH] btrfs-progs: cmds: Fix build for using NAME_MAX Sidong Yang
2021-07-24  7:50 ` Qu Wenruo
2021-07-24  8:23   ` Sidong Yang
2021-07-24  9:44     ` Qu Wenruo
2021-07-24 15:26       ` Sidong Yang
2021-07-25  2:54     ` Su Yue
2021-07-25  7:29       ` Sidong Yang
2021-07-25  9:12       ` Qu Wenruo
2021-07-26 11:25       ` David Sterba

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.