Skip to content

Commit 720261c

Browse files
committed
Merge tag 'bcachefs-2024-07-18.2' of https://evilpiepirate.org/git/bcachefs
Pull bcachefs updates from Kent Overstreet: - Metadata version 1.8: Stripe sectors accounting, BCH_DATA_unstriped This splits out the accounting of dirty sectors and stripe sectors in alloc keys; this lets us see stripe buckets that still have unstriped data in them. This is needed for ensuring that erasure coding is working correctly, as well as completing stripe creation after a crash. - Metadata version 1.9: Disk accounting rewrite The previous disk accounting scheme relied heavily on percpu counters that were also sharded by outstanding journal buffer; it was fast but not extensible or scalable, and meant that all accounting counters were recorded in every journal entry. The new disk accounting scheme stores accounting as normal btree keys; updates are deltas until they are flushed by the btree write buffer. This means we have no practical limit on the number of counters, and a new tagged union format that's easy to extend. We now have counters for compression type/ratio, per-snapshot-id usage, per-btree-id usage, and pending rebalance work. - Self healing on read IO/checksum error Data is now automatically rewritten if we get a read error and then a successful retry - Mount API conversion (thanks to Thomas Bertschinger) - Better lockdep coverage Previously, btree node locks were tracked individually by lockdep, like any other lock. But we may take _many_ btree node locks simultaneously, we easily blow through the limit of 48 locks that lockdep can track, leading to lockdep turning itself off. Tracking each btree node lock individually isn't really necessary since we have our own cycle detector for deadlock avoidance and centralized tracking of btree node locks, so we now have a single lockdep_map in btree_trans for "any btree nodes are locked". - Some more small incremental work towards online check_allocations - Lots more debugging improvements - Fixes, including: - undefined behaviour fixes, originally noted as breaking userspace LTO builds - fix a spurious warning in fsck_err, reported by Marcin - fix an integer overflow on trans->nr_updates, also reported by Marcin; this broke during deletion of highly fragmented indirect extents * tag 'bcachefs-2024-07-18.2' of https://evilpiepirate.org/git/bcachefs: (120 commits) lockdep: Add comments for lockdep_set_no{validate,track}_class() bcachefs: Fix integer overflow on trans->nr_updates bcachefs: silence silly kdoc warning bcachefs: Fix fsck warning about btree_trans not passed to fsck error bcachefs: Add an error message for insufficient rw journal devs bcachefs: varint: Avoid left-shift of a negative value bcachefs: darray: Don't pass NULL to memcpy() bcachefs: Kill bch2_assert_btree_nodes_not_locked() bcachefs: Rename BCH_WRITE_DONE -> BCH_WRITE_SUBMITTED bcachefs: __bch2_read(): call trans_begin() on every loop iter bcachefs: show none if label is not set bcachefs: drop packed, aligned from bkey_inode_buf bcachefs: btree node scan: fall back to comparing by journal seq bcachefs: Add lockdep support for btree node locks lockdep: lockdep_set_notrack_class() bcachefs: Improve copygc_wait_to_text() bcachefs: Convert clock code to u64s bcachefs: Improve startup message bcachefs: Self healing on read IO error bcachefs: Make read_only a mount option again, but hidden ...
2 parents 4f40c63 + a97b43f commit 720261c

File tree

115 files changed

+3908
-2683
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

115 files changed

+3908
-2683
lines changed

MAINTAINERS

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3720,7 +3720,6 @@ F: drivers/md/bcache/
37203720

37213721
BCACHEFS
37223722
M: Kent Overstreet <[email protected]>
3723-
R: Brian Foster <[email protected]>
37243723
37253724
S: Supported
37263725
C: irc://irc.oftc.net/bcache

fs/bcachefs/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,11 @@ bcachefs-y := \
2929
clock.o \
3030
compress.o \
3131
darray.o \
32+
data_update.o \
3233
debug.o \
3334
dirent.o \
35+
disk_accounting.o \
3436
disk_groups.o \
35-
data_update.o \
3637
ec.o \
3738
errcode.o \
3839
error.o \

fs/bcachefs/acl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -346,14 +346,14 @@ int bch2_set_acl(struct mnt_idmap *idmap,
346346
{
347347
struct bch_inode_info *inode = to_bch_ei(dentry->d_inode);
348348
struct bch_fs *c = inode->v.i_sb->s_fs_info;
349-
struct btree_trans *trans = bch2_trans_get(c);
350349
struct btree_iter inode_iter = { NULL };
351350
struct bch_inode_unpacked inode_u;
352351
struct posix_acl *acl;
353352
umode_t mode;
354353
int ret;
355354

356355
mutex_lock(&inode->ei_update_lock);
356+
struct btree_trans *trans = bch2_trans_get(c);
357357
retry:
358358
bch2_trans_begin(trans);
359359
acl = _acl;
@@ -394,8 +394,8 @@ int bch2_set_acl(struct mnt_idmap *idmap,
394394

395395
set_cached_acl(&inode->v, type, acl);
396396
err:
397-
mutex_unlock(&inode->ei_update_lock);
398397
bch2_trans_put(trans);
398+
mutex_unlock(&inode->ei_update_lock);
399399

400400
return ret;
401401
}

0 commit comments

Comments
 (0)