commit | caa659f5a0f8d93130a42b24585afa37e11b23a4 | [log] [tgz] |
---|---|---|
author | Yifan Hong <elsk@google.com> | Tue Aug 27 18:56:07 2019 -0700 |
committer | Yifan Hong <elsk@google.com> | Thu Sep 05 15:14:34 2019 -0700 |
tree | d612f31bfc3558712fae26c4b516a01da3d9f602 | |
parent | 452f64cf32a14d6efd77759eae09b09e12f0fef3 [diff] |
libsnapshot: require ex lock for {Create}{CowImage,Snapshot} / DeleteSnapshot Create / Deleting the COW image / snapshot changes states, so it makes sense to require an exclusive lock before doing so. If caller doesn't hold an exclusive lock, parallel calls to MapCowImage / MapSnapshot / UnmapCowImage / UnmapSnapshot may have weird results. Test: libsnapshot_test Change-Id: I4be660df1059ec24144f8baf43a1c8c05d9e372b