Re: dm: Add error information printing for dm_register_target()

From: Mike Snitzer
Date: Tue Apr 04 2023 - 13:49:14 EST


On Sat, Mar 18 2023 at 9:16P -0400,
Yangtao Li <frank.li@xxxxxxxx> wrote:

> Ensure that all error handling branches print error information. In this
> way, when this function fails, the upper-layer functions can directly
> return an error code without missing debugging information. Otherwise,
> the error message will be printed redundantly or missing. BTW, remove
> redundant printing information.
>
> Signed-off-by: Yangtao Li <frank.li@xxxxxxxx>

Hi,

I've picked this up with a few changes (your patch caused me to look
closer at some of the target code and we had some missed cleanup):
https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git/commit/?h=dm-6.4&id=6827af4a9a9f5bb664c42abf7c11af4978d72201
https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git/commit/?h=dm-6.4&id=6b79a428c02769f2a11f8ae76bf866226d134887

So I rebased your patch and tweaked it slightly (and splitting it), see:
https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git/commit/?h=dm-6.4&id=e6c908b5d86faf3dbcf314b1c07c342268e32def
https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux-dm.git/commit/?h=dm-6.4&id=2a455a0b418f972d61b68f9321b7d1892c16b4f7

Thanks,
Mike