Received: by mail.netbsd.org (Postfix, from userid 605) id DD17014A2BD; Sun, 10 Feb 2013 16:26:33 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id CE40214A2BC for ; Sun, 10 Feb 2013 16:26:32 +0000 (UTC) X-Virus-Scanned: amavisd-new at NetBSD.org Received: from mail.netbsd.org ([127.0.0.1]) by localhost (mail.NetBSD.org [127.0.0.1]) (amavisd-new, port 10025) with ESMTP id 0qicdySe9fuI for ; Sun, 10 Feb 2013 16:26:32 +0000 (UTC) Received: from cvs.netbsd.org (cvs.NetBSD.org [IPv6:2001:4f8:3:7:2e0:81ff:fe30:95bd]) by mail.netbsd.org (Postfix) with ESMTP id D9FF714A2B3 for ; Sun, 10 Feb 2013 16:26:31 +0000 (UTC) Received: by cvs.netbsd.org (Postfix, from userid 500) id 6292B175DD; Sun, 10 Feb 2013 16:26:35 +0000 (UTC) Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" MIME-Version: 1.0 Date: Sun, 10 Feb 2013 16:26:35 +0000 From: "Thor Lancelot Simon" Subject: CVS commit: [tls-maxphys] src/sys To: source-changes@NetBSD.org X-Mailer: log_accum Message-Id: <20130210162635.6292B175DD@cvs.netbsd.org> Sender: source-changes-owner@NetBSD.org List-Id: source-changes.NetBSD.org Precedence: bulk Reply-To: source-changes-d@NetBSD.org Mail-Reply-To: "Thor Lancelot Simon" Mail-Followup-To: source-changes-d@NetBSD.org Module Name: src Committed By: tls Date: Sun Feb 10 16:26:35 UTC 2013 Modified Files: src/sys/dev/raidframe [tls-maxphys]: rf_disks.c src/sys/kern [tls-maxphys]: subr_disk.c src/sys/sys [tls-maxphys]: disk.h mount.h src/sys/ufs/ffs [tls-maxphys]: ffs_vfsops.c src/sys/ufs/ufs [tls-maxphys]: ufs_bmap.c ufs_extern.h ufs_readwrite.c ufs_vfsops.c Log Message: Add an accessor -- ufs_maxphys() -- to check the maximum transfer size for a given UFS mountpoint, and move the code from mount that finds the underlying disk and resets the mountpoint max transfer size into a utility function, ufs_update_maxphys(). Add a global serial number that counts disk property changes to which filesystems are meant to accomodate themselves. Make ufs_maxphys() check it. This is a sort of flag-polling interface that avoids callbacks into the filesystem code, but will require freezing filesystems and draining in-flight transactions before a decrease in size that is mandatory (like attaching a disk with a smaller maximum transfer size as a spare in a RAIDframe set), rather than "advisory", like finding out set geometry from a RAID controller long after boot and deciding a smaller transfer size would be optimal, can be signalled. Still, the "advisory" case is the common one so this is progress. Make a bit of an example of RAIDframe by making it bump this new serial number when disks are added to the subsystem. I will attack one of the hardware RAID drivers (probably arcmsr) next. To generate a diff of this commit: cvs rdiff -u -r1.83 -r1.83.2.1 src/sys/dev/raidframe/rf_disks.c cvs rdiff -u -r1.100.18.2 -r1.100.18.3 src/sys/kern/subr_disk.c cvs rdiff -u -r1.57.2.1 -r1.57.2.2 src/sys/sys/disk.h cvs rdiff -u -r1.207.6.2 -r1.207.6.3 src/sys/sys/mount.h cvs rdiff -u -r1.278.2.2 -r1.278.2.3 src/sys/ufs/ffs/ffs_vfsops.c cvs rdiff -u -r1.49.14.1 -r1.49.14.2 src/sys/ufs/ufs/ufs_bmap.c cvs rdiff -u -r1.72 -r1.72.2.1 src/sys/ufs/ufs/ufs_extern.h cvs rdiff -u -r1.104.2.1 -r1.104.2.2 src/sys/ufs/ufs/ufs_readwrite.c cvs rdiff -u -r1.51 -r1.51.2.1 src/sys/ufs/ufs/ufs_vfsops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.