[sheepdog] [PATCH] sheep: correct error code of vdi deletion
Liu Yuan
namei.unix at gmail.com
Mon Jan 6 12:46:50 CET 2014
On Mon, Jan 06, 2014 at 07:37:25PM +0900, Hitoshi Mitake wrote:
> The previous refactoring commit (5e460b4d64441) broke QA 016. This
> patch fixes the problem.
>
> Signed-off-by: Hitoshi Mitake <mitake.hitoshi at lab.ntt.co.jp>
> ---
> sheep/vdi.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/sheep/vdi.c b/sheep/vdi.c
> index ff35e92..6239277 100644
> --- a/sheep/vdi.c
> +++ b/sheep/vdi.c
> @@ -1113,6 +1113,8 @@ static int start_deletion(struct request *req, uint32_t vid)
> * if the VDI is a cloned VDI, delete its objects
> * no matter whether the VDI tree is clear.
> */
> + ret = SD_RES_SUCCESS;
> +
> if (cloned) {
> di->delete_vid_array[0] = vid;
> di->delete_vid_count = 1;
> @@ -1120,7 +1122,6 @@ static int start_deletion(struct request *req, uint32_t vid)
> sd_debug("snapshot chain has valid vdi, just mark vdi %"
> PRIx32 " as deleted.", di->target_vid);
> delete_inode(di->target_vid);
> - ret = SD_RES_SUCCESS;
> goto out;
> }
> }
Applied thanks. I hope before commit, we try our best to run tests to rule out
this kind of mistake, especially for refactoring.
Thanks
Yuan
More information about the sheepdog
mailing list