* [PATCHSET 1/2] xfsprogs: various bug fixes for 7.1
@ 2026-05-07 22:11 Darrick J. Wong
2026-05-07 22:11 ` [PATCH 1/3] platform_defs.h: fix __counted_by_ptr annotation Darrick J. Wong
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Darrick J. Wong @ 2026-05-07 22:11 UTC (permalink / raw)
To: aalbersh, djwong; +Cc: linux-xfs, linux-xfs
Hi all,
This series contains miscellaneous bugfixes.
If you're going to start using this code, I strongly recommend pulling
from my git trees, which are linked below.
With a bit of luck, this should all go splendidly.
Comments and questions are, as always, welcome.
--D
kernel git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfs-linux.git/log/?h=random-fixes
xfsprogs git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfsprogs-dev.git/log/?h=random-fixes
fstests git tree:
https://git.kernel.org/cgit/linux/kernel/git/djwong/xfstests-dev.git/log/?h=random-fixes
---
Commits in this patchset:
* platform_defs.h: fix __counted_by_ptr annotation
* xfs_scrub_all: remove dead code
* xfs_scrub: remove dead code
---
include/platform_defs.h | 2 ++
scrub/unicrash.c | 7 -------
scrub/xfs_scrub_all.py.in | 6 ------
3 files changed, 2 insertions(+), 13 deletions(-)
^ permalink raw reply [flat|nested] 7+ messages in thread* [PATCH 1/3] platform_defs.h: fix __counted_by_ptr annotation
2026-05-07 22:11 [PATCHSET 1/2] xfsprogs: various bug fixes for 7.1 Darrick J. Wong
@ 2026-05-07 22:11 ` Darrick J. Wong
2026-05-08 8:56 ` Christoph Hellwig
2026-05-07 22:11 ` [PATCH 2/3] xfs_scrub_all: remove dead code Darrick J. Wong
2026-05-07 22:11 ` [PATCH 3/3] xfs_scrub: " Darrick J. Wong
2 siblings, 1 reply; 7+ messages in thread
From: Darrick J. Wong @ 2026-05-07 22:11 UTC (permalink / raw)
To: aalbersh, djwong; +Cc: linux-xfs, linux-xfs
From: Darrick J. Wong <djwong@kernel.org>
The kernel userspace headers for Linux 7.0 provide the __counted_by_ptr
macro, so we shouldn't define it separately on those platforms:
In file included from radix-tree.c:11:
../include/platform_defs.h:334:9: error: "__counted_by_ptr" redefined [-Werror]
334 | #define __counted_by_ptr(member)
| ^~~~~~~~~~~~~~~~
In file included from /usr/include/linux/posix_types.h:5,
from /usr/include/linux/types.h:9,
from /usr/include/linux/sched/types.h:5,
from /usr/include/x86_64-linux-gnu/bits/sched.h:63,
from /usr/include/sched.h:43,
from /usr/include/pthread.h:22,
from ../include/platform_defs.h:19:
/usr/include/linux/stddef.h:73:9: note: this is the location of the previous definition
73 | #define __counted_by_ptr(m)
| ^~~~~~~~~~~~~~~~
Do the customary ifndef wrapper thing.
Cc: <linux-xfs@vger.kernel.org> # v7.0.0
Fixes: df91bc3bdc9b81 ("xfs: annotate struct xfs_attr_list_context with __counted_by_ptr")
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
include/platform_defs.h | 2 ++
1 file changed, 2 insertions(+)
diff --git a/include/platform_defs.h b/include/platform_defs.h
index 5a829db66e0899..5d1bfb1baf94db 100644
--- a/include/platform_defs.h
+++ b/include/platform_defs.h
@@ -331,6 +331,8 @@ struct kvec {
#endif
/* xfs_attr.h */
+#ifndef __counted_by_ptr
#define __counted_by_ptr(member)
+#endif
#endif /* __XFS_PLATFORM_DEFS_H__ */
^ permalink raw reply related [flat|nested] 7+ messages in thread* Re: [PATCH 1/3] platform_defs.h: fix __counted_by_ptr annotation
2026-05-07 22:11 ` [PATCH 1/3] platform_defs.h: fix __counted_by_ptr annotation Darrick J. Wong
@ 2026-05-08 8:56 ` Christoph Hellwig
0 siblings, 0 replies; 7+ messages in thread
From: Christoph Hellwig @ 2026-05-08 8:56 UTC (permalink / raw)
To: Darrick J. Wong; +Cc: aalbersh, linux-xfs
On Thu, May 07, 2026 at 03:11:27PM -0700, Darrick J. Wong wrote:
> diff --git a/include/platform_defs.h b/include/platform_defs.h
> index 5a829db66e0899..5d1bfb1baf94db 100644
> --- a/include/platform_defs.h
> +++ b/include/platform_defs.h
> @@ -331,6 +331,8 @@ struct kvec {
> #endif
>
> /* xfs_attr.h */
> +#ifndef __counted_by_ptr
> #define __counted_by_ptr(member)
> +#endif
As a fix this is obviously ok, but I wonder if we should provide
the full kernel version here that actually checks? Or just not
bother as sooner or later the kernel version will be in most
builds?
Also maybe add a comment that we'll pick this up from kernel
headers from 7.1 or newer?
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH 2/3] xfs_scrub_all: remove dead code
2026-05-07 22:11 [PATCHSET 1/2] xfsprogs: various bug fixes for 7.1 Darrick J. Wong
2026-05-07 22:11 ` [PATCH 1/3] platform_defs.h: fix __counted_by_ptr annotation Darrick J. Wong
@ 2026-05-07 22:11 ` Darrick J. Wong
2026-05-08 8:56 ` Christoph Hellwig
2026-05-07 22:11 ` [PATCH 3/3] xfs_scrub: " Darrick J. Wong
2 siblings, 1 reply; 7+ messages in thread
From: Darrick J. Wong @ 2026-05-07 22:11 UTC (permalink / raw)
To: aalbersh, djwong; +Cc: linux-xfs
From: Darrick J. Wong <djwong@kernel.org>
Remove the unused backtick() function.
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
scrub/xfs_scrub_all.py.in | 6 ------
1 file changed, 6 deletions(-)
diff --git a/scrub/xfs_scrub_all.py.in b/scrub/xfs_scrub_all.py.in
index dbb6c36e467d3f..3f618587de8b25 100644
--- a/scrub/xfs_scrub_all.py.in
+++ b/scrub/xfs_scrub_all.py.in
@@ -69,12 +69,6 @@ def find_mounts():
return fs
-def backtick(cmd):
- '''Generator function that yields lines of a program's stdout.'''
- p = subprocess.Popen(cmd, stdout = subprocess.PIPE)
- for line in TextIOWrapper(p.stdout, encoding="utf-8"):
- yield line.strip()
-
def remove_killfunc(killfuncs, fn):
'''Ensure fn is not in killfuncs.'''
try:
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH 3/3] xfs_scrub: remove dead code
2026-05-07 22:11 [PATCHSET 1/2] xfsprogs: various bug fixes for 7.1 Darrick J. Wong
2026-05-07 22:11 ` [PATCH 1/3] platform_defs.h: fix __counted_by_ptr annotation Darrick J. Wong
2026-05-07 22:11 ` [PATCH 2/3] xfs_scrub_all: remove dead code Darrick J. Wong
@ 2026-05-07 22:11 ` Darrick J. Wong
2026-05-08 8:56 ` Christoph Hellwig
2 siblings, 1 reply; 7+ messages in thread
From: Darrick J. Wong @ 2026-05-07 22:11 UTC (permalink / raw)
To: aalbersh, djwong; +Cc: linux-xfs
From: Darrick J. Wong <djwong@kernel.org>
Nothing uses @mask anymore, so remove it.
Signed-off-by: "Darrick J. Wong" <djwong@kernel.org>
---
scrub/unicrash.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/scrub/unicrash.c b/scrub/unicrash.c
index 87c0a8f0542fbb..1a845d3e84572a 100644
--- a/scrub/unicrash.c
+++ b/scrub/unicrash.c
@@ -499,7 +499,6 @@ name_entry_examine(
{
UCharIterator uiter;
UChar32 uchr;
- uint8_t mask = 0;
unsigned int ret = 0;
/* Don't allow the first codepoint to be a variation */
UBool was_variation = true;
@@ -524,12 +523,6 @@ name_entry_examine(
ret |= UNICRASH_CONTROL_CHAR;
switch (u_charDirection(uchr)) {
- case U_LEFT_TO_RIGHT:
- mask |= 0x01;
- break;
- case U_RIGHT_TO_LEFT:
- mask |= 0x02;
- break;
case U_RIGHT_TO_LEFT_OVERRIDE:
ret |= UNICRASH_BIDI_OVERRIDE;
break;
^ permalink raw reply related [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-05-08 8:56 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-07 22:11 [PATCHSET 1/2] xfsprogs: various bug fixes for 7.1 Darrick J. Wong
2026-05-07 22:11 ` [PATCH 1/3] platform_defs.h: fix __counted_by_ptr annotation Darrick J. Wong
2026-05-08 8:56 ` Christoph Hellwig
2026-05-07 22:11 ` [PATCH 2/3] xfs_scrub_all: remove dead code Darrick J. Wong
2026-05-08 8:56 ` Christoph Hellwig
2026-05-07 22:11 ` [PATCH 3/3] xfs_scrub: " Darrick J. Wong
2026-05-08 8:56 ` Christoph Hellwig
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox