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
This commit is contained in:
parent
a0f9149b19
commit
03705cdeb7
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=50537
@ -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: */
|
||||
|
@ -178,6 +178,7 @@ enum constants {
|
||||
INITIAL_LOCKS = 64, /* number of locks to allocate to a plex */
|
||||
DEFAULT_REVIVE_BLOCKSIZE = 65536, /* size of block to transfer in one op */
|
||||
VINUMHOSTNAMELEN = 32, /* host name field in label */
|
||||
VINUM_BSIZE_BEST = 4096, /* best sector size */
|
||||
};
|
||||
|
||||
/* device numbers */
|
||||
|
Loading…
Reference in New Issue
Block a user