Skip to content

rbd: use snapc->seq the way server does

Alex Elder ceph-devel 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 3 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4rbd: don't use snapc->seq that waydrivers/block/rbd.c+0 -02 replies
2/4rbd: preserve snapc->seq in rbd_header_set_snap()drivers/block/rbd.c+0 -00 replies
3/4rbd: set snapc->seq only when refreshing headerdrivers/block/rbd.c+0 -00 replies
4/4rbd: kill rbd_image_header->snap_seqdrivers/block/rbd.c+0 -10 replies

Reviews trailers per patch

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

PatchJosh Durgin
SeriesR-b
1/4R-b
2/4
3/4
4/4

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/4] rbd: use snapc->seq the way server does

This series of patches changes the way the snap context "seq" field is used. Currently it is used in a way that isn't really useful, and as such is a bit confusing. This behavior seems to be a hold over from a time when there was no snap_id field maintained for an rbd_dev.

Summary:
[PATCH 1/4] rbd: don't use snapc->seq that way
Removes special handling in __rbd_refresh_header() that ensured the seq field was updated to point to the head if it had been at the start of the function.
[PATCH 2/4] rbd: preserve snapc->seq in rbd_header_set_snap()
Changes rbd_header_set_snap() so it doesn't set the seq field to the snapshot id (for a snapshot mapping) or the highest snapshot id (for the base image).
[PATCH 3/4] rbd: set snapc->seq only when refreshing header
Assigns snapc->seq whenever an updated rbd image header is received rather than when a new snapshot id has been assigned.
[PATCH 4/4] rbd: kill rbd_image_header->snap_seq

    Gets rid of the rbd_image_header->snap_seq field, which
    previously kept the same information now maintained in
    the snapc->seq field.

					-Alex