[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [Qemu-block] [PATCH v2 0/3] block: Warn about usage of

From: Paolo Bonzini
Subject: Re: [Qemu-devel] [Qemu-block] [PATCH v2 0/3] block: Warn about usage of growing formats over non-growable protocols
Date: Thu, 07 May 2015 15:55:07 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0

On 07/05/2015 15:20, Kevin Wolf wrote:
> > Does ENOSPC over LVM (dm-linear) work at all, and who generates the
> > ENOSPC there?
> The LVM use case is what oVirt uses, so I'm pretty sure that it works.
> I'm now sure who generates the ENOSPC, but it's not qemu anyway. If I
> had to guess, I'd say that the kernel block layer might just forbid
> writing after EOF for any block device.

Indeed, though it's VFS (blkdev_write_iter in fs/block_dev.c) and not
the block layer.  It looks like we need this:

diff --git a/block/block-backend.c b/block/block-backend.c
index 93e46f3..e54c433 100644
--- a/block/block-backend.c
+++ b/block/block-backend.c
@@ -461,7 +461,7 @@ static int blk_check_byte_request(BlockBackend *blk, 
int64_t offset,
     if (offset > len || len - offset < size) {
-        return -EIO;
+        return -ENOSPC;
     return 0;


reply via email to

[Prev in Thread] Current Thread [Next in Thread]