summaryrefslogtreecommitdiff
path: root/fs
AgeCommit message (Collapse)Author
12 hoursbcachefs: Read retries are after checksum errors now REQ_FUAHEADmasterKent Overstreet
REQ_FUA means "skip the drive cache", and it can be used with reads to. If there was a checksum error, we want to retry the whole read path, not read it from cache again. Suggested-by: Benjamin LaHaise <bcrl@kvack.org> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
12 hoursbcachefs: read_fua_testKent Overstreet
Add a sysfs attribute for checking whether read fua appears to behave properly on a device. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
12 hoursbcachefs: shrinker.to_text() methodsKent Overstreet
This adds shrinker.to_text() methods for our shrinkers and hooks them up to our existing to_text() functions. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
12 hoursbcachefs: compat code for pre 6.17for-nextKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
48 hoursbcachefs: kill struct moving_ioKent Overstreet
Prep work for scrub rework: repair will use the original data_update. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
48 hoursbcachefs: kill moving_io.read_completedKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
48 hoursbcachefs: Scrub now uses bch2_data_update_init()Kent Overstreet
Prep work for making scrub error correction use the move.c pipeline. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
48 hoursbcachefs: bch2_dev_usrdata_drop_key() calls bch2_bkey_set_needs_rebalance()Kent Overstreet
Prep work for rebalance handling replicas changes. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2 daysbcachefs: Don't deadlock on disk space when resizing journalKent Overstreet
Disk reservations don't guarantee that a specific device won't be full. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2 daysbcachefs: Kill moving_io.(read|write)_sectorsKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2 daysbcachefs: Kill moving_io.clKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2 daysbcachefs: kill build warning in userspaceKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2 daysbcachefs: BCH_ERR_nopromote_no_rewritesKent Overstreet
Make the io_read_nopromote tracepoint a bit better by giving it an error code for this case. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2 daysbcachefs: read_corrupt_device modparamKent Overstreet
Make the error injection tests a bit better; by limiting error injection to a single device userspace should never see an IO error. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2 daysbcachefs: fast_list.c is only required for async obj debuggingKent Overstreet
It's not supported in userspace - we don't pull in idr yet. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2 daysbcachefs: Silence error message for BCH_SB_MEMBER_INVALIDKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2 daysbcachefs: IO path options no longer may be specified at mount timeKent Overstreet
Specifying them at mount time is problematic for multiple reasons: options specified at mount time aren't persistent, and IO path option changes must create rebalance scan cookies - otherwise we'll flag IO path option inconsistency in check_rebalance_work. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2 daysclosures: kill closure.closure_get_happenedKent Overstreet
With closure_put() now using cmpxchg, this is no longer needed. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2 daysbcachefs: Rebalance scan uses BTREE_ITER_intentKent Overstreet
Avoid transaction restarts from upgrading locks, we usually need to update here. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2 daysbcachefs: bch2_trigger_extent_rebalance()Kent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2 daysbcachefs: Indirect extents don't necessarily need bch_extent_rebalanceKent Overstreet
It should only be kept around if we have inode options - we can't look up the inode once it's in the reflink btree. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2 daysbcachefs: ec_stripe_update_extent() calls set_needs_rebalance()Kent Overstreet
Drop bch_extent_rebalance when an extent no longer needs to be erasure coded. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2 daysbcachefs: Rebalance scan now walks reflink btreeKent Overstreet
Required for propagating new filesystem options to indirect extents Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2 daysbcachefs: Trigger rebalance scan before and after opt changeKent Overstreet
Avoid races with the new consistency checking for rebalance opts: a scan cookie must exist when changing the options to avoid false positives on inconsistency checks, and we need another scan cookie after setting the options to avoid racing with a scan starting before seeing the new options. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2 daysbcachefs: rebalance scan now tracks sectors_seenKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2 daysbcachefs: bch2_bkey_needs_rebalance()Kent Overstreet
Collapse bch2_bkey_sectors_need_rebalance() and bch2_bkey_ptrs_need_rebalance() down to a single function, which outputs both the bitmap of pointers that need to be rebalanced and the number of sectors that need to be processed. This will enable adding other reasons an extent might need to be processed by rebalance: changing the checksum type, increasing/decreasing replication level, enabling/disabling erasure coding, etc. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2 daysbcachefs: bkey_should_have_rb_opts()Kent Overstreet
Factor out a small helper. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2 daysbcachefs: Correct propagation of io options to indirect extentsKent Overstreet
io path options set from the inode should override existing indirect extent options, if REFLINK_P_MAY_UPDATE_OPTS is set. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2 daysbcachefs: Fix cycle detector when cycle exceeds lock graph stack sizeKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2 daysbcachefs: More accurate progress reporting for inner node iterationNikita Ofitserov
Signed-off-by: Nikita Ofitserov <himikof@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2 daysbcachefs: Better progress reporting for btree iteration without leavesNikita Ofitserov
Signed-off-by: Nikita Ofitserov <himikof@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2 daysbcachefs: Use explicit node counts in progress reportingNikita Ofitserov
Also, consider the metadata_replicas option when better accounting is not available. Signed-off-by: Nikita Ofitserov <himikof@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2 daysbcachefs: bcachefs_metadata_version_btree_node_accountingNikita Ofitserov
Introduce btree node number accounting for better progress reporting. This change includes a mandatory upgrade/downgrade. Add 2 new counters for BCH_DISK_ACCOUNTING_btree: total number of btree nodes (ignoring replication) and the number of non-leaf btree nodes (likewise). Those are to be used by recovery progress reporting instead of estimating them. Signed-off-by: Nikita Ofitserov <himikof@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2 daysbcachefs: Don't upgrade/downgrade unresized image filesKent Overstreet
This prevents mounting of unresized image files from failing. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
7 daysbcachefs: backtrace: only skip save/print backtrace if current taskKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
7 daysbcachefs: Make chain printing in check_for_deadlock less chattyKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
7 daysbcachefs: progress indicator for check_btree_backpointers()Kent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
7 daysbcachefs: BCH_COMPAT_no_stale_ptrsKent Overstreet
It turns out we don't want to use the new fast device removal path - which walks backpointers on a device - on old filesystems that didn't have backpointers for cached pointers; they might still have stale pointers. Add a compat feature bit that indicates we know a filesystem has no stale cached pointers, and have check_extents/check_indirect_extents delete any stale cached pointers so we can set it after a successful fsck. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
7 daysbcachefs: Cleanup bch2_extent_normalize()Kent Overstreet
We no longer have stale cached pointers on new filesystems - cached pointers now have backpointers, for multiple reasons - so we can kill most of this code. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
7 daysbcachefs: kill bch2_bkey_normalize()Kent Overstreet
Dead code Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
10 daysbcachefs: Delete dead time_statsKent Overstreet
Accidentally committed in a78a11900ecbb. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
10 daysbcachefs: bs > ps check is not required in userspaceKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
10 daysbcachefs: ptr_to_removed_device is autofixKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
10 daysbcachefs: Improve 'VFS incorrectly tried to delete inode' error messageKent Overstreet
We can easily print paths now. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
10 daysbcachefs: Fix restart handling in bch2_inode_rm_snapshot()Kent Overstreet
This was noticed as spurious 'VFS incorrectly tried to delete inode' errors, where we were leaking a transaction restart error (and failing to call delete_ancestor_snapshot_inodes()). Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
10 daysbcachefs: rbio_narrow_crcs() checksums outside of transactionKent Overstreet
Fix an occasional cause of srcu stall warnings - on very heavily loaded systems, it helps to move work outside of the transaction (and is good to do for performance regardless). Also add some counter, so we can observe success/fail. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
10 daysbcachefs: throttle_writes()Kent Overstreet
Throttle background writeback based on what the allocator is doing. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
10 daysbcahcefs: Improve discard_buckets tracepointsKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
10 daysbcachefs: bch2_do_discards_going_ro()Kent Overstreet
Don't run ourselves out of free space while shutting down. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
10 daysbcachefs: Tweak kstatfs.f_ffree guestimateKent Overstreet
Our inodes are bigger than they used to be - the inode backpointer fields shouldn't have been varint fields, but they came late. Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>