From: Khem Raj <raj.khem@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: Khem Raj <raj.khem@gmail.com>
Subject: [PATCH 4/6] e2fsprogs: Do not use 64bit functions for largefile support
Date: Thu, 1 Dec 2022 11:02:46 -0800 [thread overview]
Message-ID: <20221201190248.175753-4-raj.khem@gmail.com> (raw)
In-Reply-To: <20221201190248.175753-1-raj.khem@gmail.com>
Using -D_FILE_OFFSET_BITS=64 already makes the normal function behave
like 64bit variants. Moreover it makes them portable across libc
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
...-to-enable-disable-largefile-support.patch | 57 +++++++++++++++++++
.../e2fsprogs/e2fsprogs_1.46.5.bb | 3 +-
2 files changed, 59 insertions(+), 1 deletion(-)
create mode 100644 meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-Add-option-to-enable-disable-largefile-support.patch
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-Add-option-to-enable-disable-largefile-support.patch b/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-Add-option-to-enable-disable-largefile-support.patch
new file mode 100644
index 0000000000..1a00fa844c
--- /dev/null
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs/0001-Add-option-to-enable-disable-largefile-support.patch
@@ -0,0 +1,57 @@
+From 6fab3346d448298a24cee1faeb5fc8507a3b9712 Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Thu, 10 Nov 2022 20:34:54 -0800
+Subject: [PATCH] Add option to enable/disable largefile support
+
+fallocate can be used to have 64bit off_t provided its compiled with
+_FILE_OFFSET_BITS=64 which will be added automatically when
+--enable-largefile is used.
+
+Upstream-Status: Pending
+Signed-off-by: Khem Raj <raj.khem@gmail.com>
+---
+ configure.ac | 3 +++
+ misc/e4defrag.c | 6 +-----
+ 2 files changed, 4 insertions(+), 5 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index dff3d1ca..ec1c5b64 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1800,6 +1800,9 @@ OS_IO_FILE=""
+ ;;
+ esac]
+ AC_SUBST(OS_IO_FILE)
++
++AC_SYS_LARGEFILE
++
+ dnl
+ dnl Make our output files, being sure that we create the some miscellaneous
+ dnl directories
+diff --git a/misc/e4defrag.c b/misc/e4defrag.c
+index 86e97ee3..e7175c37 100644
+--- a/misc/e4defrag.c
++++ b/misc/e4defrag.c
+@@ -195,10 +195,6 @@ static struct frag_statistic_ino frag_rank[SHOW_FRAG_FILES];
+ #error posix_fadvise not available!
+ #endif
+
+-#ifndef HAVE_FALLOCATE64
+-#error fallocate64 not available!
+-#endif /* ! HAVE_FALLOCATE64 */
+-
+ /*
+ * get_mount_point() - Get device's mount point.
+ *
+@@ -1568,7 +1564,7 @@ static int file_defrag(const char *file, const struct stat64 *buf,
+ /* Allocate space for donor inode */
+ orig_group_tmp = orig_group_head;
+ do {
+- ret = fallocate64(donor_fd, 0,
++ ret = fallocate(donor_fd, 0,
+ (ext2_loff_t)orig_group_tmp->start->data.logical * block_size,
+ (ext2_loff_t)orig_group_tmp->len * block_size);
+ if (ret < 0) {
+--
+2.38.1
+
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.46.5.bb b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.46.5.bb
index 5b2d1921f0..a251f126ae 100644
--- a/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.46.5.bb
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs_1.46.5.bb
@@ -5,6 +5,7 @@ SRC_URI += "file://remove.ldconfig.call.patch \
file://ptest.patch \
file://mkdir_p.patch \
file://extents.patch \
+ file://0001-Add-option-to-enable-disable-largefile-support.patch \
"
SRC_URI:append:class-native = " \
file://e2fsprogs-fix-missing-check-for-permission-denied.patch \
@@ -17,7 +18,7 @@ UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+\.\d+(\.\d+)*)$"
EXTRA_OECONF += "--libdir=${base_libdir} --sbindir=${base_sbindir} \
--enable-elf-shlibs --disable-libuuid --disable-uuidd \
--disable-libblkid --enable-verbose-makecmds \
- --with-crond-dir=no"
+ --enable-largefile --with-crond-dir=no"
EXTRA_OECONF:darwin = "--libdir=${base_libdir} --sbindir=${base_sbindir} --enable-bsd-shlibs"
--
2.38.1
next prev parent reply other threads:[~2022-12-01 19:02 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-12-01 19:02 [PATCH 1/6] mdadm: Use _FILE_OFFSET_BITS to use largefile support Khem Raj
2022-12-01 19:02 ` [PATCH 2/6] acl: Enable largefile support by default Khem Raj
2022-12-06 15:27 ` [OE-core] " Richard Purdie
2022-12-01 19:02 ` [PATCH 3/6] btrfs-tools: Do not use 64bit functions for largefile support Khem Raj
2022-12-01 19:07 ` [OE-core] " Alexander Kanavin
[not found] ` <172CC0ECD8B86688.27320@lists.openembedded.org>
2022-12-06 14:58 ` Alexander Kanavin
2022-12-06 15:29 ` Richard Purdie
2022-12-06 16:09 ` Alexander Kanavin
2022-12-01 19:02 ` Khem Raj [this message]
2022-12-01 19:02 ` [PATCH 5/6] libpciaccess: " Khem Raj
2022-12-01 19:02 ` [PATCH 6/6] pseudo: Disable LFS on 32bit arches Khem Raj
2022-12-01 19:12 ` [OE-core] " Richard Purdie
2022-12-01 23:05 ` Alexandre Belloni
2022-12-01 23:07 ` Khem Raj
2022-12-01 23:20 ` Richard Purdie
2022-12-01 23:22 ` Khem Raj
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221201190248.175753-4-raj.khem@gmail.com \
--to=raj.khem@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.