From owner-freebsd-current@FreeBSD.ORG Fri Jun 7 04:21:37 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id F1E36252; Fri, 7 Jun 2013 04:21:36 +0000 (UTC) (envelope-from crodr001@gmail.com) Received: from mail-la0-x235.google.com (mail-la0-x235.google.com [IPv6:2a00:1450:4010:c03::235]) by mx1.freebsd.org (Postfix) with ESMTP id 4AE9E1827; Fri, 7 Jun 2013 04:21:36 +0000 (UTC) Received: by mail-la0-f53.google.com with SMTP id fs12so1795054lab.26 for ; Thu, 06 Jun 2013 21:21:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=rmaOXaprRSFlRh9aXemxKpSmJzaEFxkok4/AVjr0qOI=; b=r0r0GieWzj6oaaX6/rCXGgmRT3+9etwaPqwWB/+DVJpVLT/2aVAYdcHxBSz7MzxAX/ sQGwuYHqN3uR3m7bdI11KzpXGsq4YHIjUsUR+hcBojrjGV9Z29/atKADYHp1UnrdpYo0 cQAlEoHlc1m7/4iBMOFVbwbb7Ec5dYWp1HiKhvL/tMBuhc1ligmRXz29G4kBm9u2ELe4 d+7LA/z+5eCDlKgOfQ207MtGns58Wf+DIZG0uSHz9sIkRx8CZWr4c6xfnrWN6S51Y33o 2gi83dDdEcuMLBDos7ho4v05i25bF7EreG+QZ6ACSlTtP8EmphL3mMA2D9c3GjU6QgyV F9gA== MIME-Version: 1.0 X-Received: by 10.112.219.225 with SMTP id pr1mr333378lbc.92.1370578895184; Thu, 06 Jun 2013 21:21:35 -0700 (PDT) Sender: crodr001@gmail.com Received: by 10.112.53.231 with HTTP; Thu, 6 Jun 2013 21:21:35 -0700 (PDT) In-Reply-To: <1370537672.1086.30.camel@revolution.hippie.lan> References: <433498856.127008.1370217441419.JavaMail.root@erie.cs.uoguelph.ca> <1370537672.1086.30.camel@revolution.hippie.lan> Date: Thu, 6 Jun 2013 21:21:35 -0700 X-Google-Sender-Auth: 4_7KXPGc3I-qo_Lxw-q4NrDWcWA Message-ID: Subject: Re: mounting root from NFS via ROOTDEVNAME From: Craig Rodrigues To: Ian Lepore Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: Rick Macklem , Lars Eggert , freebsd-current X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Jun 2013 04:21:37 -0000 On Thu, Jun 6, 2013 at 9:54 AM, Ian Lepore wrote: > Well, I started out just testing Lars' patch (it works) but that > inspired me to pick up the work I toyed with months ago in this area, to > try to get BOOTP_NFSROOT to respect other root-path options such as > setting vfs.root.mountfrom in the environment and using the RB_DFLTROOT > boot option. The attached patch does those things, as follows: > Your patch is better than the existing code. Your patch makes the code more readable. In my earlier response on this thread, I threw out the idea of axing ROOTDEVNAME from the kernel config options. I had a feeling that there would be opposition to it, so I'm OK with it staying. What I don't like to see is a lot of code behind conditional preprocessor logic of #ifdef ROOTDEVNAME. This often leads to bitrot if ROOTDEVNAME is not part of the GENERIC kernel config. However, with your patch, the amount of code inside #ifdef ROOTDEVNAME blocks is very minimal, so I can live with that. With your patch, we can trigger all the behavior by setting vfs.mountfrom in loader.conf with an "nfs:" prefix, so that is good, in terms of testing the feature with GENERIC kernels. I would say, if Lars Eggert has time to provide feedback and is OK with your patch, then go with your patch and commit it. The only minor feedback I would give is that in this comment: + /* + * Choose a root filesystem. If a value is forced in the environment + * and it contains "nfs:", use it unconditionally. Otherwise, use + * ROOTDEVNAME if it contains "nfs:" and either the server didn't + * provide a name or the boot options say to force ROOTDEVNAME. + */ + If you could take the sentence starting with "Otherwise, use", and maybe split it up into two sentences, that would make the comment a little bit more readable. Thanks. -- Craig