diff mbox

[RFC,V2,07/10] blkverify: Make blkverify_iovec_clone() and blkverify_iovec_compare() public

Message ID 1344347073-7773-8-git-send-email-benoit@irqsave.net
State New
Headers show

Commit Message

Benoit Canet Aug. 7, 2012, 1:44 p.m. UTC
Signed-off-by: Benoit Canet <benoit@irqsave.net>
---
 block/blkverify.c |    8 ++++++--
 block/quorum.c    |    4 ++++
 2 files changed, 10 insertions(+), 2 deletions(-)

Comments

Stefan Hajnoczi Aug. 8, 2012, 3:38 p.m. UTC | #1
On Tue, Aug 7, 2012 at 2:44 PM, BenoƮt Canet <benoit.canet@gmail.com> wrote:
> Signed-off-by: Benoit Canet <benoit@irqsave.net>
> ---
>  block/blkverify.c |    8 ++++++--
>  block/quorum.c    |    4 ++++
>  2 files changed, 10 insertions(+), 2 deletions(-)

Perhaps these should be in cutils.c with the other iovec functions.
diff mbox

Patch

diff --git a/block/blkverify.c b/block/blkverify.c
index 9d5f1ec..9e15081 100644
--- a/block/blkverify.c
+++ b/block/blkverify.c
@@ -11,6 +11,10 @@ 
 #include "qemu_socket.h" /* for EINPROGRESS on Windows */
 #include "block_int.h"
 
+ssize_t blkverify_iovec_compare(QEMUIOVector *a, QEMUIOVector *b);
+void blkverify_iovec_clone(QEMUIOVector *dest, const QEMUIOVector *src,
+                           void *buf);
+
 typedef struct {
     BlockDriverState *test_file;
 } BDRVBlkverifyState;
@@ -130,7 +134,7 @@  static int64_t blkverify_getlength(BlockDriverState *bs)
  * @b:          I/O vector
  * @ret:        Offset to first mismatching byte or -1 if match
  */
-static ssize_t blkverify_iovec_compare(QEMUIOVector *a, QEMUIOVector *b)
+ssize_t blkverify_iovec_compare(QEMUIOVector *a, QEMUIOVector *b)
 {
     int i;
     ssize_t offset = 0;
@@ -190,7 +194,7 @@  static int sortelem_cmp_src_index(const void *a, const void *b)
  * The relative relationships of overlapping iovecs are preserved.  This is
  * necessary to ensure identical semantics in the cloned I/O vector.
  */
-static void blkverify_iovec_clone(QEMUIOVector *dest, const QEMUIOVector *src,
+void blkverify_iovec_clone(QEMUIOVector *dest, const QEMUIOVector *src,
                                   void *buf)
 {
     IOVectorSortElem sortelems[src->niov];
diff --git a/block/quorum.c b/block/quorum.c
index e6d2274..003fc3f 100644
--- a/block/quorum.c
+++ b/block/quorum.c
@@ -15,6 +15,10 @@ 
 
 #include "block_int.h"
 
+ssize_t blkverify_iovec_compare(QEMUIOVector *a, QEMUIOVector *b);
+void blkverify_iovec_clone(QEMUIOVector *dest, const QEMUIOVector *src,
+                           void *buf);
+
 typedef struct {
     BlockDriverState * bs[3];
 } BDRVQuorumState;