Thread (12 messages) 12 messages, 4 authors, 2021-10-29

Re: [PATCH v2 0/4] btrfs: sysfs: set / query btrfs stripe size

From: Johannes Thumshirn <hidden>
Date: 2021-10-29 08:31:40

On 29/10/2021 05:11, Stefan Roesch wrote:
quoted
quoted
In fact I talked about this with Johannes just now.  We sort of conflate the two
things, max_chunk_size and max_stripe_size, to get the answer we want.  But
these aren't well named and don't really behave in a way you'd expect.

Currently, we set max_stripe_size to make sure we clamp down on any dev extents
we find.  So if the whole disk is free we clearly don't want to allocate the
whole thing, so we clamp it down to max_stripe_size.  This, in effect, ends up
being our actual chunk_size.  We have this max_chunk_size thing but it doesn't
really do anything in practice because our stripe_size is already clamped down
so it'll be <= max_chunk_size.
We should also add an ASSERT() to verify we're really never ever going
beyond max_chunk_size.
 
Do you want an ASSERT() against BTRFS_MAX_DATA_CHUNK_SIZE?
Nope, I thought of an ASSERT(stripe_size <= max_chunk_size), but now I'm not sure
anymore if this really makes sense or not.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help