Displaying 1 result from an estimated 1 matches for "discard_blocks".
2012 Oct 24
2
[BUG][BTRFS-PROGS] Fix Bug to corrupt the img file
...o_dev_start(int fd)
start = 1024;
len -= 1024;
#endif
+
+ if (dev_size < len)
+ return -EIO;
+
return zero_blocks(fd, start, len);
}
@@ -572,7 +576,7 @@ int btrfs_prepare_device(int fd, char *file, int
zero_end, u64 *block_count_ret,
discard_blocks(fd, 0, block_count);
}
- ret = zero_dev_start(fd);
+ ret = zero_dev_start(fd, block_count);
if (ret) {
fprintf(stderr, "failed to zero device start %d\n", ret);
exit(1);
--
1.7.7.6
--
To unsubscribe from this list: send the lin...