summaryrefslogtreecommitdiff
path: root/fs/bcachefs/errcode.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2024-02-28 18:30:22 -0500
committerKent Overstreet <kent.overstreet@linux.dev>2024-03-13 21:22:26 -0400
commit7e64c86cdc6cee0db36eb983c62065c5bf71508b (patch)
treeb684b41b845922c8f85dbae8de0a945ff58a6927 /fs/bcachefs/errcode.h
parent66a67c860cce3643248f7e80ee095b946829a342 (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.h3
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,