On tahoe, must use secsize of 1024, even though the disk label claims 512
authorKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Sat, 23 Feb 1991 10:20:04 +0000 (02:20 -0800)
committerKirk McKusick <mckusick@ucbvax.Berkeley.EDU>
Sat, 23 Feb 1991 10:20:04 +0000 (02:20 -0800)
SCCS-vsn: sbin/fsck/setup.c 5.33

usr/src/sbin/fsck/setup.c

index 437b685..2ebd25e 100644 (file)
@@ -6,7 +6,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char sccsid[] = "@(#)setup.c    5.32 (Berkeley) %G%";
+static char sccsid[] = "@(#)setup.c    5.33 (Berkeley) %G%";
 #endif /* not lint */
 
 #define DKTYPENAMES
 #endif /* not lint */
 
 #define DKTYPENAMES
@@ -88,6 +88,14 @@ setup(dev)
                dev_bsize = secsize = lp->d_secsize;
        else
                dev_bsize = secsize = DEV_BSIZE;
                dev_bsize = secsize = lp->d_secsize;
        else
                dev_bsize = secsize = DEV_BSIZE;
+#ifdef tahoe
+       /*
+        * On the tahoe, the disk label and the disk driver disagree.
+        * The label knows that sectors are 512 bytes, but the disk
+        * drivers will only transfer in 1024 sized pieces.
+        */
+       secsize = 1024;
+#endif
        /*
         * Read in the superblock, looking for alternates if necessary
         */
        /*
         * Read in the superblock, looking for alternates if necessary
         */