diff options
author | grog <grog@FreeBSD.org> | 1999-08-29 01:41:53 +0000 |
---|---|---|
committer | grog <grog@FreeBSD.org> | 1999-08-29 01:41:53 +0000 |
commit | 1bd06cee6e8571fac69041004b232a3aba3664ed (patch) | |
tree | 02be211c3f3ebec4494e0a6534ed90136a82e31a /sys/dev/vinum/vinum.c | |
parent | 74bac527839ca7395d0b80a588415448fcdfa23e (diff) | |
download | FreeBSD-src-1bd06cee6e8571fac69041004b232a3aba3664ed.zip FreeBSD-src-1bd06cee6e8571fac69041004b232a3aba3664ed.tar.gz |
Initialize the si_bsize fields of the new dev structure. This fixes
some swapper problems analogous to those experienced with ccd.
This fix is a kludge: since we currently don't track the "sector size"
in a volume label, we guess a worst case (4 kB, as used by vnode
devices). If the concept of sector size is here to stay, I'll make
some changes to track the "sector size" of a volume. This will
probably be the maximum of the sector sizes of all component drives,
but things could get ugly if we start allowing non-standard sector
sizes such as 524 bytes.
Unkludged-version-submitted-by: phk
Diffstat (limited to 'sys/dev/vinum/vinum.c')
-rw-r--r-- | sys/dev/vinum/vinum.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/dev/vinum/vinum.c b/sys/dev/vinum/vinum.c index 7149ee8..29b7232 100644 --- a/sys/dev/vinum/vinum.c +++ b/sys/dev/vinum/vinum.c @@ -271,6 +271,9 @@ vinumopen(dev_t dev, int devminor; /* minor number */ devminor = minor(dev); + dev->si_bsize_phys = DEV_BSIZE; + dev->si_bsize_best = VINUM_BSIZE_BEST; /* kludge until we track drive block sizes */ + dev->si_bsize_max = MAXBSIZE; error = 0; /* First, decide what we're looking at */ switch (DEVTYPE(dev)) { @@ -469,3 +472,6 @@ vinumdump(dev_t dev) /* Not implemented. */ return ENXIO; } +/* Local Variables: */ +/* fill-column: 50 */ +/* End: */ |