diff options
author | Kent Overstreet <kent.overstreet@linux.dev> | 2024-02-28 18:30:22 -0500 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2024-03-13 21:22:26 -0400 |
commit | 7e64c86cdc6cee0db36eb983c62065c5bf71508b (patch) | |
tree | b684b41b845922c8f85dbae8de0a945ff58a6927 /fs/bcachefs/errcode.h | |
parent | 66a67c860cce3643248f7e80ee095b946829a342 (diff) |
bcachefs: Buffered write path now can avoid the inode lock
Non append, non extending buffered writes can now avoid taking the inode
lock.
To ensure atomicity of writes w.r.t. other writes, we lock every folio
that we'll be writing to, and if this fails we fall back to taking the
inode lock.
Extensive comments are provided as to corner cases.
Link: https://lore.kernel.org/linux-fsdevel/Zdkxfspq3urnrM6I@bombadil.infradead.org/
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/errcode.h')
-rw-r--r-- | fs/bcachefs/errcode.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/bcachefs/errcode.h b/fs/bcachefs/errcode.h index a8f1a3976305..22c7a3322bcc 100644 --- a/fs/bcachefs/errcode.h +++ b/fs/bcachefs/errcode.h @@ -250,7 +250,8 @@ x(BCH_ERR_nopromote, nopromote_congested) \ x(BCH_ERR_nopromote, nopromote_in_flight) \ x(BCH_ERR_nopromote, nopromote_no_writes) \ - x(BCH_ERR_nopromote, nopromote_enomem) + x(BCH_ERR_nopromote, nopromote_enomem) \ + x(0, need_inode_lock) enum bch_errcode { BCH_ERR_START = 2048, |