Update bcachefs sources to aae76fba15 bcachefs: Use KEY_TYPE_deleted whitouts for extents

This commit is contained in:
Kent Overstreet 2019-12-29 11:15:34 -05:00
parent fec2d17f20
commit 306cf00818
2 changed files with 6 additions and 8 deletions

View File

@ -1 +1 @@
1569db10e2463f01b322f165b37b5ee784cfd7b8
aae76fba150894dc6c8b21a58b110413531af287

View File

@ -173,7 +173,8 @@ static bool set_inc_field(struct pack_state *state, unsigned field, u64 v)
if (bits > state->bits) {
bits -= state->bits;
state->w |= v >> bits;
/* avoid shift by 64 if bits is 0 - bits is never 64 here: */
state->w |= (v >> 1) >> (bits - 1);
*state->p = state->w;
state->p = next_word(state->p);
@ -182,10 +183,7 @@ static bool set_inc_field(struct pack_state *state, unsigned field, u64 v)
}
state->bits -= bits;
EBUG_ON(!state->bits);
/* avoid shift by 64: */
state->w |= (v << 1) << (state->bits - 1);
state->w |= v << state->bits;
return true;
}
@ -372,7 +370,7 @@ static bool set_inc_field_lossy(struct pack_state *state, unsigned field, u64 v)
if (bits > state->bits) {
bits -= state->bits;
state->w |= v >> bits;
state->w |= (v >> 1) >> (bits - 1);
*state->p = state->w;
state->p = next_word(state->p);
@ -381,7 +379,7 @@ static bool set_inc_field_lossy(struct pack_state *state, unsigned field, u64 v)
}
state->bits -= bits;
state->w |= (v << 1) << (state->bits - 1);
state->w |= v << state->bits;
return ret;
}