From mboxrd@z Thu Jan 1 00:00:00 1970 From: Christoph Hellwig Subject: Re: struct backing_dev - purpose and life time rules Date: Tue, 27 Jul 2010 16:09:47 +0200 Message-ID: <20100727140947.GA25106@lst.de> References: <20100727090107.GA9572@lst.de> <20100727091459.GA11134@lst.de> <20100727133956.GA7347@redhat.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Christoph Hellwig , jaxboe@fusionio.com, peterz@infradead.org, akpm@linux-foundation.org, kay.sievers@vrfy.org, viro@zeniv.linux.org.uk, linux-mm@kvack.org, linux-fsdevel@vger.kernel.org To: Vivek Goyal Return-path: Content-Disposition: inline In-Reply-To: <20100727133956.GA7347@redhat.com> Sender: owner-linux-mm@kvack.org List-Id: linux-fsdevel.vger.kernel.org On Tue, Jul 27, 2010 at 09:39:56AM -0400, Vivek Goyal wrote: > How can I do it better? > > I needed a unique identifier with which user can work in terms of > specifying weights to devices and in terms of understanding what stats > mean. Device major/minor number looked like a obivious choice. > > I was looking for how to determine what is the major/minor number of disk > request queue is associated with and I could use bdi to do that. The problem is that a queue can be shared between multiple gendisks, so dev_t of a gendisk is not a unique identifier. In addition to that we even have gendisks that do not even have a block device associated with them (e.g. for scsi tapes) or request queues that do not have any gendisks attached to it (e.g. scsi devices without an ULD like various types of scanners or printers). -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org