* [Qemu-devel] PVFS2 Block Driver Support @ 2013-06-27 14:25 Timothy Scott 2013-06-27 14:43 ` Stefan Hajnoczi 0 siblings, 1 reply; 10+ messages in thread From: Timothy Scott @ 2013-06-27 14:25 UTC (permalink / raw) To: qemu-devel [-- Attachment #1: Type: text/plain, Size: 798 bytes --] I am working on adding block driver support for PVFS2 that will allow images stored on PVFS2 systems to bypass the kernel module and hopefully improve performance significantly. I have been modeling my changes off of the GlusterFS block driver implementation. *Can you please advise on a couple of issues*: - Should qcow2 and other optimizing formats function when using pvfs2 as a transport/block layer? ie 'qemu-img create -f qcow2 pvfs2:foo.img 10g' - Are there any debugging tools or compile flags that are recommended for use in QEMU? I am currently hacking around with gdb and having trouble navigating through much of the code. - Is there currently a testing suite/procedure for verifying new block drivers? -- T. Joe Scott Clemson University College of Engineering and Science [-- Attachment #2: Type: text/html, Size: 1418 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] PVFS2 Block Driver Support 2013-06-27 14:25 [Qemu-devel] PVFS2 Block Driver Support Timothy Scott @ 2013-06-27 14:43 ` Stefan Hajnoczi 2013-06-27 14:53 ` Stefan Hajnoczi 0 siblings, 1 reply; 10+ messages in thread From: Stefan Hajnoczi @ 2013-06-27 14:43 UTC (permalink / raw) To: Timothy Scott; +Cc: qemu-devel On Thu, Jun 27, 2013 at 4:25 PM, Timothy Scott <tscott2@clemson.edu> wrote: > I am working on adding block driver support for PVFS2 that will allow images > stored on PVFS2 systems to bypass the kernel module and hopefully improve > performance significantly. What performance bottlenecks are you seeing in the kernel which you can bypass from QEMU userspace? > Can you please advise on a couple of issues: > - Should qcow2 and other optimizing formats function when using pvfs2 as a > transport/block layer? ie 'qemu-img create -f qcow2 pvfs2:foo.img 10g' qcow2 works on top of any "protocol" and it should work on top of PVFS2. QED does not and other formats may or may not (VHDX, VMDK, etc). > - Are there any debugging tools or compile flags that are recommended for > use in QEMU? I am currently hacking around with gdb and having trouble > navigating through much of the code. You may find trace events useful, see docs/tracing.txt. > - Is there currently a testing suite/procedure for verifying new block > drivers? There is a test suite in tests/qemu-iotests/. You will need to add support for PVFS2, see how NBD and other protocols were added. Stefan ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] PVFS2 Block Driver Support 2013-06-27 14:43 ` Stefan Hajnoczi @ 2013-06-27 14:53 ` Stefan Hajnoczi 2013-06-27 21:40 ` Alex Bligh 0 siblings, 1 reply; 10+ messages in thread From: Stefan Hajnoczi @ 2013-06-27 14:53 UTC (permalink / raw) To: Timothy Scott; +Cc: qemu-devel On Thu, Jun 27, 2013 at 4:43 PM, Stefan Hajnoczi <stefanha@gmail.com> wrote: > On Thu, Jun 27, 2013 at 4:25 PM, Timothy Scott <tscott2@clemson.edu> wrote: >> - Is there currently a testing suite/procedure for verifying new block >> drivers? > > There is a test suite in tests/qemu-iotests/. You will need to add > support for PVFS2, see how NBD and other protocols were added. I realized I should give a bit more info to help you get started. tests/qemu-iotests/check is the script to run tests. There are currently around 55 tests which exercise operations using qemu-img(1), qemu-io(1), and sometimes by running QEMU. You can launch it like this: cd tests/qemu-iotests QEMU_PROG=path/to/qemu-system-x86_64 PATH=path/to/qemu-dir:$PATH ./check -qcow2 You can simplify this by putting 'qemu', 'qemu-img', and 'qemu-io' into your PATH. You may wish to symlink 'qemu' to your qemu-system-x86_64 binary. That saves you from typing out the environment variables every time. See the qemu-iotests code for details on how paths are detected. Once you've added PVFS2 support you should be able to do: check -pvfs2 Tests are grouped by specific areas (read-only, read-write, backing file, etc) in tests/qemu-iotests/group. New tests must be added to this file before they become available in check. Tests themselves can restrict themselves to certain formats or host operating systems. This is useful for ensuring that a test is only run against, say qcow2, vmdk, and qed. See the actual test code. Most tests are written in bash. The qemu-iotests framework is also written in bash. The framework is pretty simple: it runs a test and compares the output against a "golden master" output file. If the output matches then the test passes (this requires filtering output in some cases to eliminate parts that differ between runs, from system to system, etc). Some tests are written in Python and use iotests.py, which provides the necessary environment and useful functions. These tests mainly launch QEMU and interact with the QMP monitor (JSON), which is hard to do easily in bash. Stefan ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] PVFS2 Block Driver Support 2013-06-27 14:53 ` Stefan Hajnoczi @ 2013-06-27 21:40 ` Alex Bligh 2013-07-01 8:47 ` Stefan Hajnoczi 0 siblings, 1 reply; 10+ messages in thread From: Alex Bligh @ 2013-06-27 21:40 UTC (permalink / raw) To: Stefan Hajnoczi, Timothy Scott; +Cc: qemu-devel, Alex Bligh --On 27 June 2013 16:53:40 +0200 Stefan Hajnoczi <stefanha@gmail.com> wrote: > I realized I should give a bit more info to help you get started. > > tests/qemu-iotests/check is the script to run tests. There are > currently around 55 tests which exercise operations using qemu-img(1), > qemu-io(1), and sometimes by running QEMU. > > You can launch it like this: > cd tests/qemu-iotests > QEMU_PROG=path/to/qemu-system-x86_64 PATH=path/to/qemu-dir:$PATH ./check > -qcow2 This is a fantastically useful piece of information. If that's not on the wiki (I haven't found it), it would be really useful there. Thanks. I'd add that blkverify and blkdebug seem to be quite useful too. -- Alex Bligh ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] PVFS2 Block Driver Support 2013-06-27 21:40 ` Alex Bligh @ 2013-07-01 8:47 ` Stefan Hajnoczi 2013-07-03 15:41 ` Timothy Scott 0 siblings, 1 reply; 10+ messages in thread From: Stefan Hajnoczi @ 2013-07-01 8:47 UTC (permalink / raw) To: Alex Bligh; +Cc: Kevin Wolf, Timothy Scott, qemu-devel On Thu, Jun 27, 2013 at 10:40:23PM +0100, Alex Bligh wrote: > --On 27 June 2013 16:53:40 +0200 Stefan Hajnoczi <stefanha@gmail.com> wrote: > > >I realized I should give a bit more info to help you get started. > > > >tests/qemu-iotests/check is the script to run tests. There are > >currently around 55 tests which exercise operations using qemu-img(1), > >qemu-io(1), and sometimes by running QEMU. > > > >You can launch it like this: > >cd tests/qemu-iotests > >QEMU_PROG=path/to/qemu-system-x86_64 PATH=path/to/qemu-dir:$PATH ./check > >-qcow2 > > This is a fantastically useful piece of information. If that's not on the > wiki (I haven't found it), it would be really useful there. Thanks. Good idea. I have created a page here: http://qemu-project.org/Documentation/QemuIoTests Stefan ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] PVFS2 Block Driver Support 2013-07-01 8:47 ` Stefan Hajnoczi @ 2013-07-03 15:41 ` Timothy Scott 2013-07-04 8:41 ` Stefan Hajnoczi 0 siblings, 1 reply; 10+ messages in thread From: Timothy Scott @ 2013-07-03 15:41 UTC (permalink / raw) To: Stefan Hajnoczi; +Cc: Kevin Wolf, qemu-devel [-- Attachment #1: Type: text/plain, Size: 1490 bytes --] In testing my block driver implementation, I am receiving the following error when trying to run an orangefs protocol with a qcow2 image format: +Header extension too large +qemu-io: can't open device pvfs2:/... +no file open, try 'help open' Is './check -pvfs2 -qcow2' a valid usecase in the iotests suite for specifying a qcow2 format file over the orangefs protocol? Just want to check so I can stop chasing this error if it is the result of misusing the tests. Thanks, Joe Scott On Mon, Jul 1, 2013 at 4:47 AM, Stefan Hajnoczi <stefanha@gmail.com> wrote: > On Thu, Jun 27, 2013 at 10:40:23PM +0100, Alex Bligh wrote: > > --On 27 June 2013 16:53:40 +0200 Stefan Hajnoczi <stefanha@gmail.com> > wrote: > > > > >I realized I should give a bit more info to help you get started. > > > > > >tests/qemu-iotests/check is the script to run tests. There are > > >currently around 55 tests which exercise operations using qemu-img(1), > > >qemu-io(1), and sometimes by running QEMU. > > > > > >You can launch it like this: > > >cd tests/qemu-iotests > > >QEMU_PROG=path/to/qemu-system-x86_64 PATH=path/to/qemu-dir:$PATH ./check > > >-qcow2 > > > > This is a fantastically useful piece of information. If that's not on the > > wiki (I haven't found it), it would be really useful there. Thanks. > > Good idea. I have created a page here: > http://qemu-project.org/Documentation/QemuIoTests > > Stefan > -- T. Joe Scott Clemson University '14 College of Engineering and Science [-- Attachment #2: Type: text/html, Size: 2415 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] PVFS2 Block Driver Support 2013-07-03 15:41 ` Timothy Scott @ 2013-07-04 8:41 ` Stefan Hajnoczi 2013-07-08 14:54 ` Timothy Scott 2013-07-10 14:08 ` Timothy Scott 0 siblings, 2 replies; 10+ messages in thread From: Stefan Hajnoczi @ 2013-07-04 8:41 UTC (permalink / raw) To: Timothy Scott; +Cc: Kevin Wolf, qemu-devel On Wed, Jul 03, 2013 at 11:41:08AM -0400, Timothy Scott wrote: > In testing my block driver implementation, I am receiving the following > error when trying to run an orangefs protocol with a qcow2 image format: > > +Header extension too large > +qemu-io: can't open device pvfs2:/... > +no file open, try 'help open' > > Is './check -pvfs2 -qcow2' a valid usecase in the iotests suite for > specifying a qcow2 format file over the orangefs protocol? I haven't run IMGPROTO + IMGFMT tests but looking at the code it should work. The "Header extension too large" error message comes from block/qcow2.c so it seems the header data is corrupt. I suggest running "./check -pvfs2" first to make sure it passes the raw image tests. Once that seems okay it's worth looking into issues from "./check -pvfs2 -qcow2" and installing/running guests. Stefan ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] PVFS2 Block Driver Support 2013-07-04 8:41 ` Stefan Hajnoczi @ 2013-07-08 14:54 ` Timothy Scott 2013-07-10 14:08 ` Timothy Scott 1 sibling, 0 replies; 10+ messages in thread From: Timothy Scott @ 2013-07-08 14:54 UTC (permalink / raw) To: Stefan Hajnoczi; +Cc: Kevin Wolf, qemu-devel [-- Attachment #1: Type: text/plain, Size: 1777 bytes --] I pass all 15/15 tests that actually run when I just run './check -pvfs2' When running './check -pvfs2 -qcow2' I fail 39 of 44 tests. These seem to be the most common errors: +IOError: [Errno 2] No such file or directory: 'pvfs2:/home/tscott2/qemu/tests/qemu-iotests/scratch/t.qcow2' +qemu-img: Header extension too large +qemu-img: Could not open 'pvfs2:TEST_DIR/t.qcow2': Invalid argument Failures:001 002 003 004 005 007 008 009 010 011 013 014 015 017 018 019 020 021 022 023 024 026 027 028 029 031 032 033 034 035 036 037 038 039 043 046 047 052 054 When I manually run 'qemu-img -f qcow2 pvfs2:scratch/t.qcow2 2g' a 193k image is successfully created. Any ideas where to start poking around in the tests? On Thu, Jul 4, 2013 at 4:41 AM, Stefan Hajnoczi <stefanha@gmail.com> wrote: > On Wed, Jul 03, 2013 at 11:41:08AM -0400, Timothy Scott wrote: > > In testing my block driver implementation, I am receiving the following > > error when trying to run an orangefs protocol with a qcow2 image format: > > > > +Header extension too large > > +qemu-io: can't open device pvfs2:/... > > +no file open, try 'help open' > > > > Is './check -pvfs2 -qcow2' a valid usecase in the iotests suite for > > specifying a qcow2 format file over the orangefs protocol? > > I haven't run IMGPROTO + IMGFMT tests but looking at the code it should > work. > > The "Header extension too large" error message comes from block/qcow2.c > so it seems the header data is corrupt. > > I suggest running "./check -pvfs2" first to make sure it passes the raw > image tests. > > Once that seems okay it's worth looking into issues from "./check -pvfs2 > -qcow2" and installing/running guests. > > Stefan > -- T. Joe Scott Clemson University '14 College of Engineering and Science [-- Attachment #2: Type: text/html, Size: 2493 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] PVFS2 Block Driver Support 2013-07-04 8:41 ` Stefan Hajnoczi 2013-07-08 14:54 ` Timothy Scott @ 2013-07-10 14:08 ` Timothy Scott 2013-07-10 14:31 ` Kevin Wolf 1 sibling, 1 reply; 10+ messages in thread From: Timothy Scott @ 2013-07-10 14:08 UTC (permalink / raw) To: Stefan Hajnoczi; +Cc: Kevin Wolf, qemu-devel [-- Attachment #1: Type: text/plain, Size: 1773 bytes --] Stefan, Any pointers on likely culprits here? I pass all 15/15 tests that actually run when I just run './check -pvfs2' When running './check -pvfs2 -qcow2' I fail 39 of 44 tests. These seem to be the most common errors: +IOError: [Errno 2] No such file or directory: 'pvfs2:/home/tscott2/qemu/tests/qemu-iotests/scratch/t.qcow2' +qemu-img: Header extension too large +qemu-img: Could not open 'pvfs2:TEST_DIR/t.qcow2': Invalid argument Failures:001 002 003 004 005 007 008 009 010 011 013 014 015 017 018 019 020 021 022 023 024 026 027 028 029 031 032 033 034 035 036 037 038 039 043 046 047 052 054 When I manually run 'qemu-img -f qcow2 pvfs2:scratch/t.qcow2 2g' a 193k image is successfully created. Joe On Thu, Jul 4, 2013 at 4:41 AM, Stefan Hajnoczi <stefanha@gmail.com> wrote: > On Wed, Jul 03, 2013 at 11:41:08AM -0400, Timothy Scott wrote: > > In testing my block driver implementation, I am receiving the following > > error when trying to run an orangefs protocol with a qcow2 image format: > > > > +Header extension too large > > +qemu-io: can't open device pvfs2:/... > > +no file open, try 'help open' > > > > Is './check -pvfs2 -qcow2' a valid usecase in the iotests suite for > > specifying a qcow2 format file over the orangefs protocol? > > I haven't run IMGPROTO + IMGFMT tests but looking at the code it should > work. > > The "Header extension too large" error message comes from block/qcow2.c > so it seems the header data is corrupt. > > I suggest running "./check -pvfs2" first to make sure it passes the raw > image tests. > > Once that seems okay it's worth looking into issues from "./check -pvfs2 > -qcow2" and installing/running guests. > > Stefan > -- T. Joe Scott Clemson University '14 College of Engineering and Science [-- Attachment #2: Type: text/html, Size: 2933 bytes --] ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [Qemu-devel] PVFS2 Block Driver Support 2013-07-10 14:08 ` Timothy Scott @ 2013-07-10 14:31 ` Kevin Wolf 0 siblings, 0 replies; 10+ messages in thread From: Kevin Wolf @ 2013-07-10 14:31 UTC (permalink / raw) To: Timothy Scott; +Cc: Stefan Hajnoczi, qemu-devel Am 10.07.2013 um 16:08 hat Timothy Scott geschrieben: > Stefan, > > Any pointers on likely culprits here? > > I pass all 15/15 tests that actually run when I just run './check -pvfs2' > > When running './check -pvfs2 -qcow2' I fail 39 of 44 tests. These seem to be > the most common errors: > +IOError: [Errno 2] No such file or directory: 'pvfs2:/home/tscott2/qemu/tests/ > qemu-iotests/scratch/t.qcow2' > +qemu-img: Header extension too large > +qemu-img: Could not open 'pvfs2:TEST_DIR/t.qcow2': Invalid argument > > Failures:001 002 003 004 005 007 008 009 010 011 013 014 015 017 018 019 020 > 021 022 023 024 026 027 028 029 031 032 033 034 035 036 037 038 039 043 046 047 > 052 054 > > When I manually run 'qemu-img -f qcow2 pvfs2:scratch/t.qcow2 2g' a 193k image > is successfully created. Can you run something like 'qemu-io -c "read 0 128M" pvfs2:scratch/t.qcow2' on that manually created image? (This, and a write on the same area, is essentially what the test 001 does) Kevin ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2013-07-10 14:32 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-06-27 14:25 [Qemu-devel] PVFS2 Block Driver Support Timothy Scott 2013-06-27 14:43 ` Stefan Hajnoczi 2013-06-27 14:53 ` Stefan Hajnoczi 2013-06-27 21:40 ` Alex Bligh 2013-07-01 8:47 ` Stefan Hajnoczi 2013-07-03 15:41 ` Timothy Scott 2013-07-04 8:41 ` Stefan Hajnoczi 2013-07-08 14:54 ` Timothy Scott 2013-07-10 14:08 ` Timothy Scott 2013-07-10 14:31 ` 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).