* util-linux bug: was Re: [PATCH 00/16 v3] f2fs: introduce flash-friendly file system [not found] ` <1352634168.1893.9.camel@kjgkr> @ 2012-11-23 0:23 ` NeilBrown 2012-11-26 13:27 ` Karel Zak 0 siblings, 1 reply; 3+ messages in thread From: NeilBrown @ 2012-11-23 0:23 UTC (permalink / raw) To: Jaegeuk Kim, util-linux Cc: Vyacheslav Dubeyko, Martin Steigerwald, linux-kernel, Jaegeuk Kim, linux-fsdevel, gregkh, viro, arnd, tytso, chur.lee, cm224.lee, jooyoung.hwang [-- Attachment #1: Type: text/plain, Size: 2945 bytes --] On Sun, 11 Nov 2012 20:42:48 +0900 Jaegeuk Kim <jaegeuk.kim@gmail.com> wrote: > 2012-11-11 (일), 00:55 +0300, Vyacheslav Dubeyko: > > Hi, > > > > On Nov 10, 2012, at 9:33 PM, Martin Steigerwald wrote: > > > > [snip] > > > > > > merkaba:~> mkfs.f2fs /dev/sdb1 > > > Info: sector size = 512 > > > Info: total sectors = 4093951 (in 512bytes) > > > Info: zone aligned segment0 blkaddr: 256 > > > Info: This device doesn't support TRIM > > > Info: format successful > > > merkaba:~> mount /dev/sdb1 /mnt/zeit > > > mount: you must specify the filesystem type > > > merkaba:~#32> mount -t f2fs /dev/sdb1 /mnt/zeit > > > merkaba:~> df -hT /mnt/zeit > > > Dateisystem Typ Größe Benutzt Verf. Verw% Eingehängt auf > > > /dev/sdb1 f2fs 2,0G 147M 1,8G 8% /mnt/zeit > > > > > > > Do you really have trouble with f2fs mount without definition of filesystem type? If so, it is a bug. > > Could you explain this bug in mor)e detail? > Or, can anyone comment this? > > Actually, I've looking at the *mount* in linux-utils. > I suspect something does not support f2fs in linux-utils. > This is a bug in util-linux. If 'blkid' doesn't recognise the filesystem, mount reads /etc/filesystems and tries everything listed there. If that file ends with a '*', it should read /proc/filesystems and try everything else listed that (that doesn't start with 'nodev'). However it currently ignores the '*' and just adds everything from /proc/filesystems. So the list it uses will have a '*' in the middle, which will be before 'f2fs' appears. When it tries each filesystem type in turn, it will abort if it get any error other than EINVAL. When it tries with filesystem type '*' it gets 'ENODEV' and so gives up. The following patch (against git://github.com/karelzak/util-linux.git) fixes it for me, though I suspect it should possible ignore 'ENODEV' too - otherwise if /etc/filesystems contains an invalid filesystem name, it will silently ignore all others. As a quick hack, just add 'f2fs' to /etc/filesystems NeilBrown Signed-off-by: NeilBrown <neilb@suse.de> diff --git a/libmount/src/utils.c b/libmount/src/utils.c index 624633d..054f266 100644 --- a/libmount/src/utils.c +++ b/libmount/src/utils.c @@ -462,6 +462,10 @@ static int get_filesystems(const char *filename, char ***filesystems, const char continue; if (sscanf(line, " %128[^\n ]\n", name) != 1) continue; + if (strcmp(name, "*") == 0) { + rc = 1; + break; + } if (pattern && !mnt_match_fstype(name, pattern)) continue; rc = add_filesystem(filesystems, name); @@ -486,7 +490,7 @@ int mnt_get_filesystems(char ***filesystems, const char *pattern) *filesystems = NULL; rc = get_filesystems(_PATH_FILESYSTEMS, filesystems, pattern); - if (rc) + if (rc != 1) return rc; return get_filesystems(_PATH_PROC_FILESYSTEMS, filesystems, pattern); } [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 828 bytes --] ^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: util-linux bug: was Re: [PATCH 00/16 v3] f2fs: introduce flash-friendly file system 2012-11-23 0:23 ` util-linux bug: was Re: [PATCH 00/16 v3] f2fs: introduce flash-friendly file system NeilBrown @ 2012-11-26 13:27 ` Karel Zak 2012-11-26 21:06 ` NeilBrown 0 siblings, 1 reply; 3+ messages in thread From: Karel Zak @ 2012-11-26 13:27 UTC (permalink / raw) To: NeilBrown Cc: Jaegeuk Kim, util-linux, Vyacheslav Dubeyko, Martin Steigerwald, linux-kernel, Jaegeuk Kim, linux-fsdevel, gregkh, viro, arnd, tytso, chur.lee, cm224.lee, jooyoung.hwang On Fri, Nov 23, 2012 at 11:23:09AM +1100, NeilBrown wrote: > This is a bug in util-linux. > > If 'blkid' doesn't recognise the filesystem, mount reads /etc/filesystems > and tries everything listed there. If that file ends with a '*', it should > read /proc/filesystems and try everything else listed that (that doesn't > start with 'nodev'). > > However it currently ignores the '*' and just adds everything Fixed. Thanks for the report! > The following patch (against git://github.com/karelzak/util-linux.git) fixes > it for me, though I suspect it should possible ignore 'ENODEV' too - > otherwise if /etc/filesystems contains an invalid filesystem name, it will > silently ignore all others. Good idea, implemented. ... all will be fixed in stable v2.22.2 release. Karel -- Karel Zak <kzak@redhat.com> http://karelzak.blogspot.com ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: util-linux bug: was Re: [PATCH 00/16 v3] f2fs: introduce flash-friendly file system 2012-11-26 13:27 ` Karel Zak @ 2012-11-26 21:06 ` NeilBrown 0 siblings, 0 replies; 3+ messages in thread From: NeilBrown @ 2012-11-26 21:06 UTC (permalink / raw) To: Karel Zak Cc: Jaegeuk Kim, util-linux, Vyacheslav Dubeyko, Martin Steigerwald, linux-kernel, Jaegeuk Kim, linux-fsdevel, gregkh, viro, arnd, tytso, chur.lee, cm224.lee, jooyoung.hwang [-- Attachment #1: Type: text/plain, Size: 971 bytes --] On Mon, 26 Nov 2012 14:27:00 +0100 Karel Zak <kzak@redhat.com> wrote: > On Fri, Nov 23, 2012 at 11:23:09AM +1100, NeilBrown wrote: > > This is a bug in util-linux. > > > > If 'blkid' doesn't recognise the filesystem, mount reads /etc/filesystems > > and tries everything listed there. If that file ends with a '*', it should > > read /proc/filesystems and try everything else listed that (that doesn't > > start with 'nodev'). > > > > However it currently ignores the '*' and just adds everything > > Fixed. Thanks for the report! > > > The following patch (against git://github.com/karelzak/util-linux.git) fixes > > it for me, though I suspect it should possible ignore 'ENODEV' too - > > otherwise if /etc/filesystems contains an invalid filesystem name, it will > > silently ignore all others. > > Good idea, implemented. > > ... all will be fixed in stable v2.22.2 release. > > Karel > Looks good, thanks, NeilBrown [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 828 bytes --] ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2012-11-26 21:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <003d01cdb74b$0c3fa420$24beec60$%kim@samsung.com>
[not found] ` <201211021439.02797.Martin@lichtvoll.de>
[not found] ` <CAOtxgye-sqJFe17EyfJQ0RrMwQqsPbDv5m+4cJT0BjnRnGv56w@mail.gmail.com>
[not found] ` <201211101933.38434.Martin@lichtvoll.de>
[not found] ` <8A3372F6-6294-404E-909B-3FDE0C2368B7@dubeyko.com>
[not found] ` <1352634168.1893.9.camel@kjgkr>
2012-11-23 0:23 ` util-linux bug: was Re: [PATCH 00/16 v3] f2fs: introduce flash-friendly file system NeilBrown
2012-11-26 13:27 ` Karel Zak
2012-11-26 21:06 ` NeilBrown
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).