ntfs: handle block device cache flush in fsync paths
Status from this message: Applied them to #ntfs-next.
Get series with b4
b4 am [email protected]Versions newest first
Patches in v1 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/2 | ntfs: report block device flush failures from fsyncfs/ | +2 | 1 reply | |
| 2/2 | ntfs: flush the block device when syncing a directoryfs/ | +2 | 1 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.
| Patch | Baolin Liu |
|---|---|
| Series | R-b |
| 1/2 | R-b |
| 2/2 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
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