diff options
author | mckusick <mckusick@FreeBSD.org> | 2002-11-27 02:18:58 +0000 |
---|---|---|
committer | mckusick <mckusick@FreeBSD.org> | 2002-11-27 02:18:58 +0000 |
commit | 9251693096205ec24c8f8eec7bd9f516b3bb70e5 (patch) | |
tree | d1928be6bf74e88babe007808d7eaa98444918f3 /sbin/fsirand/fsirand.c | |
parent | 4b6c4bf70dda32c0c61b5380253299edaff0df5b (diff) | |
download | FreeBSD-src-9251693096205ec24c8f8eec7bd9f516b3bb70e5.zip FreeBSD-src-9251693096205ec24c8f8eec7bd9f516b3bb70e5.tar.gz |
Create a new 32-bit fs_flags word in the superblock. Add code to move
the old 8-bit fs_old_flags to the new location the first time that the
filesystem is mounted by a new kernel. One of the unused flags in
fs_old_flags is used to indicate that the flags have been moved.
Leave the fs_old_flags word intact so that it will work properly if
used on an old kernel.
Change the fs_sblockloc superblock location field to be in units
of bytes instead of in units of filesystem fragments. The old units
did not work properly when the fragment size exceeeded the superblock
size (8192). Update old fs_sblockloc values at the same time that
the flags are moved.
Suggested by: BOUWSMA Barry <freebsd-misuser@netscum.dyndns.dk>
Sponsored by: DARPA & NAI Labs.
Diffstat (limited to 'sbin/fsirand/fsirand.c')
-rw-r--r-- | sbin/fsirand/fsirand.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sbin/fsirand/fsirand.c b/sbin/fsirand/fsirand.c index a4d922b..7b6274f 100644 --- a/sbin/fsirand/fsirand.c +++ b/sbin/fsirand/fsirand.c @@ -152,8 +152,7 @@ fsirand(char *device) } if ((sblock->fs_magic == FS_UFS1_MAGIC || (sblock->fs_magic == FS_UFS2_MAGIC && - sblock->fs_sblockloc == - numfrags(sblock, sblock_try[i]))) && + sblock->fs_sblockloc == sblock_try[i])) && sblock->fs_bsize <= MAXBSIZE && sblock->fs_bsize >= sizeof(struct fs)) break; |