All of lore.kernel.org
 help / color / mirror / Atom feed
From: Max Reitz <mreitz@redhat.com>
To: qemu-block@nongnu.org
Cc: Kevin Wolf <kwolf@redhat.com>,
	qemu-devel@nongnu.org, Max Reitz <mreitz@redhat.com>
Subject: [PATCH 00/18] block: Allow exporting BDSs via FUSE
Date: Thu, 19 Dec 2019 15:38:00 +0100	[thread overview]
Message-ID: <20191219143818.1646168-1-mreitz@redhat.com> (raw)

Preamble: This series is based on a combination of my (current) block
branch and “iotests: Minor fixes”.  I’ve pushed it here:

  https://git.xanclic.moe/XanClic/qemu fuse-exports-v1

(The base is on fuse-exports-v1-base.)


Hi,

Ever since I found out that you can mount FUSE filesystems on regular
files (not just directories), I had the idea of adding FUSE block
exports to qemu where you can export block nodes as raw images.  The
best thing is that you’d be able to mount an image on itself, so
whatever format it may be in, qemu lets it appear as a raw image (and
you can then use regular tools like dd on it).

I started with some concept of a qemu-blkfuse daemon (similar to
qemu-nbd), but never sent patches, for two reasons: (1) Performance was
not good, (2) it didn’t seem right, for some reason.

Now Kevin is proposing a storage daemon for multiple export types like
NBD, and he also mentioned FUSE (while knowing of my previous attempts).
Now it does seem right to add FUSE exports to qemu, but only in the form
of some module with a proper QAPI/QMP binding.

Performance is still quite bad, but who cares.  We can always improve
it, if the need arises.


This series does the following:

First, add the FUSE export module (block/fuse.c) that implements the
basic file access functions.  (Note that you need libfuse 3.8.0 or later
for SEEK_HOLE/SEEK_DATA.)

Second, it allows using FUSE exports as a protocol in the iotests and
makes many iotests work with it.  (The file node is exported by a
background qemu instance to $SOCK_DIR.)
Note that I only ran raw and qcow2 on it; I’m sure other formats
currently have some failing tests.

This gives us a lot of coverage for, well, not free (it does take ten
patches), but for cheap; but there are still some more specialized
things we want to test, so third and last, this series adds an iotest
dedicated to FUSE exports.


Final rather important notice: I didn’t really run the iotests with this
yet.  I wanted to, but they appear rather broken on current master,
actually.  I’m not yet sure whether that’s because something in my setup
broke in the last two weeks, or because there’s quite something broken
in master (it does look like there are a couple things broken in master
currently).


Max Reitz (18):
  configure: Detect libfuse
  fuse: Allow exporting BDSs via FUSE
  fuse: Implement standard FUSE operations
  fuse: Add fuse-export-remove
  fuse: Allow growable exports
  fuse: (Partially) implement fallocate()
  fuse: Implement hole detection through lseek
  iotests: Do not needlessly filter _make_test_img
  iotests: Do not pipe _make_test_img
  iotests: Use convert -n in some cases
  iotests: Avoid renaming images
  iotests: Derive image names from $TEST_IMG
  iotests/091: Use _cleanup_qemu instad of "wait"
  iotests: Restrict some Python tests to file
  iotests: Let _make_test_img guess $TEST_IMG_FILE
  iotests: Allow testing FUSE exports
  iotests: Enable fuse for many tests
  iotests/281: Add test for FUSE exports

 block.c                          |   4 +
 block/Makefile.objs              |   3 +
 block/fuse.c                     | 668 +++++++++++++++++++++++++++++++
 configure                        |  68 ++++
 include/block/fuse.h             |  24 ++
 qapi/block.json                  |  42 ++
 tests/qemu-iotests/013           |   9 +-
 tests/qemu-iotests/013.out       |   3 +-
 tests/qemu-iotests/018           |   5 +-
 tests/qemu-iotests/018.out       |   1 +
 tests/qemu-iotests/020           |   2 +-
 tests/qemu-iotests/025           |   2 +-
 tests/qemu-iotests/026           |   2 +-
 tests/qemu-iotests/028           |  16 +-
 tests/qemu-iotests/028.out       |   3 +
 tests/qemu-iotests/031           |   2 +-
 tests/qemu-iotests/034           |   2 +-
 tests/qemu-iotests/036           |   2 +-
 tests/qemu-iotests/037           |   2 +-
 tests/qemu-iotests/038           |   2 +-
 tests/qemu-iotests/039           |   2 +-
 tests/qemu-iotests/046           |   7 +-
 tests/qemu-iotests/046.out       |   2 +-
 tests/qemu-iotests/050           |   2 +-
 tests/qemu-iotests/054           |   2 +-
 tests/qemu-iotests/060           |   2 +-
 tests/qemu-iotests/071           |  21 +-
 tests/qemu-iotests/072           |   5 +-
 tests/qemu-iotests/072.out       |   1 +
 tests/qemu-iotests/079           |   2 +-
 tests/qemu-iotests/080           |   2 +-
 tests/qemu-iotests/089           |   5 +-
 tests/qemu-iotests/089.out       |   1 +
 tests/qemu-iotests/090           |   2 +-
 tests/qemu-iotests/091           |   5 +-
 tests/qemu-iotests/095           |   2 +-
 tests/qemu-iotests/097           |   2 +-
 tests/qemu-iotests/098           |   2 +-
 tests/qemu-iotests/102           |   2 +-
 tests/qemu-iotests/103           |   2 +-
 tests/qemu-iotests/106           |   2 +-
 tests/qemu-iotests/107           |   2 +-
 tests/qemu-iotests/108           |   2 +-
 tests/qemu-iotests/111           |   2 +-
 tests/qemu-iotests/112           |   2 +-
 tests/qemu-iotests/115           |   2 +-
 tests/qemu-iotests/117           |   2 +-
 tests/qemu-iotests/120           |   2 +-
 tests/qemu-iotests/121           |   2 +-
 tests/qemu-iotests/127           |   2 +-
 tests/qemu-iotests/133           |   2 +-
 tests/qemu-iotests/137           |   2 +-
 tests/qemu-iotests/138           |   2 +-
 tests/qemu-iotests/140           |   2 +-
 tests/qemu-iotests/154           |   2 +-
 tests/qemu-iotests/161           |  14 +-
 tests/qemu-iotests/171           |   2 +-
 tests/qemu-iotests/174           |  10 +-
 tests/qemu-iotests/175           |   8 +-
 tests/qemu-iotests/176           |   2 +-
 tests/qemu-iotests/177           |   2 +-
 tests/qemu-iotests/179           |   2 +-
 tests/qemu-iotests/183           |   2 +-
 tests/qemu-iotests/186           |   2 +-
 tests/qemu-iotests/187           |   2 +-
 tests/qemu-iotests/191           |   2 +-
 tests/qemu-iotests/195           |   2 +-
 tests/qemu-iotests/200           |   5 +-
 tests/qemu-iotests/200.out       |   4 +-
 tests/qemu-iotests/204           |   2 +-
 tests/qemu-iotests/206           |   1 +
 tests/qemu-iotests/214           |   2 +-
 tests/qemu-iotests/217           |   2 +-
 tests/qemu-iotests/220           |   2 +-
 tests/qemu-iotests/221           |   2 +-
 tests/qemu-iotests/229           |   5 +-
 tests/qemu-iotests/229.out       |   6 +-
 tests/qemu-iotests/242           |   1 +
 tests/qemu-iotests/247           |   2 +-
 tests/qemu-iotests/249           |   8 +-
 tests/qemu-iotests/250           |   2 +-
 tests/qemu-iotests/252           |   2 +-
 tests/qemu-iotests/265           |   2 +-
 tests/qemu-iotests/268           |   2 +-
 tests/qemu-iotests/272           |   2 +-
 tests/qemu-iotests/273           |   2 +-
 tests/qemu-iotests/279           |   2 +-
 tests/qemu-iotests/281           | 328 +++++++++++++++
 tests/qemu-iotests/281.out       |  92 +++++
 tests/qemu-iotests/check         |   6 +
 tests/qemu-iotests/common.filter |   5 +-
 tests/qemu-iotests/common.rc     | 190 ++++++++-
 tests/qemu-iotests/group         |   1 +
 93 files changed, 1571 insertions(+), 120 deletions(-)
 create mode 100644 block/fuse.c
 create mode 100644 include/block/fuse.h
 create mode 100755 tests/qemu-iotests/281
 create mode 100644 tests/qemu-iotests/281.out

-- 
2.23.0



             reply	other threads:[~2019-12-19 14:40 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-19 14:38 Max Reitz [this message]
2019-12-19 14:38 ` [PATCH 01/18] configure: Detect libfuse Max Reitz
2019-12-19 14:38 ` [PATCH 02/18] fuse: Allow exporting BDSs via FUSE Max Reitz
2019-12-20 10:26   ` Kevin Wolf
2019-12-20 10:48     ` Max Reitz
2019-12-20 11:24       ` Kevin Wolf
2019-12-20 12:09         ` Max Reitz
2019-12-20 12:48         ` Markus Armbruster
2019-12-20 12:58           ` Kevin Wolf
2019-12-20 13:25             ` Markus Armbruster
2019-12-20 21:18               ` Eric Blake
2019-12-20 12:49     ` Markus Armbruster
2019-12-20 13:02       ` Kevin Wolf
2019-12-20 21:15   ` Eric Blake
2020-01-06 12:00     ` Max Reitz
2019-12-19 14:38 ` [PATCH 03/18] fuse: Implement standard FUSE operations Max Reitz
2019-12-19 14:38 ` [PATCH 04/18] fuse: Add fuse-export-remove Max Reitz
2019-12-19 14:38 ` [PATCH 05/18] fuse: Allow growable exports Max Reitz
2019-12-19 14:38 ` [PATCH 06/18] fuse: (Partially) implement fallocate() Max Reitz
2019-12-19 14:38 ` [PATCH 07/18] fuse: Implement hole detection through lseek Max Reitz
2019-12-19 14:38 ` [PATCH 08/18] iotests: Do not needlessly filter _make_test_img Max Reitz
2019-12-19 14:38 ` [PATCH 09/18] iotests: Do not pipe _make_test_img Max Reitz
2019-12-19 14:38 ` [PATCH 10/18] iotests: Use convert -n in some cases Max Reitz
2019-12-19 14:38 ` [PATCH 11/18] iotests: Avoid renaming images Max Reitz
2019-12-19 14:38 ` [PATCH 12/18] iotests: Derive image names from $TEST_IMG Max Reitz
2019-12-19 14:38 ` [PATCH 13/18] iotests/091: Use _cleanup_qemu instad of "wait" Max Reitz
2019-12-19 14:38 ` [PATCH 14/18] iotests: Restrict some Python tests to file Max Reitz
2019-12-19 14:38 ` [PATCH 15/18] iotests: Let _make_test_img guess $TEST_IMG_FILE Max Reitz
2019-12-19 14:38 ` [PATCH 16/18] iotests: Allow testing FUSE exports Max Reitz
2019-12-19 14:38 ` [PATCH 17/18] iotests: Enable fuse for many tests Max Reitz
2019-12-19 14:38 ` [PATCH 18/18] iotests/281: Add test for FUSE exports Max Reitz
2019-12-19 19:05 ` [PATCH 00/18] block: Allow exporting BDSs via FUSE Max Reitz
2019-12-20 10:08 ` Stefan Hajnoczi
2019-12-20 10:30   ` Max Reitz
2019-12-20 12:50     ` Kevin Wolf
2019-12-20 21:20       ` Eric Blake
2020-01-02 11:22     ` Stefan Hajnoczi

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=20191219143818.1646168-1-mreitz@redhat.com \
    --to=mreitz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /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 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.