thebeanogamer / rpms / qemu-kvm

Forked from rpms/qemu-kvm 5 months ago
Clone

Blame SOURCES/kvm-block-backend-expose-bs-bl.max_transfer_length.patch

34b321
From b9d7b6bbaa64404eb9b4a65d0af841bfae5c9089 Mon Sep 17 00:00:00 2001
34b321
From: Fam Zheng <famz@redhat.com>
34b321
Date: Mon, 11 Jul 2016 05:33:36 +0200
34b321
Subject: [PATCH 3/7] block-backend: expose bs->bl.max_transfer_length
34b321
34b321
RH-Author: Fam Zheng <famz@redhat.com>
34b321
Message-id: <1468215219-30793-4-git-send-email-famz@redhat.com>
34b321
Patchwork-id: 71107
34b321
O-Subject: [RHEL-7.3 qemu-kvm PATCH 3/6] block-backend: expose bs->bl.max_transfer_length
34b321
Bugzilla: 1318199
34b321
RH-Acked-by: Stefan Hajnoczi <stefanha@redhat.com>
34b321
RH-Acked-by: John Snow <jsnow@redhat.com>
34b321
RH-Acked-by: Paolo Bonzini <pbonzini@redhat.com>
34b321
34b321
From: Peter Lieven <pl@kamp.de>
34b321
34b321
Signed-off-by: Peter Lieven <pl@kamp.de>
34b321
Reviewed-by: Max Reitz <mreitz@redhat.com>
34b321
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
34b321
(cherry picked from commit 454057b7d9b9ad141bd5df8c4075745e56b4870f)
34b321
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
34b321
34b321
Conflicts:
34b321
	block/block-backend.c
34b321
	include/sysemu/block-backend.h
34b321
34b321
Downstream doesn't have BlockBackend yet, so "blk_" -> "bdrv_" and put
34b321
the function in block.c.
34b321
34b321
Signed-off-by: Fam Zheng <famz@redhat.com>
34b321
---
34b321
 block.c               | 5 +++++
34b321
 include/block/block.h | 1 +
34b321
 2 files changed, 6 insertions(+)
34b321
34b321
diff --git a/block.c b/block.c
34b321
index ae756aa..bdcd741 100644
34b321
--- a/block.c
34b321
+++ b/block.c
34b321
@@ -3656,6 +3656,11 @@ int bdrv_get_flags(BlockDriverState *bs)
34b321
     return bs->open_flags;
34b321
 }
34b321
 
34b321
+int bdrv_get_max_transfer_length(BlockDriverState *bs)
34b321
+{
34b321
+    return bs->bl.max_transfer_length;
34b321
+}
34b321
+
34b321
 int bdrv_flush_all(void)
34b321
 {
34b321
     BlockDriverState *bs;
34b321
diff --git a/include/block/block.h b/include/block/block.h
34b321
index 75147b2..d29733a 100644
34b321
--- a/include/block/block.h
34b321
+++ b/include/block/block.h
34b321
@@ -379,6 +379,7 @@ void bdrv_iterate_format(void (*it)(void *opaque, const char *name),
34b321
                          void *opaque);
34b321
 const char *bdrv_get_device_name(BlockDriverState *bs);
34b321
 int bdrv_get_flags(BlockDriverState *bs);
34b321
+int bdrv_get_max_transfer_length(BlockDriverState *bs);
34b321
 int bdrv_write_compressed(BlockDriverState *bs, int64_t sector_num,
34b321
                           const uint8_t *buf, int nb_sectors);
34b321
 int bdrv_get_info(BlockDriverState *bs, BlockDriverInfo *bdi);
34b321
-- 
34b321
1.8.3.1
34b321