Skip to contentSkip to conversation

btrfs-tools: upgrade 5.15.1 -> 5.16

PATCH New Wang Mingyu 1 participant 1 message Jan 19, 2022

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 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

---
 ...compat-add-local-definition-for-alig.patch | 46 +++++++++++++++++++
 ...ude-linux-const.h-to-fix-build-with-.patch | 42 -----------------
 ...fs-tools_5.15.1.bb => btrfs-tools_5.16.bb} |  4 +-
 3 files changed, 48 insertions(+), 44 deletions(-)
 create mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-btrfs-progs-kerncompat-add-local-definition-for-alig.patch
 delete mode 100644 meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-btrfs-tools-include-linux-const.h-to-fix-build-with-.patch
 rename meta/recipes-devtools/btrfs-tools/{btrfs-tools_5.15.1.bb => btrfs-tools_5.16.bb} (95%)
meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-btrfs-progs-kerncompat-add-local-definition-for-alig.patch new file +46 -0
new file mode 100644
index 0000000000..b0fe67922d
@@ -0,0 +1,46 @@
+From b0cfe12c4d4b8b4ef335cdf4ddefcbdcd1b70d58 Mon Sep 17 00:00:00 2001
+From: David Sterba <[email protected]>
+Date: Thu, 13 Jan 2022 14:47:08 +0100
+Subject: [PATCH] btrfs-progs: kerncompat: add local definition for alignment
+ macros
+
+There's still problem left with compilation on musl and kernel < 5.11,
+because __ALIGN_KERNEL is not defined anymore:
+
+../bin/ld: kernel-shared/volumes.o: in function `create_chunk':
+volumes.c:(.text+0x17f8): undefined reference to `__ALIGN_KERNEL'
+
+Due to the entangled includes and unconditional definition of
+__ALIGN_KERNEL, we can't use #ifdef in kerncompat.h to define it
+eventually (as kerncompat.h is the first include). Instead add local
+definitions of the macros and rename them to avoid name clashes.
+
+Pull-request: #433
+
+Upstream-Status: Backport [https://github.com/kdave/btrfs-progs/commit/b0cfe12c4d4b8b4ef335cdf4ddefcbdcd1b70d58]
+
+Signed-off-by: Wang Mingyu <[email protected]>
+---
+ kerncompat.h | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/kerncompat.h b/kerncompat.h
+index 6ca1526e2..f0a6e196e 100644
+--- a/kerncompat.h
++++ b/kerncompat.h
+@@ -359,7 +359,14 @@ do {					\
+ 
+ /* Alignment check */
+ #define IS_ALIGNED(x, a)                (((x) & ((typeof(x))(a) - 1)) == 0)
+-#define ALIGN(x, a)		__ALIGN_KERNEL((x), (a))
++
++/*
++ * Alignment, copied and renamed from /usr/include/linux/const.h to work around
++ * issues caused by moving the definition in 5.12
++ */
++#define __ALIGN_KERNEL__(x, a)		__ALIGN_KERNEL_MASK__(x, (typeof(x))(a) - 1)
++#define __ALIGN_KERNEL_MASK__(x, mask)	(((x) + (mask)) & ~(mask))
++#define ALIGN(x, a)		__ALIGN_KERNEL__((x), (a))
+ 
+ static inline int is_power_of_2(unsigned long n)
+ {
meta/recipes-devtools/btrfs-tools/btrfs-tools/0001-btrfs-tools-include-linux-const.h-to-fix-build-with-.patch deleted +0 -42

42 lines not on this page · raw message

meta/recipes-devtools/btrfs-tools/btrfs-tools_5.16.bb renamed from meta/recipes-devtools/btrfs-tools/btrfs-tools_5.15.1.bb +2 -2
similarity index 95%
rename from meta/recipes-devtools/btrfs-tools/btrfs-tools_5.15.1.bb
rename to meta/recipes-devtools/btrfs-tools/btrfs-tools_5.16.bb
index 3cf216724e..fa7abcf2ba 100644
@@ -17,9 +17,9 @@ DEPENDS = "lzo util-linux zlib"
 
 SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git;branch=master \
            file://0001-Add-a-possibility-to-specify-where-python-modules-ar.patch \
-           file://0001-btrfs-tools-include-linux-const.h-to-fix-build-with-.patch \
+           file://0001-btrfs-progs-kerncompat-add-local-definition-for-alig.patch \
            "
-SRCREV = "c0ad9bde429196db7e8710ea1abfab7a2bca2e43"
+SRCREV = "8ad326b2f28c044cb6ed9016d7c3285e23b673c8"
 S = "${WORKDIR}/git"
 
 PACKAGECONFIG ??= " \
Signature · 1 line
2.25.1