Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 26 Aug 1999 16:25:14 -0700 (PDT)
From:      Matthew Dillon <dillon@apollo.backplane.com>
To:        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:  <199908262325.QAA25436@apollo.backplane.com>
References:   <1673.935703901@critter.freebsd.dk>

next in thread | previous in thread | raw e-mail | index | archive | help
:>>      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




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