]> git.apps.os.sepia.ceph.com Git - ceph.git/commit
librbd: fix snapshot handling
authorJosh Durgin <josh.durgin@dreamhost.com>
Wed, 30 Mar 2011 23:41:00 +0000 (16:41 -0700)
committerJosh Durgin <josh.durgin@dreamhost.com>
Thu, 31 Mar 2011 00:26:59 +0000 (17:26 -0700)
commite424171cbc7ca663fae39c319017fa8c47d97808
treef7417fc15d9e680c12dc28d197f4a41ac1b3043e
parent7b28d5af6750b33d3ebe46d59bf72ef0c6389dda
librbd: fix snapshot handling

To ensure consistency, always set the snap context when the header is
updated. If snapid is set, we update librados' snapid when refreshing
the header as well. Also use CEPH_NOSNAP instead of 0 as the default
snapid to prevent confusion. These changes fix snapshot creation
and removal, and prevent writing to a snapshot.

Rollback is fixed by using selfmanaged_snapshot_rollback.

Signed-off-by: Josh Durgin <josh.durgin@dreamhost.com>
src/librbd.cc