unsubscribe freebsd-current
-----Original Message-----
From: Matthew Dillon [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 26, 1999 6:25 PM
To: Poul-Henning Kamp
Cc: Christopher Masto; [EMAIL PROTECTED]; John W. DeBoskey;
[EMAIL PROTECTED]; [EMAIL PROTECTED]
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
:[EMAIL PROTECTED] "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
<[EMAIL PROTECTED]>
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 [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message