diff options
author | Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp> | 2014-06-06 13:35:11 +0900 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2014-06-06 14:53:55 +0200 |
commit | b544c1aba8681c2fe5d6715fbd37cf6caf1bc7bb (patch) | |
tree | 88e449eb666a95692dbf100c7b9f53f7cb0018d7 /qapi/common.json | |
parent | 405a27640b33c31ccef4001b3f3936b8c9d2218f (diff) |
sheepdog: fix vdi object update after live snapshot
sheepdog driver should decide a write request is COW or not based on inode
object which is active when the write request is issued.
Example of wrong inode update path in the previous driver:
1. drier issues an ordinal write request to an existing object
2. user creates a snapshot of the VDI before the write request is completed
3. the respones for the request is RDONLY, because the VDI is already a snapshot
4. the driver reload an inode object of the new active VDI, then issues a write
request again
5. the second write request can be completed
6. driver decide the request is COW or not with the below conditional branch:
if (s->inode.data_vdi_id[idx] != s->inode.vdi_id) {
7. the ID of the written object and VID of the new active VDI is different, so
the driver updates data_vdi_id[idx] and writes inode object
8. the existing object cannot be seen by the new active VDI, it results object
leaking
Cc: Kevin Wolf <kwolf@redhat.com>
Cc: Stefan Hajnoczi <stefanha@redhat.com>
Cc: Liu Yuan <namei.unix@gmail.com>
Cc: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Signed-off-by: Hitoshi Mitake <mitake.hitoshi@lab.ntt.co.jp>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'qapi/common.json')
0 files changed, 0 insertions, 0 deletions