Date: Thu, 18 May 2017 14:19:06 +0000 (UTC) From: Emmanuel Vadot <manu@FreeBSD.org> 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 Message-ID: <201705181419.v4IEJ6jQ056960@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201705181419.v4IEJ6jQ056960>