Re: [Qemu-devel] [PATCH Update] sheepdog: don't update inode when create_and_write fails

2012-12-16 Thread MORITA Kazutaka
At Mon, 17 Dec 2012 13:22:31 +0800, Liu Yuan wrote: > > On 12/17/2012 11:43 AM, MORITA Kazutaka wrote: > > send_pending_req() needs to be called even in error case. Rather than > > moving the error check, I think it looks better to update > > s->inode.data_vdi_id only when rsp.result is SD_RES_SU

Re: [Qemu-devel] [PATCH Update] sheepdog: don't update inode when create_and_write fails

2012-12-16 Thread Liu Yuan
On 12/17/2012 11:43 AM, MORITA Kazutaka wrote: > send_pending_req() needs to be called even in error case. Rather than > moving the error check, I think it looks better to update > s->inode.data_vdi_id only when rsp.result is SD_RES_SUCCESS. Why can't we check the rsp.result in the first place? d

Re: [Qemu-devel] [PATCH Update] sheepdog: don't update inode when create_and_write fails

2012-12-16 Thread MORITA Kazutaka
At Sat, 15 Dec 2012 17:59:12 +0800, Liu Yuan wrote: > > From: Liu Yuan > > 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 fa

[Qemu-devel] [PATCH Update] sheepdog: don't update inode when create_and_write fails

2012-12-15 Thread Liu Yuan
From: Liu Yuan 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 Cc: Kevin Wolf Signed-off-by: Li