[sheepdog] Call to sd_truncate()

Hadrien KOHL hadrien.kohl at gmail.com
Fri Dec 13 18:47:33 CET 2013


Excellent! The problem is gone! I filled up the disk (10Gb) without
problems.

I don't totally understand the effect of the bug and I installed a few
virtual machines on my setup. Do you think the disks could have been
corrupted and that I should start over?

Thank you!


2013/12/13 Liu Yuan <namei.unix at gmail.com>

> On Fri, Dec 13, 2013 at 05:48:55PM +0100, Hadrien KOHL wrote:
> > Sure,  on what commit should apply this patch?
>
> I think current commit you are testing.
>
> After the patch, it looks like following:
>
> static coroutine_fn int sd_co_writev(BlockDriverState *bs, int64_t
> sector_num,
>                         int nb_sectors, QEMUIOVector *qiov)
> {
>     SheepdogAIOCB *acb;
>     int ret;
>     int64_t offset = (sector_num + nb_sectors) * BDRV_SECTOR_SIZE;
>     BDRVSheepdogState *s = bs->opaque;
>
>     if (bs->growable && offset > s->inode.vdi_size) {
>         ret = sd_truncate(bs, offset);
>         if (ret < 0) {
>             return ret;
>         }
>     }
>
>
> Thanks
> Yuan
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wpkg.org/pipermail/sheepdog/attachments/20131213/b35cdf04/attachment-0004.html>


More information about the sheepdog mailing list