From owner-svn-src-head@freebsd.org Thu May 18 14:19:08 2017 Return-Path: Delivered-To: svn-src-head@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 4E529D73FD7; Thu, 18 May 2017 14:19:08 +0000 (UTC) (envelope-from manu@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 09A03162C; Thu, 18 May 2017 14:19:07 +0000 (UTC) (envelope-from manu@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v4IEJ6uW056965; Thu, 18 May 2017 14:19:06 GMT (envelope-from manu@FreeBSD.org) Received: (from manu@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v4IEJ6jQ056960; Thu, 18 May 2017 14:19:06 GMT (envelope-from manu@FreeBSD.org) Message-Id: <201705181419.v4IEJ6jQ056960@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: manu set sender to manu@FreeBSD.org using -f From: Emmanuel Vadot Date: Thu, 18 May 2017 14:19:06 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r318452 - in head/usr.sbin/makefs: . ffs X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 May 2017 14:19:08 -0000 Author: manu Date: Thu May 18 14:19:06 2017 New Revision: 318452 URL: https://svnweb.freebsd.org/changeset/base/318452 Log: makefs: Add soft-updates option Add the ffs option to enable soft-updates. The option is only processed is ufs2 has been selected. Reviewed by: emaste, bapt (earlier version), allanjude (earlier version) Sponsored by: Gandi.net Differential Revision: https://reviews.freebsd.org/D10773 Modified: head/usr.sbin/makefs/ffs.c head/usr.sbin/makefs/ffs.h head/usr.sbin/makefs/ffs/mkfs.c head/usr.sbin/makefs/makefs.8 Modified: head/usr.sbin/makefs/ffs.c ============================================================================== --- head/usr.sbin/makefs/ffs.c Thu May 18 14:05:29 2017 (r318451) +++ head/usr.sbin/makefs/ffs.c Thu May 18 14:19:06 2017 (r318452) @@ -176,6 +176,8 @@ ffs_prep_opts(fsinfo_t *fsopts) 0, 0, "Optimization (time|space)" }, { 'l', "label", ffs_opts->label, OPT_STRARRAY, 1, sizeof(ffs_opts->label), "UFS label" }, + { 's', "softupdates", &ffs_opts->softupdates, OPT_INT32, + 0, 1, "enable softupdates" }, { .name = NULL } }; @@ -190,6 +192,7 @@ ffs_prep_opts(fsinfo_t *fsopts) ffs_opts->avgfilesize= -1; ffs_opts->avgfpdir= -1; ffs_opts->version = 1; + ffs_opts->softupdates = 0; fsopts->fs_specific = ffs_opts; fsopts->fs_options = copy_opts(ffs_options); Modified: head/usr.sbin/makefs/ffs.h ============================================================================== --- head/usr.sbin/makefs/ffs.h Thu May 18 14:05:29 2017 (r318451) +++ head/usr.sbin/makefs/ffs.h Thu May 18 14:19:06 2017 (r318452) @@ -64,6 +64,7 @@ typedef struct { int version; /* filesystem version (1 = FFS, 2 = UFS2) */ int maxbsize; /* maximum extent size */ int maxblkspercg; /* max # of blocks per cylinder group */ + int softupdates; /* soft updates */ /* XXX: support `old' file systems ? */ } ffs_opt_t; Modified: head/usr.sbin/makefs/ffs/mkfs.c ============================================================================== --- head/usr.sbin/makefs/ffs/mkfs.c Thu May 18 14:05:29 2017 (r318451) +++ head/usr.sbin/makefs/ffs/mkfs.c Thu May 18 14:19:06 2017 (r318452) @@ -279,6 +279,8 @@ ffs_mkfs(const char *fsys, const fsinfo_ sblock.fs_inopb = sblock.fs_bsize / sizeof(struct ufs2_dinode); sblock.fs_maxsymlinklen = ((UFS_NDADDR + UFS_NIADDR) * sizeof (ufs2_daddr_t)); + if (ffs_opts->softupdates == 1) + sblock.fs_flags |= FS_DOSOFTDEP; } sblock.fs_sblkno = Modified: head/usr.sbin/makefs/makefs.8 ============================================================================== --- head/usr.sbin/makefs/makefs.8 Thu May 18 14:05:29 2017 (r318451) +++ head/usr.sbin/makefs/makefs.8 Thu May 18 14:19:06 2017 (r318452) @@ -35,7 +35,7 @@ .\" .\" $FreeBSD$ .\" -.Dd April 6, 2017 +.Dd May 17, 2017 .Dt MAKEFS 8 .Os .Sh NAME @@ -308,6 +308,8 @@ Maximum total number of blocks in a cyli .It Sy version UFS version. 1 for FFS (default), 2 for UFS2. +.It Sy softupdates +0 for disable (default), 1 for enable .El .Ss CD9660-specific options .Sy cd9660