i have a report where a user has a slightly corrupted filesystem in that `blkid` is not able to identify it, but `mount -t fs ...` is able to work. the complaint is that `mount -t auto ...` (the default behavior) should have mounted it as well. looking through the code, the logic for parsing /etc/filesystems and /proc/filesystems is that if the probe code was consulted and did not find a match for the fs in question, a mount operation is not even attempted. see was_tested() and its call to fsprobe_known_fstype(). considering the brute force nature of this code, i dont see the point of consulting fsprobe here. the "auto" type already asked the probe code to identify the fs and iff that fails does mount fall back to the filesystems config files. so it's basically asking fsprobe twice for the same answer expecting a different result. i propose we simply delete that call in was_tested(): diff --git a/mount/mount.c b/mount/mount.c index 0f986df..c9e99ec 100644 --- a/mount/mount.c +++ b/mount/mount.c @@ -744,8 +744,6 @@ static int was_tested(const char *fstype) { struct tried *t; - if (fsprobe_known_fstype(fstype)) - return 1; for (t = tried; t; t = t->next) { if (!strcmp(t->type, fstype)) return 1; -mike
Attachment:
signature.asc
Description: This is a digitally signed message part.