Skip to contentSkip to conversation

qemu-io - an I/O path exerciser

PATCH Applied Christoph Hellwig 2 participants 2 messages Mar 29, 2009 – Apr 5, 2009 Kbuild

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 qemu-io - an I/O path exerciser

This patch adds a new qemu-io tool that links against the block layer and image formats and allow to exercise them without needing a guest image. It is inspired by the xfs_io tool which does the same for plain file I/O. In fact the libxcmd library which is the backend of xfs_io is reused by this tool in a limited fashing (cmd.[ch] files).

This version tests out most of the plain block I/O commands with the most notable absent commands beeing snapshot handling and real aio.

This tool is the basis of the I/O path test suite I'm working on right now.

Makefile +3 -1
Index: qemu/Makefile
===================================================================
@@ -206,7 +206,9 @@ qemu-img$(EXESUF): qemu-img.o qemu-tool.
 
 qemu-nbd$(EXESUF):  qemu-nbd.o qemu-tool.o osdep.o $(BLOCK_OBJS)
 
-qemu-img$(EXESUF) qemu-nbd$(EXESUF): LIBS += -lz
+qemu-io$(EXESUF):  qemu-io.o qemu-tool.o osdep.o cmd.o $(BLOCK_OBJS)
+
+qemu-img$(EXESUF) qemu-nbd$(EXESUF) qemu-io$(EXESUF): LIBS += -lz
 
 clean:
 # avoid old build problems by removing potentially incorrect old files
configure +1 -1
Index: qemu/configure
===================================================================
@@ -1535,7 +1535,7 @@ esac
 
 tools=
 if test `expr "$target_list" : ".*softmmu.*"` != 0 ; then
-  tools="qemu-img\$(EXESUF) $tools"
+  tools="qemu-img\$(EXESUF) qemu-io\$(EXESUF) $tools"
   if [ "$linux" = "yes" ] ; then
       tools="qemu-nbd\$(EXESUF) $tools"
   fi
qemu-io.c new file +1074 -0

1,074 lines not on this page · raw message

cmd.c new file +565 -0

565 lines not on this page · raw message

cmd.h new file +78 -0

78 lines not on this page · raw message

#1 lore raw
Quoted 6 lines · Christoph Hellwig

This patch adds a new qemu-io tool that links against the block layer and image formats and allow to exercise them without needing a guest image. It is inspired by the xfs_io tool which does the same for plain file I/O. In fact the libxcmd library which is the backend of xfs_io is reused by this tool in a limited fashing (cmd.[ch] files).

Quoted 8 lines

This version tests out most of the plain block I/O commands with the most notable absent commands beeing snapshot handling and real aio.

This tool is the basis of the I/O path test suite I'm working on right now.

Applied. Thanks.

Signature · 3 lines
Regards,

Anthony Liguori