linux-block.git
11 months agobcachefs: Don't overflow stack in bch2_extent_merge_inline()
Kent Overstreet [Thu, 30 May 2019 00:06:06 +0000 (20:06 -0400)]
bcachefs: Don't overflow stack in bch2_extent_merge_inline()

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: Fix starting copygc when already started
Kent Overstreet [Fri, 24 May 2019 18:45:33 +0000 (14:45 -0400)]
bcachefs: Fix starting copygc when already started

We can sometimes call bch2_dev_read_write() when the device is already
RW (in error paths).

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: Fix an error path in bch2_btree_iter_traverse()
Kent Overstreet [Fri, 24 May 2019 18:33:16 +0000 (14:33 -0400)]
bcachefs: Fix an error path in bch2_btree_iter_traverse()

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: Improve key marking interface
Kent Overstreet [Fri, 24 May 2019 15:56:20 +0000 (11:56 -0400)]
bcachefs: Improve key marking interface

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: Fix cached sectors not being updated on invalidate
Kent Overstreet [Fri, 24 May 2019 15:56:01 +0000 (11:56 -0400)]
bcachefs: Fix cached sectors not being updated on invalidate

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: better BTREE_INSERT_NO_CLEAR_REPLICAS
Kent Overstreet [Tue, 21 May 2019 19:49:56 +0000 (15:49 -0400)]
bcachefs: better BTREE_INSERT_NO_CLEAR_REPLICAS

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: fix a mount error path
Kent Overstreet [Tue, 21 May 2019 17:42:02 +0000 (13:42 -0400)]
bcachefs: fix a mount error path

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: fix bch2_extent_merge()
Kent Overstreet [Tue, 21 May 2019 14:14:54 +0000 (10:14 -0400)]
bcachefs: fix bch2_extent_merge()

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: Don't use a fixed size buffer for fs_usage_deltas
Kent Overstreet [Wed, 15 May 2019 19:47:43 +0000 (15:47 -0400)]
bcachefs: Don't use a fixed size buffer for fs_usage_deltas

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: Rip out old hacky transaction restart tracing
Kent Overstreet [Wed, 15 May 2019 16:37:11 +0000 (12:37 -0400)]
bcachefs: Rip out old hacky transaction restart tracing

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: More work to avoid transaction restarts
Kent Overstreet [Wed, 15 May 2019 14:54:43 +0000 (10:54 -0400)]
bcachefs: More work to avoid transaction restarts

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: Avoid spurious transaction restarts
Kent Overstreet [Wed, 15 May 2019 14:08:55 +0000 (10:08 -0400)]
bcachefs: Avoid spurious transaction restarts

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: Ensure bch2_btree_iter_next() always advances
Kent Overstreet [Wed, 15 May 2019 13:53:27 +0000 (09:53 -0400)]
bcachefs: Ensure bch2_btree_iter_next() always advances

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: Fix a bug with spinning on the journal
Kent Overstreet [Wed, 15 May 2019 13:49:46 +0000 (09:49 -0400)]
bcachefs: Fix a bug with spinning on the journal

Transactional triggers meant that when we failed to get a journal
reservation, then bailed out into the error path to block on a journal
reservation, the second blocking call into the journal code was asking
for less space, which is not what we want.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: Delete duplicate code
Kent Overstreet [Wed, 15 May 2019 13:47:40 +0000 (09:47 -0400)]
bcachefs: Delete duplicate code

Also rename for consistency

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: Fix spurious inconsistency in recovery
Kent Overstreet [Tue, 14 May 2019 18:37:11 +0000 (14:37 -0400)]
bcachefs: Fix spurious inconsistency in recovery

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: improved btree locking tracepoints
Kent Overstreet [Tue, 14 May 2019 18:08:23 +0000 (14:08 -0400)]
bcachefs: improved btree locking tracepoints

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: bch2_btree_delete_at_range()
Kent Overstreet [Sat, 11 May 2019 21:36:31 +0000 (17:36 -0400)]
bcachefs: bch2_btree_delete_at_range()

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: stripe creation fixes
Kent Overstreet [Mon, 13 May 2019 04:30:02 +0000 (00:30 -0400)]
bcachefs: stripe creation fixes

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: Merge extents with checksums
Kent Overstreet [Mon, 13 May 2019 02:23:30 +0000 (22:23 -0400)]
bcachefs: Merge extents with checksums

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: kill BTREE_ITER_NOUNLOCK
Kent Overstreet [Fri, 10 May 2019 21:15:30 +0000 (17:15 -0400)]
bcachefs: kill BTREE_ITER_NOUNLOCK

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: Don't pass around may_drop_locks
Kent Overstreet [Fri, 10 May 2019 21:09:42 +0000 (17:09 -0400)]
bcachefs: Don't pass around may_drop_locks

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: Kill remaining bch2_btree_iter_unlock() uses
Kent Overstreet [Fri, 10 May 2019 20:09:17 +0000 (16:09 -0400)]
bcachefs: Kill remaining bch2_btree_iter_unlock() uses

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: Fix for the stripes mark path and gc
Kent Overstreet [Wed, 8 May 2019 21:56:05 +0000 (17:56 -0400)]
bcachefs: Fix for the stripes mark path and gc

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: Redo replicas gc mechanism
Kent Overstreet [Tue, 30 Apr 2019 21:15:39 +0000 (17:15 -0400)]
bcachefs: Redo replicas gc mechanism

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: Fix return code from bch2_fs_start()
Kent Overstreet [Mon, 22 Apr 2019 21:47:49 +0000 (17:47 -0400)]
bcachefs: Fix return code from bch2_fs_start()

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: Don't run fsck by default at mount time
Kent Overstreet [Thu, 18 Apr 2019 00:16:43 +0000 (20:16 -0400)]
bcachefs: Don't run fsck by default at mount time

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: some improvements to startup messages and options
Kent Overstreet [Wed, 17 Apr 2019 22:21:19 +0000 (18:21 -0400)]
bcachefs: some improvements to startup messages and options

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: Various improvements to bch2_alloc_write()
Kent Overstreet [Wed, 17 Apr 2019 22:14:46 +0000 (18:14 -0400)]
bcachefs: Various improvements to bch2_alloc_write()

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: bch2_trans_mark_update()
Kent Overstreet [Mon, 11 Mar 2019 18:59:58 +0000 (14:59 -0400)]
bcachefs: bch2_trans_mark_update()

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: btree_bkey_cached_common
Kent Overstreet [Sat, 6 Jun 2020 16:28:01 +0000 (12:28 -0400)]
bcachefs: btree_bkey_cached_common

This is prep work for the btree key cache: btree iterators will point to
either struct btree, or a new struct bkey_cached.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: Write out fs usage consistently
Kent Overstreet [Mon, 11 Feb 2019 00:34:47 +0000 (19:34 -0500)]
bcachefs: Write out fs usage consistently

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: Avoid write lock on mark_lock
Kent Overstreet [Thu, 3 Dec 2020 19:17:33 +0000 (14:17 -0500)]
bcachefs: Avoid write lock on mark_lock

mark_lock is a frequently taken lock, and there's also potential for
deadlocks since currently bch2_clear_page_bits which is called from
memory reclaim has to take it to drop disk reservations.

The disk reservation get path takes it when it recalculates the number
of sectors known to be available, but it's not really needed for
consistency.  We just want to make sure we only have one thread updating
the sectors_available count, which we can do with a dedicated mutex.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: Fix a bug with multiple iterators being traversed
Kent Overstreet [Tue, 14 May 2019 17:25:25 +0000 (13:25 -0400)]
bcachefs: Fix a bug with multiple iterators being traversed

If upgrade fails on one iterator, but it was copied from another
iterator and will be freed before transaction restart, then the original
iterator will get traversed first, so we need to make required btree
nodes on the original iterator will be traversed too.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: fix bch2_rbio_narrow_crcs()
Kent Overstreet [Wed, 15 May 2019 16:24:39 +0000 (12:24 -0400)]
bcachefs: fix bch2_rbio_narrow_crcs()

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: Fix journal shutdown path
Kent Overstreet [Fri, 10 May 2019 15:58:00 +0000 (11:58 -0400)]
bcachefs: Fix journal shutdown path

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: Fix fsync error reporting
Kent Overstreet [Thu, 18 Apr 2019 00:34:24 +0000 (20:34 -0400)]
bcachefs: Fix fsync error reporting

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: bch2_bkey_ptrs_invalid()
Kent Overstreet [Sat, 11 May 2019 21:32:07 +0000 (17:32 -0400)]
bcachefs: bch2_bkey_ptrs_invalid()

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: Don't hardcode BTREE_ID_EXTENTS
Kent Overstreet [Sat, 11 May 2019 21:29:20 +0000 (17:29 -0400)]
bcachefs: Don't hardcode BTREE_ID_EXTENTS

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: fix bch2_flags_to_text()
Kent Overstreet [Mon, 29 Apr 2019 19:16:18 +0000 (15:16 -0400)]
bcachefs: fix bch2_flags_to_text()

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: Add actual tracepoints for transaction restarts
Kent Overstreet [Tue, 23 Apr 2019 04:10:08 +0000 (00:10 -0400)]
bcachefs: Add actual tracepoints for transaction restarts

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: copy correct journal_seq to dir in create
Kent Overstreet [Thu, 18 Apr 2019 00:10:43 +0000 (20:10 -0400)]
bcachefs: copy correct journal_seq to dir in create

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: Return errors from for_each_btree_key()
Kent Overstreet [Wed, 17 Apr 2019 19:49:28 +0000 (15:49 -0400)]
bcachefs: Return errors from for_each_btree_key()

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: fix triggers for stripes btree
Kent Overstreet [Wed, 17 Apr 2019 19:49:45 +0000 (15:49 -0400)]
bcachefs: fix triggers for stripes btree

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: use same timesource as current_time()
Kent Overstreet [Tue, 16 Apr 2019 20:03:31 +0000 (16:03 -0400)]
bcachefs: use same timesource as current_time()

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: Fix hang while shutting down
Kent Overstreet [Tue, 16 Apr 2019 19:13:16 +0000 (15:13 -0400)]
bcachefs: Fix hang while shutting down

If the allocator thread exited before bch2_dev_allocator_stop() was
called (because of an error), bch2_dev_allocator_quiesce() could hang.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: lockdep fix when going rw from bch2_alloc_write()
Kent Overstreet [Tue, 16 Apr 2019 18:42:05 +0000 (14:42 -0400)]
bcachefs: lockdep fix when going rw from bch2_alloc_write()

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: Mark overwrites from journal replay in initial gc
Kent Overstreet [Mon, 15 Apr 2019 18:58:00 +0000 (14:58 -0400)]
bcachefs: Mark overwrites from journal replay in initial gc

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: Deduplicate keys in the journal before replay
Kent Overstreet [Fri, 12 Apr 2019 02:39:39 +0000 (22:39 -0400)]
bcachefs: Deduplicate keys in the journal before replay

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: Journal replay refactoring
Kent Overstreet [Fri, 12 Apr 2019 02:39:39 +0000 (22:39 -0400)]
bcachefs: Journal replay refactoring

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: cmp_int()
Kent Overstreet [Fri, 12 Apr 2019 08:54:12 +0000 (04:54 -0400)]
bcachefs: cmp_int()

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: Pass flags arg to bch2_alloc_write()
Kent Overstreet [Sat, 6 Apr 2019 19:12:21 +0000 (15:12 -0400)]
bcachefs: Pass flags arg to bch2_alloc_write()

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: allocate sb_read_scratch with __get_free_page
Kent Overstreet [Sat, 6 Apr 2019 18:32:06 +0000 (14:32 -0400)]
bcachefs: allocate sb_read_scratch with __get_free_page

kmalloc allocations aren't guranteed alignment for io

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: delete duplicated code
Kent Overstreet [Fri, 5 Apr 2019 04:20:02 +0000 (00:20 -0400)]
bcachefs: delete duplicated code

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: disallow ever going rw if nochanges or noreplay
Kent Overstreet [Fri, 5 Apr 2019 04:18:52 +0000 (00:18 -0400)]
bcachefs: disallow ever going rw if nochanges or noreplay

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: initial gc no longer needs to touch every node
Kent Overstreet [Fri, 5 Apr 2019 03:01:54 +0000 (23:01 -0400)]
bcachefs: initial gc no longer needs to touch every node

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: Rewrite journal_seq_blacklist machinery
Kent Overstreet [Fri, 5 Apr 2019 01:53:12 +0000 (21:53 -0400)]
bcachefs: Rewrite journal_seq_blacklist machinery

Now, we store blacklisted journal sequence numbers in the superblock,
not the journal: this helps to greatly simplify the code, and more
importantly it's now implemented in a way that doesn't require all btree
nodes to be visited before starting the journal - instead, we
unconditionally blacklist the next 4 journal sequence numbers after an
unclean shutdown.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: don't lose errors from iterators that have been freed
Kent Overstreet [Fri, 5 Apr 2019 01:28:16 +0000 (21:28 -0400)]
bcachefs: don't lose errors from iterators that have been freed

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: free trans->mem on commit
Kent Overstreet [Wed, 3 Apr 2019 21:11:15 +0000 (17:11 -0400)]
bcachefs: free trans->mem on commit

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: add ability to run gc on metadata only
Kent Overstreet [Sat, 30 Mar 2019 02:22:45 +0000 (22:22 -0400)]
bcachefs: add ability to run gc on metadata only

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: Convert gc errors to fsck errors
Kent Overstreet [Thu, 28 Mar 2019 07:13:27 +0000 (03:13 -0400)]
bcachefs: Convert gc errors to fsck errors

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: ratelimit copygc warning
Kent Overstreet [Thu, 4 Apr 2019 00:38:37 +0000 (20:38 -0400)]
bcachefs: ratelimit copygc warning

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: minor fsck fix
Kent Overstreet [Sun, 31 Mar 2019 23:23:34 +0000 (19:23 -0400)]
bcachefs: minor fsck fix

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: Fsck locking improvements
Kent Overstreet [Sun, 31 Mar 2019 21:37:30 +0000 (17:37 -0400)]
bcachefs: Fsck locking improvements

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: Caller now responsible for calling mark_key for gc
Kent Overstreet [Fri, 29 Mar 2019 23:49:17 +0000 (19:49 -0400)]
bcachefs: Caller now responsible for calling mark_key for gc

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: Refactor bch2_fs_recovery()
Kent Overstreet [Fri, 29 Mar 2019 23:13:54 +0000 (19:13 -0400)]
bcachefs: Refactor bch2_fs_recovery()

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: fix bch2_trans_unlock()
Kent Overstreet [Sun, 31 Mar 2019 22:40:01 +0000 (18:40 -0400)]
bcachefs: fix bch2_trans_unlock()

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: add missing bch2_btree_iter_node_drop() call
Kent Overstreet [Fri, 29 Mar 2019 18:42:34 +0000 (14:42 -0400)]
bcachefs: add missing bch2_btree_iter_node_drop() call

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: allow journal reply on ro mount
Kent Overstreet [Fri, 29 Mar 2019 18:29:47 +0000 (14:29 -0400)]
bcachefs: allow journal reply on ro mount

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: make sure to use BTREE_INSERT_LAZY_RW in fsck
Kent Overstreet [Fri, 29 Mar 2019 18:34:10 +0000 (14:34 -0400)]
bcachefs: make sure to use BTREE_INSERT_LAZY_RW in fsck

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: Track whether filesystem has errors in superblock
Kent Overstreet [Thu, 28 Mar 2019 13:34:55 +0000 (09:34 -0400)]
bcachefs: Track whether filesystem has errors in superblock

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: (invalidate|release)_folio fixes
Kent Overstreet [Sun, 25 Dec 2022 03:45:11 +0000 (22:45 -0500)]
bcachefs: (invalidate|release)_folio fixes

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: Assorted preemption fixes
Kent Overstreet [Sun, 25 Dec 2022 03:44:56 +0000 (22:44 -0500)]
bcachefs: Assorted preemption fixes

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: Write out alloc info more carefully
Kent Overstreet [Thu, 28 Mar 2019 07:40:39 +0000 (03:40 -0400)]
bcachefs: Write out alloc info more carefully

In flight btree updates could update alloc info until they're flushed -
so we have to try writing again after they've been flushed.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: fix initial gc
Kent Overstreet [Thu, 28 Mar 2019 08:49:05 +0000 (04:49 -0400)]
bcachefs: fix initial gc

Buckets weren't being marked as dirty

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: Handle fsck errors at runtime better
Kent Overstreet [Thu, 28 Mar 2019 07:28:59 +0000 (03:28 -0400)]
bcachefs: Handle fsck errors at runtime better

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: simplify gc locking a bit
Kent Overstreet [Thu, 28 Mar 2019 07:08:40 +0000 (03:08 -0400)]
bcachefs: simplify gc locking a bit

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>