[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Fwd: [sheepdog] Call to sd_truncate()
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] Fwd: [sheepdog] Call to sd_truncate() |
Date: |
Mon, 16 Dec 2013 17:14:31 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Thu, Dec 12, 2013 at 12:15:07PM +0100, Hadrien KOHL wrote:
> I am having trouble with my qemu guests. I am facing buffer input output
> errors on the guests' kernel log:
> [TIMESTAMP] Buffer I/O error on device vda1, logical block XXXXXX
> [TIMESTAMP] end_request: I/O error, dev vda, sector XXXXXX
>
> I am also reading in the qemu log:
> qemu-system-x86_64: shrinking is not supported
>
> I traced this message to the block driver I am using (sheepdog):
> static int sd_truncate(BlockDriverState *bs, int64_t offset)
> {
> BDRVSheepdogState *s = bs->opaque;
> int ret, fd;
> unsigned int datalen;
>
> if (offset < s->inode.vdi_size) {
> error_report("shrinking is not supported");
> return -EINVAL;
> } else if (offset > SD_MAX_VDI_SIZE) {
> error_report("too big image size");
> return -EINVAL;
> }
>
> fd = connect_to_sdog(s);
> if (fd < 0) {
> return fd;
> }
> ...
> }
>
> This function is called as the .bdrv_truncate function. I already asked
> people on sheepdog about what could cause calls to this function but as far
> as they know, only qemu-img resize could call this function.
> I am using libvirt as well.
>
> Does anyone have a clue?
For the record, Liu Yuan submitted a patch to fix this and it has been
merged into the block tree:
sheepdog: fix dynamic grow for running qcow2 format
Stefan