• Kent Overstreet's avatar
    bcachefs: Fix bch2_alloc_sectors_start_trans() error handling · 247ce5f1
    Kent Overstreet authored
    When we fail to allocate because of insufficient open buckets, we don't
    want to retry from the full set of devices - we just want to retry in
    blocking mode.
    
    But if the retry in blocking mode fails with a different error code, we
    end up squashing the -BCH_ERR_open_buckets_empty error with an error
    that makes us thing we won't be able to allocate (insufficient_devices)
    - which is incorrect when we didn't try to allocate from the full set of
    devices, and causes the write to fail.
    Signed-off-by: default avatarKent Overstreet <kent.overstreet@linux.dev>
    247ce5f1
alloc_foreground.c 41 KB