Date: Thu, 20 Dec 2018 17:28:45 -0800 From: Kirk McKusick <mckusick@mckusick.com> To: Rebecca Cran <rebecca@bluestop.org>, Mark Johnston <markj@freebsd.org> Cc: pho@freebsd.org, "freebsd-current@FreeBSD.org" <freebsd-current@freebsd.org> Subject: Re: Panic in getblkx() booting from disc1.iso in Qemu VM Message-ID: <201812210128.wBL1SjfA041538@chez.mckusick.com> In-Reply-To: <20181220180449.GD98252@raichu>
next in thread | previous in thread | raw e-mail | index | archive | help
Thanks Rebecca for the report and Mark for the analysis of the problem. This should be fixed in -r342290. Kirk McKusick =-=-= From: Kirk McKusick <mckusick@FreeBSD.org> Date: Fri, 21 Dec 2018 01:09:25 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r342290 - head/sys/kern Author: mckusick Date: Fri Dec 21 01:09:25 2018 New Revision: 342290 URL: https://svnweb.freebsd.org/changeset/base/342290 Log: Some filesystems (like cd9660 and ext3) require that VFS_STATFS() be called before VFS_ROOT() is called. Move the call for VFS_STATFS() so that it is done after VFS_MOUNT(), but before VFS_ROOT(). This change actually improves the robustness of the mount system call because it returns an error rather than failing silently when VFS_STATFS() returns failure. Reported by: Rebecca Cran <rebecca@bluestop.org> Sponsored by: Netflix Modified: head/sys/kern/vfs_mount.c Modified: head/sys/kern/vfs_mount.c ============================================================================== --- head/sys/kern/vfs_mount.c Thu Dec 20 22:39:58 2018 (r342289) +++ head/sys/kern/vfs_mount.c Fri Dec 21 01:09:25 2018 (r342290) @@ -895,6 +895,7 @@ vfs_domount_first( */ error1 = 0; if ((error = VFS_MOUNT(mp)) != 0 || + (error1 = VFS_STATFS(mp, &mp->mnt_stat)) != 0 || (error1 = VFS_ROOT(mp, LK_EXCLUSIVE, &newdp)) != 0) { if (error1 != 0) { error = error1; @@ -916,7 +917,6 @@ vfs_domount_first( vfs_freeopts(mp->mnt_opt); mp->mnt_opt = mp->mnt_optnew; *optlist = NULL; - (void)VFS_STATFS(mp, &mp->mnt_stat); /* * Prevent external consumers of mount options from reading mnt_optnew.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201812210128.wBL1SjfA041538>