junneyang / zumastor

Automatically exported from code.google.com/p/zumastor
0 stars 1 forks source link

replication stops because of a bug in fdsize #123

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
will first found this when he was running zumastor replication. Our cbtb
replication tests also failed because of this bug. The bug was introduced
in revision 1579. Here is the fix.

Index: ddsnap.c
===================================================================
--- ddsnap.c    (revision 1584)
+++ ddsnap.c    (working copy)
@@ -1163,11 +1163,11 @@
        u64 extent_addr = 0, chunk_num;
        int current_time, last_update = 0;

-       if (!fullvolume && (source_volume_size = fdsize64(snapdev1)) != -1) {
+       if (!fullvolume && (source_volume_size = fdsize64(snapdev1)) == -1) {
                warn("unable to determine volume size for %s", dev1name);
                goto out;
        }
-       if ((target_volume_size = fdsize64(snapdev2)) != -1) {
+       if ((target_volume_size = fdsize64(snapdev2)) == -1) {
                warn("unable to determine volume size for %s", dev2name);
                goto out;
        }

Jiaying

Original issue reported on code.google.com by jiahotc...@gmail.com on 25 Apr 2008 at 2:48

GoogleCodeExporter commented 9 years ago
Would the smoke test have found this, or is it still borken?

Original comment by daniel.r...@gmail.com on 25 Apr 2008 at 3:06

GoogleCodeExporter commented 9 years ago
It would, since we have a test for replication. LGTM anyway.

Original comment by williama...@gmail.com on 25 Apr 2008 at 3:18

GoogleCodeExporter commented 9 years ago
fixed with revision 1585.

Original comment by jiahotc...@gmail.com on 25 Apr 2008 at 3:29