linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bruno Haible <bruno@clisp.org>
To: Evgeniy Dushistov <dushistov@mail.ru>
Cc: linux-fsdevel@vger.kernel.org
Subject: ufs filesystem cannot mount NetBSD/arm64 partition
Date: Mon, 15 Jan 2024 23:05:51 +0100	[thread overview]
Message-ID: <4014963.3daJWjYHZt@nimes> (raw)

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




             reply	other threads:[~2024-01-15 22:09 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-15 22:05 Bruno Haible [this message]
2024-01-15 22:22 ` ufs filesystem cannot mount NetBSD/arm64 partition 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4014963.3daJWjYHZt@nimes \
    --to=bruno@clisp.org \
    --cc=dushistov@mail.ru \
    --cc=linux-fsdevel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).