From owner-svn-src-all@freebsd.org Thu Jun 15 20:06:42 2017 Return-Path: Delivered-To: svn-src-all@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 B4799B956E5; Thu, 15 Jun 2017 20:06:42 +0000 (UTC) (envelope-from stevek@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 84B4B821D8; Thu, 15 Jun 2017 20:06:42 +0000 (UTC) (envelope-from stevek@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v5FK6fZt045608; Thu, 15 Jun 2017 20:06:41 GMT (envelope-from stevek@FreeBSD.org) Received: (from stevek@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v5FK6fak045607; Thu, 15 Jun 2017 20:06:41 GMT (envelope-from stevek@FreeBSD.org) Message-Id: <201706152006.v5FK6fak045607@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: stevek set sender to stevek@FreeBSD.org using -f From: "Stephen J. Kiernan" Date: Thu, 15 Jun 2017 20:06:41 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r319987 - head/etc X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 15 Jun 2017 20:06:42 -0000 Author: stevek Date: Thu Jun 15 20:06:41 2017 New Revision: 319987 URL: https://svnweb.freebsd.org/changeset/base/319987 Log: Replace md(4) usage in diskless(8) script rc.initdiskless with tmpfs(5). Need to multiply the size of the disk passed to mount_md by 512 as mdmfs expects number of 512-byte blocks while tmpfs size option wants number of bytes. Reviewed by: brooks Approved by: sjg (mentor) Obtained from: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D11106 Modified: head/etc/rc.initdiskless Modified: head/etc/rc.initdiskless ============================================================================== --- head/etc/rc.initdiskless Thu Jun 15 19:56:59 2017 (r319986) +++ head/etc/rc.initdiskless Thu Jun 15 20:06:41 2017 (r319987) @@ -195,10 +195,10 @@ handle_remount() { # $1 = mount point to_umount="$b ${to_umount}" } -# Create a generic memory disk +# Create a generic memory disk (using tmpfs) # mount_md() { - /sbin/mdmfs -S -i 4096 -s $1 -M md $2 + mount -t tmpfs -o size=$(($1 * 512)) tmpfs $2 } # Create the memory filesystem if it has not already been created