From owner-freebsd-arch Sun Mar 2 19:13:58 2003 Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2FA3337B401 for ; Sun, 2 Mar 2003 19:13:57 -0800 (PST) Received: from mail.chesapeake.net (chesapeake.net [205.130.220.14]) by mx1.FreeBSD.org (Postfix) with ESMTP id 67DD343FBD for ; Sun, 2 Mar 2003 19:13:56 -0800 (PST) (envelope-from jroberson@chesapeake.net) Received: from localhost (jroberson@localhost) by mail.chesapeake.net (8.11.6/8.11.6) with ESMTP id h23365p59793 for ; Sun, 2 Mar 2003 22:06:05 -0500 (EST) (envelope-from jroberson@chesapeake.net) Date: Sun, 2 Mar 2003 22:06:05 -0500 (EST) From: Jeff Roberson To: arch@freebsd.org Subject: New getblk parameter. Message-ID: <20030302220232.C56877-100000@mail.chesapeake.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I'd like to add a new parameter to getblk called 'flags'. The only flag I'm currently defining is GB_LOCK_NOWAIT so that it doesn't block trying to get the block. This is useful in the vfs_cluster code where we want to include a block in a cluster but only if it isn't currently in use. I have defined a new function 'getblkf' and put up a #define wrapper for getblk. It'd be neat to have a getblk() that didn't have the slpflag and slptimo args since almost nothing uses those and then use getblkf to supply all possible arguments. I'm not doing that for now though. I have a patch that does this and makes use of it in vfs_cluster available at: http://www.chesapeake.net/~jroberson/cluster.diff This clears up some other unsafe code in vfs cluster as well. Comments? Cheers, Jeff To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message