On 8/11/25 3:52 AM, Christoph Hellwig wrote:
On Thu, Aug 07, 2025 at 11:48:38AM +0800, Chao Yu wrote:
This patch introduces a new sysfs entry /sys/fs/f2fs//flush_policy
in order to tune performance of f2fs data flush flow.
For example, checkpoint will use REQ_FUA to persist CP metadata, however
On 9/10/24 8:01 AM, Kanchan Joshi wrote:
diff --git a/include/linux/rw_hint.h b/include/linux/rw_hint.h
index b9942f5f13d3..ff708a75e2f6 100644
--- a/include/linux/rw_hint.h
+++ b/include/linux/rw_hint.h
@@ -21,4 +21,17 @@ enum rw_lifetime_hint {
static_assert(sizeof(enum rw_lifetime_hint) == 1
On 9/12/24 8:50 AM, Kanchan Joshi wrote:
Wherever hint is being used in generic way, u8 data type is being used.
Has it been considered to introduce a new union and to use that as the
type of 'hint' instead of 'u8'?
Thanks,
Bart.
___
Linux-f2fs-de
On 8/26/24 1:06 PM, Kanchan Joshi wrote:
/* Block storage write lifetime hint values. */
-enum rw_hint {
+enum rw_life_hint {
The name "rw_life_hint" seems confusing to me. I think that the
name "rw_lifetime_hint" would be a better name.
Thanks,
Bart.
On 8/26/24 10:06 AM, Kanchan Joshi wrote:
Change i_write_hint (in inode), bi_write_hint (in bio) and write_hint
(in request) to use u8 data-type rather than this enum.
That sounds fishy to me. Why to increase the size of this enum? Why to
reduce the ability of the compiler to perform type check
On 2/29/24 23:49, Yi Zhang wrote:
Bisect shows it was introduced with the below commit:
commit dbf8e63f48af48f3f0a069fc971c9826312dbfc1
Author: Eunhee Rho
Date: Mon Aug 1 13:40:02 2022 +0900
f2fs: remove device type check for direct IO
(+Eunhee)
Thank you Yi for having bisected this
On 7/4/23 09:14, Matthew Wilcox wrote:
On Tue, Jul 04, 2023 at 07:06:26AM -0700, Bart Van Assche wrote:
On 7/4/23 05:21, Jan Kara wrote:
+struct bdev_handle {
+ struct block_device *bdev;
+ void *holder;
+};
Please explain in the patch description why a holder pointer is
On 7/4/23 05:21, Jan Kara wrote:
+struct bdev_handle {
+ struct block_device *bdev;
+ void *holder;
+};
Please explain in the patch description why a holder pointer is
introduced in struct bdev_handle and how it relates to the bd_holder
pointer in struct block_device. Is one of th
Make the argument list match the format string. Use PRIu64 for uint64_t
and %zu for size_t.
Signed-off-by: Bart Van Assche
---
fsck/sload.c | 2 +-
lib/libf2fs.c | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/fsck/sload.c b/fsck/sload.c
index 00c3403dace0
On 8/24/22 13:34, Jaegeuk Kim wrote:
Could you please check this branch?
https://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs-tools.git/log/?h=dev
That branch looks good to me.
Thanks,
Bart.
___
Linux-f2fs-devel mailing list
Linux-f2fs-d
On 6/23/22 11:12, Bart Van Assche wrote:
This patch series fixes one issue reported by Peter Collingbourne and a few
issues I discovered by reading the zoned block device source code. Please
consider these patches for inclusion in the official f2fs-tools repository.
Hi Jaegeuk,
Please let me
Change the type of the third argument of f2fs_report_zone() from void *
into struct blk_zone * to enable type checking.
Signed-off-by: Bart Van Assche
---
include/f2fs_fs.h | 4 +++-
lib/libf2fs_zoned.c | 24 +++-
2 files changed, 18 insertions(+), 10 deletions(-)
diff
Fix the struct f2fs_dentry_block definition on systems for which
PAGE_SIZE != 4096. This patch does not change the struct f2fs_dentry_block
definition if PAGE_SIZE == 4096.
Cc: Peter Collingbourne
Reported-by: Peter Collingbourne
Signed-off-by: Bart Van Assche
---
include/f2fs_fs.h | 4
Use F2FS_BLKSIZE instead of PAGE_SIZE for dev_read_block() buffers since
dev_read_block() reads F2FS_BLKSIZE bytes.
Signed-off-by: Bart Van Assche
---
fsck/mount.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/fsck/mount.c b/fsck/mount.c
index 108e1238493d
Hi Jaegeuk,
This patch series fixes one issue reported by Peter Collingbourne and a few
issues I discovered by reading the zoned block device source code. Please
consider these patches for inclusion in the official f2fs-tools repository.
Thanks,
Bart.
Bart Van Assche (5):
Fix the struct
reading the source code.
Cc: Shin'ichiro Kawasaki
Fixes: 6d7c7b785feb ("libf2fs_zoned: Introduce f2fs_report_zone() helper
function")
Signed-off-by: Bart Van Assche
---
lib/libf2fs_zoned.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/libf2f
Since the size of struct f2fs_summary_block equals F2FS_BLKSIZE, use
F2FS_BLKSIZE instead of PAGE_CACHE_SIZE as the size of struct
f2fs_summary_block.
Signed-off-by: Bart Van Assche
---
fsck/mount.c | 8
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/fsck/mount.c b/fsck
Fix the f2fs-tools build on systems for which PAGE_SIZE != 4096.
Cc: Peter Collingbourne
Reported-by: Peter Collingbourne
Signed-off-by: Bart Van Assche
---
include/f2fs_fs.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/f2fs_fs.h b/include/f2fs_fs.h
index
Hi Jaegeuk,
This patch series fixes one issue reported by Peter Collingbourne and two
issues I discovered by reading the zoned block device source code. Please
consider these patches for inclusion in the official f2fs-tools repository.
Thanks,
Bart.
Bart Van Assche (3):
Fix the struct
reading the source code.
Cc: Shin'ichiro Kawasaki
Fixes: 6d7c7b785feb ("libf2fs_zoned: Introduce f2fs_report_zone() helper
function")
Signed-off-by: Bart Van Assche
---
lib/libf2fs_zoned.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/lib/libf2f
Change the type of the third argument of f2fs_report_zone() from void *
into struct blk_zone * to enable type checking.
Signed-off-by: Bart Van Assche
---
include/f2fs_fs.h | 4 +++-
lib/libf2fs_zoned.c | 22 +-
2 files changed, 16 insertions(+), 10 deletions(-)
diff
On 6/9/22 19:05, Peter Collingbourne wrote:
On Thu, Apr 21, 2022 at 03:18:15PM -0700, Bart Van Assche wrote:
+static_assert(sizeof(struct f2fs_dentry_block) == 4096, "");
I noticed that this static_assert fails when PAGE_SIZE is defined to
a value other than 4096.
I have to admi
On 4/27/22 09:02, Pankaj Raghav wrote:
diff --git a/drivers/block/null_blk/main.c b/drivers/block/null_blk/main.c
index c441a4972064..82a62b543782 100644
--- a/drivers/block/null_blk/main.c
+++ b/drivers/block/null_blk/main.c
@@ -1931,8 +1931,8 @@ static int null_validate_conf(struct nullb_device
ifications to the math if
needed in one place and adds now support for npo2 zone devices.
But since the code looks fine:
Reviewed-by: Bart Van Assche
___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge
On 4/27/22 09:02, Pankaj Raghav wrote:
- sector &= ~(ns->zsze - 1);
+ sector = rounddown(sector, ns->zsze);
The above change breaks 32-bit builds since ns->zsze is 64 bits wide and
since rounddown() uses the C division operator instead of div64_u64().
Thanks,
Bart.
___
On 4/27/22 09:02, Pankaj Raghav wrote:
Adapt blkdev_nr_zones and blk_queue_zone_no function so that it can
also work for non-power-of-2 zone sizes.
As the existing deployments of zoned devices had power-of-2
assumption, power-of-2 optimized calculation is kept for those devices.
There are no di
On 4/27/22 09:02, Pankaj Raghav wrote:
+static inline unsigned int bdev_zone_no(struct block_device *bdev, sector_t
sec)
+{
+ struct request_queue *q = bdev_get_queue(bdev);
+
+ if (q)
+ return blk_queue_zone_no(q, sec);
+ return 0;
+}
This patch series has been
On 4/27/22 09:02, Pankaj Raghav wrote:
+static inline bool bdev_zone_aligned(struct block_device *bdev, sector_t sec)
+{
+ struct request_queue *q = bdev_get_queue(bdev);
+
+ if (q)
+ return blk_queue_zone_aligned(q, sec);
+ return false;
+}
Which patch uses this
Make the Github continuous integration checks more strict.
Signed-off-by: Bart Van Assche
---
.github/workflows/ci.yml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 0c774f92fac8..428039db860d 100644
--- a/.github
Just like in the Linux kernel source code, annotate switch/case
fallthrough.
Signed-off-by: Bart Van Assche
---
fsck/fsck.c | 1 +
fsck/main.c | 1 +
include/f2fs_fs.h | 6 ++
tools/f2fscrypt.c | 1 +
4 files changed, 9 insertions(+)
diff --git a/fsck/fsck.c b/fsck/fsck.c
index
Some PowerPC cross-compilers have the uuid.h header file but not the
uuid library. Hence this patch that causes f2fs-tools only to use the
uuid functions if both the uuid header file and library are available.
Signed-off-by: Bart Van Assche
---
mkfs/f2fs_format.c | 2 +-
tools/f2fscrypt.c | 4
__SANE_USERSPACE_TYPES__ must be defined before is
included. Hence this patch that moves the definition of that macro into
the source files that need it.
Signed-off-by: Bart Van Assche
---
include/f2fs_fs.h | 7 ---
tools/f2fs_io/f2fs_io.c | 3 +++
2 files changed, 7 insertions(+), 3
val))
| ^~~
Signed-off-by: Bart Van Assche
---
include/f2fs_fs.h | 24
1 file changed, 12 insertions(+), 12 deletions(-)
diff --git a/include/f2fs_fs.h b/include/f2fs_fs.h
index 73dc48e25ec0..bc57dd07819a 100644
--- a/include/f2fs_fs.h
+++ b/incl
Make it possible to check whether the return value of ioctl() is negative.
Signed-off-by: Bart Van Assche
---
tools/f2fs_io/f2fs_io.c | 10 +-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/tools/f2fs_io/f2fs_io.c b/tools/f2fs_io/f2fs_io.c
index e807177a4174..6bb094cc7f25
Since 'remained_blkentries' is unsigned, the assert statement that
verifies whether that variable is positive will never fail. Hence
remove that assert statement.
Signed-off-by: Bart Van Assche
---
fsck/segment.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/fsck/segment.c b/fsck
It is recommended to test a HAVE_* macro instead of directly testing the
host type in source code. Hence this patch.
Signed-off-by: Bart Van Assche
---
configure.ac | 2 ++
lib/libf2fs.c| 4 +++-
lib/libf2fs_io.c | 10 +++---
lib/libf2fs_zoned.c | 2
Suppress the following compiler warning:
main.c:37:14: warning: unused function 'absolute_path' [-Wunused-function]
static char *absolute_path(const char *file)
^
Signed-off-by: Bart Van Assche
---
fsck/main.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/fsc
F2FS_SLOT_LEN,
^~~
f2fs_format.c:1653:37: note: use array indexing to silence this warning
memcpy(dent_blk->filename[3], LPF + F2FS_SLOT_LEN,
^
& [ ]
Signed-off-by: Bart V
Signed-off-by: Bart Van Assche
---
tools/f2fscrypt.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/tools/f2fscrypt.c b/tools/f2fscrypt.c
index 0f0650f4dd63..293173fcb5b4 100644
--- a/tools/f2fscrypt.c
+++ b/tools/f2fscrypt.c
@@ -45,6 +45,8 @@
#endif
#ifdef HAVE_UUID_UUID_H
The selinux/android.h header file is available in Android but not in the
Android NDK. Hence this patch that detects presence of that header file
at configure time.
Signed-off-by: Bart Van Assche
---
configure.ac | 1 +
fsck/sload.c | 4 ++--
2 files changed, 3 insertions(+), 2 deletions
Signed-off-by: Bart Van Assche
---
fsck/main.c | 5 -
1 file changed, 5 deletions(-)
diff --git a/fsck/main.c b/fsck/main.c
index b555ff4dbee7..fc776eb0af1f 100644
--- a/fsck/main.c
+++ b/fsck/main.c
@@ -32,11 +32,6 @@
struct f2fs_fsck gfsck;
-#ifdef WITH_ANDROID
-#include
-extern
Suppress the following compiler warning:
segment.c:698:12: warning: ānā may be used uninitialized in this function
[-Wmaybe-uninitialized]
698 | if (n < 0)
|^
Signed-off-by: Bart Van Assche
---
fsck/segment.c | 2 +-
1 file changed, 1 insertion(+), 1 delet
The header is available in Android but not in the
Android NDK. Hence this patch that only includes the sparse header file
if it is available.
Signed-off-by: Bart Van Assche
---
configure.ac| 1 +
lib/libf2fs_io.c| 10 +-
mkfs/f2fs_format_main.c | 2 +-
3 files
Fix multiple compiler warnings and build errors reported by the MinGW
cross-compiler.
Signed-off-by: Bart Van Assche
---
configure.ac| 46 +
fsck/Makefile.am| 2 +-
fsck/dir.c | 8 +++
fsck/f2fs.h | 8
Prepare for enabling -Wmacro-redefined.
Signed-off-by: Bart Van Assche
---
fsck/f2fs.h | 2 +-
include/f2fs_fs.h | 5 +
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/fsck/f2fs.h b/fsck/f2fs.h
index eacfd42478b8..e5130ba19961 100644
--- a/fsck/f2fs.h
+++ b/fsck/f2fs.h
Use %zu to format size_t as required by the POSIX standards.
Signed-off-by: Bart Van Assche
---
fsck/mount.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/fsck/mount.c b/fsck/mount.c
index e075d3184f83..584385d682b5 100644
--- a/fsck/mount.c
+++ b/fsck/mount.c
Move the be32_to_cpu() definition next to the little endian conversion
functions. This patch improves portability since the MinGW ntohl()
function exists in another library than the C library.
Signed-off-by: Bart Van Assche
---
fsck/quotaio.h| 2 --
include/f2fs_fs.h | 2 ++
2 files changed
the Linux kernel.
Signed-off-by: Bart Van Assche
---
fsck/quotaio.c | 2 +-
fsck/quotaio_tree.h | 2 +-
fsck/quotaio_v2.h | 6 +++---
fsck/xattr.h| 2 +-
include/f2fs_fs.h | 52 ++---
include/quota.h | 9 +++-
tools/f2fscrypt.c
Since no code uses the HAVE_.*_PROTOTYPE macros, remove the code that
sets these macros.
Signed-off-by: Bart Van Assche
---
configure.ac | 25 -
1 file changed, 25 deletions(-)
diff --git a/configure.ac b/configure.ac
index f906be780eb2..c908c9394613 100644
--- a
##__VA_ARGS__);
\
|^~~
Signed-off-by: Bart Van Assche
---
fsck/mount.c | 2 +-
include/f2fs_fs.h | 16
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/fsck/mount.c b/fsck/mount.c
index f15260e02cab..e075d3184f83 100644
--- a/fsck/mount.c
+++ b/fsck/mount.c
@@
Hi Jaegeuk,
This patch series should make f2fs-tools easier to maintain and fixes a few
smaller bugs. Although these patches have been compile-tested only, please
consider these patches for the upstream f2fs-tools repository.
Thanks,
Bart.
Bart Van Assche (31):
configure.ac: Stop using
Before modifying the __attribute__((packed)) annotations, let the
compiler verify the sizes of on-disk data structures.
Signed-off-by: Bart Van Assche
---
fsck/quotaio.c | 2 ++
fsck/quotaio_tree.h | 2 ++
fsck/quotaio_v2.h | 6 +
fsck/xattr.h| 2 ++
include/f2fs_fs.h
Stop using PKG_CHECK_MODULES() since that macro is not compatible with
cross-compilation.
Signed-off-by: Bart Van Assche
---
README | 1 -
configure.ac| 47 ++---
mkfs/f2fs_format.c | 2 +-
mkfs/f2fs_format_main.c | 4
Many format strings use one of the PRI* macros. These macros are compatible
with the uint types but not with the u_int types. Hence this patch
that switches from the u_int to the uint types.
Signed-off-by: Bart Van Assche
---
fsck/fsck.c | 4 +-
fsck/mount.c | 44
For those who use Github to contribute f2fs-tools patches, let the
github servers build the f2fs-tools source code upon every push and pull
requests. This change does not affect users who do not use Github.
Signed-off-by: Bart Van Assche
---
.github/workflows/ci.yml | 70
Prepare for verifying structure sizes with static_assert().
Signed-off-by: Bart Van Assche
---
fsck/f2fs.h | 4 ++--
include/f2fs_fs.h | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/fsck/f2fs.h b/fsck/f2fs.h
index 7fb328ff8861..eacfd42478b8 100644
--- a/fsck/f2fs.h
igure.ac'
mkfs/Makefile.am:11: while processing Libtool library 'libf2fs_format.la'
Signed-off-by: Bart Van Assche
---
configure.ac | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/configure.ac b/configure.ac
index c908c9394613..b40012bd8745 100644
--- a
rning: The macro `AC_PROG_LIBTOOL' is obsolete.
configure.ac:49: You should run autoupdate.
m4/libtool.m4:100: AC_PROG_LIBTOOL is expanded from...
configure.ac:49: the top level
Signed-off-by: Bart Van Assche
---
configure.ac | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
di
Signed-off-by: Bart Van Assche
---
configure.ac | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/configure.ac b/configure.ac
index b40012bd8745..0d7872abde19 100644
--- a/configure.ac
+++ b/configure.ac
@@ -100,13 +100,13 @@ AC_CHECK_HEADERS(m4_flatten([
fcntl.h
This makes it easier to build f2fs-tools for Windows.
Signed-off-by: Bart Van Assche
---
lib/libf2fs.c| 10 +-
lib/libf2fs_io.c | 6 +++---
lib/libf2fs_zoned.c | 2 +-
mkfs/f2fs_format.c | 2 +-
mkfs/f2fs_format_main.c | 2 +-
mkfs/f2fs_format_utils.c
nit_f2fs_rwsem() caller.
Cc: Tim Murray
Reported-by: syzbot+0b9cadf5fc45a98a5...@syzkaller.appspotmail.com
Fixes: e4544b63a7ee ("f2fs: move f2fs to use reader-unfair rwsems")
Signed-off-by: Bart Van Assche
---
fs/f2fs/f2fs.h | 12 ++--
1 file changed, 10 insertions(+), 2 deletions(
On 2020-05-29 13:27, Matthew Wilcox wrote:
> On Fri, May 29, 2020 at 10:11:00PM +0800, Kaitao Cheng wrote:
>> There is a function named ilog2() exist which can replace blksize.
>> The generated code will be shorter and more efficient on some
>> architecture, such as arm64. And ilog2() can be optimi
e are changed")
[ ... ]
Reviewed-by: Bart Van Assche
___
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
On 11/25/19 11:22 AM, Jaegeuk Kim wrote:
On 11/25, Bart Van Assche wrote:
Thank you for the additional and very helpful clarification. Can you have a
look at the (totally untested) patch below? I prefer that version because it
prevents concurrent processing of requests and syncing/killing the
On 11/25/19 9:59 AM, Jaegeuk Kim wrote:
On 11/19, Bart Van Assche wrote:
On 5/17/19 5:53 PM, Jaegeuk Kim wrote:
This patch tries to avoid EAGAIN due to nrpages!=0 that was originally trying
to drop stale pages resulting in wrong data access.
Report: https://bugs.chromium.org/p/chromium/issues
On 5/17/19 5:53 PM, Jaegeuk Kim wrote:
This patch tries to avoid EAGAIN due to nrpages!=0 that was originally trying
to drop stale pages resulting in wrong data access.
Report: https://bugs.chromium.org/p/chromium/issues/detail?id=938958#c38
Please provide a more detailed commit description. W
On 2019-11-08 18:54, Damien Le Moal wrote:
> On 2019/11/09 4:06, Bart Van Assche wrote:
>> On 11/7/19 5:57 PM, Damien Le Moal wrote:
>>> - buf = vzalloc(bufsize);
>>> - if (buf)
>>> - *buflen = bufsize;
>>> + while (bufsize >= SECT
On 11/7/19 5:57 PM, Damien Le Moal wrote:
- buf = vzalloc(bufsize);
- if (buf)
- *buflen = bufsize;
+ while (bufsize >= SECTOR_SIZE) {
+ buf = vzalloc(bufsize);
+ if (buf) {
+ *buflen = bufsize;
+
On 01/05/2016 09:53 PM, mchri...@redhat.com wrote:
> From: Mike Christie
>
> This has callers of submit_bio/submit_bio_wait set the bio->bi_rw
> instead of passing it in. This makes that use the same as
> generic_make_request and how we set the other bio fields.
Reviewed-b
69 matches
Mail list logo