[sheepdog] Call to sd_truncate()

Hadrien KOHL hadrien.kohl at gmail.com
Fri Dec 13 17:01:42 CET 2013


Here we go:

# qemu-img create -f qcow2 sheepdog:test 10G
Formatting 'sheepdog:test', fmt=qcow2 size=10737418240 encryption=off
cluster_size=65536 lazy_refcounts=off

# qemu-system-x86_64 -machine accel=kvm:tcg -drive
file=sheepdog:127.0.0.1:7000:test,if=none,id=virtio-disk0,format=qcow2,cache=writeback
-cdrom /vm/iso/install-amd64-minimal-20131010.iso -device
virtio-blk-pci,scsi=off,bus=pci.0,addr=0x4,drive=virtio-disk0,id=virtio-disk0,bootindex=1
-boot cd -m 1024 -name test -vnc 172.16.0.11:0 -bios
/usr/local/share/qemu/bios.bin
65798144, 73555968
qemu-system-x86_64: shrinking is not supported
371130368, 379322368
qemu-system-x86_64: shrinking is not supported
455671808, 472121344
qemu-system-x86_64: shrinking is not supported
666042368, 674234368
qemu-system-x86_64: shrinking is not supported
776339456, 791805952
qemu-system-x86_64: shrinking is not supported
796459008, 796471296
qemu-system-x86_64: shrinking is not supported

On the guest side:

[   54.739145] end_request: I/O error, dev vda, sector 114688
[   54.739151] Buffer I/O error on device vda, logical block 14336
[   54.739152] lost page write due to I/O error on vda
[   54.739159] Buffer I/O error on device vda, logical block 14337
[   54.739161] lost page write due to I/O error on vda
[   54.739163] Buffer I/O error on device vda, logical block 14338
[   54.739164] lost page write due to I/O error on vda
[   54.739166] Buffer I/O error on device vda, logical block 14339
[   54.739167] lost page write due to I/O error on vda
[   54.739169] Buffer I/O error on device vda, logical block 14340
[   54.739170] lost page write due to I/O error on vda
[   54.739172] Buffer I/O error on device vda, logical block 14341
[   54.739173] lost page write due to I/O error on vda
[   54.739175] Buffer I/O error on device vda, logical block 14342
[   54.739176] lost page write due to I/O error on vda
[   54.739178] Buffer I/O error on device vda, logical block 14343
[   54.739179] lost page write due to I/O error on vda
[   54.739181] Buffer I/O error on device vda, logical block 14344
[   54.739182] lost page write due to I/O error on vda
[   54.739184] Buffer I/O error on device vda, logical block 14345
[   54.739185] lost page write due to I/O error on vda
[   54.739489] end_request: I/O error, dev vda, sector 115696
[   54.739729] end_request: I/O error, dev vda, sector 116704
[   54.739973] end_request: I/O error, dev vda, sector 117712
[   54.740232] end_request: I/O error, dev vda, sector 118720
[   54.740353] end_request: I/O error, dev vda, sector 119728
[   54.742135] end_request: I/O error, dev vda, sector 120736
[   54.742217] end_request: I/O error, dev vda, sector 121744
[   54.742276] end_request: I/O error, dev vda, sector 122752
[   54.742331] end_request: I/O error, dev vda, sector 123760
[   62.117735] blk_update_request: 3 callbacks suppressed
[   62.117739] end_request: I/O error, dev vda, sector 723944
[   62.117742] quiet_error: 1628 callbacks suppressed
[   62.117744] Buffer I/O error on device vda, logical block 90493
[   62.117745] lost page write due to I/O error on vda
[   62.117747] Buffer I/O error on device vda, logical block 90494
[   62.117749] lost page write due to I/O error on vda
[   62.117750] Buffer I/O error on device vda, logical block 90495
[   62.117752] lost page write due to I/O error on vda
[   62.117753] Buffer I/O error on device vda, logical block 90496
[   62.117754] lost page write due to I/O error on vda
[   62.117756] Buffer I/O error on device vda, logical block 90497
[   62.117757] lost page write due to I/O error on vda
[   62.117759] Buffer I/O error on device vda, logical block 90498
[   62.117760] lost page write due to I/O error on vda
[   62.117762] Buffer I/O error on device vda, logical block 90499
[   62.117763] lost page write due to I/O error on vda
[   62.117765] Buffer I/O error on device vda, logical block 90500
[   62.117766] lost page write due to I/O error on vda
[   62.117768] Buffer I/O error on device vda, logical block 90501
[   62.117769] lost page write due to I/O error on vda
[   62.117770] Buffer I/O error on device vda, logical block 90502
[   62.117772] lost page write due to I/O error on vda
[   62.117897] end_request: I/O error, dev vda, sector 724952
[   62.118024] end_request: I/O error, dev vda, sector 725960
[   62.118155] end_request: I/O error, dev vda, sector 726968
[   62.118287] end_request: I/O error, dev vda, sector 727976
[   62.118418] end_request: I/O error, dev vda, sector 728984
[   62.118549] end_request: I/O error, dev vda, sector 729992
[   62.118680] end_request: I/O error, dev vda, sector 731000
[   62.118812] end_request: I/O error, dev vda, sector 732008
[   62.118942] end_request: I/O error, dev vda, sector 733016
[   71.217654] blk_update_request: 15 callbacks suppressed
[   71.217658] end_request: I/O error, dev vda, sector 1299320
[   71.217660] quiet_error: 3126 callbacks suppressed
[   71.217662] Buffer I/O error on device vda, logical block 162415
[   71.217664] lost page write due to I/O error on vda
[   71.217667] Buffer I/O error on device vda, logical block 162416
[   71.217668] lost page write due to I/O error on vda
[   71.217670] Buffer I/O error on device vda, logical block 162417
[   71.217671] lost page write due to I/O error on vda
[   71.217672] Buffer I/O error on device vda, logical block 162418
[   71.217674] lost page write due to I/O error on vda
[   71.217675] Buffer I/O error on device vda, logical block 162419
[   71.217677] lost page write due to I/O error on vda
[   71.217678] Buffer I/O error on device vda, logical block 162420
[   71.217679] lost page write due to I/O error on vda
[   71.217681] Buffer I/O error on device vda, logical block 162421
[   71.217682] lost page write due to I/O error on vda
[   71.217684] Buffer I/O error on device vda, logical block 162422
[   71.217685] lost page write due to I/O error on vda
[   71.217687] Buffer I/O error on device vda, logical block 162423
[   71.217688] lost page write due to I/O error on vda
[   71.217690] Buffer I/O error on device vda, logical block 162424
[   71.217691] lost page write due to I/O error on vda
[   71.217816] end_request: I/O error, dev vda, sector 1300328
[   71.218003] end_request: I/O error, dev vda, sector 1301336
[   71.218067] end_request: I/O error, dev vda, sector 1302344
[   71.218258] end_request: I/O error, dev vda, sector 1303352
[   71.218348] end_request: I/O error, dev vda, sector 1304360
[   71.218464] end_request: I/O error, dev vda, sector 1305368
[   71.218592] end_request: I/O error, dev vda, sector 1306376
[   71.218723] end_request: I/O error, dev vda, sector 1307384
[   71.218854] end_request: I/O error, dev vda, sector 1308392



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

> 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) {
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wpkg.org/pipermail/sheepdog/attachments/20131213/71fbd9d1/attachment-0004.html>


More information about the sheepdog mailing list