f2fs-tools: Build f2fs-tools with _FILE_OFFSET_BITS=64
PATCH 1/3 f2fs-tools: Build f2fs-tools with _FILE_OFFSET_BITS=64
From: "xiuhong.wang" <[email protected]>
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.
--- tools/f2fs_io/Android.bp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
tools/f2fs_io/Android.bp +2 -1
@@ -1,7 +1,8 @@ cc_defaults { name: "f2fs-io-defaults", cflags: [ - "-Wno-unused-function" + "-D_FILE_OFFSET_BITS=64", + "-Wno-unused-function", ], }
Signature · 8 lines
2.55.0.rc0.799.gd6f94ed593-goog _______________________________________________ Linux-f2fs-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
PATCH 2/3 f2fs_io: add include dir
From: Jaegeuk Kim <[email protected]>
--- tools/f2fs_io/Android.bp | 3 +++ 1 file changed, 3 insertions(+)
tools/f2fs_io/Android.bp +3 -0
@@ -4,6 +4,9 @@ cc_defaults { "-D_FILE_OFFSET_BITS=64", "-Wno-unused-function", ], + include_dirs: [ + "external/f2fs-tools/include/", + ], } cc_binary {
Signature · 8 lines
2.55.0.rc0.799.gd6f94ed593-goog _______________________________________________ Linux-f2fs-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
Re: [f2fs-dev] [PATCH 2/3] f2fs_io: add include dir
Quoted 3 lines · On 7/2/26 14:56, Jaegeuk Kim via Linux-f2fs-devel wrote:
From: Jaegeuk Kim <[email protected]>
Signed-off-by Jaegeuk Kim <[email protected]>
Thanks,
_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
PATCH 3/3 f2fs-tools: fix build failure on mac
In reply to Jaegeuk Kim via Linux-f2fs-develexternal/f2fs-tools/lib/libf2fs.c:1019:12: error: use of undeclared identifier 'BLKFLSBUF'
1019 | ioctl(fd, BLKFLSBUF);
| ^~~~~~~~~--- lib/libf2fs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
lib/libf2fs.c +2 -1
@@ -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);
Signature · 8 lines
2.55.0.rc0.799.gd6f94ed593-goog _______________________________________________ Linux-f2fs-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
Re: [f2fs-dev] [PATCH 3/3] f2fs-tools: fix build failure on mac
Quoted 6 lines · 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 <[email protected]>
Thanks,
_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
Quoted 6 lines · On 7/2/26 14:56, Jaegeuk Kim via Linux-f2fs-devel wrote:
From: "xiuhong.wang" <[email protected]>
After commit
b15b6cc56ac7("f2fs-tools: convert to lseek() and kill lseek64"), 32-bit Android should also be built with _FILE_OFFSET_BITS=64.
Quoted 8 lines
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 <[email protected]>Signed-off-by Zhiguo Niu <[email protected]>Signed-off-by Jaegeuk Kim <[email protected]>
Thanks,
_______________________________________________
Linux-f2fs-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel