mbox series

[v3,0/4] ocfs2 bugs fixes exposed by fstests

Message ID 20240408082041.20925-1-glass.su@suse.com (mailing list archive)
Headers show
Series ocfs2 bugs fixes exposed by fstests | expand


Su Yue April 8, 2024, 8:20 a.m. UTC
The patchset is to fix some wrong behavior of ocfs2 exposed
by fstests.

Patch 1 makes userspace happy when some error happens when
doing direct io. Before the patch, DIO always return -EIO
in case of error. After the patch, it returns real error code
such like -ENOSPC, EDQUOT...

Patch 2 fixes an error case when doing AIO+DIO and hole punching
at same file position in parallel. generic/300

Patch 3 fixes inode link count mismatch after power failure.
Without the patch, inode link would be wrong even fync was called
on the file. tests/generic/040,041,104,107,336

patch 4 fixes wrong atime with mount option realtime.
Without the patch, atime of new created file won't be updated in
right time. tests/generic/192

For stable kernels, I added fixes to patch 2,3,4.
The patch 1 is not recommended to be backported since
ocfs2_dio_wr_get_block calls too many functions. It's diffcult
to check every git history of ocfs2 for every LTS kernel. 

  - Add rvb to patch 1.
  - Add fixes to patch 2,3,4.
  - Descirbe more in cover letter.
  - Fix typos and amend commit message about the functions called
  by ocfs2_dio_wr_get_block in patch 1.
  - Add rvb to patch 2,3,4.
Su Yue (4):
  ocfs2: return real error code in ocfs2_dio_wr_get_block
  ocfs2: fix races between hole punching and AIO+DIO
  ocfs2: update inode fsync transaction id in ocfs2_unlink and
  ocfs2: use coarse time for new created files

 fs/ocfs2/aops.c  | 2 --
 fs/ocfs2/file.c  | 2 ++
 fs/ocfs2/namei.c | 4 +++-
 3 files changed, 5 insertions(+), 3 deletions(-)