Skip to content

ntfs: handle block device cache flush in fsync paths

DaeMyung Kang lkml ntfs stable 1 version Applied

Status from this message: Applied them to #ntfs-next.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest2 patches 4 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/2ntfs: report block device flush failures from fsyncfs/ntfs/file.c+2 -21 reply
2/2ntfs: flush the block device when syncing a directoryfs/ntfs/dir.c+2 -01 reply

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchBaolin Liu
SeriesR-b
1/2R-b
2/2R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

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

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

Signature · 1 line
2.43.0