Date: Thu, 4 Mar 2004 16:39:27 -0500 From: Alexander Kabaev <ak03@gte.com> To: "David E. Cross" <crossd@cs.rpi.edu> Cc: freebsd-fs@freebsd.org Subject: Re: struct buf * and journaled-UFS help 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>
next in thread | previous in thread | raw e-mail | index | archive | help
On 03 Mar 2004 16:38:49 -0500 "David E. Cross" <crossd@cs.rpi.edu> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040304163927.5babadf9>