Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 Sep 1997 22:44:22 +0000 (GMT)
From:      Terry Lambert <tlambert@primenet.com>
To:        kato@migmatite.eps.nagoya-u.ac.jp (KATO Takenori)
Cc:        bde@zeta.org.au, current@FreeBSD.ORG
Subject:   Re: Daily SNAPshots at current.freebsd.org shut down for now.
Message-ID:  <199709252244.PAA05902@usr04.primenet.com>
In-Reply-To: <199709251645.BAA07216@gneiss.eps.nagoya-u.ac.jp> from "KATO Takenori" at Sep 26, 97 01:45:50 am

next in thread | previous in thread | raw e-mail | index | archive | help
> > clustering is 2 too many for a production system :-) (non-clustering for
> > /dev/vn must be forced independently of any mount options and sysctls,
> > except possibly for debugging).
> 
> How does mount() in vfs_syscall.c know special device is /dev/vn?

It needs to be a per device flag, only asserted by the vn device.

> When mount() can know specical device is /dev/vn, then
> 
> 	if (special device is /dev/vn)
> 		mp->mnt_flag |= MNT_NOCLUSTER;
> 
> works, and doclusterread and doclusterwrite can be eliminated.

The easiest place to add this would be as a falg bit in d_flags;
put it under D_CHAIN in sys/disklabel.h:

#define		D_CHAIN		0x10		/* can do back-back transfers */
#define		D_UNCLUSTERED	0x20		/* do not cluster{read|write} */

This flag is to be set in the disklabel (look how D_ECC is handled).


Personally, I'd prefer to have it an attribute of the "real" device,
but that would mean changing d_type into a bitmap, and adding a flag
in sys/conf.h and changing the dev/vn/vn.c from:

static struct bdevsw vn_bdevsw =
	{ vnopen,       vnclose,        vnstrategy,     vnioctl,        /*15*/
	  vndump,       vnsize,         D_DISK, "vn",   &vn_cdevsw,     -1 };

to:

static struct bdevsw vn_bdevsw =
	{ vnopen,       vnclose,        vnstrategy,     vnioctl,        /*15*/
	  vndump,       vnsize,         D_DISK|D_UNCLUSTERED,
	  "vn",   &vn_cdevsw,     -1 };

The alternative of adding:

#define	D_CCD	4		/* a concatenated disk*/

Would require too much overhead to check for a d_type of D_CCD in addition
to a d_type of D_DISK literally *everywhere*.

Either change would mean touching a lot more files than the disklabel
hack... but it *is* a hack.

On the other hand, Bruce did ask "there's time to go back and do it right
later?" (or something to that effect), so he might champion a large change
(bit checking of d_type instead of value checking, everywhere it's
checked currently).

Anyway, that'd be my preference for implementation.


					Terry Lambert
					terry@lambert.org
---
Any opinions in this posting are my own and not those of my present
or previous employers.



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