Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756510AbcCCBs2 (ORCPT ); Wed, 2 Mar 2016 20:48:28 -0500 Received: from mail-lb0-f172.google.com ([209.85.217.172]:36502 "EHLO mail-lb0-f172.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754102AbcCCBs0 (ORCPT ); Wed, 2 Mar 2016 20:48:26 -0500 MIME-Version: 1.0 In-Reply-To: <20160303012530.GA23521@kroah.com> References: <20160303012530.GA23521@kroah.com> Date: Wed, 2 Mar 2016 17:48:24 -0800 Message-ID: Subject: Re: allocate an official device major number for virtio device? From: Jin Qian To: Greg Kroah-Hartman Cc: linux-kernel@vger.kernel.org, Jeff Sharkey , David Turner , pprabhu@google.com, Yu Ning Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1183 Lines: 34 Do you mean detecting device name string as in /dev/...? Just checked latest virtio_blk code, it's dynamic but not using anything specific to experimental range. I guess we're fine here but Yu can confirm. Thanks, jin On Wed, Mar 2, 2016 at 5:25 PM, Greg Kroah-Hartman wrote: > On Wed, Mar 02, 2016 at 05:08:00PM -0800, Jin Qian wrote: >> Hi - >> >> Can we allocate an official device major number for virtio devices? >> Currently it's using 240-254 (LOCAL/EXPERIMENTAL USE). The reason we >> ask for this is because userspace will need to treat virtio block >> devices differently and need a way to detect such device. For example, >> it checks major number to detect scsi and mmc device. >> >> https://android-review.googlesource.com/#/c/195240 >> >> With dynamic major numbers 240-254, we might treat other devices as >> virtio block device incorrectly. > > You shouldn't treat them incorrectly, devtmpfs handles this for you > automatically, so I'd recommend using the dynamic majors please. > > And what in-kernel code is using the "experimental" range today? Do you > have a pointer to that? We should fix that now... > > thanks, > > greg k-h