Skip to content

btrfs: minor fixes and cleanups on direct IO path

Qu Wenruo linux-btrfs 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 1 replyIn review
  2. v14 patches 4 repliesSuperseded

Changes in v2 from the cover letter

- Drop the first 2 patches
The problem with APPEND NOWAIT direct writes needs more consideration. If short writes happened for APPEND NOWAIT write, there are more factors to consider.

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2btrfs: remove btrfs_dio_data::submittedfs/btrfs/direct-io.c+4 -80 replies
2/2btrfs: refactor btrfs_dio_iomap_end()fs/btrfs/direct-io.c+65 -600 replies

Reviews trailers per patch

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

PatchFilipe Manana
SeriesR-b
1/2
2/2

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

Read the v2 thread

Cover letter [PATCH v2 0/2] btrfs: minor fixes and cleanups on direct IO path

[CHANGELOG]
v2:
- Drop the first 2 patches
The problem with APPEND NOWAIT direct writes needs more consideration. If short writes happened for APPEND NOWAIT write, there are more factors to consider.

Firstly we should return -EGAIN so that the caller can retry in a blocking way.

Secondly we should fully revert what has been written so that isize is not increased.

For the OE conflicts I have not yet hit with upstream, so it should be something wrong in my previous direct locking changes.

There are several small problems inside the direct IO code:

- Duplicated btrfs_dio_data::submitted
The iomap_end() callback has @written parameter which provides the same value.

Fixed in the third patch.

- Badly structured btrfs_dio_iomap_end()
Refactored in the last patch.

Qu Wenruo (2):
btrfs: remove btrfs_dio_data::submitted
btrfs: refactor btrfs_dio_iomap_end()

 fs/btrfs/direct-io.c | 131 ++++++++++++++++++++++---------------------
 1 file changed, 66 insertions(+), 65 deletions(-)
Signature · 1 line
2.54.0