linux-block.git
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 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>
11 months agobcachefs: Fix a dio bug
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>
11 months agobcachefs: More allocator startup improvements
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>
11 months agobcachefs: correctly initialize bch_extent_ptr
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>
11 months agobcachefs: use crc64 from lib/
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>
11 months agobcachefs: Factor out acc_u64s()
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>
11 months agobcachefs: Minor replicas.c refactoring
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>
11 months agobcachefs: fix new reinherit_attrs ioctl
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>
11 months agobcachefs: Lots of option handling improvements
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>
11 months agobcachefs: more project quota fixes
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>
11 months agobcachefs: fix an rcu usage bug
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>
11 months agobcachefs: fix ja->cur_idx use while reading journal
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>
11 months agobcachefs: fix device remove error path
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>
11 months agobcachefs: Fix duplicate ioctl nr
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>
11 months agobcachefs: bch2_ioc_reinherit_attrs()
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>
11 months agobcachefs: rename keeps inheritable inode opts consistent
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>
11 months agobcachefs: add bcachefs_effective xattrs
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>
11 months agobcachefs: Add flags to indicate if inode opts were inherited or explicitly set
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>
11 months agobcachefs: bch2_fs_quota_transfer
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>
11 months agobcachefs: merge BCH_INODE_FIELDS_INHERIT/BCH_INODE_OPTS
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>
11 months agobcachefs: use x-macros more consistently
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>
11 months agobcachefs: Fix for building in userspace
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>
11 months agobcachefs: Fix bkey_method compilation on gcc 7.3.0
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>
11 months agobcachefs: Include summarized counts in fs_usage
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>
11 months agobcachefs: refactor bch_fs_usage
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>
11 months agobcachefs: Switch replicas to mark_lock
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>
11 months agobcachefs: fix an incorrect bkey_debugcheck() call
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>
11 months agobcachefs: improve extent debugcheck fn
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>
11 months agobcachefs: improve/clarify ptr_disk_sectors()
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>
11 months agobcachefs: Fix for running in degraded mode
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>
11 months agobcachefs: Compression fixes
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>
11 months agobcachefs: propagate BCH_WRITE_CACHED
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>
11 months agobcachefs: s/usage_lock/mark_lock
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>
11 months agobcachefs: New blockcount field for bch_stripe
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>
11 months agobcachefs: move dirty into bucket_mark
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>
11 months agobcachefs: Add new alloc fields
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>
11 months agobcachefs: Deferred btree updates
Kent Overstreet [Tue, 17 Jul 2018 17:50:15 +0000 (13:50 -0400)]
bcachefs: Deferred btree updates

Will be used in the future for inode updates, which will be very helpful
for multithreaded workloads that have to update the inode with every
extent update (appends, or updates that change i_sectors)

Also will be used eventually for fully persistent alloc info

However - we still need a mechanism for reserving space in the journal
prior to getting a journal reservation, so it's not technically safe to
make use of this just yet, we could deadlock with the journal full
(although not likely to be an issue in practice)

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: drop bogus percpu_ref_tryget
Kent Overstreet [Sat, 24 Nov 2018 23:27:16 +0000 (18:27 -0500)]
bcachefs: drop bogus percpu_ref_tryget

caller should already be guarding against rw, and checking here breaks
when caller needs to finish updates for going RO

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: Track nr_inodes with the key marking machinery
Kent Overstreet [Thu, 29 Nov 2018 07:14:31 +0000 (02:14 -0500)]
bcachefs: Track nr_inodes with the key marking machinery

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: Make bkey types globally unique
Kent Overstreet [Thu, 1 Nov 2018 19:10:01 +0000 (15:10 -0400)]
bcachefs: Make bkey types globally unique

this lets us get rid of a lot of extra switch statements - in a lot of
places we dispatch on the btree node type, and then the key type, so
this is a nice cleanup across a lot of code.

Also improve the on disk format versioning stuff.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: Fix a btree iter usage error
Kent Overstreet [Thu, 29 Nov 2018 08:24:06 +0000 (03:24 -0500)]
bcachefs: Fix a btree iter usage error

previously, if the code traversed to the next btree node, that could
return an error (due to lock restarts) - which was not being checked
for.

fix is to rework it so it never iterates past the current leaf node, and
pops an assertion if it ever sees an error.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: Split out bkey_sort.c
Kent Overstreet [Tue, 27 Nov 2018 23:30:56 +0000 (18:30 -0500)]
bcachefs: Split out bkey_sort.c

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: fix waiting on an open journal entry
Kent Overstreet [Tue, 27 Nov 2018 15:06:18 +0000 (10:06 -0500)]
bcachefs: fix waiting on an open journal entry

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: return errors correctly from gc
Kent Overstreet [Tue, 27 Nov 2018 13:14:51 +0000 (08:14 -0500)]
bcachefs: return errors correctly from gc

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: Hold usage_lock over mark_key and fs_usage_apply
Kent Overstreet [Fri, 23 Nov 2018 03:50:35 +0000 (22:50 -0500)]
bcachefs: Hold usage_lock over mark_key and fs_usage_apply

Fixes an inconsistency at the end of gc

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: Stripes now properly subject to gc
Kent Overstreet [Sat, 24 Nov 2018 22:09:44 +0000 (17:09 -0500)]
bcachefs: Stripes now properly subject to gc

gc now verifies the contents of the stripes radix tree, important for
persistent alloc info

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: Btree locking fix, refactoring
Kent Overstreet [Fri, 23 Nov 2018 10:19:25 +0000 (05:19 -0500)]
bcachefs: Btree locking fix, refactoring

Hit an assertion, probably spurious, indicating an iterator was unlocked
when it shouldn't have been (spurious because it wasn't locked at all
when the caller called btree_insert_at()).

Add a flag, BTREE_ITER_NOUNLOCK, and tighten up the assertions

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: shim for userspace raid library
Kent Overstreet [Fri, 23 Nov 2018 07:06:18 +0000 (02:06 -0500)]
bcachefs: shim for userspace raid library

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agoRevert "bcachefs: start erasure coding after journal replay"
Kent Overstreet [Fri, 23 Nov 2018 07:50:33 +0000 (02:50 -0500)]
Revert "bcachefs: start erasure coding after journal replay"

This reverts commit 36f389604294dfc953e6f5624ceb683818d32f28.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: Allow for new alloc fields
Kent Overstreet [Fri, 23 Nov 2018 04:05:13 +0000 (23:05 -0500)]
bcachefs: Allow for new alloc fields

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: gc now operates on second set of bucket marks
Kent Overstreet [Mon, 23 Jul 2018 09:32:01 +0000 (05:32 -0400)]
bcachefs: gc now operates on second set of bucket marks

This means we can now use gc to verify the allocation information -
important for testing persistant alloc info

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: fix mempool double initialization
Kent Overstreet [Wed, 21 Nov 2018 12:16:28 +0000 (07:16 -0500)]
bcachefs: fix mempool double initialization

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: fix btree iterator bug when using depth > 0
Kent Overstreet [Wed, 21 Nov 2018 07:59:07 +0000 (02:59 -0500)]
bcachefs: fix btree iterator bug when using depth > 0

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: Allocator startup improvements
Kent Overstreet [Mon, 19 Nov 2018 04:20:21 +0000 (23:20 -0500)]
bcachefs: Allocator startup improvements

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: Journal refactoring
Kent Overstreet [Sun, 18 Nov 2018 23:32:16 +0000 (18:32 -0500)]
bcachefs: Journal refactoring

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: Don't block on journal reservation with btree locks held
Kent Overstreet [Mon, 19 Nov 2018 02:35:59 +0000 (21:35 -0500)]
bcachefs: Don't block on journal reservation with btree locks held

Fixes a deadlock between the allocator thread, when it first starts up,
and journal replay

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: start erasure coding after journal replay
Kent Overstreet [Mon, 19 Nov 2018 01:42:02 +0000 (20:42 -0500)]
bcachefs: start erasure coding after journal replay

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: Clean up, possixly fix page disk reservation accounting
Kent Overstreet [Thu, 15 Nov 2018 02:53:40 +0000 (21:53 -0500)]
bcachefs: Clean up, possixly fix page disk reservation accounting

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: Fix an error path
Kent Overstreet [Thu, 15 Nov 2018 02:53:25 +0000 (21:53 -0500)]
bcachefs: Fix an error path

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: fix typo when picking read method
Kent Overstreet [Wed, 14 Nov 2018 03:10:27 +0000 (22:10 -0500)]
bcachefs: fix typo when picking read method

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: Erasure coding
Kent Overstreet [Thu, 1 Nov 2018 19:13:19 +0000 (15:13 -0400)]
bcachefs: Erasure coding

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: More btree gc refactorings
Kent Overstreet [Mon, 12 Nov 2018 22:26:36 +0000 (17:26 -0500)]
bcachefs: More btree gc refactorings

more prep work for erasure coding

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: Centralize marking of replicas in btree update path
Kent Overstreet [Wed, 7 Nov 2018 22:48:32 +0000 (17:48 -0500)]
bcachefs: Centralize marking of replicas in btree update path

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: Move key marking out of extents.c
Kent Overstreet [Mon, 5 Nov 2018 07:31:48 +0000 (02:31 -0500)]
bcachefs: Move key marking out of extents.c

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: stripe support for replicas tracking
Kent Overstreet [Tue, 30 Oct 2018 18:32:47 +0000 (14:32 -0400)]
bcachefs: stripe support for replicas tracking

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: Check for unsupported features
Kent Overstreet [Mon, 12 Nov 2018 23:30:55 +0000 (18:30 -0500)]
bcachefs: Check for unsupported features

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: revamp to_text methods
Kent Overstreet [Fri, 9 Nov 2018 06:24:07 +0000 (01:24 -0500)]
bcachefs: revamp to_text methods

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: delete some dead code
Kent Overstreet [Fri, 9 Nov 2018 06:42:49 +0000 (01:42 -0500)]
bcachefs: delete some dead code

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: fix a replicas bug
Kent Overstreet [Fri, 9 Nov 2018 05:55:20 +0000 (00:55 -0500)]
bcachefs: fix a replicas bug

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
11 months agobcachefs: Set the last mount time using the realtime clock
Tim Schlueter [Mon, 5 Nov 2018 04:14:46 +0000 (20:14 -0800)]
bcachefs: Set the last mount time using the realtime clock

This way the last mount time is actually meaningful instead of just being
various times from 1970 (which happens with the monotonic clock).

Also, roundup_pow_of_two() is undefined when passed in 0, so check before
calling it.

Signed-off-by: Tim Schlueter <schlueter.tim@linux.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>