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@xxxxxxxxxx For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>