Re: [PATCH 0/2] ntfs: handle block device cache flush in fsync paths

From: liubaolin

Date: Tue Oct 13 2026 - 19:25:10 EST




在 2026/10/13 22:58, DaeMyung Kang 写道:
Regular-file fsync currently ignores a block device cache flush failure,
while directory fsync never issues a cache flush. Both can report success
without ensuring that the data and metadata reached stable storage.

The first patch returns and logs flush failures from regular-file fsync.
The second adds a flush to directory fsync and reports its failure. The
syncfs path already handles flush errors.

QEMU blkdebug injected -EIO for flush_to_disk on ntfs-next at
04fb910da2c8. Before these changes, both file and directory fsync
returned success while syncfs returned -EIO. With the respective fixes,
both fsync calls return -EIO. A kretprobe confirmed the flush failures.

DaeMyung Kang (2):
ntfs: report block device flush failures from fsync
ntfs: flush the block device when syncing a directory

fs/ntfs/dir.c | 2 ++
fs/ntfs/file.c | 4 ++--
2 files changed, 4 insertions(+), 2 deletions(-)


base-commit: 04fb910da2c857cdf99a331c576c3e5e7197c6dd

The series looks good to me.

Reviewed-by: Baolin Liu <liubaolin@xxxxxxxxxx>