Skip to content

Commit

Permalink
rbd: decouple header read-in from updating rbd_dev->header
Browse files Browse the repository at this point in the history
commit 510a733 upstream.

Make rbd_dev_header_info() populate a passed struct rbd_image_header
instead of rbd_dev->header and introduce rbd_dev_update_header() for
updating mutable fields in rbd_dev->header upon refresh.  The initial
read-in of both mutable and immutable fields in rbd_dev_image_probe()
passes in rbd_dev->header so no update step is required there.

rbd_init_layout() is now called directly from rbd_dev_image_probe()
instead of individually in format 1 and format 2 implementations.

Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Reviewed-by: Dongsheng Yang <dongsheng.yang@easystack.cn>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
idryomov authored and gregkh committed Oct 10, 2023
1 parent 33ecf5f commit 377d261
Showing 1 changed file with 114 additions and 92 deletions.

0 comments on commit 377d261

Please sign in to comment.