On 2/6/21 2:39 AM, Mike Snitzer wrote:
> On Mon, Feb 01 2021 at 10:35pm -0500,
> Jeffle Xu <[email protected]> wrote:
>
>> According to the definition of dm_iterate_devices_fn:
>> * This function must iterate through each section of device used by the
>> * target until it encounters a non-zero return code, which it then returns.
>> * Returns zero if no callout returned non-zero.
>>
>> For some target type (e.g., dm-stripe), one call of iterate_devices() may
>> iterate multiple underlying devices internally, in which case a non-zero
>> return code returned by iterate_devices_callout_fn will stop the iteration
>> in advance.
>>
>> Thus if we want to ensure that _all_ underlying devices support some kind of
>> attribute, the iteration structure like dm_table_supports_nowait() should be
>> used, while the input iterate_devices_callout_fn should handle the 'not
>> support' semantics. On the opposite, the iteration structure like
>> dm_table_any_device_attribute() should be used if _any_ underlying device
>> supporting this attibute is sufficient. In this case, the input
>> iterate_devices_callout_fn should handle the 'support' semantics.
>>
>> Fixes: 545ed20e6df6 ("dm: add infrastructure for DAX support")
>> Fixes: c3c4555edd10 ("dm table: clear add_random unless all devices have it
>> set")
>> Fixes: 4693c9668fdc ("dm table: propagate non rotational flag")
>> Cc: [email protected]
>> Signed-off-by: Jeffle Xu <[email protected]>
>
> Thanks for auditing and fixing this up. It has been on my todo so
> you've really helped me out -- your changes look correct to me.
>
> I've staged it for 5.12, the stable fix will likely need manual fixups
> depending on the stable tree... we'll just need to assist with
> backport(s) as needed.
I'm glad to help offer the stable backport. But I don't know which
kernel version the stable kernel is still being maintained. Also which
mailing list I should send to when I finished backporting?
--
Thanks,
Jeffle
--
dm-devel mailing list
[email protected]
https://listman.redhat.com/mailman/listinfo/dm-devel