Date: Thu, 2 Oct 2014 20:32:04 -0500 (CDT) From: Dan Mack <mack@macktronics.com> To: freebsd-virtualization@freebsd.org Subject: virtio_blk devices on linux and FL_CD ? Message-ID: <alpine.BSF.2.11.1410022023490.7190@olive.macktronics.com>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.11.1410022023490.7190>