Skip to content

rbd: use common code for probe and refresh

Alex Elder ceph-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest7 patches 2 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/7rbd: set the mapping size and features laterdrivers/block/rbd.c+6 -70 replies
2/7rbd: zero format 1 header structure earlierdrivers/block/rbd.c+0 -00 replies
3/7rbd: refactor rbd_header_from_disk()drivers/block/rbd.c+0 -00 replies
4/7rbd: update in-core header directlydrivers/block/rbd.c+0 -00 replies
5/7rbd: simplify rbd_dev_v1_probe()drivers/block/rbd.c+0 -00 replies
6/7rbd: get rid of trivial v1 header wrappersdrivers/block/rbd.c+0 -00 replies
7/7rbd: define rbd_dev_v1_header_info()drivers/block/rbd.c+0 -00 replies

Reviews trailers per patch

None of the 7 patches has a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchJosh Durgin
SeriesR-b
1/7
2/7
3/7
4/7
5/7
6/7
7/7

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/7] rbd: use common code for probe and refresh

This is some work I had nearly done a long time ago. It didn't even have a bug associated with it. I resurrected it over the weekend and ported it to the new code.

It's basically cleanup though. For format 1 rbd images, when probing an image, header information for it is read in and translated directly into the rbd_dev->header structure.

For an image refresh, instead, we use a stack structure to hold the translated header, and then in a second step we copy that into rbd_dev->header.

This series gets rid of the local variable, and always just puts things directly into rbd_dev->header. It also simplifies probe and refresh for both format 1 and format 2, using a common rbd_dev_vX_header_info() function for both purposes.

This set of patches, as well as the two single patches and series of six I just posted, are available in the "review/wip-rbd-cleanup-1" branch of the ceph-client git repository.

-Alex

[PATCH 1/7] rbd: set the mapping size and features later [PATCH 2/7] rbd: zero format 1 header structure earlier [PATCH 3/7] rbd: refactor rbd_header_from_disk() [PATCH 4/7] rbd: update in-core header directly [PATCH 5/7] rbd: simplify rbd_dev_v1_probe() [PATCH 6/7] rbd: get rid of trivial v1 header wrappers [PATCH 7/7] rbd: define rbd_dev_v1_header_info()