On Tue, 17 Oct 2023 20:35:46 +0800 Xiao Ni <xni@xxxxxxxxxx> wrote: > After and include kernel v5.4, it adds one feature bit > MD_FEATURE_RAID0_LAYOUT. It must need to specify a layout for raid0 with more > than one zone. But for raid0 with one zone, in fact it also has a defalut > layout. > > Now for raid0 with one zone, *unknown* layout can be seen when running mdadm > -D command. It's the reason that mdadm doesn't set MD_FEATURE_RAID0_LAYOUT for > raid0 with one zone. Then in kernel space, super_1_validate sets mddev->layout > to -1 because of no MD_FEATURE_RAID0_LAYOUT. In fact, in raid0 io path, it > uses the default layout. Set raid0_need_layout to true if > kernel_version<=v5.4. > > Fixes: 329dfc28debb ('Create: add support for RAID0 layouts.') > Signed-off-by: Xiao Ni <xni@xxxxxxxxxx> > --- LGTM. Reviewed-by: Mariusz Tkaczyk <mariusz.tkaczyk@xxxxxxxxxxxxxxx> Thanks, Mariusz