summaryrefslogtreecommitdiff
path: root/fs/bcachefs/btree_write_buffer.h
diff options
context:
space:
mode:
authorKent Overstreet <kent.overstreet@linux.dev>2023-11-03 02:37:15 +0300
committerKent Overstreet <kent.overstreet@linux.dev>2024-01-01 19:47:39 +0300
commit183bcc89b855c412bfefa545b799006d66f689a6 (patch)
tree5f639310d3f967cc5f938d56f2a0f59382f07210 /fs/bcachefs/btree_write_buffer.h
parentcf5bacb6a5213cd7f59c1dbf11531ff96445027a (diff)
downloadlinux-183bcc89b855c412bfefa545b799006d66f689a6.tar.xz
bcachefs: Clean up btree write buffer write ref handling
__bch2_btree_write_buffer_flush() now assumes a write ref is already held (as called by the transaction commit path); and the wrappers bch2_write_buffer_flush() and flush_sync() take an explicit write ref. This means internally the write buffer code can always use BTREE_INSERT_NOCHECK_RW, instead of in the previous code passing flags around and hoping the NOCHECK_RW flag was always carried around correctly. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/btree_write_buffer.h')
-rw-r--r--fs/bcachefs/btree_write_buffer.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/bcachefs/btree_write_buffer.h b/fs/bcachefs/btree_write_buffer.h
index 322df1c8304e..45388e636639 100644
--- a/fs/bcachefs/btree_write_buffer.h
+++ b/fs/bcachefs/btree_write_buffer.h
@@ -2,7 +2,8 @@
#ifndef _BCACHEFS_BTREE_WRITE_BUFFER_H
#define _BCACHEFS_BTREE_WRITE_BUFFER_H
-int __bch2_btree_write_buffer_flush(struct btree_trans *, unsigned, bool);
+int bch2_btree_write_buffer_flush_nocheck_rw(struct btree_trans *);
+int __bch2_btree_write_buffer_flush(struct btree_trans *, bool);
int bch2_btree_write_buffer_flush_sync(struct btree_trans *);
int bch2_btree_write_buffer_flush(struct btree_trans *);