linux-block.git
8 months agobcachefs: move some checks to expensive_debug_checks
Kent Overstreet [Thu, 28 Mar 2019 05:51:47 +0000 (01:51 -0400)]
bcachefs: move some checks to expensive_debug_checks

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: Sort updates in bch2_trans_update()
Kent Overstreet [Thu, 28 Mar 2019 04:34:25 +0000 (00:34 -0400)]
bcachefs: Sort updates in bch2_trans_update()

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: Unlink not-touched iters on successful transaction commit
Kent Overstreet [Thu, 28 Mar 2019 04:32:38 +0000 (00:32 -0400)]
bcachefs: Unlink not-touched iters on successful transaction commit

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: traverse all iterators on transaction restart
Kent Overstreet [Thu, 28 Mar 2019 04:07:24 +0000 (00:07 -0400)]
bcachefs: traverse all iterators on transaction restart

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: Add iter->idx
Kent Overstreet [Thu, 28 Mar 2019 03:14:38 +0000 (23:14 -0400)]
bcachefs: Add iter->idx

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: Kill btree_iter->next
Kent Overstreet [Thu, 28 Mar 2019 02:46:52 +0000 (22:46 -0400)]
bcachefs: Kill btree_iter->next

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: Change btree_iter_traverse_error() to not use iter->next
Kent Overstreet [Thu, 28 Mar 2019 02:54:42 +0000 (22:54 -0400)]
bcachefs: Change btree_iter_traverse_error() to not use iter->next

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: trans_for_each_iter()
Kent Overstreet [Thu, 28 Mar 2019 02:03:30 +0000 (22:03 -0400)]
bcachefs: trans_for_each_iter()

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: Better bch2_trans_copy_iter()
Kent Overstreet [Tue, 26 Mar 2019 02:43:26 +0000 (22:43 -0400)]
bcachefs: Better bch2_trans_copy_iter()

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: Btree iterators now always have a btree_trans
Kent Overstreet [Mon, 25 Mar 2019 21:06:42 +0000 (17:06 -0400)]
bcachefs: Btree iterators now always have a btree_trans

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: Only get btree iters from btree transactions
Kent Overstreet [Mon, 25 Mar 2019 19:10:15 +0000 (15:10 -0400)]
bcachefs: Only get btree iters from btree transactions

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: Btree iter improvements
Kent Overstreet [Mon, 25 Mar 2019 19:34:48 +0000 (15:34 -0400)]
bcachefs: Btree iter improvements

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: Verify fs hasn't been modified before going rw
Kent Overstreet [Fri, 22 Mar 2019 03:13:46 +0000 (23:13 -0400)]
bcachefs: Verify fs hasn't been modified before going rw

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: Go rw lazily
Kent Overstreet [Fri, 22 Mar 2019 02:19:57 +0000 (22:19 -0400)]
bcachefs: Go rw lazily

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: Fix a deadlock
Kent Overstreet [Fri, 22 Mar 2019 08:32:29 +0000 (04:32 -0400)]
bcachefs: Fix a deadlock

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: Rework error handling in btree update path
Kent Overstreet [Fri, 22 Mar 2019 01:12:01 +0000 (21:12 -0400)]
bcachefs: Rework error handling in btree update path

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: Fix error handling in gc
Kent Overstreet [Thu, 21 Mar 2019 23:12:52 +0000 (19:12 -0400)]
bcachefs: Fix error handling in gc

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: More debug params for testing of recovery paths
Kent Overstreet [Thu, 21 Mar 2019 23:03:57 +0000 (19:03 -0400)]
bcachefs: More debug params for testing of recovery paths

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: Run gc if failed to read alloc btree
Kent Overstreet [Thu, 21 Mar 2019 23:02:48 +0000 (19:02 -0400)]
bcachefs: Run gc if failed to read alloc btree

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: Fix error handling in bch2_fs_recovery()
Kent Overstreet [Thu, 21 Mar 2019 21:04:50 +0000 (17:04 -0400)]
bcachefs: Fix error handling in bch2_fs_recovery()

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: Add time stats for btree updates
Kent Overstreet [Thu, 21 Mar 2019 20:28:57 +0000 (16:28 -0400)]
bcachefs: Add time stats for btree updates

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: BTREE_INSERT_ATOMIC must be used for extents now
Kent Overstreet [Mon, 18 Mar 2019 20:18:39 +0000 (16:18 -0400)]
bcachefs: BTREE_INSERT_ATOMIC must be used for extents now

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: Add more time stats for being blocked on allocator
Kent Overstreet [Mon, 18 Mar 2019 17:42:10 +0000 (13:42 -0400)]
bcachefs: Add more time stats for being blocked on allocator

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: Fix a deadlock
Kent Overstreet [Sun, 17 Mar 2019 20:49:59 +0000 (16:49 -0400)]
bcachefs: Fix a deadlock

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: Allocate fs_usage in do_btree_insert_at()
Kent Overstreet [Fri, 15 Mar 2019 22:20:46 +0000 (18:20 -0400)]
bcachefs: Allocate fs_usage in do_btree_insert_at()

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: Btree update path cleanup
Kent Overstreet [Fri, 15 Mar 2019 21:11:58 +0000 (17:11 -0400)]
bcachefs: Btree update path cleanup

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: kill struct btree_insert
Kent Overstreet [Thu, 14 Mar 2019 02:44:04 +0000 (22:44 -0400)]
bcachefs: kill struct btree_insert

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: convert bch2_btree_insert_at() usage to bch2_trans_commit()
Kent Overstreet [Thu, 14 Mar 2019 00:49:16 +0000 (20:49 -0400)]
bcachefs: convert bch2_btree_insert_at() usage to bch2_trans_commit()

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: drop btree_insert->did_work
Kent Overstreet [Mon, 11 Mar 2019 20:25:42 +0000 (16:25 -0400)]
bcachefs: drop btree_insert->did_work

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: Refactor extent insert path
Kent Overstreet [Sat, 16 Mar 2019 18:27:40 +0000 (14:27 -0400)]
bcachefs: Refactor extent insert path

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: Always use bch2_extent_trim_atomic()
Kent Overstreet [Sat, 16 Mar 2019 18:27:40 +0000 (14:27 -0400)]
bcachefs: Always use bch2_extent_trim_atomic()

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: fix bch2_mark_bkey_replicas() call
Kent Overstreet [Fri, 15 Mar 2019 23:34:16 +0000 (19:34 -0400)]
bcachefs: fix bch2_mark_bkey_replicas() call

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: fix bch2_invalidate_one_bucket2() during journal replay
Kent Overstreet [Wed, 13 Mar 2019 20:56:48 +0000 (16:56 -0400)]
bcachefs: fix bch2_invalidate_one_bucket2() during journal replay

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: Make deferred inode updates a mount option
Kent Overstreet [Wed, 13 Mar 2019 17:31:02 +0000 (13:31 -0400)]
bcachefs: Make deferred inode updates a mount option

Journal reclaim may still need performance tuning

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: Fix for shutting down before fs started marking it clean
Kent Overstreet [Sat, 9 Mar 2019 19:53:03 +0000 (14:53 -0500)]
bcachefs: Fix for shutting down before fs started marking it clean

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: Fix for when compressed extent is split during journal replay
Kent Overstreet [Fri, 8 Mar 2019 22:20:33 +0000 (17:20 -0500)]
bcachefs: Fix for when compressed extent is split during journal replay

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: increase BTREE_ITER_MAX
Kent Overstreet [Fri, 8 Mar 2019 04:13:39 +0000 (23:13 -0500)]
bcachefs: increase BTREE_ITER_MAX

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: fix a faulty assertion
Kent Overstreet [Fri, 8 Mar 2019 04:14:35 +0000 (23:14 -0500)]
bcachefs: fix a faulty assertion

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: assertion to catch outstanding bug
Kent Overstreet [Fri, 8 Mar 2019 00:45:57 +0000 (19:45 -0500)]
bcachefs: assertion to catch outstanding bug

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: minor journal reclaim fixes
Kent Overstreet [Thu, 7 Mar 2019 22:19:04 +0000 (17:19 -0500)]
bcachefs: minor journal reclaim fixes

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: Don't BUG_ON() on bucket sector count overflow
Kent Overstreet [Thu, 7 Mar 2019 21:33:56 +0000 (16:33 -0500)]
bcachefs: Don't BUG_ON() on bucket sector count overflow

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: Remove direct use of bch2_btree_iter_link()
Kent Overstreet [Mon, 4 Mar 2019 22:54:28 +0000 (17:54 -0500)]
bcachefs: Remove direct use of bch2_btree_iter_link()

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: Use deferred btree updates for inode updates
Kent Overstreet [Sat, 21 Jul 2018 02:27:07 +0000 (22:27 -0400)]
bcachefs: Use deferred btree updates for inode updates

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: Use journal preres for deferred btree updates
Kent Overstreet [Tue, 19 Feb 2019 22:56:21 +0000 (17:56 -0500)]
bcachefs: Use journal preres for deferred btree updates

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: Add a pre-reserve mechanism for the journal
Kent Overstreet [Tue, 19 Feb 2019 18:41:36 +0000 (13:41 -0500)]
bcachefs: Add a pre-reserve mechanism for the journal

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: Don't block on reclaim_lock from journal_res_get
Kent Overstreet [Thu, 28 Feb 2019 19:22:52 +0000 (14:22 -0500)]
bcachefs: Don't block on reclaim_lock from journal_res_get

When we're doing btree updates from journal flush, this becomes a
locking inversion

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: bch2_journal_space_available improvements
Kent Overstreet [Sun, 3 Mar 2019 21:50:40 +0000 (16:50 -0500)]
bcachefs: bch2_journal_space_available improvements

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: Separate discards from rest of journal reclaim
Kent Overstreet [Sun, 3 Mar 2019 23:39:07 +0000 (18:39 -0500)]
bcachefs: Separate discards from rest of journal reclaim

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: ja->discard_idx, ja->dirty_idx
Kent Overstreet [Sun, 3 Mar 2019 20:15:55 +0000 (15:15 -0500)]
bcachefs: ja->discard_idx, ja->dirty_idx

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: Allocator startup fixes/refactoring
Kent Overstreet [Fri, 1 Mar 2019 22:21:44 +0000 (17:21 -0500)]
bcachefs: Allocator startup fixes/refactoring

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: Drop a faulty assertion
Kent Overstreet [Fri, 1 Mar 2019 20:51:57 +0000 (15:51 -0500)]
bcachefs: Drop a faulty assertion

the assertion was meant to check that bch2_journal_reclaim_fast() was
always being called, but since the atomic dec can happen outside of
j->lock the assertion itself can race

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: improved flush_held_btree_writes()
Kent Overstreet [Fri, 1 Mar 2019 03:33:06 +0000 (22:33 -0500)]
bcachefs: improved flush_held_btree_writes()

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: use correct wq for journal reclaim
Kent Overstreet [Fri, 1 Mar 2019 03:32:09 +0000 (22:32 -0500)]
bcachefs: use correct wq for journal reclaim

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: Journal reclaim refactoring
Kent Overstreet [Thu, 21 Feb 2019 18:33:21 +0000 (13:33 -0500)]
bcachefs: Journal reclaim refactoring

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: Better journal debug
Kent Overstreet [Tue, 26 Feb 2019 19:28:08 +0000 (14:28 -0500)]
bcachefs: Better journal debug

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: Don't get journal reservation until after we know insert will succeed
Kent Overstreet [Tue, 26 Feb 2019 22:13:46 +0000 (17:13 -0500)]
bcachefs: Don't get journal reservation until after we know insert will succeed

Checking if we can do the insert after getting the journal reservation
means potentially wasting space in the journal, which will break the new
pre reservation mechanism

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: fix integer underflow in journal code
Kent Overstreet [Thu, 28 Feb 2019 00:14:23 +0000 (19:14 -0500)]
bcachefs: fix integer underflow in journal code

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: Fix gc handling of bucket gens
Kent Overstreet [Wed, 20 Feb 2019 22:57:06 +0000 (17:57 -0500)]
bcachefs: Fix gc handling of bucket gens

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: fix a deadlock on startup
Kent Overstreet [Wed, 20 Feb 2019 21:00:03 +0000 (16:00 -0500)]
bcachefs: fix a deadlock on startup

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: force str_hash code to be inlined
Kent Overstreet [Wed, 20 Feb 2019 19:18:44 +0000 (14:18 -0500)]
bcachefs: force str_hash code to be inlined

the btree trans iterator stuff relies on a dirty horrible hack that uses
a short backtrace to generate tokens, and gcc uninlining these functions
breaks that hack. ugh.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: Assorted journal refactoring
Kent Overstreet [Mon, 18 Feb 2019 22:39:42 +0000 (17:39 -0500)]
bcachefs: Assorted journal refactoring

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: fs_usage_u64s()
Kent Overstreet [Fri, 15 Feb 2019 01:39:17 +0000 (20:39 -0500)]
bcachefs: fs_usage_u64s()

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: Add a mechanism for blocking the journal
Kent Overstreet [Thu, 14 Feb 2019 23:38:52 +0000 (18:38 -0500)]
bcachefs: Add a mechanism for blocking the journal

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: Convert bucket invalidation to key marking path
Kent Overstreet [Wed, 13 Feb 2019 19:46:32 +0000 (14:46 -0500)]
bcachefs: Convert bucket invalidation to key marking path

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: fixes for cached data accounting
Kent Overstreet [Thu, 14 Feb 2019 20:42:41 +0000 (15:42 -0500)]
bcachefs: fixes for cached data accounting

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: fix more locking bugs
Kent Overstreet [Wed, 13 Feb 2019 20:17:23 +0000 (15:17 -0500)]
bcachefs: fix more locking bugs

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: refactor key marking code a bit
Kent Overstreet [Tue, 12 Feb 2019 20:03:47 +0000 (15:03 -0500)]
bcachefs: refactor key marking code a bit

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: Fix double counting when gc is running
Kent Overstreet [Tue, 12 Feb 2019 19:58:55 +0000 (14:58 -0500)]
bcachefs: Fix double counting when gc is running

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: gc lock no longer needed for disk reservations
Kent Overstreet [Tue, 12 Feb 2019 03:08:09 +0000 (22:08 -0500)]
bcachefs: gc lock no longer needed for disk reservations

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: Fix oldest_gen handling
Kent Overstreet [Tue, 12 Feb 2019 00:27:33 +0000 (19:27 -0500)]
bcachefs: Fix oldest_gen handling

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: Fix a locking bug
Kent Overstreet [Tue, 12 Feb 2019 00:04:40 +0000 (19:04 -0500)]
bcachefs: Fix a locking bug

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: Fix a lockdep splat
Kent Overstreet [Mon, 11 Feb 2019 20:33:14 +0000 (15:33 -0500)]
bcachefs: Fix a lockdep splat

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: no need to run gc when initializing new fs
Kent Overstreet [Mon, 11 Feb 2019 00:16:55 +0000 (19:16 -0500)]
bcachefs: no need to run gc when initializing new fs

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: Don't need to walk inodes on clean shutdown
Kent Overstreet [Sun, 10 Feb 2019 00:45:36 +0000 (19:45 -0500)]
bcachefs: Don't need to walk inodes on clean shutdown

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: don't do initial gc if have alloc info feature
Kent Overstreet [Wed, 6 Feb 2019 16:56:51 +0000 (11:56 -0500)]
bcachefs: don't do initial gc if have alloc info feature

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: serialize persistent_reserved
Kent Overstreet [Sun, 10 Feb 2019 00:20:57 +0000 (19:20 -0500)]
bcachefs: serialize persistent_reserved

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: initialize fs usage summary in recovery
Kent Overstreet [Fri, 25 Jan 2019 01:25:40 +0000 (20:25 -0500)]
bcachefs: initialize fs usage summary in recovery

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: journal_replay_early()
Kent Overstreet [Fri, 25 Jan 2019 00:09:49 +0000 (19:09 -0500)]
bcachefs: journal_replay_early()

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: Write out fs usage
Kent Overstreet [Thu, 24 Jan 2019 22:54:51 +0000 (17:54 -0500)]
bcachefs: Write out fs usage

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: reserve space in journal for fs usage entries
Kent Overstreet [Thu, 24 Jan 2019 22:12:00 +0000 (17:12 -0500)]
bcachefs: reserve space in journal for fs usage entries

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: fix bch2_sb_field_resize()
Kent Overstreet [Sat, 9 Feb 2019 23:24:20 +0000 (18:24 -0500)]
bcachefs: fix bch2_sb_field_resize()

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: delete a debug printk
Kent Overstreet [Sat, 9 Feb 2019 21:50:53 +0000 (16:50 -0500)]
bcachefs: delete a debug printk

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: fix for unmount hang
Kent Overstreet [Fri, 8 Feb 2019 19:43:53 +0000 (14:43 -0500)]
bcachefs: fix for unmount hang

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: Fix a bug when shutting down before allocator started
Kent Overstreet [Sat, 9 Feb 2019 21:15:29 +0000 (16:15 -0500)]
bcachefs: Fix a bug when shutting down before allocator started

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: percpu utility code
Kent Overstreet [Wed, 6 Feb 2019 16:42:13 +0000 (11:42 -0500)]
bcachefs: percpu utility code

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: sysfs trigger for bch2_alloc_write
Kent Overstreet [Thu, 24 Jan 2019 23:32:13 +0000 (18:32 -0500)]
bcachefs: sysfs trigger for bch2_alloc_write

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: New journal_entry_res mechanism
Kent Overstreet [Thu, 24 Jan 2019 21:50:48 +0000 (16:50 -0500)]
bcachefs: New journal_entry_res mechanism

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: improve alloc_debug
Kent Overstreet [Fri, 25 Jan 2019 00:50:00 +0000 (19:50 -0500)]
bcachefs: improve alloc_debug

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: fix inode counting
Kent Overstreet [Fri, 25 Jan 2019 01:00:57 +0000 (20:00 -0500)]
bcachefs: fix inode counting

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: Persist stripe blocks_used
Kent Overstreet [Mon, 26 Nov 2018 01:53:51 +0000 (20:53 -0500)]
bcachefs: Persist stripe blocks_used

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: Improve c version of __bkey_cmp_bits
Kent Overstreet [Tue, 22 Jan 2019 18:46:14 +0000 (13:46 -0500)]
bcachefs: Improve c version of __bkey_cmp_bits

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: Persist alloc info on clean shutdown
Kent Overstreet [Mon, 19 Nov 2018 06:31:41 +0000 (01:31 -0500)]
bcachefs: Persist alloc info on clean shutdown

 - Does not persist alloc info for stripes yet
 - Also does not yet include filesystem block/sector counts yet, from
struct fs_usage
 - Not made use of just yet

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: Fix fifo overflow in allocator startup
Kent Overstreet [Wed, 23 Jan 2019 01:04:06 +0000 (20:04 -0500)]
bcachefs: Fix fifo overflow in allocator startup

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: Fix check for if extent update is allocating
Kent Overstreet [Mon, 21 Jan 2019 20:32:13 +0000 (15:32 -0500)]
bcachefs: Fix check for if extent update is allocating

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: fix error message in device remove path
Kent Overstreet [Mon, 21 Jan 2019 02:16:25 +0000 (21:16 -0500)]
bcachefs: fix error message in device remove path

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: dio arithmetic improvements
Kent Overstreet [Sat, 19 Jan 2019 23:12:24 +0000 (18:12 -0500)]
bcachefs: dio arithmetic improvements

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: Fix some reserve calculations
Kent Overstreet [Sat, 19 Jan 2019 18:13:29 +0000 (13:13 -0500)]
bcachefs: Fix some reserve calculations

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: Add a workqueue for journal reclaim
Kent Overstreet [Sat, 19 Jan 2019 17:20:00 +0000 (12:20 -0500)]
bcachefs: Add a workqueue for journal reclaim

journal reclaim writes btree nodes, which can end up waiting for in
flight btree writes to complete, and btree write completions run out of
workqueues - so we can't run out of the same workqueue or we risk
deadlock

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: Fix an allocator error path
Kent Overstreet [Fri, 18 Jan 2019 23:58:51 +0000 (18:58 -0500)]
bcachefs: Fix an allocator error path

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
8 months agobcachefs: fixes for getting stuck flushing journal pins
Kent Overstreet [Mon, 14 Jan 2019 05:38:47 +0000 (00:38 -0500)]
bcachefs: fixes for getting stuck flushing journal pins

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>