Re: [PATCH] bcachefs: Remove the unused variable journal_flags

2023-11-14 Thread Kent Overstreet
On Wed, Nov 15, 2023 at 11:13:29AM +0800, Jiapeng Chong wrote: > Variable journal_flags is not effectively used, so delete it. > > fs/bcachefs/btree_update_interior.c:1057:11: warning: variable > 'journal_flags' set but not used. > > Reported-by: Abaci Robot > Closes: https://bugzilla.openanoli

[PATCH] bcachefs: Remove the unused variable journal_flags

2023-11-14 Thread Jiapeng Chong
Variable journal_flags is not effectively used, so delete it. fs/bcachefs/btree_update_interior.c:1057:11: warning: variable 'journal_flags' set but not used. Reported-by: Abaci Robot Closes: https://bugzilla.openanolis.cn/show_bug.cgi?id=7559 Signed-off-by: Jiapeng Chong --- fs/bcachefs/btre

Re: [PATCH 07/17] bcachefs: Make journal replay more efficient

2023-11-14 Thread Kent Overstreet
On Tue, Nov 14, 2023 at 08:19:04AM -0500, Brian Foster wrote: > On Fri, Nov 10, 2023 at 11:31:44AM -0500, Kent Overstreet wrote: > > + /* > > +* First, attempt to replay keys in sorted order. This is more > > +* efficient, but some might fail if that would cause a journal > > +* deadl

[PATCH] bcachefs: six locks: Fix lost wakeup

2023-11-14 Thread Kent Overstreet
In percpu reader mode, trylock() for read had a lost wakeup: on failure to get the lock, we may have caused a writer to fail to get the lock, because we temporarily elevated the reader count. We need to check for waiters after decrementing the read count - not before. Signed-off-by: Kent Overstre

Re: [PATCH 07/17] bcachefs: Make journal replay more efficient

2023-11-14 Thread Brian Foster
On Fri, Nov 10, 2023 at 11:31:44AM -0500, Kent Overstreet wrote: > Journal replay now first attempts to replay keys in sorted order, > similar to how the btree write buffer flush path works. > > Any keys that can not be replayed due to journal deadlock are then left > for later and replayed in jou

Re: [PATCH 05/17] bcachefs: Kill BTREE_UPDATE_PREJOURNAL

2023-11-14 Thread Brian Foster
On Mon, Nov 13, 2023 at 11:49:10AM -0500, Kent Overstreet wrote: > On Mon, Nov 13, 2023 at 10:29:34AM -0500, Brian Foster wrote: > > On Fri, Nov 10, 2023 at 11:31:42AM -0500, Kent Overstreet wrote: > > > With the previous patch that reworks BTREE_INSERT_JOURNAL_REPLAY, we can > > > now switch the b