qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 0/2] Fix werror=enospc for qcow2 on iscsi
@ 2015-10-22  8:17 Fam Zheng
  2015-10-22  8:17 ` [Qemu-devel] [PATCH 1/2] iscsi: Translate scsi sense into error code Fam Zheng
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Fam Zheng @ 2015-10-22  8:17 UTC (permalink / raw)
  To: qemu-devel
  Cc: Kevin Wolf, Paolo Bonzini, Peter Lieven, qemu-block,
	Ronnie Sahlberg

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.

Fam


Fam Zheng (2):
  iscsi: Translate scsi sense into error code
  qcow2: Translate -ERANGE to -ENOSPC

 block/iscsi.c | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++++++-
 block/qcow2.c |  6 ++++++
 2 files changed, 61 insertions(+), 1 deletion(-)

-- 
2.4.3

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2015-10-22 10:07 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-22  8:17 [Qemu-devel] [PATCH 0/2] Fix werror=enospc for qcow2 on iscsi Fam Zheng
2015-10-22  8:17 ` [Qemu-devel] [PATCH 1/2] iscsi: Translate scsi sense into error code Fam Zheng
2015-10-22  8:31   ` Peter Lieven
2015-10-22  8:45     ` Paolo Bonzini
2015-10-22  9:11       ` Peter Lieven
2015-10-22  9:51       ` Fam Zheng
2015-10-22  9:56         ` Paolo Bonzini
2015-10-22  9:11   ` Kevin Wolf
2015-10-22  8:17 ` [Qemu-devel] [PATCH 2/2] qcow2: Translate -ERANGE to -ENOSPC Fam Zheng
2015-10-22  8:32 ` [Qemu-devel] [PATCH 0/2] Fix werror=enospc for qcow2 on iscsi Peter Lieven
2015-10-22 10:06   ` Fam Zheng
2015-10-22  8:45 ` Paolo Bonzini
2015-10-22  9:03   ` Kevin Wolf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).