qemu-block
[Top][All Lists]
Advanced

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

Re: [Qemu-block] [PATCH 0/2] Fix werror=enospc for qcow2 on iscsi


From: Paolo Bonzini
Subject: Re: [Qemu-block] [PATCH 0/2] Fix werror=enospc for qcow2 on iscsi
Date: Thu, 22 Oct 2015 10:45:06 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0


On 22/10/2015 10:17, Fam Zheng wrote:
> When qcow2 is created on iscsi target with a virtual size greater than 
> physical
> capacity of the LUN, over time it's possible that guest fills too much data 
> and
> at that point, new clusters in qcow2 will be allocated beyond the end of disk.
> 
> werror=enospc is useful for that purpose to allocate more data for the guest,
> except in this case, unlike a host file system, iscsi returns -EIO instead of
> -ENOSPC, which makes it hard to detect and report proper error.
> 
> Fix this by improving iscsi error handling code to return meaningful error
> codes (-ERANGE here), then further translate it to -ENOSPC in qcow2.

FWIW, Linux uses ENOSPC if it detects out of range LBAs:

        if (iocb->ki_pos >= size)
                return -ENOSPC;

so I think it's okay to convert LBA_OUT_OF_RANGE to ENOSPC directly and
avoid patch 2.

Paolo



reply via email to

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