public inbox for kvm@vger.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <levinsasha928@gmail.com>
To: penberg@cs.helsinki.fi
Cc: kvm@vger.kernel.org, mingo@elte.hu, asias.hejun@gmail.com,
	gorcunov@gmail.com, Sasha Levin <levinsasha928@gmail.com>
Subject: [PATCH v2 04/10] kvm tools: Modify behaviour on missing ops ptr
Date: Tue,  1 Nov 2011 18:06:13 +0200	[thread overview]
Message-ID: <1320163579-13811-4-git-send-email-levinsasha928@gmail.com> (raw)
In-Reply-To: <1320163579-13811-1-git-send-email-levinsasha928@gmail.com>

In case a read or write op ptr is missing simply ignore it instead of
critically failing. This provides an easier way to prevent read or write
in specific scenarios.

Signed-off-by: Sasha Levin <levinsasha928@gmail.com>
---
 tools/kvm/disk/core.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/kvm/disk/core.c b/tools/kvm/disk/core.c
index 9a84f39..4f51cbe 100644
--- a/tools/kvm/disk/core.c
+++ b/tools/kvm/disk/core.c
@@ -147,7 +147,7 @@ ssize_t disk_image__read(struct disk_image *disk, u64 sector, const struct iovec
 			return -1;
 		}
 	} else {
-		die("No disk image operation for read\n");
+		/* Do nothing */
 	}
 
 	return total;
@@ -174,7 +174,7 @@ ssize_t disk_image__write(struct disk_image *disk, u64 sector, const struct iove
 			return -1;
 		}
 	} else {
-		die("No disk image operation for read\n");
+		/* Do nothing */
 	}
 
 	return total;
-- 
1.7.7.1


  parent reply	other threads:[~2011-11-01 16:08 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-01 16:06 [PATCH v2 01/10] kvm tools: Switch to using an enum for disk image types Sasha Levin
2011-11-01 16:06 ` [PATCH v2 02/10] kvm tools: Remove the non-iov interface from disk image ops Sasha Levin
2011-11-01 16:06 ` [PATCH v2 03/10] kvm tools: Modify disk ops usage Sasha Levin
2011-11-01 16:06 ` Sasha Levin [this message]
2011-11-01 16:06 ` [PATCH v2 05/10] kvm tools: Add optional callback on disk op completion Sasha Levin
2011-11-01 16:06 ` [PATCH v2 06/10] kvm tools: Remove qcow nowrite function Sasha Levin
2011-11-01 16:06 ` [PATCH v2 07/10] kvm tools: Split io request from completion Sasha Levin
2011-11-01 16:06 ` [PATCH v2 08/10] kvm tools: Hook virtio-blk completion to disk op completion Sasha Levin
2011-11-01 16:06 ` [PATCH v2 09/10] kvm tools: Add aio read write functions Sasha Levin
2011-11-01 16:06 ` [PATCH v2 10/10] kvm tools: Use native vectored AIO in virtio-blk Sasha Levin
2011-11-01 17:07   ` Pekka Enberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1320163579-13811-4-git-send-email-levinsasha928@gmail.com \
    --to=levinsasha928@gmail.com \
    --cc=asias.hejun@gmail.com \
    --cc=gorcunov@gmail.com \
    --cc=kvm@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=penberg@cs.helsinki.fi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox