From owner-freebsd-fs@FreeBSD.ORG Wed Mar 3 13:49:25 2004 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6E74A16A4CE for ; Wed, 3 Mar 2004 13:49:25 -0800 (PST) Received: from newman.gte.com (newman.gte.com [132.197.8.26]) by mx1.FreeBSD.org (Postfix) with ESMTP id 69A6343D2F for ; Wed, 3 Mar 2004 13:49:24 -0800 (PST) (envelope-from ak03@gte.com) Received: from h132-197-179-27.gte.com (kanpc.gte.com [132.197.179.27]) by newman.gte.com (8.9.1/8.9.1) with ESMTP id QAA09900; Wed, 3 Mar 2004 16:49:21 -0500 (EST) Received: from kanpc.gte.com (localhost [IPv6:::1])i24LdSke029734; Thu, 4 Mar 2004 16:39:28 -0500 (EST) (envelope-from ak03@gte.com) Date: Thu, 4 Mar 2004 16:39:27 -0500 From: Alexander Kabaev To: "David E. Cross" Message-Id: <20040304163927.5babadf9@kanpc.gte.com> In-Reply-To: <1078349927.454.5.camel@rexx.cs.rpi.edu> References: <1078349927.454.5.camel@rexx.cs.rpi.edu> Organization: Verizon Data Services X-Mailer: Sylpheed version 0.9.9claws36 (GTK+ 1.2.10; i386-portbld-freebsd5.2) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit cc: freebsd-fs@freebsd.org Subject: Re: struct buf * and journaled-UFS help X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2004 21:49:25 -0000 On 03 Mar 2004 16:38:49 -0500 "David E. Cross" wrote: > As some are aware I have been working with a computer science graduate > student to bring jounralling to the UFS(2) filesystem. Right now we > have it so that operations are journaled to an in-core memory > structure(comprised of BLKSIZE * number amount of memory, which is > obtained by malloc(9)). When this in-core journal gets full we need > to flush it to disk. Previously we had used VOP_WRITE() for this, but > it was suggested, and I agree that we should use either VOP_STRATEGY > or brwite/bread for our IO work. Both of these require a "struct buf" > to do their work. What is the appropriate way to get such a > structure? I have seen gbincore() used in similar cases, but it seems > that gbincore(), like many of the other buf(9) routines are for > getting an already allocated struct buf from the system pool; for > example gbincore checks that the lblkno of what is requested is the > name as the block already allocated in either the clean or dirty block > trees. If you don't need any delwri functionality struct buf provides, I would suggest using struct bio to route IO directly to storage drivers/geom. -- Alexander Kabaev