diff options
author | wangmy <wangmy@fujitsu.com> | 2022-01-19 09:07:09 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-01-20 11:57:29 +0000 |
commit | 18e35543012e0285a1193e4d566cb56dc9975be4 (patch) | |
tree | 190580e4b7c081a027bac07dc66ee03b8c3c6592 /meta/recipes-devtools/btrfs-tools | |
parent | b129c716fc587b250cc441b8de67db2d2ec96236 (diff) | |
download | poky-18e35543012e0285a1193e4d566cb56dc9975be4.tar.gz |
btrfs-tools: upgrade 5.15.1 -> 5.16
0001-btrfs-tools-include-linux-const.h-to-fix-build-with-.patch
removed since it is included in 5.16
Add 0001-btrfs-progs-kerncompat-add-local-definition-for-alig.patch
to fix "undefined reference to `__ALIGN_KERNEL'".
Changelog:
=========
- rescue: new subcommand clear-uuid-tree to fix failed mount due to bad uuid
subvolume keys, caught by tree-checker
- fi du: skip inaccessible files
- prop: properly resolve to symlink targets
- send, receive: fix crash after parent subvolume lookup errors
- build:
fix build on 5.12+ kernels due to changes in linux/kernel.h
fix build on musl with old kernel headers
- other:
error handling fixes, cleanups, refactoring
extent tree v2 preparatory work
lots of RST documentation updates (last release with asciidoc sources),
https://btrfs.readthedocs.io
(From OE-Core rev: 420191dc951f04b36645ffae2d946b50150feab0)
Signed-off-by: Wang Mingyu <wangmy@fujitsu.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/btrfs-tools')
-rw-r--r-- | meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-btrfs-progs-kerncompat-add-local-definition-for-alig.patch | 46 | ||||
-rw-r--r-- | meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-btrfs-tools-include-linux-const.h-to-fix-build-with-.patch | 42 | ||||
-rw-r--r-- | meta/recipes-devtools/btrfs-tools/btrfs-tools_5.16.bb (renamed from meta/recipes-devtools/btrfs-tools/btrfs-tools_5.15.1.bb) | 4 |
3 files changed, 48 insertions, 44 deletions
diff --git a/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-btrfs-progs-kerncompat-add-local-definition-for-alig.patch b/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-btrfs-progs-kerncompat-add-local-definition-for-alig.patch new file mode 100644 index 0000000000..b0fe67922d --- /dev/null +++ b/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-btrfs-progs-kerncompat-add-local-definition-for-alig.patch | |||
@@ -0,0 +1,46 @@ | |||
1 | From b0cfe12c4d4b8b4ef335cdf4ddefcbdcd1b70d58 Mon Sep 17 00:00:00 2001 | ||
2 | From: David Sterba <dsterba@suse.com> | ||
3 | Date: Thu, 13 Jan 2022 14:47:08 +0100 | ||
4 | Subject: [PATCH] btrfs-progs: kerncompat: add local definition for alignment | ||
5 | macros | ||
6 | |||
7 | There's still problem left with compilation on musl and kernel < 5.11, | ||
8 | because __ALIGN_KERNEL is not defined anymore: | ||
9 | |||
10 | ../bin/ld: kernel-shared/volumes.o: in function `create_chunk': | ||
11 | volumes.c:(.text+0x17f8): undefined reference to `__ALIGN_KERNEL' | ||
12 | |||
13 | Due to the entangled includes and unconditional definition of | ||
14 | __ALIGN_KERNEL, we can't use #ifdef in kerncompat.h to define it | ||
15 | eventually (as kerncompat.h is the first include). Instead add local | ||
16 | definitions of the macros and rename them to avoid name clashes. | ||
17 | |||
18 | Pull-request: #433 | ||
19 | |||
20 | Upstream-Status: Backport [https://github.com/kdave/btrfs-progs/commit/b0cfe12c4d4b8b4ef335cdf4ddefcbdcd1b70d58] | ||
21 | |||
22 | Signed-off-by: Wang Mingyu <wangmy@fujitsu.com> | ||
23 | --- | ||
24 | kerncompat.h | 9 ++++++++- | ||
25 | 1 file changed, 8 insertions(+), 1 deletion(-) | ||
26 | |||
27 | diff --git a/kerncompat.h b/kerncompat.h | ||
28 | index 6ca1526e2..f0a6e196e 100644 | ||
29 | --- a/kerncompat.h | ||
30 | +++ b/kerncompat.h | ||
31 | @@ -359,7 +359,14 @@ do { \ | ||
32 | |||
33 | /* Alignment check */ | ||
34 | #define IS_ALIGNED(x, a) (((x) & ((typeof(x))(a) - 1)) == 0) | ||
35 | -#define ALIGN(x, a) __ALIGN_KERNEL((x), (a)) | ||
36 | + | ||
37 | +/* | ||
38 | + * Alignment, copied and renamed from /usr/include/linux/const.h to work around | ||
39 | + * issues caused by moving the definition in 5.12 | ||
40 | + */ | ||
41 | +#define __ALIGN_KERNEL__(x, a) __ALIGN_KERNEL_MASK__(x, (typeof(x))(a) - 1) | ||
42 | +#define __ALIGN_KERNEL_MASK__(x, mask) (((x) + (mask)) & ~(mask)) | ||
43 | +#define ALIGN(x, a) __ALIGN_KERNEL__((x), (a)) | ||
44 | |||
45 | static inline int is_power_of_2(unsigned long n) | ||
46 | { | ||
diff --git a/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-btrfs-tools-include-linux-const.h-to-fix-build-with-.patch b/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-btrfs-tools-include-linux-const.h-to-fix-build-with-.patch deleted file mode 100644 index be942388a5..0000000000 --- a/meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-btrfs-tools-include-linux-const.h-to-fix-build-with-.patch +++ /dev/null | |||
@@ -1,42 +0,0 @@ | |||
1 | From 3d19b0fb882c5e195362a9f0909c474e60070ca0 Mon Sep 17 00:00:00 2001 | ||
2 | From: Bruce Ashfield <bruce.ashfield@gmail.com> | ||
3 | Date: Fri, 18 Jun 2021 11:10:36 -0400 | ||
4 | Subject: [PATCH] btrfs-progs: include linux/const.h to fix build with 5.12+ | ||
5 | headers | ||
6 | |||
7 | btrfs-tools compile fails with mips, musl and 5.12+ headers. | ||
8 | |||
9 | The definition of __ALIGN_KERNEL has moved in 5.12+ kernels, so we | ||
10 | add an explicit include of const.h to pickup the macro: | ||
11 | |||
12 | | make: *** [Makefile:595: mkfs.btrfs] Error 1 | ||
13 | | make: *** Waiting for unfinished jobs.... | ||
14 | | libbtrfs.a(volumes.o): in function `dev_extent_search_start': | ||
15 | | /usr/src/debug/btrfs-tools/5.12.1-r0/git/kernel-shared/volumes.c:464: undefined reference to `__ALIGN_KERNEL' | ||
16 | | collect2: error: ld returned 1 exit status | ||
17 | |||
18 | This is safe for older kernel's as well, since the header still | ||
19 | exists, and is valid to include. | ||
20 | |||
21 | Upstream-Status: Inappropriate [mips64 + musl + libc-headers] | ||
22 | |||
23 | Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> | ||
24 | --- | ||
25 | kerncompat.h | 1 + | ||
26 | 1 file changed, 1 insertion(+) | ||
27 | |||
28 | diff --git a/kerncompat.h b/kerncompat.h | ||
29 | index df167fe6..254235bd 100644 | ||
30 | --- a/kerncompat.h | ||
31 | +++ b/kerncompat.h | ||
32 | @@ -30,6 +30,7 @@ | ||
33 | #include <linux/types.h> | ||
34 | #include <linux/kernel.h> | ||
35 | #include <stdint.h> | ||
36 | +#include <linux/const.h> | ||
37 | |||
38 | #include <features.h> | ||
39 | |||
40 | -- | ||
41 | 2.25.1 | ||
42 | |||
diff --git a/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.15.1.bb b/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.16.bb index 3cf216724e..fa7abcf2ba 100644 --- a/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.15.1.bb +++ b/meta/recipes-devtools/btrfs-tools/btrfs-tools_5.16.bb | |||
@@ -17,9 +17,9 @@ DEPENDS = "lzo util-linux zlib" | |||
17 | 17 | ||
18 | SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git;branch=master \ | 18 | SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git;branch=master \ |
19 | file://0001-Add-a-possibility-to-specify-where-python-modules-ar.patch \ | 19 | file://0001-Add-a-possibility-to-specify-where-python-modules-ar.patch \ |
20 | file://0001-btrfs-tools-include-linux-const.h-to-fix-build-with-.patch \ | 20 | file://0001-btrfs-progs-kerncompat-add-local-definition-for-alig.patch \ |
21 | " | 21 | " |
22 | SRCREV = "c0ad9bde429196db7e8710ea1abfab7a2bca2e43" | 22 | SRCREV = "8ad326b2f28c044cb6ed9016d7c3285e23b673c8" |
23 | S = "${WORKDIR}/git" | 23 | S = "${WORKDIR}/git" |
24 | 24 | ||
25 | PACKAGECONFIG ??= " \ | 25 | PACKAGECONFIG ??= " \ |