Re: regarding major number of block extended devt
From: H. Peter Anvin
Date: Wed Sep 03 2008 - 20:45:11 EST
Tejun Heo wrote:
H. Peter Anvin wrote:
Note that addition /partitions/ is somewhat unlikely to be useful, since
existing code will have to search through random crap in sysfs to look
for the partition directories anyway.
Currently it has to list /sys/block/DEV/DEV[-]N/. With proper
classification, it can do /sys/block/*/partitions/*. We'll need to keep
around symlinks at the root level. It also plays well with how other
subsystems have been changing.
Yes, my point was mostly that in order to support older kernels, most
code is going to want to just access /sys/block/DEV/DEV*N/ anyway. What
I have done in my code is I do a readdir() on /sys/block/DEV and look
for subdirectories with a "dev" member.
Changing them to symlinks would actually break at least my code
(arguably bad programming on my part), since optimize by looking for
DT_DIR.
-hpa
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/