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

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