From owner-freebsd-current Thu Aug 26 16:28:59 1999 Delivered-To: freebsd-current@freebsd.org Received: from tangelo.bmc.com (fw-us-hou-2.bmc.com [198.207.223.251]) by hub.freebsd.org (Postfix) with ESMTP id E273214EB1; Thu, 26 Aug 1999 16:28:48 -0700 (PDT) (envelope-from Girish_Pillai@bmc.com) Received: from ec01-hou.bmc.com (ec01-hou.bmc.com [172.17.0.150]) by tangelo.bmc.com (8.8.6 (PHNE_17135)/8.8.6) with ESMTP id SAA03080; Thu, 26 Aug 1999 18:27:59 -0500 (CDT) Received: by ec01-hou.bmc.com with Internet Mail Service (5.5.2448.0) id ; Thu, 26 Aug 1999 18:27:58 -0500 Message-ID: From: "Pillai, Girish" To: "'Matthew Dillon'" , 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) Date: Thu, 26 Aug 1999 18:27:14 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2448.0) Content-Type: text/plain; charset="iso-8859-1" Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG unsubscribe freebsd-current -----Original Message----- From: Matthew Dillon [mailto:dillon@apollo.backplane.com] Sent: Thursday, August 26, 1999 6:25 PM 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) :>> 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 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message