Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753395AbbFWDjO (ORCPT ); Mon, 22 Jun 2015 23:39:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53764 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752271AbbFWDjG (ORCPT ); Mon, 22 Jun 2015 23:39:06 -0400 From: Fam Zheng To: linux-kernel@vger.kernel.org Cc: "Michael S. Tsirkin" , virtualization@lists.linux-foundation.org Subject: [PATCH] virtio-blk: Allow extended partitions Date: Tue, 23 Jun 2015 11:39:00 +0800 Message-Id: <1435030740-18421-1-git-send-email-famz@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 877 Lines: 27 This will allow up to DISK_MAX_PARTS (256) partitions, with for example GPT in the guest. Otherwise, the partition scan code will only discover the first 15 partitions. Signed-off-by: Fam Zheng --- drivers/block/virtio_blk.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/block/virtio_blk.c b/drivers/block/virtio_blk.c index 5ea2f0b..97daa70 100644 --- a/drivers/block/virtio_blk.c +++ b/drivers/block/virtio_blk.c @@ -657,6 +657,7 @@ static int virtblk_probe(struct virtio_device *vdev) vblk->disk->private_data = vblk; vblk->disk->fops = &virtblk_fops; vblk->disk->driverfs_dev = &vdev->dev; + vblk->disk->flags |= GENHD_FL_EXT_DEVT; vblk->index = index; /* configure queue flush support */ -- 2.4.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in Please read the FAQ at http://www.tux.org/lkml/