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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Kent Overstreet [Mon, 14 Jan 2019 02:36:14 +0000 (21:36 -0500)]
bcachefs: Fix a dio bug
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Kent Overstreet [Sun, 13 Jan 2019 21:02:22 +0000 (16:02 -0500)]
bcachefs: More allocator startup improvements
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Kent Overstreet [Sat, 12 Jan 2019 04:23:27 +0000 (23:23 -0500)]
bcachefs: correctly initialize bch_extent_ptr
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Kent Overstreet [Fri, 11 Jan 2019 10:11:07 +0000 (05:11 -0500)]
bcachefs: use crc64 from lib/
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Kent Overstreet [Mon, 17 Dec 2018 13:44:56 +0000 (08:44 -0500)]
bcachefs: Factor out acc_u64s()
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Kent Overstreet [Mon, 17 Dec 2018 13:29:44 +0000 (08:29 -0500)]
bcachefs: Minor replicas.c refactoring
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Kent Overstreet [Wed, 19 Dec 2018 21:01:38 +0000 (16:01 -0500)]
bcachefs: fix new reinherit_attrs ioctl
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Kent Overstreet [Wed, 19 Dec 2018 17:58:56 +0000 (12:58 -0500)]
bcachefs: Lots of option handling improvements
Add helptext to option definitions - so we can unify the option
handling with the format command
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Kent Overstreet [Wed, 19 Dec 2018 13:43:01 +0000 (08:43 -0500)]
bcachefs: more project quota fixes
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Kent Overstreet [Tue, 18 Dec 2018 19:43:00 +0000 (14:43 -0500)]
bcachefs: fix an rcu usage bug
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Kent Overstreet [Tue, 18 Dec 2018 15:15:35 +0000 (10:15 -0500)]
bcachefs: fix ja->cur_idx use while reading journal
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Kent Overstreet [Tue, 18 Dec 2018 13:41:58 +0000 (08:41 -0500)]
bcachefs: fix device remove error path
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Kent Overstreet [Mon, 17 Dec 2018 14:24:49 +0000 (09:24 -0500)]
bcachefs: Fix duplicate ioctl nr
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Kent Overstreet [Mon, 17 Dec 2018 11:11:14 +0000 (06:11 -0500)]
bcachefs: bch2_ioc_reinherit_attrs()
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Kent Overstreet [Mon, 17 Dec 2018 10:31:49 +0000 (05:31 -0500)]
bcachefs: rename keeps inheritable inode opts consistent
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Kent Overstreet [Mon, 17 Dec 2018 10:31:09 +0000 (05:31 -0500)]
bcachefs: add bcachefs_effective xattrs
Allows seeing xattrs that were inherited, not explicitly set
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Kent Overstreet [Thu, 13 Dec 2018 13:32:11 +0000 (08:32 -0500)]
bcachefs: Add flags to indicate if inode opts were inherited or explicitly set
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Kent Overstreet [Mon, 17 Dec 2018 10:43:00 +0000 (05:43 -0500)]
bcachefs: bch2_fs_quota_transfer
improve quota transfer locking & make ei_qid usage more consistent
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Kent Overstreet [Thu, 13 Dec 2018 13:24:21 +0000 (08:24 -0500)]
bcachefs: merge BCH_INODE_FIELDS_INHERIT/BCH_INODE_OPTS
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Kent Overstreet [Thu, 13 Dec 2018 11:01:30 +0000 (06:01 -0500)]
bcachefs: use x-macros more consistently
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Kent Overstreet [Wed, 12 Dec 2018 11:23:25 +0000 (06:23 -0500)]
bcachefs: Fix for building in userspace
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Tim Schlueter [Sun, 9 Dec 2018 21:20:52 +0000 (13:20 -0800)]
bcachefs: Fix bkey_method compilation on gcc 7.3.0
Signed-off-by: Tim Schlueter <schlueter.tim@linux.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Kent Overstreet [Sat, 1 Dec 2018 16:32:12 +0000 (11:32 -0500)]
bcachefs: Include summarized counts in fs_usage
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Kent Overstreet [Tue, 27 Nov 2018 13:23:22 +0000 (08:23 -0500)]
bcachefs: refactor bch_fs_usage
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Kent Overstreet [Sat, 1 Dec 2018 15:32:48 +0000 (10:32 -0500)]
bcachefs: Switch replicas to mark_lock
Prep work for upcoming disk accounting changes
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Kent Overstreet [Thu, 6 Dec 2018 17:01:29 +0000 (12:01 -0500)]
bcachefs: fix an incorrect bkey_debugcheck() call
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Kent Overstreet [Thu, 6 Dec 2018 15:24:22 +0000 (10:24 -0500)]
bcachefs: improve extent debugcheck fn
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Kent Overstreet [Thu, 6 Dec 2018 16:52:58 +0000 (11:52 -0500)]
bcachefs: improve/clarify ptr_disk_sectors()
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Kent Overstreet [Thu, 6 Dec 2018 14:58:03 +0000 (09:58 -0500)]
bcachefs: Fix for running in degraded mode
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Kent Overstreet [Wed, 5 Dec 2018 17:30:02 +0000 (12:30 -0500)]
bcachefs: Compression fixes
regressions from switching disk space accounting to be in compressed
sectors
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Kent Overstreet [Wed, 5 Dec 2018 17:28:35 +0000 (12:28 -0500)]
bcachefs: propagate BCH_WRITE_CACHED
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Kent Overstreet [Mon, 26 Nov 2018 05:13:33 +0000 (00:13 -0500)]
bcachefs: s/usage_lock/mark_lock
better describes what it's for, and we're going to call a new lock
usage_lock
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Kent Overstreet [Sun, 25 Nov 2018 00:01:45 +0000 (19:01 -0500)]
bcachefs: New blockcount field for bch_stripe
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Kent Overstreet [Mon, 19 Nov 2018 06:16:07 +0000 (01:16 -0500)]
bcachefs: move dirty into bucket_mark
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Kent Overstreet [Sun, 22 Jul 2018 03:36:11 +0000 (23:36 -0400)]
bcachefs: Add new alloc fields
prep work for persistent alloc info
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>