From owner-freebsd-bugs Fri Dec 26 13:45:55 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id NAA07160 for bugs-outgoing; Fri, 26 Dec 1997 13:45:55 -0800 (PST) (envelope-from owner-freebsd-bugs) Received: from godzilla.zeta.org.au (godzilla.zeta.org.au [203.2.228.19]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id NAA07131; Fri, 26 Dec 1997 13:45:19 -0800 (PST) (envelope-from bde@godzilla.zeta.org.au) Received: (from bde@localhost) by godzilla.zeta.org.au (8.8.7/8.8.7) id IAA28656; Sat, 27 Dec 1997 08:39:24 +1100 Date: Sat, 27 Dec 1997 08:39:24 +1100 From: Bruce Evans Message-Id: <199712262139.IAA28656@godzilla.zeta.org.au> To: bde@zeta.org.au, toor@dyson.iquest.net Subject: Re: kern/5355: Fix for NULLFS problems Cc: cschuber@uumail.gov.bc.ca, dyson@FreeBSD.ORG, freebsd-bugs@hub.freebsd.org Sender: owner-freebsd-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >I think that the problem with specfs is that the default size is bogus. There are several bogus defaults for specfs: 1) BLKDEV_IOSIZE = 2048. Used for reads and writes to block-special devices if neither 2) nor 3) applies. Also returned by stat() in st_blksize to advise user processes about the "best" block size to use. Usually too small. 2) dpart.part->p_frag * dpart.part->p_fsize, where dpart.part is a pointer to a partition table entry. Used for reads and writes to block-special devices if it is nonzero, the partition type is FS_BSDFS, and 3) doesn't apply. Only works right for partitions with unmounted BSD file systems on them. 3) vp->v_mount->mnt_stat.f_iosize, where vp->v_mount is a pointer to the mount struct for the file system containing the inode for the special file. Used for clustered writes to blockspecial devices under certain conditions. Never actually used, since spec_bmap() always returns a run length of 0. Completely bogus. 4) MAXBSIZE = 65536. Returned by stat() in st_blksize to advise user processes about the "best" block size to use. Usually too large - good sizes for disks and tapes are silly for terminals. Bruce