[lvm-devel] [PATCH]pvchange: Fix the deadlock problem

David Teigland teigland at redhat.com
Wed Jun 2 21:45:54 UTC 2021


On Tue, Jun 01, 2021 at 04:14:39PM +0800, Wu Guanghao wrote:
> Hi,
> 
> I found a deadlock problem during testing,the reason is that the pvchange command
> did not acquire the global lock first.

> +	if (!lock_global(cmd, "ex"))
> +		return_ECMD_FAILED;
> +
>  	clear_hint_file(cmd);

Thanks, that's correct, but I changed it a bit to avoid invalidating the
hints more than necessary, which also avoids serializing more commands
than necessary.

https://sourceware.org/git/?p=lvm2.git;a=commit;h=2bce6faed017df8da3e659eff3f42f39d25c7f09




More information about the lvm-devel mailing list