summaryrefslogtreecommitdiffstats
path: root/package/utils/f2fs-tools
diff options
context:
space:
mode:
Diffstat (limited to 'package/utils/f2fs-tools')
-rw-r--r--package/utils/f2fs-tools/Makefile6
-rw-r--r--package/utils/f2fs-tools/patches/100-configure.ac-fix-AC_ARG_WITH.patch88
-rw-r--r--package/utils/f2fs-tools/patches/200-resize_f2fs-fix_wrong_ovp_calculation.patch46
3 files changed, 91 insertions, 49 deletions
diff --git a/package/utils/f2fs-tools/Makefile b/package/utils/f2fs-tools/Makefile
index 3c53f27d79..8f53516d34 100644
--- a/package/utils/f2fs-tools/Makefile
+++ b/package/utils/f2fs-tools/Makefile
@@ -8,12 +8,12 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=f2fs-tools
-PKG_VERSION:=1.14.0
-PKG_RELEASE:=3
+PKG_VERSION:=1.15.0
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git/snapshot/
-PKG_HASH:=619263d4e2022152a1472c1d912eaae104f20bd227ce0bb9d41d1d6608094bd1
+PKG_HASH:=147d471040b44900283ce2c935f1d35d13d7f40008e7cb8fab2b69f54da01a4f
PKG_MAINTAINER:=Felix Fietkau <nbd@nbd.name>
PKG_LICENSE:=GPL-2.0-only
diff --git a/package/utils/f2fs-tools/patches/100-configure.ac-fix-AC_ARG_WITH.patch b/package/utils/f2fs-tools/patches/100-configure.ac-fix-AC_ARG_WITH.patch
new file mode 100644
index 0000000000..a7fb50a63d
--- /dev/null
+++ b/package/utils/f2fs-tools/patches/100-configure.ac-fix-AC_ARG_WITH.patch
@@ -0,0 +1,88 @@
+From 9af8ee5baceab59d46154c96da62b52935f363fe Mon Sep 17 00:00:00 2001
+From: Nick Hainke <vincent@systemli.org>
+Date: Mon, 27 Jun 2022 20:43:11 +0200
+Subject: [PATCH] configure.ac: fix AC_ARG_WITH
+
+In the new version the configuration no longer respects the
+--without/--with blkid/selinux parameters. Add the tests for
+"with_blkid" and "with_selinux" back to configure.ac as described
+in the manual.
+
+Link: https://www.gnu.org/software/autoconf/manual/autoconf-2.60/html_node/External-Software.html
+
+Fixes: c48335416a09 ("configure.ac: Enable cross-compilation")
+
+Signed-off-by: Nick Hainke <vincent@systemli.org>
+---
+ configure.ac | 44 ++++++++++++++++++++++++++++++--------------
+ 1 file changed, 30 insertions(+), 14 deletions(-)
+
+--- a/configure.ac
++++ b/configure.ac
+@@ -39,12 +39,16 @@ AM_INIT_AUTOMAKE([-Wall -Werror foreign
+
+ # Test configure options.
+ AC_ARG_WITH([selinux],
+- AS_HELP_STRING([--without-selinux],
+- [Ignore presence of libselinux and disable selinux support]))
++ [AS_HELP_STRING([--without-selinux],
++ [Ignore presence of libselinux and disable selinux support])],
++ [],
++ [with_selinux=check])
+
+ AC_ARG_WITH([blkid],
+- AS_HELP_STRING([--without-blkid],
+- [Ignore presence of libblkid and disable blkid support]))
++ [AS_HELP_STRING([--without-blkid],
++ [Ignore presence of libblkid and disable blkid support])],
++ [],
++ [with_blkid=check])
+
+ # Checks for programs.
+ AC_PROG_CC
+@@ -55,11 +59,17 @@ AC_PATH_PROG([LDCONFIG], [ldconfig],
+ [$PATH:/sbin])
+
+ # Checks for libraries.
+-AC_CHECK_LIB([blkid], [blkid_probe_all],
+- [AC_SUBST([libblkid_LIBS], ["-lblkid"])
+- AC_DEFINE([HAVE_LIBBLKID], [1],
+- [Define if you have libblkid])
+- ], [], [])
++AS_IF([test "x$with_blkid" != xno],
++ [AC_CHECK_LIB([blkid], [blkid_probe_all],
++ [AC_SUBST([libblkid_LIBS], ["-lblkid"])
++ AC_DEFINE([HAVE_LIBBLKID], [1],
++ [Define if you have libblkid])
++ ],
++ [if test "x$with_blkid" != xcheck; then
++ AC_MSG_FAILURE(
++ [--with-blkid was given, but test for blkid failed])
++ fi
++ ], -lblkid)])
+
+ AC_CHECK_LIB([lzo2], [main],
+ [AC_SUBST([liblzo2_LIBS], ["-llzo2"])
+@@ -73,11 +83,17 @@ AC_CHECK_LIB([lz4], [main],
+ [Define if you have liblz4])
+ ], [], [])
+
+-AC_CHECK_LIB([selinux], [getcon],
+- [AC_SUBST([libselinux_LIBS], ["-lselinux"])
+- AC_DEFINE([HAVE_LIBSELINUX], [1],
+- [Define if you have libselinux])
+- ], [], [])
++AS_IF([test "x$with_selinux" != xno],
++ [AC_CHECK_LIB([selinux], [getcon],
++ [AC_SUBST([libselinux_LIBS], ["-lselinux"])
++ AC_DEFINE([HAVE_LIBSELINUX], [1],
++ [Define if you have libselinux])
++ ],
++ [if test "x$with_selinux" != xcheck; then
++ AC_MSG_FAILURE(
++ [--with-selinux was given, but test for selinux failed])
++ fi
++ ], -lselinux)])
+
+ AC_CHECK_LIB([uuid], [uuid_clear],
+ [AC_SUBST([libuuid_LIBS], ["-luuid"])
diff --git a/package/utils/f2fs-tools/patches/200-resize_f2fs-fix_wrong_ovp_calculation.patch b/package/utils/f2fs-tools/patches/200-resize_f2fs-fix_wrong_ovp_calculation.patch
deleted file mode 100644
index 0b433f76c4..0000000000
--- a/package/utils/f2fs-tools/patches/200-resize_f2fs-fix_wrong_ovp_calculation.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From f056fbeff08d30a6d9acdb9e06704461ceee3500 Mon Sep 17 00:00:00 2001
-From: Jaegeuk Kim <jaegeuk@kernel.org>
-Date: Thu, 1 Apr 2021 20:13:55 -0700
-Subject: resize.f2fs: fix wrong ovp calculation
-
-beroal reported a mount failure due to broken valid_user_blocks.
-[ 6890.647749] F2FS-fs (loop0): Wrong valid_user_blocks: 16040048,
-user_block_count: 10016768
-
-From fsck,
-
-segment_count_main [0x 9a95 : 39573]
--> 39573 * 2MB = 78GB as user space
-
-overprov_segment_count [0x 4e29 : 20009]
--> 20009 * 2MB = 40GB as overprovisioned space which user can't see.
-
-But,
-[FSCK] valid_block_count matching with CP [Ok..] [0xf4c070]
--> 0xf4c070 = 16040048
-
-valid_block_count [0x f4c070 : 16040048]
--> So, this is correct.
-
-It turns out resize.f2fs gave very large and wrong overprovisioning space
-result in shortage of user blocks. The root cause was f2fs_get_usable_segments()
-didn't consider resize case which needs segment_count_main from new superblock.
-
-Fixes: f8410857b7a8 ("f2fs-tools: zns zone-capacity support")
-Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
----
- lib/libf2fs_zoned.c | 3 +++
- 1 file changed, 3 insertions(+)
-
---- a/lib/libf2fs_zoned.c
-+++ b/lib/libf2fs_zoned.c
-@@ -495,6 +495,9 @@ uint32_t f2fs_get_usable_segments(struct
- int i, j;
- uint32_t usable_segs = 0, zone_segs;
-
-+ if (c.func == RESIZE)
-+ return get_sb(segment_count_main);
-+
- for (i = 0; i < c.ndevs; i++) {
- if (c.devices[i].zoned_model != F2FS_ZONED_HM) {
- usable_segs += c.devices[i].total_segments;