Index: head/sys/ufs/ffs/ffs_alloc.c =================================================================== --- head/sys/ufs/ffs/ffs_alloc.c +++ head/sys/ufs/ffs/ffs_alloc.c @@ -1958,6 +1958,16 @@ } /* + * Synchronous inode initialization is needed only when barrier writes do not + * work as advertised, and will impose a heavy cost on file creation in a newly + * created filesystem. + */ +static int doasyncinodeinit = 1; +SYSCTL_INT(_vfs_ffs, OID_AUTO, doasyncinodeinit, CTLFLAG_RWTUN, + &doasyncinodeinit, 0, + "Perform inode block initialization using asynchronous writes"); + +/* * Determine whether an inode can be allocated. * * Check to see if an inode is available, and if it is, @@ -2065,6 +2075,7 @@ dp2->di_gen = arc4random(); dp2++; } + /* * Rather than adding a soft updates dependency to ensure * that the new inode block is written before it is claimed @@ -2074,7 +2085,10 @@ * written. The barrier write should only slow down bulk * loading of newly created filesystems. */ - babarrierwrite(ibp); + if (doasyncinodeinit) + babarrierwrite(ibp); + else + bwrite(ibp); /* * After the inode block is written, try to update the