All of lore.kernel.org
 help / color / mirror / Atom feed
* [f2fs-dev] [PATCH 1/3] f2fs-tools: Build f2fs-tools with _FILE_OFFSET_BITS=64
@ 2026-07-02  6:56 Jaegeuk Kim via Linux-f2fs-devel
  2026-07-02  6:56 ` [f2fs-dev] [PATCH 2/3] f2fs_io: add include dir Jaegeuk Kim via Linux-f2fs-devel
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Jaegeuk Kim via Linux-f2fs-devel @ 2026-07-02  6:56 UTC (permalink / raw)
  To: linux-f2fs-devel; +Cc: xiuhong.wang, Jaegeuk Kim, Zhiguo Niu

From: "xiuhong.wang" <xiuhong.wang@unisoc.com>

After commit b15b6cc56ac7("f2fs-tools: convert to lseek() and kill
lseek64"), 32-bit Android should also be built with
_FILE_OFFSET_BITS=64.

When calling the lseek function on arm32, if the offset exceeds 32
bits, lseek fails. Therefore, the flag _FILE_OFFSET_BITS=64 is
added to support operations with offsets greater than 32 bits on
arm32.

Signed-off-by: Xiuhong Wang <xiuhong.wang@unisoc.com>
Signed-off-by: Zhiguo Niu <zhiguo.niu@unisoc.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
 tools/f2fs_io/Android.bp | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tools/f2fs_io/Android.bp b/tools/f2fs_io/Android.bp
index 2cc81eb859d4..52cdb73f41d6 100644
--- a/tools/f2fs_io/Android.bp
+++ b/tools/f2fs_io/Android.bp
@@ -1,7 +1,8 @@
 cc_defaults {
     name: "f2fs-io-defaults",
     cflags: [
-        "-Wno-unused-function"
+        "-D_FILE_OFFSET_BITS=64",
+        "-Wno-unused-function",
     ],
 }
 
-- 
2.55.0.rc0.799.gd6f94ed593-goog



_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [f2fs-dev] [PATCH 2/3] f2fs_io: add include dir
  2026-07-02  6:56 [f2fs-dev] [PATCH 1/3] f2fs-tools: Build f2fs-tools with _FILE_OFFSET_BITS=64 Jaegeuk Kim via Linux-f2fs-devel
@ 2026-07-02  6:56 ` Jaegeuk Kim via Linux-f2fs-devel
  2026-07-02  7:31   ` Chao Yu via Linux-f2fs-devel
  2026-07-02  6:56 ` [f2fs-dev] [PATCH 3/3] f2fs-tools: fix build failure on mac Jaegeuk Kim via Linux-f2fs-devel
  2026-07-02  7:31 ` [f2fs-dev] [PATCH 1/3] f2fs-tools: Build f2fs-tools with _FILE_OFFSET_BITS=64 Chao Yu via Linux-f2fs-devel
  2 siblings, 1 reply; 6+ messages in thread
From: Jaegeuk Kim via Linux-f2fs-devel @ 2026-07-02  6:56 UTC (permalink / raw)
  To: linux-f2fs-devel; +Cc: Jaegeuk Kim

From: Jaegeuk Kim <jaegeuk@google.com>

Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>
---
 tools/f2fs_io/Android.bp | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tools/f2fs_io/Android.bp b/tools/f2fs_io/Android.bp
index 52cdb73f41d6..d507c63c4fd6 100644
--- a/tools/f2fs_io/Android.bp
+++ b/tools/f2fs_io/Android.bp
@@ -4,6 +4,9 @@ cc_defaults {
         "-D_FILE_OFFSET_BITS=64",
         "-Wno-unused-function",
     ],
+    include_dirs: [
+       "external/f2fs-tools/include/",
+    ],
 }
 
 cc_binary {
-- 
2.55.0.rc0.799.gd6f94ed593-goog



_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [f2fs-dev] [PATCH 3/3] f2fs-tools: fix build failure on mac
  2026-07-02  6:56 [f2fs-dev] [PATCH 1/3] f2fs-tools: Build f2fs-tools with _FILE_OFFSET_BITS=64 Jaegeuk Kim via Linux-f2fs-devel
  2026-07-02  6:56 ` [f2fs-dev] [PATCH 2/3] f2fs_io: add include dir Jaegeuk Kim via Linux-f2fs-devel
@ 2026-07-02  6:56 ` Jaegeuk Kim via Linux-f2fs-devel
  2026-07-02  7:31   ` Chao Yu via Linux-f2fs-devel
  2026-07-02  7:31 ` [f2fs-dev] [PATCH 1/3] f2fs-tools: Build f2fs-tools with _FILE_OFFSET_BITS=64 Chao Yu via Linux-f2fs-devel
  2 siblings, 1 reply; 6+ messages in thread
From: Jaegeuk Kim via Linux-f2fs-devel @ 2026-07-02  6:56 UTC (permalink / raw)
  To: linux-f2fs-devel; +Cc: Jaegeuk Kim

external/f2fs-tools/lib/libf2fs.c:1019:12: error: use of undeclared identifier 'BLKFLSBUF'
 1019 |         ioctl(fd, BLKFLSBUF);
      |                   ^~~~~~~~~

Fixes: c188a3e303d9 ("f2fs-tools: invalidate block device page cache before reading metadata")
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
 lib/libf2fs.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/libf2fs.c b/lib/libf2fs.c
index 7f8b643d117d..93f36ca6a30c 100644
--- a/lib/libf2fs.c
+++ b/lib/libf2fs.c
@@ -1016,8 +1016,9 @@ int get_device_info(int i)
 	}
 
 	dev->fd = fd;
+#ifdef BLKFLSBUF
 	ioctl(fd, BLKFLSBUF);
-
+#endif
 	if (c.sparse_mode && i == 0) {
 		if (f2fs_init_sparse_file()) {
 			free(stat_buf);
-- 
2.55.0.rc0.799.gd6f94ed593-goog



_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [f2fs-dev] [PATCH 1/3] f2fs-tools: Build f2fs-tools with _FILE_OFFSET_BITS=64
  2026-07-02  6:56 [f2fs-dev] [PATCH 1/3] f2fs-tools: Build f2fs-tools with _FILE_OFFSET_BITS=64 Jaegeuk Kim via Linux-f2fs-devel
  2026-07-02  6:56 ` [f2fs-dev] [PATCH 2/3] f2fs_io: add include dir Jaegeuk Kim via Linux-f2fs-devel
  2026-07-02  6:56 ` [f2fs-dev] [PATCH 3/3] f2fs-tools: fix build failure on mac Jaegeuk Kim via Linux-f2fs-devel
@ 2026-07-02  7:31 ` Chao Yu via Linux-f2fs-devel
  2 siblings, 0 replies; 6+ messages in thread
From: Chao Yu via Linux-f2fs-devel @ 2026-07-02  7:31 UTC (permalink / raw)
  To: Jaegeuk Kim, linux-f2fs-devel; +Cc: xiuhong.wang, Zhiguo Niu

On 7/2/26 14:56, Jaegeuk Kim via Linux-f2fs-devel wrote:
> From: "xiuhong.wang" <xiuhong.wang@unisoc.com>
> 
> After commit b15b6cc56ac7("f2fs-tools: convert to lseek() and kill
> lseek64"), 32-bit Android should also be built with
> _FILE_OFFSET_BITS=64.
> 
> When calling the lseek function on arm32, if the offset exceeds 32
> bits, lseek fails. Therefore, the flag _FILE_OFFSET_BITS=64 is
> added to support operations with offsets greater than 32 bits on
> arm32.
> 
> Signed-off-by: Xiuhong Wang <xiuhong.wang@unisoc.com>
> Signed-off-by: Zhiguo Niu <zhiguo.niu@unisoc.com>
> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>

Reviewed-by: Chao Yu <chao@kernel.org>

Thanks,


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [f2fs-dev] [PATCH 2/3] f2fs_io: add include dir
  2026-07-02  6:56 ` [f2fs-dev] [PATCH 2/3] f2fs_io: add include dir Jaegeuk Kim via Linux-f2fs-devel
@ 2026-07-02  7:31   ` Chao Yu via Linux-f2fs-devel
  0 siblings, 0 replies; 6+ messages in thread
From: Chao Yu via Linux-f2fs-devel @ 2026-07-02  7:31 UTC (permalink / raw)
  To: Jaegeuk Kim, linux-f2fs-devel; +Cc: Jaegeuk Kim

On 7/2/26 14:56, Jaegeuk Kim via Linux-f2fs-devel wrote:
> From: Jaegeuk Kim <jaegeuk@google.com>
> 
> Signed-off-by: Jaegeuk Kim <jaegeuk@google.com>

Reviewed-by: Chao Yu <chao@kernel.org>

Thanks,


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [f2fs-dev] [PATCH 3/3] f2fs-tools: fix build failure on mac
  2026-07-02  6:56 ` [f2fs-dev] [PATCH 3/3] f2fs-tools: fix build failure on mac Jaegeuk Kim via Linux-f2fs-devel
@ 2026-07-02  7:31   ` Chao Yu via Linux-f2fs-devel
  0 siblings, 0 replies; 6+ messages in thread
From: Chao Yu via Linux-f2fs-devel @ 2026-07-02  7:31 UTC (permalink / raw)
  To: Jaegeuk Kim, linux-f2fs-devel

On 7/2/26 14:56, Jaegeuk Kim via Linux-f2fs-devel wrote:
> external/f2fs-tools/lib/libf2fs.c:1019:12: error: use of undeclared identifier 'BLKFLSBUF'
>   1019 |         ioctl(fd, BLKFLSBUF);
>        |                   ^~~~~~~~~
> 
> Fixes: c188a3e303d9 ("f2fs-tools: invalidate block device page cache before reading metadata")
> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>

Reviewed-by: Chao Yu <chao@kernel.org>

Thanks,


_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2026-07-02  7:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-02  6:56 [f2fs-dev] [PATCH 1/3] f2fs-tools: Build f2fs-tools with _FILE_OFFSET_BITS=64 Jaegeuk Kim via Linux-f2fs-devel
2026-07-02  6:56 ` [f2fs-dev] [PATCH 2/3] f2fs_io: add include dir Jaegeuk Kim via Linux-f2fs-devel
2026-07-02  7:31   ` Chao Yu via Linux-f2fs-devel
2026-07-02  6:56 ` [f2fs-dev] [PATCH 3/3] f2fs-tools: fix build failure on mac Jaegeuk Kim via Linux-f2fs-devel
2026-07-02  7:31   ` Chao Yu via Linux-f2fs-devel
2026-07-02  7:31 ` [f2fs-dev] [PATCH 1/3] f2fs-tools: Build f2fs-tools with _FILE_OFFSET_BITS=64 Chao Yu via Linux-f2fs-devel

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.