[sheepdog] Call to sd_truncate()

Liu Yuan namei.unix at gmail.com
Fri Dec 13 16:40:31 CET 2013


On Fri, Dec 13, 2013 at 04:33:18PM +0100, Hadrien KOHL wrote:
> I sure can, but how can I print those information?
> 
> I didn't mention that earlier, but the problem does not arise before a
> couple of hundreds of MB (even though it's a bit random).

you can try following patch and tell the output. what did you mean by 'hunreads
of MB', I notice you just mkfs.ext4 and said then it would cause problem.

Thanks
Yuan

diff --git a/block/sheepdog.c b/block/sheepdog.c
index b4ae50f..2036fbf 100644
--- a/block/sheepdog.c
+++ b/block/sheepdog.c
@@ -1774,6 +1774,7 @@ static int sd_truncate(BlockDriverState *bs, int64_t offset)
     unsigned int datalen;
 
     if (offset < s->inode.vdi_size) {
+        printf("%ld, %ld\n", offset, s->inode.vdi_size);
         error_report("shrinking is not supported");
         return -EINVAL;
     } else if (offset > SD_MAX_VDI_SIZE) {



More information about the sheepdog mailing list