Skip to content

Instantly share code, notes, and snippets.

Avatar

Daniel Hill YellowOnion

View GitHub Profile
View gist:278b22a6cbc82b4e649fc64a9cf58b7c
bch2_alloc_read:
Lock hold times:
count: 188200
standard:
avg frequency: 0 / ms
stddev frequency: 0 / ms
weighted:
avg frequency: 7692 / ms
stddev frequency: 0 / ms
View gist:c972bc27e0c53a5b16b2bf31e9dba16a
* need_inc_gen 1
* dirty_sectors 512
* cached_sectors 0
* stripe 0
* stripe_redundancy 0
* io_time[READ] 221950502136
* io_time[WRITE] 226135808656
* backpointers: 1
* btree=extents l=1 offset=0:0 len=512 pos=1451038:5037480:U32_MAX
* overwrite: btree=alloc l=0 u64s 19 type alloc_v4 4:665120:0 len 0 ver 0:
View gist:d94c82515cc2a5bb49b450c9aeead36f
version = 7
cpus=6
bch-rebalance/9-804 [002] 3245.621939: bucket_alloc_fail: 253,48 reserve none free 232940 avail 188166 copygc_wait 376754312/360827320 seen 45 open 44 need_journal_commit 0 nouse 0 nonblocking 1 ret -2048
bch-rebalance/9-804 [002] 3245.622251: bucket_alloc_fail: 253,32 reserve none free 46212 avail 16371 copygc_wait 376754312/360827320 seen 18 open 17 need_journal_commit 0 nouse 0 nonblocking 1 ret -2048
kworker/u12:0-932 [000] 3245.622662: bucket_alloc_fail: 253,19 reserve none free 1052832 avail 1023825 copygc_wait 376754312/360827320 seen 192 open 191 need_journal_commit 0 nouse 0 nonblocking 1 ret -2048
bch-rebalance/9-804 [002] 3245.622747: bucket_alloc_fail: 253,48 reserve none free 232940 avail 188166 copygc_wait 376754312/360827320 seen 45 open 44 need_journal_commit 0 nouse 0 nonblocking 1 ret -2048
bch-rebalance/9-804 [002] 3245.622983: bucket_alloc_fail: 253,32 reserve none free 46212 avail 16371 copygc_wait 376754312/360827320 seen 18 open 17
View patch2.diff
diff --git a/fs/bcachefs/buckets.h b/fs/bcachefs/buckets.h
index 670b95b82442..6881502d95f1 100644
--- a/fs/bcachefs/buckets.h
+++ b/fs/bcachefs/buckets.h
@@ -178,12 +178,12 @@ static inline u64 __dev_buckets_available(struct bch_dev *ca,
enum alloc_reserve reserve)
{
return max_t(s64, 0,
- usage.d[BCH_DATA_free].buckets -
- usage.d[BCH_DATA_cached].buckets -
View patch.diff
diff --git a/fs/bcachefs/movinggc.c b/fs/bcachefs/movinggc.c
index f9ad4cb26905..ae4f888e9857 100644
--- a/fs/bcachefs/movinggc.c
+++ b/fs/bcachefs/movinggc.c
@@ -190,11 +190,12 @@ unsigned long bch2_copygc_wait_amount(struct bch_fs *c)
for_each_rw_member(ca, c, dev_idx) {
struct bch_dev_usage usage = bch2_dev_usage_read(ca);
-
- fragmented_allowed = ((__dev_buckets_available(ca, usage, RESERVE_none) *
View gist:f423ad91ef9b1419a9b3e74fd87a5223
[ 0.000000] Linux version 5.18.0-bullettime+ (daniel@Kawasaki-Lemon) (gcc (GCC) 11.3.0, GNU ld (GNU Binutils) 2.38) #154 SMP PREEMPT_DYNAMIC Sat Jun 18 18:09:34 NZST 2022
[ 0.000000] Command line: quiet loglevel=4 net.ifnames=0 init=/nix/store/nvzcid07r5ld42qbf45q3di3nkqd3xk9-nixos-system-nixos-22.11pre383837.033bd4fa9a8/init regInfo=/nix/store/712pwihrh8hjs7j05yp0x2jkpiakg4vh-closure-info/registration console=tty0 console=hvc0
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x200: 'Protection Keys User registers'
[ 0.000000] x86/fpu: xstate_offset[2]: 576, xstate_sizes[2]: 256
[ 0.000000] x86/fpu: xstate_offset[9]: 832, xstate_sizes[9]: 8
[ 0.000000] x86/fpu: Enabled xstate features 0x207, context size is 840 bytes, using 'compacted' format.
[ 0.000000] si
View gist:93b8f93775bf783d8a417502dd358b35
[ 0.000000] Linux version 5.18.0-bullettime+ (daniel@Kawasaki-Lemon) (gcc (GCC) 11.3.0, GNU ld (GNU Binutils) 2.38) #150 SMP PREEMPT_DYNAMIC Fri Jun 17 19:52:02 NZST 2022
[ 0.000000] Command line: quiet loglevel=4 net.ifnames=0 init=/nix/store/nvzcid07r5ld42qbf45q3di3nkqd3xk9-nixos-system-nixos-22.11pre383837.033bd4fa9a8/init regInfo=/nix/store/712pwihrh8hjs7j05yp0x2jkpiakg4vh-closure-info/registration console=tty0 console=hvc0
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x001: 'x87 floating point registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x002: 'SSE registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x004: 'AVX registers'
[ 0.000000] x86/fpu: Supporting XSAVE feature 0x200: 'Protection Keys User registers'
[ 0.000000] x86/fpu: xstate_offset[2]: 576, xstate_sizes[2]: 256
[ 0.000000] x86/fpu: xstate_offset[9]: 832, xstate_sizes[9]: 8
[ 0.000000] x86/fpu: Enabled xstate features 0x207, context size is 840 bytes, using 'compacted' format.
[ 0.000000] si
View report-0684192d-c97f-425e-89bf-853f0398f511.toml
name = 'pijul'
operating_system = 'unix:Unknown'
crate_version = '1.0.0-beta.1'
explanation = '''
Panic occurred in file '/build/pijul-1.0.0-beta.1-vendor.tar.gz/git2/src/diff.rs' at line 624
'''
cause = 'unknown mode: 33204'
method = 'Panic'
backtrace = '''
View fix2.diff
diff --git a/fs/bcachefs/move.c b/fs/bcachefs/move.c
index 2847000ec60c..7319f338dd39 100644
--- a/fs/bcachefs/move.c
+++ b/fs/bcachefs/move.c
@@ -944,6 +944,8 @@ int bch2_evacuate_bucket(struct bch_fs *c,
bch2_trans_begin(&trans);
+ BUG_ON(bp_offset == U64_MAX);
+
View fix.diff
diff --git a/fs/bcachefs/move.c b/fs/bcachefs/move.c
index 2847000ec60c..2193d8f022c5 100644
--- a/fs/bcachefs/move.c
+++ b/fs/bcachefs/move.c
@@ -946,12 +946,12 @@ int bch2_evacuate_bucket(struct bch_fs *c,
ret = bch2_get_next_backpointer(&trans, bucket, gen,
&bp_offset, &bp, &bp_pos);
+ if (bp_offset == U64_MAX)
+ break;