summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPoul-Henning Kamp <phk@FreeBSD.org>2002-05-12 20:21:40 +0000
committerPoul-Henning Kamp <phk@FreeBSD.org>2002-05-12 20:21:40 +0000
commit7110af7577b8a4fcd4f154bade61083c77480b39 (patch)
treef8881a1706abe6ff98361858048c6c983eb2c4bd
parent7cb71b749c8a348efbd7a72d42b09ce7cd13f838 (diff)
Notes
-rw-r--r--sys/gnu/ext2fs/fs.h3
-rw-r--r--sys/gnu/fs/ext2fs/fs.h3
-rw-r--r--sys/sys/disklabel.h3
-rw-r--r--sys/sys/diskmbr.h3
-rw-r--r--sys/sys/diskpc98.h3
-rw-r--r--sys/ufs/ffs/ffs_snapshot.c1
-rw-r--r--sys/ufs/ffs/fs.h5
7 files changed, 14 insertions, 7 deletions
diff --git a/sys/gnu/ext2fs/fs.h b/sys/gnu/ext2fs/fs.h
index 736051143918..785f267f8ac3 100644
--- a/sys/gnu/ext2fs/fs.h
+++ b/sys/gnu/ext2fs/fs.h
@@ -55,9 +55,8 @@
* The first boot and super blocks are given in absolute disk addresses.
* The byte-offset forms are preferred, as they don't imply a sector size.
*/
-#define BBSIZE 1024
#define SBSIZE 1024
-#define SBOFF ((off_t)(BBSIZE))
+#define SBLOCK 2
/*
* The path name on which the file system is mounted is maintained
diff --git a/sys/gnu/fs/ext2fs/fs.h b/sys/gnu/fs/ext2fs/fs.h
index 736051143918..785f267f8ac3 100644
--- a/sys/gnu/fs/ext2fs/fs.h
+++ b/sys/gnu/fs/ext2fs/fs.h
@@ -55,9 +55,8 @@
* The first boot and super blocks are given in absolute disk addresses.
* The byte-offset forms are preferred, as they don't imply a sector size.
*/
-#define BBSIZE 1024
#define SBSIZE 1024
-#define SBOFF ((off_t)(BBSIZE))
+#define SBLOCK 2
/*
* The path name on which the file system is mounted is maintained
diff --git a/sys/sys/disklabel.h b/sys/sys/disklabel.h
index 44eb997bf588..6928408a606f 100644
--- a/sys/sys/disklabel.h
+++ b/sys/sys/disklabel.h
@@ -88,6 +88,9 @@
#define MAXPARTITIONS 8
#endif
+/* Size of bootblock area in sector-size neutral bytes */
+#define BBSIZE 8192
+
#define LABEL_PART 2 /* partition containing label */
#define RAW_PART 2 /* partition containing whole disk */
#define SWAP_PART 1 /* partition normally containing swap */
diff --git a/sys/sys/diskmbr.h b/sys/sys/diskmbr.h
index 44eb997bf588..6928408a606f 100644
--- a/sys/sys/diskmbr.h
+++ b/sys/sys/diskmbr.h
@@ -88,6 +88,9 @@
#define MAXPARTITIONS 8
#endif
+/* Size of bootblock area in sector-size neutral bytes */
+#define BBSIZE 8192
+
#define LABEL_PART 2 /* partition containing label */
#define RAW_PART 2 /* partition containing whole disk */
#define SWAP_PART 1 /* partition normally containing swap */
diff --git a/sys/sys/diskpc98.h b/sys/sys/diskpc98.h
index 44eb997bf588..6928408a606f 100644
--- a/sys/sys/diskpc98.h
+++ b/sys/sys/diskpc98.h
@@ -88,6 +88,9 @@
#define MAXPARTITIONS 8
#endif
+/* Size of bootblock area in sector-size neutral bytes */
+#define BBSIZE 8192
+
#define LABEL_PART 2 /* partition containing label */
#define RAW_PART 2 /* partition containing whole disk */
#define SWAP_PART 1 /* partition normally containing swap */
diff --git a/sys/ufs/ffs/ffs_snapshot.c b/sys/ufs/ffs/ffs_snapshot.c
index 257450b0b389..7965211d72ec 100644
--- a/sys/ufs/ffs/ffs_snapshot.c
+++ b/sys/ufs/ffs/ffs_snapshot.c
@@ -37,6 +37,7 @@
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/conf.h>
+#include <sys/disklabel.h>
#include <sys/bio.h>
#include <sys/buf.h>
#include <sys/proc.h>
diff --git a/sys/ufs/ffs/fs.h b/sys/ufs/ffs/fs.h
index af7fd43dc528..da854f9496e6 100644
--- a/sys/ufs/ffs/fs.h
+++ b/sys/ufs/ffs/fs.h
@@ -58,12 +58,11 @@
* The beginning of cylinder group cg in fs, is given by
* the ``cgbase(fs, cg)'' macro.
*
- * The first boot and super blocks are given in absolute disk addresses.
- * The byte-offset forms are preferred, as they don't imply a sector size.
+ * The size and offset of the super-block in sector-size neutral bytes.
*/
-#define BBSIZE 8192
#define SBSIZE 8192
#define SBOFF ((off_t)(BBSIZE))
+#define SBLOCK ((ufs_daddr_t)(SBOFF / DEV_BSIZE))
/* Max number of fragments per block, this is not tweakable */
#define MAXFRAG 8