|
| 1 | +diff --git a/sys/conf/GENERIC b/sys/conf/GENERIC |
| 2 | +index b524e4c00..635c51ad3 100644 |
| 3 | +--- a/sys/conf/GENERIC |
| 4 | ++++ b/sys/conf/GENERIC |
| 5 | +@@ -42,6 +42,7 @@ option MSDOSFS # MS-DOS file system |
| 6 | + option FIFO # FIFOs; RECOMMENDED |
| 7 | + #option TMPFS # efficient memory file system |
| 8 | + option FUSE # FUSE |
| 9 | ++option HAMMER2 # HAMMER2 file system |
| 10 | + |
| 11 | + option SOCKET_SPLICE # Socket Splicing for TCP and UDP |
| 12 | + option TCP_ECN # Explicit Congestion Notification for TCP |
| 13 | +diff --git a/sys/conf/files b/sys/conf/files |
| 14 | +index 3bd32d693..2e3a09ee8 100644 |
| 15 | +--- a/sys/conf/files |
| 16 | ++++ b/sys/conf/files |
| 17 | +@@ -788,6 +788,7 @@ file tmpfs/tmpfs_vfsops.c tmpfs |
| 18 | + file tmpfs/tmpfs_vnops.c tmpfs |
| 19 | + file tmpfs/tmpfs_specops.c tmpfs |
| 20 | + file tmpfs/tmpfs_fifoops.c tmpfs & fifo |
| 21 | ++file hammer2/hammer2_vfsops.c hammer2 |
| 22 | + file net/art.c |
| 23 | + file net/bpf.c bpfilter needs-count |
| 24 | + file net/bpf_filter.c bpfilter |
| 25 | +diff --git a/sys/kern/vfs_init.c b/sys/kern/vfs_init.c |
| 26 | +index 84c00f0e4..59715d5d8 100644 |
| 27 | +--- a/sys/kern/vfs_init.c |
| 28 | ++++ b/sys/kern/vfs_init.c |
| 29 | +@@ -100,6 +100,11 @@ static struct vfsconf vfsconflist[] = { |
| 30 | + { &tmpfs_vfsops, MOUNT_TMPFS, 19, 0, MNT_LOCAL, |
| 31 | + sizeof(struct tmpfs_args) }, |
| 32 | + #endif |
| 33 | ++ |
| 34 | ++#ifdef HAMMER2 |
| 35 | ++ { &hammer2_vfsops, "hammer2", 20, 0, MNT_LOCAL, |
| 36 | ++ sizeof(struct hammer2_args) }, |
| 37 | ++#endif |
| 38 | + }; |
| 39 | + |
| 40 | + |
| 41 | +diff --git a/sys/sys/mount.h b/sys/sys/mount.h |
| 42 | +index 40c12e976..c31e7c17c 100644 |
| 43 | +--- a/sys/sys/mount.h |
| 44 | ++++ b/sys/sys/mount.h |
| 45 | +@@ -257,6 +257,15 @@ struct fusefs_args { |
| 46 | + int allow_other; |
| 47 | + }; |
| 48 | + |
| 49 | ++/* |
| 50 | ++ * Arguments to mount HAMMER2 file systems |
| 51 | ++ * XXX sizeof can't exceed existing union mount_info size. |
| 52 | ++ */ |
| 53 | ++struct hammer2_args { |
| 54 | ++ char volume[100]; /* was 1024, change this to pointer */ |
| 55 | ++ int hflags; /* extended hammer2 mount flags */ |
| 56 | ++}; |
| 57 | ++ |
| 58 | + /* |
| 59 | + * file system statistics |
| 60 | + */ |
| 61 | +@@ -273,6 +282,7 @@ union mount_info { |
| 62 | + struct msdosfs_args msdosfs_args; |
| 63 | + struct ntfs_args ntfs_args; |
| 64 | + struct tmpfs_args tmpfs_args; |
| 65 | ++ struct hammer2_args hammer2_args; |
| 66 | + char __align[160]; /* 64-bit alignment and room to grow */ |
| 67 | + }; |
| 68 | + |
| 69 | +@@ -558,6 +568,7 @@ extern const struct vfsops ntfs_vfsops; |
| 70 | + extern const struct vfsops udf_vfsops; |
| 71 | + extern const struct vfsops fusefs_vfsops; |
| 72 | + extern const struct vfsops tmpfs_vfsops; |
| 73 | ++extern const struct vfsops hammer2_vfsops; |
| 74 | + |
| 75 | + #include <net/radix.h> |
| 76 | + #include <sys/socket.h> /* XXX for AF_MAX */ |
| 77 | +diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h |
| 78 | +index c9bb267e7..4b6aebca0 100644 |
| 79 | +--- a/sys/sys/vnode.h |
| 80 | ++++ b/sys/sys/vnode.h |
| 81 | +@@ -66,13 +66,13 @@ enum vtype { VNON, VREG, VDIR, VBLK, VCHR, VLNK, VSOCK, VFIFO, VBAD }; |
| 82 | + enum vtagtype { |
| 83 | + VT_NON, VT_UFS, VT_NFS, VT_MFS, VT_MSDOSFS, |
| 84 | + VT_PORTAL, VT_PROCFS, VT_AFS, VT_ISOFS, VT_ADOSFS, |
| 85 | +- VT_EXT2FS, VT_VFS, VT_NTFS, VT_UDF, VT_FUSEFS, VT_TMPFS, |
| 86 | ++ VT_EXT2FS, VT_VFS, VT_NTFS, VT_UDF, VT_FUSEFS, VT_TMPFS, VT_HAMMER2, |
| 87 | + }; |
| 88 | + |
| 89 | + #define VTAG_NAMES \ |
| 90 | + "NON", "UFS", "NFS", "MFS", "MSDOSFS", \ |
| 91 | + "unused", "unused", "unused", "ISOFS", "unused", \ |
| 92 | +- "EXT2FS", "VFS", "NTFS", "UDF", "FUSEFS", "TMPFS" |
| 93 | ++ "EXT2FS", "VFS", "NTFS", "UDF", "FUSEFS", "TMPFS", "HAMMER2" |
| 94 | + |
| 95 | + /* |
| 96 | + * Each underlying filesystem allocates its own private area and hangs |
0 commit comments