From owner-freebsd-geom@freebsd.org Mon Nov 6 08:58:33 2017 Return-Path: Delivered-To: freebsd-geom@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 73BF4E572EC for ; Mon, 6 Nov 2017 08:58:33 +0000 (UTC) (envelope-from 0100015f908d5f88-f54848aa-5a30-4571-865d-5f1e0c3dca32-000000@amazonses.com) Received: from a8-60.smtp-out.amazonses.com (a8-60.smtp-out.amazonses.com [54.240.8.60]) (using TLSv1 with cipher ECDHE-RSA-AES128-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3945765F31 for ; Mon, 6 Nov 2017 08:58:32 +0000 (UTC) (envelope-from 0100015f908d5f88-f54848aa-5a30-4571-865d-5f1e0c3dca32-000000@amazonses.com) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=ae7m2yrxjw65l2cqdpjxuucyrvy564tn; d=tarsnap.com; t=1509958705; h=Subject:To:References:Cc:From:Message-ID:Date:MIME-Version:In-Reply-To:Content-Type:Content-Transfer-Encoding; bh=PkO7e8tXb088hUsKMOQZWqKO/EUG0gQ/kVGPPF9O4l4=; b=QWhvyPv9HW7j1Ewsxd9JxWN1Tge4qsIFh1lCsdt8qHdmMAV6ULEgswJioCaSaszO 4lTzMkIh8IuaKieuq2xgLhIgscjkjlowOBvuqH7iz3R4BE3u3Tt4ma8kowsiixEvhFF o+psp0svEv4snJcU3hnX84yRgHLUlvD0nLaF30kY= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/simple; s=224i4yxa5dv7c2xz3womw6peuasteono; d=amazonses.com; t=1509958705; h=Subject:To:References:Cc:From:Message-ID:Date:MIME-Version:In-Reply-To:Content-Type:Content-Transfer-Encoding:Feedback-ID; bh=PkO7e8tXb088hUsKMOQZWqKO/EUG0gQ/kVGPPF9O4l4=; b=nuKoo2THCsfqa2StoeFGN7GctA12NVrBvMvCvo+D0MC2htuBZcYylMuPtefUYCAZ FWq0fFiyN7+csKW1/rBEPyzA1H5OQCiSSxnXu8MehkHJVQIrKXx89+bGjfKfzV+vVLq DPsEOyaSyiCX7k+cYbK3nq9jslW+D6PEnMfLj1yQ= Subject: Re: No automatic root mount holding for new geom providers? To: Poul-Henning Kamp References: <0100015f900017eb-91becde5-26c8-49f0-b593-751670ca42e0-000000@email.amazonses.com> <31857.1509955550@critter.freebsd.dk> Cc: freebsd-geom@freebsd.org From: Colin Percival Message-ID: <0100015f908d5f88-f54848aa-5a30-4571-865d-5f1e0c3dca32-000000@email.amazonses.com> Date: Mon, 6 Nov 2017 08:58:25 +0000 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <31857.1509955550@critter.freebsd.dk> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-SES-Outgoing: 2017.11.06-54.240.8.60 Feedback-ID: 1.us-east-1.Lv9FVjaNvvR5llaqfLoOVbo2VxOELl7cjN0AOyXnPlk=:AmazonSES X-BeenThere: freebsd-geom@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: GEOM-specific discussions and implementations List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Nov 2017 08:58:33 -0000 On 11/06/17 00:05, Poul-Henning Kamp wrote: > Colin Percival writes: >> In practice, it seems that we avoid this by virtue of tasting new geoms being >> much faster than everything else the kernel does between when the disks are >> attached and when vfs_mountroot runs, but I wouldn't want to rely on that. >> >> Am I missing something? > > As I recall, the actual open will stall on the non-empty event-queue. Aha! I'm not sure about opens, but vfs_mountroot_wait calls g_waitidle, which waits until the event queue is empty. So any devices discovered before we hit vfs_mountroot will indeed have been fully digested before we try to mount the root filesystem. Thanks! -- Colin Percival Security Officer Emeritus, FreeBSD | The power to serve Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid