]> git.proxmox.com Git - qemu.git/commit
sheepdog: don't update inode when create_and_write fails
authorLiu Yuan <tailai.ly@taobao.com>
Mon, 17 Dec 2012 06:17:26 +0000 (14:17 +0800)
committerStefan Hajnoczi <stefanha@redhat.com>
Wed, 2 Jan 2013 15:08:58 +0000 (16:08 +0100)
commitbd751f2204a03d6fcd47a4b4b12ac534d2ecbea7
treed06a3a3e97f20444af4fe75df5dab640de060e64
parentfccedc624c425e3acb1557f9f9b13104427ec5ce
sheepdog: don't update inode when create_and_write fails

For the error case such as SD_RES_NO_SPACE, we shouldn't update the inode bitmap
to avoid the scenario that the object is allocated but wasn't created at the
server side. This will result in VM's IO error on the failed object.

Cc: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Cc: Kevin Wolf <kwolf@redhat.com>
Signed-off-by: Liu Yuan <tailai.ly@taobao.com>
Reviewed-by: MORITA Kazutaka <morita.kazutaka@lab.ntt.co.jp>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
block/sheepdog.c