hammer2 - Add vfs.hammer2.supported_version
authorMatthew Dillon <dillon@apollo.backplane.com>
Mon, 6 Nov 2017 18:31:04 +0000 (10:31 -0800)
committerMatthew Dillon <dillon@apollo.backplane.com>
Mon, 6 Nov 2017 18:31:04 +0000 (10:31 -0800)
* Add vfs.hammer2.supported_version, which newfs_hammer2 probes
  and complains about when it isn't there.  This stops the complaints.

sys/vfs/hammer2/hammer2_vfsops.c

index edaefe9..b2ad510 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011-2015 The DragonFly Project.  All rights reserved.
+ * Copyright (c) 2011-2017 The DragonFly Project.  All rights reserved.
  *
  * This code is derived from software contributed to The DragonFly Project
  * by Matthew Dillon <dillon@backplane.com>
@@ -77,6 +77,7 @@ static struct hammer2_mntlist hammer2_mntlist;
 struct hammer2_pfslist hammer2_pfslist;
 struct lock hammer2_mntlk;
 
+int hammer2_supported_version = HAMMER2_VOL_VERSION_DEFAULT;
 int hammer2_debug;
 int hammer2_cluster_meta_read = 1;     /* physical read-ahead */
 int hammer2_cluster_data_read = 4;     /* physical read-ahead */
@@ -117,6 +118,8 @@ MALLOC_DEFINE(M_HAMMER2_DEBUFFER, "HAMMER2-decompbuffer",
 
 SYSCTL_NODE(_vfs, OID_AUTO, hammer2, CTLFLAG_RW, 0, "HAMMER2 filesystem");
 
+SYSCTL_INT(_vfs_hammer2, OID_AUTO, supported_version, CTLFLAG_RD,
+          &hammer2_supported_version, 0, "");
 SYSCTL_INT(_vfs_hammer2, OID_AUTO, debug, CTLFLAG_RW,
           &hammer2_debug, 0, "");
 SYSCTL_INT(_vfs_hammer2, OID_AUTO, cluster_meta_read, CTLFLAG_RW,