<div dir="ltr">Sorry, that's the fault braught by my hyper volume patchset.<div><br></div><div>Reviewed-by: Robin Dong <<a href="mailto:sanbai@taobao.com">sanbai@taobao.com</a>></div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">2013/11/29 Liu Yuan <span dir="ltr"><<a href="mailto:namei.unix@gmail.com" target="_blank">namei.unix@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
- clear bitmap for hyper valume<br>
- return error if inode operatoin fails as before<br>
<br>
Signed-off-by: Liu Yuan <<a href="mailto:namei.unix@gmail.com">namei.unix@gmail.com</a>><br>
---<br>
 sheep/ops.c |    8 ++++----<br>
 1 file changed, 4 insertions(+), 4 deletions(-)<br>
<br>
diff --git a/sheep/ops.c b/sheep/ops.c<br>
index b626489..4dffa86 100644<br>
--- a/sheep/ops.c<br>
+++ b/sheep/ops.c<br>
@@ -819,7 +819,7 @@ static int local_flush_vdi(struct request *req)<br>
 static int local_discard_obj(struct request *req)<br>
 {<br>
        uint64_t oid = req->rq.obj.oid;<br>
-       uint32_t vid = oid_to_vid(oid), zero = 0, tmp_vid;<br>
+       uint32_t vid = oid_to_vid(oid), tmp_vid;<br>
        int ret = SD_RES_SUCCESS, idx = data_oid_to_idx(oid);<br>
        struct sd_inode *inode = xmalloc(sizeof(struct sd_inode));<br>
<br>
@@ -832,9 +832,9 @@ static int local_discard_obj(struct request *req)<br>
        tmp_vid = INODE_GET_VID(inode, idx);<br>
        /* if vid in idx is not exist, we don't need to remove it */<br>
        if (tmp_vid) {<br>
-               INODE_SET_VID(inode, idx, vid);<br>
+               INODE_SET_VID(inode, idx, 0);<br>
                ret = sd_inode_write_vid(sheep_bnode_writer, inode, idx, vid,<br>
-                                        zero, 0, false, false);<br>
+                                        0, 0, false, false);<br>
                if (ret != SD_RES_SUCCESS)<br>
                        goto out;<br>
                if (sd_remove_object(oid) != SD_RES_SUCCESS)<br>
@@ -846,7 +846,7 @@ static int local_discard_obj(struct request *req)<br>
         */<br>
 out:<br>
        free(inode);<br>
-       return SD_RES_SUCCESS;<br>
+       return ret;<br>
 }<br>
<br>
 static int local_flush_and_del(struct request *req)<br>
<span class="HOEnZb"><font color="#888888">--<br>
1.7.9.5<br>
<br>
--<br>
sheepdog mailing list<br>
<a href="mailto:sheepdog@lists.wpkg.org">sheepdog@lists.wpkg.org</a><br>
<a href="http://lists.wpkg.org/mailman/listinfo/sheepdog" target="_blank">http://lists.wpkg.org/mailman/listinfo/sheepdog</a><br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br>--<br>Best Regard<br>Robin Dong
</div>