From owner-freebsd-hackers Sun Dec 7 23:24:33 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id XAA08570 for hackers-outgoing; Sun, 7 Dec 1997 23:24:33 -0800 (PST) (envelope-from owner-freebsd-hackers) Received: from sos.freebsd.dk (sos.freebsd.dk [195.8.129.33]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id XAA08559 for ; Sun, 7 Dec 1997 23:24:27 -0800 (PST) (envelope-from sos@sos.freebsd.dk) Received: (from sos@localhost) by sos.freebsd.dk (8.8.8/8.8.8) id IAA01786; Mon, 8 Dec 1997 08:24:49 +0100 (MET) (envelope-from sos) Message-Id: <199712080724.IAA01786@sos.freebsd.dk> Subject: Re: [hackers:] Architectural advice needed In-Reply-To: from Julian Elischer at "Dec 7, 97 09:46:34 pm" To: julian@whistle.com (Julian Elischer) Date: Mon, 8 Dec 1997 08:24:49 +0100 (MET) Cc: hackers@FreeBSD.ORG, julian@whistle.com, mckusick@mckusick.com From: Søren Schmidt Reply-to: sos@FreeBSD.dk X-Mailer: ELM [version 2.4ME+ PL30 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk In reply to Julian Elischer who wrote: > This starts out discussing a single problem and then goes on to discuss > more general problems and ideas.. stick with it.. > > BDE pointed out a problem in the system that showed up when using my > device filesystem. In spec_getpages() the size of the device's blocks is > incorrectly deduced from the blocksize of the filesystem in which the > device resided (e.g. if you are accessing sd2 with a blocksize of 1K, you > will get 512 bytes because /dev/ is in / and THAT is on sd0 and has a > blocksize of 512 bytes.) This so obvioously wrong that i'm not worried > about whether it SHOULD be fixed, just HOW? Wrong, if a filesystem is mounted, it uses the mnt_stat.f_bsize instead. This is endeed an ugly hack (I put it there to accomodate devices with != 512 byt sectors). Either we let it stay at all times at 512 bytes and let the device driver chain cope with that, or we use the actual size of the device throughout the system. The whole thing boils down to the question of who deals with the actual blocksize of the device. Either the entire system knows how to deal with it (as it sortof is now), or it is handled in the device/slice layer. I was newer able to favour one clearly above the other... -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=- Søren Schmidt (sos@FreeBSD.org) FreeBSD Core Team Even more code to hack -- will it ever end ..