Module Name: src
Committed By: dholland
Date: Tue Sep 3 02:24:01 UTC 2013
Modified Files:
src/sys/ufs/ffs: fs.h
Log Message:
Add the FS_SUJ flag for journaled softupdates from FreeBSD.
This conflicts with our flag for FS_INDEXDIRS. Apparently FreeBSD
changed that arbitrarily on their end when implementing journaled
softupdates, so follow their lead.
Unfortunately, the new value they use for FS_INDEXDIRS conflicts with
our flag FS_DOQUOTA2 for 64-bit quotas. Since the only thing in our
tree that knows about FS_INDEXDIRS is dumpfs (for printing it), leave
FS_INDEXDIRS commented out.
Also add FS_NFS4ACLS from FreeBSD, commented out because it conflicts
with our FS_DOWAPBL, and FS_TRIM.
(We could honor FS_TRIM as we have code for doing that; however I'm
not sure why FreeBSD chose to make it an on-disk flag instead of e.g.
a mount option and it seems problematic to me. In any case, not in
this commit.)
Also see a post I just made in tech-kern about the flag conflicts.
To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/sys/ufs/ffs/fs.h
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/ufs/ffs/fs.h
diff -u src/sys/ufs/ffs/fs.h:1.64 src/sys/ufs/ffs/fs.h:1.65
--- src/sys/ufs/ffs/fs.h:1.64 Sun Jun 23 22:03:34 2013
+++ src/sys/ufs/ffs/fs.h Tue Sep 3 02:24:01 2013
@@ -1,4 +1,4 @@
-/* $NetBSD: fs.h,v 1.64 2013/06/23 22:03:34 dholland Exp $ */
+/* $NetBSD: fs.h,v 1.65 2013/09/03 02:24:01 dholland Exp $ */
/*
* Copyright (c) 1982, 1986, 1993
@@ -422,13 +422,16 @@ struct fs {
#define FS_UNCLEAN 0x001 /* file system not clean at mount (unused) */
#define FS_DOSOFTDEP 0x002 /* file system using soft dependencies */
#define FS_NEEDSFSCK 0x004 /* needs sync fsck (FreeBSD compat, unused) */
-#define FS_INDEXDIRS 0x008 /* kernel supports indexed directories */
+#define FS_SUJ 0x008 /* file system using journaled softupdates */
#define FS_ACLS 0x010 /* file system has ACLs enabled */
#define FS_MULTILABEL 0x020 /* file system is MAC multi-label */
#define FS_GJOURNAL 0x40 /* gjournaled file system */
#define FS_FLAGS_UPDATED 0x80 /* flags have been moved to new location */
#define FS_DOWAPBL 0x100 /* Write ahead physical block logging */
+/* FS_NFS4ACLS 0x100 file system has NFSv4 ACLs enabled (FBSD) */
#define FS_DOQUOTA2 0x200 /* in-filesystem quotas */
+/* FS_INDEXDIRS 0x200 kernel supports indexed directories (FBSD)*/
+#define FS_TRIM 0x400 /* discard deleted blocks in storage layer */
/* File system flags that are ok for NetBSD if set in fs_flags */
#define FS_KNOWN_FLAGS (FS_DOSOFTDEP | FS_DOWAPBL | FS_DOQUOTA2)