commit | caaf9a617af7bacaf735586cf6e7ca9a13d7d2ab | [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 | 27fb95dedfafeef20220294f0a814cec06e9db87 [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