Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Aug 1999 18:27:14 -0500
From:      "Pillai, Girish" <Girish_Pillai@bmc.com>
To:        "'Matthew Dillon'" <dillon@apollo.backplane.com>, Poul-Henning Kamp <phk@critter.freebsd.dk>
Cc:        Christopher Masto <chris@netmonger.net>, grog@FreeBSD.ORG, "John W. DeBoskey" <jwd@unx.sas.com>, julian@whistle.com, freebsd-current@FreeBSD.ORG
Subject:   RE: -current kernel problems (spec_getpages & vm_fault) 
Message-ID:  <B6200F7A96BCD211864900A0C9D8173803314FF1@es01-hou.bmc.com>

next in thread | raw e-mail | index | archive | help
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 
					<dillon@backplane.com>


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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?B6200F7A96BCD211864900A0C9D8173803314FF1>