• Kent Overstreet's avatar
    bcachefs: Don't erasure code cached ptrs · bf0fdb4d
    Kent Overstreet authored
    It doesn't make much sense to be erasure coding cached pointers, we
    should be erasure coding one of the dirty pointers in an extent. This
    patch makes sure we're passing BCH_WRITE_CACHED when we expect the new
    pointer to be a cached pointer, and tweaks the write path to not
    allocate from a stripe when BCH_WRITE_CACHED is set - and fixes an
    assertion we were hitting in the ec path where when adding the stripe to
    an extent and deleting the other pointers the pointer to the stripe
    didn't exist (because dropping all dirty pointers from an extent turns
    it into a KEY_TYPE_error key).
    Signed-off-by: default avatarKent Overstreet <kent.overstreet@gmail.com>
    bf0fdb4d
ec.c 39.1 KB