From owner-freebsd-current Thu Sep 25 15:44:58 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id PAA18866 for current-outgoing; Thu, 25 Sep 1997 15:44:58 -0700 (PDT) Received: from usr04.primenet.com (tlambert@usr04.primenet.com [206.165.6.204]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id PAA18857 for ; Thu, 25 Sep 1997 15:44:44 -0700 (PDT) Received: (from tlambert@localhost) by usr04.primenet.com (8.8.5/8.8.5) id PAA05902; Thu, 25 Sep 1997 15:44:23 -0700 (MST) From: Terry Lambert Message-Id: <199709252244.PAA05902@usr04.primenet.com> Subject: Re: Daily SNAPshots at current.freebsd.org shut down for now. To: kato@migmatite.eps.nagoya-u.ac.jp (KATO Takenori) Date: Thu, 25 Sep 1997 22:44:22 +0000 (GMT) Cc: bde@zeta.org.au, current@FreeBSD.ORG In-Reply-To: <199709251645.BAA07216@gneiss.eps.nagoya-u.ac.jp> from "KATO Takenori" at Sep 26, 97 01:45:50 am X-Mailer: ELM [version 2.4 PL23] Content-Type: text Sender: owner-freebsd-current@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > > 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.