bcachefs: Minor dio write path improvements
authorKent Overstreet <kent.overstreet@linux.dev>
Mon, 14 Nov 2022 03:43:37 +0000 (22:43 -0500)
committerKent Overstreet <kent.overstreet@linux.dev>
Sun, 22 Oct 2023 21:09:46 +0000 (17:09 -0400)
commit6b1b186a5a8e9cf4770e9546c3606fef40666830
tree7bb738a19abf55c07d065c14d4179a5ba5fcf883
parent84fea8e5b3abc9147a20211e608ba8844c479998
bcachefs: Minor dio write path improvements

This switches where we take quota reservations to be per bch_wirte_op
instead of per dio_write, so we can drop the quota reservation in the
same place as we call i_sectors_acct(), and only take/release
ei_quota_lock once.

In the future we'd like ei_quota_lock to not be a mutex, so that we can
avoid punting to process context before deliving write completions in
nocow mode.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/fs-io.c