linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* ufs filesystem cannot mount NetBSD/arm64 partition
@ 2024-01-15 22:05 Bruno Haible
  2024-01-15 22:22 ` Al Viro
  0 siblings, 1 reply; 8+ messages in thread
From: Bruno Haible @ 2024-01-15 22:05 UTC (permalink / raw)
  To: Evgeniy Dushistov; +Cc: linux-fsdevel

To: Evgeniy Dushistov <dushistov@mail.ru>
CC: linux-fsdevel@vger.kernel.org
Subject: ufs filesystem cannot mount NetBSD/arm64 partition

The disk obtained by

$ wget http://nycdn.netbsd.org/pub/NetBSD-daily/netbsd-9/latest/evbarm-aarch64/binary/gzimg/arm64.img.gz
$ gunzip arm64.img

contains two partitions, as shown by
$ fdisk arm64.img
Device     Boot  Start     End Sectors Size Id Type
arm64.img1 *     32768  196607  163840  80M  c W95 FAT32 (LBA)
arm64.img2      196608 2366335 2169728   1G a9 NetBSD

The second partition is of type ufs, with subtype 44bsd (as all NetBSD UFS
partitions). But Linux cannot mount them.

How to reproduce:
# kpartx -av arm64.img
add map loopXXp1 ...
add map loopXXp2 ...
# mount -r -t ufs -o ufstype=44bsd /dev/mapper/loopXXp2 /mnt
mount: /mnt: wrong fs type, bad option, bad superblock on /dev/mapper/loopXXp2, missing codepage or helper program, or other error.
       dmesg(1) may have more information after failed mount system call.
# dmesg
...
[  285.212612] ufs: UFSD (fs/ufs/super.c, 797): ufs_fill_super:
[  285.212619] ufs: ENTER
[  285.212622] ufs: UFSD (fs/ufs/super.c, 812): ufs_fill_super:
[  285.212625] ufs: flag 1
[  285.212629] ufs: UFSD (fs/ufs/super.c, 387): ufs_parse_options:
[  285.212632] ufs: ENTER
[  285.212636] ufs: UFSD (fs/ufs/super.c, 852): ufs_fill_super:
[  285.212639] ufs: ufstype=44bsd
[  285.212739] ufs: ufs_fill_super(): fragment size 8192 is too large
[  285.212745] ufs: UFSD (fs/ufs/super.c, 1300): ufs_fill_super:
[  285.212749] ufs: EXIT (FAILED)

Reproduced on Ubuntu 23.10 with a vanilla linux-6.7.0.

Whereas this partition can be mounted fine on FreeBSD, NetBSD, OpenBSD.
FreeBSD 11:
# mount -r -t ufs /dev/ada1s2 /mnt
NetBSD 9.3:
# mount -r -t ffs /dev/wd1a /mnt
OpenBSD 7.4:
# mount -r -t ffs /dev/wd1j /mnt

The source code line which emits the
  ufs: ufs_fill_super(): fragment size 8192 is too large
error is obviously linux/fs/ufs/super.c:1083.

       Bruno




^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-01-15 23:36 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-15 22:05 ufs filesystem cannot mount NetBSD/arm64 partition Bruno Haible
2024-01-15 22:22 ` Al Viro
2024-01-15 22:33   ` Al Viro
2024-01-15 23:08     ` Matthew Wilcox
2024-01-15 23:25       ` Al Viro
2024-01-15 23:29       ` Bruno Haible
2024-01-15 23:36         ` Al Viro
2024-01-15 23:28     ` Bruno Haible

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).