Skip to contentSkip to conversation

xfsprogs: warning fix and add stack usage to gitignore

PATCH In review Andrey Albershteyn 3 participants 8 messages Oct 29 – Nov 3

lore
Share & tools
lore
#0 lore raw

cover xfsprogs: warning fix and add stack usage to gitignore

Hi folks,

One last fix for a warning to make it compile under gcc16 and all these new warnings enabled. And a gitignore update with stack usage files.

Andrey Albershteyn (2):
xfs: fix two warnings in xfs_alloc.c
xfsprogs: add gcc generated stack usage files to gitignore

 .gitignore                     | 1 +
 libxfs/stubs/xfs_extent_busy.h | 5 ++++-
 2 files changed, 5 insertions(+), 1 deletion(-)
Signature · 1 line
2.54.0
#1 lore raw

PATCH 1/2 xfs: fix two warnings in xfs_alloc.c

There's still two warnings in xfs_alloc due to unused alloc_flags var.

xfs_alloc.c: In function ‘xfs_alloc_ag_vextent_near’:
xfs_alloc.c:1676:33: error: parameter ‘alloc_flags’ set but not used [-Werror=unused-but-set-parameter=]

 1676 |         uint32_t                alloc_flags)
      |         ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
xfs_alloc.c: In function ‘xfs_alloc_ag_vextent_size’:
xfs_alloc.c:1792:33: error: parameter ‘alloc_flags’ set but not used [-Werror=unused-but-set-parameter=]
 1792 |         uint32_t                alloc_flags)
      |         ~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~
---
 libxfs/stubs/xfs_extent_busy.h | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
libxfs/stubs/xfs_extent_busy.h +4 -1
index e7d1bcdb2fab..2ef307f0f901 100644
@@ -15,6 +15,9 @@
 	*(busy_gen) = __foo;					\
 	false;							\
 })
-#define xfs_extent_busy_flush(tp,pag,busy_gen,alloc_flags)	((int)(0))
+#define xfs_extent_busy_flush(tp,pag,busy_gen,alloc_flags)	({	\
+	(void)alloc_flags;						\
+	(int)(0);							\
+})
 
 #endif /* __XFS_EXTENT_BUSY_H__ */
Signature · 1 line
2.54.0
Reviewed-by on v1 1/2
#2 lore raw

Re: [PATCH 1/2] xfs: fix two warnings in xfs_alloc.c

Quoted 1 line · Andrey Albershteyn

There's still two warnings in xfs_alloc due to unused alloc_flags var.

Looks good. At some point we should look into converting these stubs to inlines, but just as I didn't quite want to jump to that with my previous series I'm not going to force you here either.

#3 lore raw

PATCH 2/2 xfsprogs: add gcc generated stack usage files to gitignore

In reply to Andrey Albershteyn

These are generated by gcc due to recently added:

WARNINGS += -fstack-usage

---
 .gitignore | 1 +
 1 file changed, 1 insertion(+)
.gitignore +1 -0
index eb3decd108be..f5411ed52198 100644
@@ -9,6 +9,7 @@
 /include/platform_defs.h
 /include/builddefs
 /install-sh
+*.su
 
 # magic directory symlinks
 /include/disk
Signature · 1 line
2.54.0
Reviewed-by on v1 2/2
#4 lore raw

Re: [PATCH 2/2] xfsprogs: add gcc generated stack usage files to gitignore

Quoted 3 lines · Andrey Albershteyn

These are generated by gcc due to recently added:

WARNINGS += -fstack-usage

I don't actually see that added, and I also think we really should not add it by default.

That being said, having it in gitignore if someone wants to use it is perfectly fine, so:

with a slight tweak to the commit message.

#5 lore raw

Re: [PATCH 2/2] xfsprogs: add gcc generated stack usage files to gitignore

Quoted 7 lines · Christoph Hellwig
Quoted 3 lines · Andrey Albershteyn

These are generated by gcc due to recently added:

WARNINGS += -fstack-usage

I don't actually see that added, and I also think we really should not add it by default.

Yes it's not set yet, I meant to reference Darrick's patches with Warnings [1]. I thought your patchset is also a preparation for pulling those warnings. I can resend Darrick's patchset without stack-usage, I will look if all of those are necessary actually

1: https://lore.kernel.org/linux-xfs/20261015144610.GP2705364@frogsfrogsfrogs/

Quoted 6 lines

That being said, having it in gitignore if someone wants to use it is perfectly fine, so:

Thanks

Quoted 2 lines

with a slight tweak to the commit message.

Oh sorry, I already pulled that in for-next

Signature · 1 line
- Andrey
#6 lore raw

Re: [PATCH 2/2] xfsprogs: add gcc generated stack usage files to gitignore

Quoted 6 lines · Andrey Albershteyn
Quoted 5 lines · Christoph Hellwig
Quoted 3 lines · Andrey Albershteyn

These are generated by gcc due to recently added:

WARNINGS += -fstack-usage

Quoted 7 lines
Quoted 2 lines

I don't actually see that added, and I also think we really should not add it by default.

Yes it's not set yet, I meant to reference Darrick's patches with Warnings [1]. I thought your patchset is also a preparation for pulling those warnings. I can resend Darrick's patchset without stack-usage, I will look if all of those are necessary actually

I think a lot of them are over the top. A good first step would be to catch up with the kernel flags.

Reviewed-by on the v1 series
#7 lore raw
In reply to Andrey Albershteyn
Quoted 5 lines · Andrey Albershteyn

Hi folks,

One last fix for a warning to make it compile under gcc16 and all these new warnings enabled. And a gitignore update with stack usage files.

Quoted 7 lines

Andrey Albershteyn (2):
xfs: fix two warnings in xfs_alloc.c
xfsprogs: add gcc generated stack usage files to gitignore

 .gitignore                     | 1 +
 libxfs/stubs/xfs_extent_busy.h | 5 ++++-
 2 files changed, 5 insertions(+), 1 deletion(-)

For the series:

Quoted 5 lines
Signature · 2 lines
-- 
2.54.0