From owner-freebsd-bugs@FreeBSD.ORG Fri Sep 5 09:28:02 2014 Return-Path: Delivered-To: freebsd-bugs@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id EE199153 for ; Fri, 5 Sep 2014 09:28:02 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BB74314AB for ; Fri, 5 Sep 2014 09:28:02 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.9/8.14.9) with ESMTP id s859S2WE070904 for ; Fri, 5 Sep 2014 09:28:02 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 193338] New: vfs_mountroot_shuffle sets wrong mnt_stat.mntonname Date: Fri, 05 Sep 2014 09:28:02 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 10.0-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: dvm.avgoor@gmail.com X-Bugzilla-Status: Needs Triage X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter attachments.created Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2014 09:28:03 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=193338 Bug ID: 193338 Summary: vfs_mountroot_shuffle sets wrong mnt_stat.mntonname Product: Base System Version: 10.0-STABLE Hardware: Any OS: Any Status: Needs Triage Severity: Affects Some People Priority: --- Component: kern Assignee: freebsd-bugs@FreeBSD.org Reporter: dvm.avgoor@gmail.com Created attachment 146853 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=146853&action=edit patch In case if you have configured /.mount.conf with several rootfs options like (for example): .md /mfs_root.lz readonly ufs:/dev/ufs/rootimg .timeout 3 ufs:/dev/ufs/bootfail .ask after fail at first rootfs kernel proceeds to next and loads it correct. But after loading system there are wrong options in mounted filesystems: /dev/ufs/failsafe on / (ufs, local, read-only) /dev/ufs/bootfail on /.mount (ufs, local, read-only) /dev/ufs/boot on /.mount (ufs, local, read-only) And a real ufs/boot is under /.mount/.mount/ instead of /.mount In this case you can't unmount it or remount to RW. Underlying filesystems become useless. This happens because of vfs_mountroot_shuffle() sets mporoot->mnt_stat.f_mntonname unconditional, despite the real FS hierarchy. I have attached something looks like a patch, please review it. I hope it will help. Thank you. -- You are receiving this mail because: You are the assignee for the bug.