Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
librbd: OBJECT_PENDING should always be treated as dirty
OBJECT_PENDING is a transition state which normally isn't encountered in (snapshot) object maps. In case it's encountered, for example when a snapshot is taken after losing power at the time a discard was being handled, the object should be treated as dirty and produce a diff as a result. Assuming an object is marked OBJECT_PENDING, theoretically there are four cases with respect to object's state in the next snapshot: 1. OBJECT_NONEXISTENT 2. OBJECT_EXISTS 3. OBJECT_PENDING 4. OBJECT_EXISTS_CLEAN Prior to commit b81cd24 ("librbd/object_map: diff state machine should track object existence"), (3) was handled incorrectly (diff set to DIFF_STATE_NONE instead of DIFF_STATE_UPDATED). Post commit 399a45e ("librbd/object_map: rbd diff between two snapshots lists entire image content"), (4) is handled incorrectly (diff set to DIFF_STATE_DATA instead of DIFF_STATE_DATA_UPDATED). Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
- Loading branch information