Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F139451513
D13428.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D13428.diff
View Options
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
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Dec 13, 6:13 AM (11 h, 34 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
26923408
Default Alt Text
D13428.diff (1 KB)
Attached To
Mode
D13428: Provide an option to force synchronous initialization of inode blocks
Attached
Detach File
Event Timeline
Log In to Comment