From owner-freebsd-virtualization@FreeBSD.ORG Fri Oct 3 01:38:49 2014 Return-Path: Delivered-To: freebsd-virtualization@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id A6EB5AFF for ; Fri, 3 Oct 2014 01:38:49 +0000 (UTC) Received: from borg.macktronics.com (borg.macktronics.com [209.181.253.68]) by mx1.freebsd.org (Postfix) with ESMTP id 85B2BF1B for ; Fri, 3 Oct 2014 01:38:49 +0000 (UTC) Received: from olive.macktronics.com (olive.macktronics.com [209.181.253.67]) by borg.macktronics.com (Postfix) with ESMTP id A91EA7D4 for ; Thu, 2 Oct 2014 20:32:04 -0500 (CDT) Date: Thu, 2 Oct 2014 20:32:04 -0500 (CDT) From: Dan Mack To: freebsd-virtualization@freebsd.org Subject: virtio_blk devices on linux and FL_CD ? Message-ID: User-Agent: Alpine 2.11 (BSF 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII X-BeenThere: freebsd-virtualization@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Discussion of various virtualization techniques FreeBSD supports." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Oct 2014 01:38:49 -0000 Anyone know why sda doesn't have the FL_CD bit set but vda (virtio_blk) devices do ? I just came across this when working through a disk enumerator for an OS install when running my tests under bhyve and was curious. The linux genhd.h file isn't super clear as to what GEN_FL_CD means but I think it is CDROM ??? #define GENHD_FL_REMOVABLE 1 /* 2 is unused */ #define GENHD_FL_MEDIA_CHANGE_NOTIFY 4 #define GENHD_FL_CD 8 #define GENHD_FL_UP 16 #define GENHD_FL_SUPPRESS_PARTITION_INFO 32 #define GENHD_FL_EXT_DEVT 64 /* allow extended devt */ #define GENHD_FL_NATIVE_CAPACITY 128 #define GENHD_FL_BLOCK_EVENTS_ON_EXCL_WRITE 256 #define GENHD_FL_NO_PART_SCAN 512 or does it mean character device ? On a bhyve Linux system I see this for example: [root@cent ~]# ./diskcapability.bash sr0 (cap == 119) | REMOVABLE | MEDIA_CHANGE_NOTIFY | UP | SUPPRESS_PARTITION_INFO | EXT_DEVT vda (cap == 10) | CD I don't think this has anything to do with bhyve becuase the same thing happens on a digital ocean coreos system. The linux header file says '2' is unused but it appears to be set, no? 10==8+2 dan -- Dan Mack