summaryrefslogtreecommitdiff
path: root/ufs
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1997-06-20 19:34:41 +0000
committerMiles Bader <miles@gnu.org>1997-06-20 19:34:41 +0000
commita8297c7e7cf37673ce734836a2f95d2b5f46d2c7 (patch)
tree09c2205d007fbcbcc8428f472174847d0383d9a3 /ufs
parent68478ff7a6bfc94ae95d14ef282f6f12f3580734 (diff)
(diskfs_set_hypermetadata):
Adjust device addresses for possible differences between DEV_BSIZE & device block size.
Diffstat (limited to 'ufs')
-rw-r--r--ufs/hyper.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/ufs/hyper.c b/ufs/hyper.c
index 052bc220..500934eb 100644
--- a/ufs/hyper.c
+++ b/ufs/hyper.c
@@ -1,5 +1,5 @@
/* Fetching and storing the hypermetadata (superblock and cg summary info).
- Copyright (C) 1994, 1995, 1996 Free Software Foundation
+ Copyright (C) 1994, 1995, 1996, 1997 Free Software Foundation
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
@@ -292,8 +292,10 @@ diskfs_set_hypermetadata (int wait, int clean)
size_t read = 0;
size_t bufsize = round_page (fragroundup (sblock, sblock->fs_cssize));
- err = store_read (store, fsbtodb (sblock, sblock->fs_csaddr), bufsize,
- &buf, &read);
+ err = store_read (store,
+ fsbtodb (sblock, sblock->fs_csaddr)
+ << log2_dev_blocks_per_dev_bsize,
+ bufsize, &buf, &read);
if (err)
return err;
else if (read != bufsize)
@@ -304,7 +306,9 @@ diskfs_set_hypermetadata (int wait, int clean)
bcopy (csum, buf, sblock->fs_cssize);
if (swab_disk)
swab_csums ((struct csum *)buf);
- err = store_write (store, fsbtodb (sblock, sblock->fs_csaddr),
+ err = store_write (store,
+ fsbtodb (sblock, sblock->fs_csaddr)
+ << log2_dev_blocks_per_dev_bsize,
buf, bufsize, &wrote);
if (!err && wrote != bufsize)
err = EIO;