[dm-devel] [QUESTION]: multipath device with wrong path lead to metadata err
lixiaokeng
lixiaokeng at huawei.com
Thu Feb 4 11:25:42 UTC 2021
Hi Martin,
On 2021/1/27 7:11, Martin Wilck wrote:
> So we can only conclude that (if there's no kernel refcounting bug,
> which I doubt) either orphan_path()->uninitialize_path() had been
> called (closing the fd), or that opening the sd device had failed in
> the first place (in which case the path WWID should have been nulled in
> pathinfo(). In both cases it makes little sense that the path should
> still be part of a struct multipath.
I have an idea.
If pp->fd < 0 ("Couldn't open device node"), pathinfo() returns
PATHINFO_FAILED. Don't close(pp->fd) in orphan_path(). It may solve the
problem (device with wrong path). I will take some time to test it.
However, I don’t know if there are potential risks. Do you have
suggestions about this?
Regards,
Lixiaokeng
More information about the dm-devel
mailing list