]> git.openfabrics.org - ~emulex/infiniband.git/commit
rbd: don't use snapc->seq that way
authorAlex Elder <elder@inktank.com>
Thu, 19 Jul 2012 13:49:18 +0000 (08:49 -0500)
committerSage Weil <sage@inktank.com>
Tue, 31 Jul 2012 01:15:41 +0000 (18:15 -0700)
commit75fe9e19816d6ed3e90f1bd3b741f99bf030e848
tree55d3b46400f943e365ff7fe505528f5749233a14
parenta71b891bc7d77a070e723c8c53d1dd73cf931555
rbd: don't use snapc->seq that way

In what appears to be an artifact of a different way of encoding
whether an rbd image maps a snapshot, __rbd_refresh_header() has
code that arranges to update the seq value in an rbd image's
snapshot context to point to the first entry in its snapshot
array if that's where it was pointing initially.

We now use rbd_dev->snap_id to record the snapshot id--using the
special value CEPH_NOSNAP to indicate the rbd_dev is not mapping a
snapshot at all.

There is therefore no need to check for this case, nor to update the
seq value, in __rbd_refresh_header().  Just preserve the seq value
that rbd_read_header() provides (which, at the moment, is nothing).

Signed-off-by: Alex Elder <elder@inktank.com>
Reviewed-by: Josh Durgin <josh.durgin@inktank.com>
drivers/block/rbd.c