On Wed, Mar 26, 2008 at 09:54:22AM +0900, Tejun Heo wrote:I think you are using either the wrong programming language, or your sysfs walking logic is quite convulted. Look at the udev and HAL code if you want to steal some compact, working sysfs code :) And again, is this a performance requiring operation? Exactly, originally you suggested a new ioctl, which would be trivial to add, and trivial to switch any program that was currently using an ioctl to get the disk size, to use it instead. Since when is the major:minor view of devices the "standard" one that userspace uses? Last I looked, userspace uses symlinks and lots of other ways of directly accessing block devices in /dev/, and does not rely on major:minor. And finally, I haven't seen a patch that implements this "shadow" tree, it would be interesting to see if it could even be done. My tiny little phone runs udev, I don't see why anyone wouldn't run it these days, except in very limited embedded applications with no dynamic devices. But if you are in that situation, you aren't querying the size of any random block device either :) And heck, this phone is a very limited embedded application, with razor thin margins, if it can use udev, I'd be interested in hearing the justifications for anyone who says it is too large for their systems to use it. Why the preopcupation with major:minor? Just because you are able to grab it from an open file handle? Heck, why not just an ioctl to get the path within sysfs for the device currently open? :) thanks, greg k-h --
| Stephen Smalley | Re: [AppArmor 39/45] AppArmor: Profile loading and manipulation, pathname matching |
| Tarkan Erimer | Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3 |
| Jan Engelhardt | intel iommu (Re: -mm merge plans for 2.6.23) |
| Greg Kroah-Hartman | [PATCH 005/196] Chinese: add translation of SubmittingDrivers |
git: | |
| David Fenyes | sigsetmask()? (LINUX) |
| Stephen Tweedie | Unmounting root (no kidding!) [was: Some Linux problems---solved] |
| Les Andrzejewski | X386/WD90C31/SUMSUNG SYNC MASTER 4 |
| Doug Evans | Re: Stabilizing Linux |
| Gerrit Renker | [PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side) |
| Linus Torvalds | Re: [GIT]: Networking |
| Jarek Poplawski | [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock(). |
| Herbert Xu | Re: [PATCH] myr10ge: again fix lro_gen_skb() alignment |
