Hi, On Wed, May 16, 2007 at 01:04:48PM -0500, Shapor Naghibzadeh wrote: > > I noticed your patch reads the blkid cache when guessing the filesystem type, > which is the one difference from my patch. I left that out because the cost > of using libblkid is almost certainly more expensive than simply using the > filesystem detection logic, especially with a large number of devices. Also, > that way libblkid is used for what it is intended to optimize: caching uuids > and labels to prevent having to scan n**2 devices in order to mount by uuid. Good point. Unfortunately blkid_get_tag_value(NULL, "TYPE", devname); is bad solution, because the libblkid internally initializes the cache: char *blkid_get_tag_value(blkid_cache cache, const char *tagname, const char *devname) { ...... if (!cache) { if (blkid_get_cache(&c, NULL) < 0) return NULL; } ....... if (!cache) blkid_put_cache(c); it means you save nothing if you don't call the blkid_get_cache() in the mount(8). I think possible workaround is: blkid_get_cache(&cache, "/dev/null"); blkid_get_tag_value(&cache, "TYPE", devname); (I'll try to use this solution if the cache is not initialized yet.) The best solution would be to add interface for a direct FS probing to libblkid API, something like blkid_verify(), but without the cache. blkid_fsprobe(devname, &uuid, &label, &fstype); Ted? > See my test case documented at: http://www.shapor.com/libblkid/, with a link > to the thread on linux-ext4 which I cc'ed the maintainer of util-linux on with > no response (yet). Nice test. > Its refreshing to see work being done on util-linux with an active mailing > list and some issues with core Linux infrastructure being attended to. Keep > up the good work! Thanks. Karel -- Karel Zak <kzak@xxxxxxxxxx> - To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html