]> xenbits.xensource.com Git - people/aperard/linux.git/commit
rbd: decouple parent info read-in from updating rbd_dev
authorIlya Dryomov <idryomov@gmail.com>
Thu, 5 Oct 2023 15:29:52 +0000 (17:29 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 10 Oct 2023 19:46:42 +0000 (21:46 +0200)
commitbc2a3044015f90453dc885a4a072e38c20ce63b1
tree8a3806cded0992a4492721fa2de8f8b049dc7731
parent2e0114edeb47189c6f8c0c36de38ecb78d75375d
rbd: decouple parent info read-in from updating rbd_dev

commit c10311776f0a8ddea2276df96e255625b07045a8 upstream.

Unlike header read-in, parent info read-in is already decoupled in
get_parent_info(), but it's buried in rbd_dev_v2_parent_info() along
with the processing logic.

Separate the initial read-in and update read-in logic into
rbd_dev_setup_parent() and rbd_dev_update_parent() respectively and
have rbd_dev_v2_parent_info() just populate struct parent_image_info
(i.e. what get_parent_info() did).  Some existing QoI issues, like
flatten of a standalone clone being disregarded on refresh, remain.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Dongsheng Yang <dongsheng.yang@easystack.cn>
[idryomov@gmail.com: backport to 5.4: context]
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/block/rbd.c