From owner-freebsd-current Thu Aug 26 16:26:23 1999 Delivered-To: freebsd-current@freebsd.org Received: from apollo.backplane.com (apollo.backplane.com [209.157.86.2]) by hub.freebsd.org (Postfix) with ESMTP id C133D1517A; Thu, 26 Aug 1999 16:26:08 -0700 (PDT) (envelope-from dillon@apollo.backplane.com) Received: (from dillon@localhost) by apollo.backplane.com (8.9.3/8.9.1) id QAA25436; Thu, 26 Aug 1999 16:25:14 -0700 (PDT) (envelope-from dillon) Date: Thu, 26 Aug 1999 16:25:14 -0700 (PDT) From: Matthew Dillon Message-Id: <199908262325.QAA25436@apollo.backplane.com> To: Poul-Henning Kamp Cc: Christopher Masto , grog@FreeBSD.ORG, "John W. DeBoskey" , julian@whistle.com, freebsd-current@FreeBSD.ORG Subject: Re: -current kernel problems (spec_getpages & vm_fault) References: <1673.935703901@critter.freebsd.dk> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG :>> int devminor; /* minor number */ :>> :>> devminor = minor(dev); :>> + dev->si_bsize_phys = DEV_BSIZE; :>> + dev->si_bsize_best = BLKDEV_IOSIZE; :>> + dev->si_bsize_max = MAXBSIZE; :> :>Bingo! Thank you. : :Cool, I expect grog will commit it soon. : :-- :Poul-Henning Kamp FreeBSD coreteam member :phk@FreeBSD.ORG "Real hackers run -current on their laptop." The patch for ccd is not quite right. Here is the patch from my big fat patch at http://www.backplane.com/FreeBSD4/ The problem is that you cannot simply set the physical sector size to DEV_BSIZE if the underlying device has a larger sector size. If you do, specfs's blocksize alignment (another fix in my big fat patch) will be incorrect and result in an I/O error on the physical media. For example, swap-backed VN devices have a sector size of one page, i.e. 4K. -Matt Matthew Dillon Index: ccd.c =================================================================== RCS file: /home/ncvs/src/sys/dev/ccd/ccd.c,v retrieving revision 1.53 diff -u -r1.53 ccd.c --- ccd.c 1999/08/26 14:46:10 1.53 +++ ccd.c 1999/08/26 23:22:43 @@ -1417,6 +1417,12 @@ lp->d_ncylinders = ccg->ccg_ncylinders; lp->d_secpercyl = lp->d_ntracks * lp->d_nsectors; + dev->si_bsize_phys = lp->d_secsize; + dev->si_bsize_best = BLKDEV_IOSIZE; + dev->si_bsize_max = MAXBSIZE; + if (dev->si_bsize_best < lp->d_secsize) + dev->si_bsize_best = lp->d_secsize; + strncpy(lp->d_typename, "ccd", sizeof(lp->d_typename)); lp->d_type = DTYPE_CCD; strncpy(lp->d_packname, "fictitious", sizeof(lp->d_packname)); To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message