All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH 00/18] nbd: BLOCK_STATUS
@ 2017-02-03 15:47 Vladimir Sementsov-Ogievskiy
  2017-02-03 15:47 ` [Qemu-devel] [PATCH 01/18] nbd: rename NBD_REPLY_MAGIC to NBD_SIMPLE_REPLY_MAGIC Vladimir Sementsov-Ogievskiy
                   ` (18 more replies)
  0 siblings, 19 replies; 58+ messages in thread
From: Vladimir Sementsov-Ogievskiy @ 2017-02-03 15:47 UTC (permalink / raw)
  To: qemu-block, qemu-devel
  Cc: famz, jsnow, kwolf, mreitz, pbonzini, armbru, eblake, den, stefanha

Hi all!

We really need exporting dirty bitmaps feature as well as remote
get_block_status for nbd devices. So, here is minimalistic and restricted
realization of 'structured reply' and 'block status' nbd protocol extension
(as second is developed over the first the combined spec may be found here:
https://github.com/NetworkBlockDevice/nbd/blob/extension-blockstatus/doc/proto.md)

What is done:

server:
 - can send not fragmented structured replies for CMD_READ (this was done only
   because the spec doesn't allow structure reply feature without maintaining
   structured read)
 - can export dirty bitmap through BLOCK_STATUS. Only one bitmap can be exported,
   negotiation query should be 'qemu-dirty-bitmap:<bitmap name>'
 - cab export block status through BLOCK_STATUS. Client can negotiate only one
   entity for exporting through BLOCK_STATUS - bitmap _or_ block status.
   negotiation query should be 'base:allocation', as defined in the spec.
   server sends only one extent on each BLOCK_STATUS query.

client:
 - can receive not fragmented structured replies for CMD_READ
 - can get load dirty bitmap through nbd. Be careful: bitmap for export is
   is selected during nbd negotiation - actually in open(). So, name argument for
   qmp block-dirty-bitmap-load is just a _new_ name for loaded bitmap.
   (any way, for us block-dirty-bitmap-load is just a way to test the feature,
    really we need only server part)
 - get_block_status works now through nbd CMD_BLOCK_STATUS, if base:allocation is
   negotiated for export.

It should be minimal but fully compatible realization of the spec.

web: https://src.openvz.org/users/vsementsov/repos/qemu/browse?at=nbd-block-status-v1
git: https://src.openvz.org/scm/~vsementsov/qemu.git (tag nbd-block-status-v1)

Vladimir Sementsov-Ogievskiy (18):
  nbd: rename NBD_REPLY_MAGIC to NBD_SIMPLE_REPLY_MAGIC
  nbd-server: refactor simple reply sending
  nbd: Minimal structured read for server
  nbd/client: refactor nbd_receive_starttls
  nbd/client: fix drop_sync
  nbd/client: refactor drop_sync
  nbd: Minimal structured read for client
  hbitmap: add next_zero function
  block/dirty-bitmap: add bdrv_dirty_bitmap_next()
  block/dirty-bitmap: add bdrv_load_dirty_bitmap
  nbd: BLOCK_STATUS for bitmap export: server part
  nbd: BLOCK_STATUS for bitmap export: client part
  nbd: add nbd_dirty_bitmap_load
  qmp: add x-debug-block-dirty-bitmap-sha256
  qmp: add block-dirty-bitmap-load
  iotests: add test for nbd dirty bitmap export
  nbd: BLOCK_STATUS for standard get_block_status function: server part
  nbd: BLOCK_STATUS for standard get_block_status function: client part

 block/dirty-bitmap.c                     |  70 ++++
 block/nbd-client.c                       | 230 ++++++++++-
 block/nbd-client.h                       |  13 +
 block/nbd.c                              |  44 +-
 blockdev.c                               |  57 +++
 include/block/block_int.h                |   4 +
 include/block/dirty-bitmap.h             |  10 +
 include/block/nbd.h                      |  73 +++-
 include/qemu/hbitmap.h                   |  16 +
 nbd/client.c                             | 373 ++++++++++++++---
 nbd/nbd-internal.h                       |  25 +-
 nbd/server.c                             | 661 ++++++++++++++++++++++++++++++-
 qapi/block-core.json                     |  46 ++-
 qemu-nbd.c                               |   2 +-
 tests/Makefile.include                   |   2 +-
 tests/qemu-iotests/180                   | 133 +++++++
 tests/qemu-iotests/180.out               |   5 +
 tests/qemu-iotests/group                 |   1 +
 tests/qemu-iotests/nbd-fault-injector.py |   4 +-
 util/hbitmap.c                           |  37 ++
 20 files changed, 1713 insertions(+), 93 deletions(-)
 create mode 100755 tests/qemu-iotests/180
 create mode 100644 tests/qemu-iotests/180.out

-- 
2.11.0

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

end of thread, other threads:[~2017-08-01 15:56 UTC | newest]

Thread overview: 58+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-02-03 15:47 [Qemu-devel] [PATCH 00/18] nbd: BLOCK_STATUS Vladimir Sementsov-Ogievskiy
2017-02-03 15:47 ` [Qemu-devel] [PATCH 01/18] nbd: rename NBD_REPLY_MAGIC to NBD_SIMPLE_REPLY_MAGIC Vladimir Sementsov-Ogievskiy
2017-02-06 19:54   ` Eric Blake
2017-02-03 15:47 ` [Qemu-devel] [PATCH 02/18] nbd-server: refactor simple reply sending Vladimir Sementsov-Ogievskiy
2017-02-06 21:09   ` Eric Blake
2017-02-03 15:47 ` [Qemu-devel] [PATCH 03/18] nbd: Minimal structured read for server Vladimir Sementsov-Ogievskiy
2017-02-06 23:01   ` Eric Blake
2017-02-07 17:44     ` Paolo Bonzini
2017-05-04 10:58     ` Vladimir Sementsov-Ogievskiy
2017-05-04 13:28       ` Eric Blake
2017-05-05 11:30         ` Vladimir Sementsov-Ogievskiy
2017-02-03 15:47 ` [Qemu-devel] [PATCH 04/18] nbd/client: refactor nbd_receive_starttls Vladimir Sementsov-Ogievskiy
2017-02-07 16:32   ` Eric Blake
2017-02-09  6:20     ` Vladimir Sementsov-Ogievskiy
2017-02-09 14:41       ` Eric Blake
2017-02-10 11:23         ` Vladimir Sementsov-Ogievskiy
2017-02-11 19:30           ` Eric Blake
2017-02-20 16:14             ` Eric Blake
2017-02-03 15:47 ` [Qemu-devel] [PATCH 05/18] nbd/client: fix drop_sync Vladimir Sementsov-Ogievskiy
2017-02-06 23:17   ` Eric Blake
2017-02-15 14:50     ` Eric Blake
2017-02-03 15:47 ` [Qemu-devel] [PATCH 06/18] nbd/client: refactor drop_sync Vladimir Sementsov-Ogievskiy
2017-02-06 23:19   ` Eric Blake
2017-02-08  7:55     ` Vladimir Sementsov-Ogievskiy
2017-02-15 16:52       ` Paolo Bonzini
2017-02-03 15:47 ` [Qemu-devel] [PATCH 07/18] nbd: Minimal structured read for client Vladimir Sementsov-Ogievskiy
2017-02-07 20:14   ` Eric Blake
2017-02-15 16:54     ` Paolo Bonzini
2017-08-01 15:41     ` Vladimir Sementsov-Ogievskiy
2017-08-01 15:56       ` Vladimir Sementsov-Ogievskiy
2017-02-03 15:47 ` [Qemu-devel] [PATCH 08/18] hbitmap: add next_zero function Vladimir Sementsov-Ogievskiy
2017-02-07 22:55   ` Eric Blake
2017-02-15 16:57     ` Paolo Bonzini
2017-02-03 15:47 ` [Qemu-devel] [PATCH 09/18] block/dirty-bitmap: add bdrv_dirty_bitmap_next() Vladimir Sementsov-Ogievskiy
2017-02-03 15:47 ` [Qemu-devel] [PATCH 10/18] block/dirty-bitmap: add bdrv_load_dirty_bitmap Vladimir Sementsov-Ogievskiy
2017-02-08 11:45   ` Fam Zheng
2017-02-16 12:37   ` Denis V. Lunev
2017-02-03 15:47 ` [Qemu-devel] [PATCH 11/18] nbd: BLOCK_STATUS for bitmap export: server part Vladimir Sementsov-Ogievskiy
2017-02-08 13:13   ` Eric Blake
2017-02-16 13:00   ` Denis V. Lunev
2017-02-03 15:47 ` [Qemu-devel] [PATCH 12/18] nbd: BLOCK_STATUS for bitmap export: client part Vladimir Sementsov-Ogievskiy
2017-02-08 23:06   ` Eric Blake
2017-02-03 15:47 ` [Qemu-devel] [PATCH 13/18] nbd: add nbd_dirty_bitmap_load Vladimir Sementsov-Ogievskiy
2017-02-03 15:47 ` [Qemu-devel] [PATCH 14/18] qmp: add x-debug-block-dirty-bitmap-sha256 Vladimir Sementsov-Ogievskiy
2017-02-03 15:47 ` [Qemu-devel] [PATCH 15/18] qmp: add block-dirty-bitmap-load Vladimir Sementsov-Ogievskiy
2017-02-07 12:04   ` Fam Zheng
2017-02-09 15:18   ` Eric Blake
2017-02-15 16:57   ` Paolo Bonzini
2017-02-03 15:47 ` [Qemu-devel] [PATCH 16/18] iotests: add test for nbd dirty bitmap export Vladimir Sementsov-Ogievskiy
2017-02-03 15:47 ` [Qemu-devel] [PATCH 17/18] nbd: BLOCK_STATUS for standard get_block_status function: server part Vladimir Sementsov-Ogievskiy
2017-02-09 15:38   ` Eric Blake
2017-02-15 17:02     ` Paolo Bonzini
2017-02-15 17:02     ` Paolo Bonzini
2017-02-03 15:47 ` [Qemu-devel] [PATCH 18/18] nbd: BLOCK_STATUS for standard get_block_status function: client part Vladimir Sementsov-Ogievskiy
2017-02-09 16:00   ` Eric Blake
2017-02-15 17:04     ` Paolo Bonzini
2017-02-15 17:05 ` [Qemu-devel] [PATCH 00/18] nbd: BLOCK_STATUS Paolo Bonzini
2017-07-13 11:10   ` Eric Blake

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.