[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API |
Date: |
Wed, 18 Jul 2012 10:41:30 +0100 |
On Wed, Jul 18, 2012 at 9:51 AM, Wenchao Xia <address@hidden> wrote:
> /* sync access */
> int qbdrvs_read(BlockDriverState *bs, int64_t sector_num,
> uint8_t *buf, int nb_sectors);
> int qbdrvs_write(BlockDriverState *bs, int64_t sector_num,
> const uint8_t *buf, int nb_sectors);
Whether to provide sync and/or async access is a key question.
Synchronous APIs are great for writing dedicated tools like dd, cp,
convert, etc.
Asynchronous APIs are essential for integrating image file I/O into
event-driven programs like libvirt. Here, the ability to do other
things while image file I/O is in progress is a requirement. It may
also be necessary to cancel or timeout if an operation is not making
progress or the user decides to stop it.
I think we need to provide both sync and async. Libraries like
libssh2 and libcurl already do this so their APIs can be used as a
starting point for async I/O.
Stefan
- Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API, (continued)
- Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API, Michael Tokarev, 2012/07/13
- Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API, Blue Swirl, 2012/07/13
- Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API, Stefan Weil, 2012/07/13
- Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API, Lluís Vilanova, 2012/07/13
- Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API, Stefan Hajnoczi, 2012/07/16
- Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API, Wenchao Xia, 2012/07/16
- Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API, Paolo Bonzini, 2012/07/16
- Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API, Wenchao Xia, 2012/07/18
- Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API, Paolo Bonzini, 2012/07/18
- Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API, Kevin Wolf, 2012/07/18
- Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API,
Stefan Hajnoczi <=
- Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API, Paolo Bonzini, 2012/07/18
- Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API, Stefan Hajnoczi, 2012/07/18
- Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API, Andreas Färber, 2012/07/18
- Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API, Kevin Wolf, 2012/07/18
- Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API, Daniel P. Berrange, 2012/07/18
- Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API, Paolo Bonzini, 2012/07/18
- Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API, Daniel P. Berrange, 2012/07/18
- Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API, Kevin Wolf, 2012/07/18
- Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API, Daniel P. Berrange, 2012/07/18
- Re: [Qemu-devel] [RFC] introduce a dynamic library to expose qemu block API, Paolo Bonzini, 2012/07/19