Thread (26 messages) 26 messages, 3 authors, 2022-01-12

Re: [PATCH v2 06/17] btrfs: replace btrfs_dio_private::refs with btrfs_dio_private::pending_bytes

From: Qu Wenruo <hidden>
Date: 2021-12-09 10:35:16


On 2021/12/9 18:02, Johannes Thumshirn wrote:
On 06/12/2021 03:30, Qu Wenruo wrote:
quoted
This mostly follows the behavior of compressed_bio::pending_sectors.

The point here is, dip::refs is not split bio friendly, as if a bio with
its bi_private = dip, and the bio get split, we can easily underflow
dip::refs.

By using the same sector based solution as compressed_bio, dio can
handle both unsplit and split bios.

Signed-off-by: Qu Wenruo <redacted>

JFYI, for this patch I get checkpatch complains:

Applying: btrfs: replace btrfs_dio_private::refs with btrfs_dio_private::pending_bytes
.git/rebase-apply/patch:37: space before tab in indent.
                                      u32 bytes)
warning: 1 line adds whitespace errors.
ERROR:CODE_INDENT: code indent should use tabs where possible
#32: FILE: fs/btrfs/inode.c:7693:
+^I    ^I^I^I     u32 bytes)$

WARNING:SPACE_BEFORE_TAB: please, no space before tabs
#32: FILE: fs/btrfs/inode.c:7693:
+^I    ^I^I^I     u32 bytes)$

total: 1 errors, 1 warnings, 180 lines checked
Oh, I should add checkpatch to my git hooks...

Thanks for catching this, will rebase the branch to misc-next with this
fixed.

Thanks,
Qu
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help