[adding Al Viro]
Hi Dmitry,
I expect that the "WARNING:" message is being interpreted incorrectly here,
but that's a minor issue IMO.
if (info->si_lasti == BFS_MAX_LASTI)
printf("WARNING: filesystem %s was created with 512 inodes, the real maximum is 511, mounting anyway\n", s->s_id);
If you/we look at fs/bfs/bfs.h, it says:
/* In theory BFS supports up to 512 inodes, numbered from 2 (for /) up to 513 inclusive.
In actual fact, attempting to create the 512th inode (i.e. inode No. 513 or file No. 511)
will fail with ENOSPC in bfs_add_entry(): the root directory cannot contain so many entries, counting '..'.
So, mkfs.bfs(8) should really limit its -N option to 511 and not 512. For now, we just print a warning
if a filesystem is mounted with such "impossible to fill up" number of inodes */
so one question is why does syzkaller try to do this at all?
Why not set number-of-inodes to 511 instead of 512 in the BFS image file?
However, in testing this, I see that the BFS image is not mounted
on /dev/loop# at all.
'mount' says:
# mount -t bfs -o loop bfsfilesyz000.img /mnt/stand
mount: /mnt/stand: mount(2) system call failed: Not a directory.
(but it is a directory)
and I have tracked that down to fs/namespace.c::graft_tree()
returning -ENOTDIR, but I don't know why that is happening.
Al, can you provide any insights on this?
thanks.
--
~Randy