Date: Fri, 23 Aug 2002 00:20:31 -0400 (EDT) From: Rashim Gupta <guptar@cs.rpi.edu> To: Alfred Perlstein <bright@mu.org> Cc: <fs@freebsd.org>, "David E. Cross" <crossd@cs.rpi.edu> Subject: Re: Block free question Message-ID: <Pine.GSO.4.31.0208230016390.9115-100000@jenolen.cs.rpi.edu> In-Reply-To: <20020823033558.GY75574@elvis.mu.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Hi Alfred Thanks for the response. I tried the following piece of code based on your suggestions: VFS_VGET(ba->devvp->v_rdev->si_mountpoint, ba->inum, 0, &myvnode); Here, ba is a structure which contains the inode number, the devvp pointer, and the block number. But on compiling this, I get the follwoing error: "dereferencing pointer to incomplete type". Any suggestions how I proceed from here. Thanks in advance Rashim On Thu, 22 Aug 2002, Alfred Perlstein wrote: > * Rashim Gupta <guptar@cs.rpi.edu> [020822 20:28] wrote: > > > > Hi > > As you all know we are working on logging the FS metadata. We are stuck > > while we are trying to free a block . When we free a block, we need to > > write this block number into the log file. We are storing the handle to > > the journal file in the ufsmount structure, how do we get access to that > > in ffs_blkfree? We have available to us "struct fs *fs", but there > > doesn't seem to be a way to get back to the ufsmount from there. We also > > have struct vnode *devvp, but that points to the /dev/foo entry (devfs), > > so its not usefull. The last bits of information we have are the > > block-number and inode-number, which I don't see an easy O(reasonable) way > > to extract the ufsmount information. > > > > As a status update we have the following metadata operations mostly done: > > inodealloc, link, unlink, blockalloc. > > here's one way: > > you can look at devvp->v_rdev->si_mountpoint for 'struct mount', > you can use VFS_VGET on the mount along with the inode number to > get the vnode, the vnode can also give you the info you require. > > -- > -Alfred Perlstein [alfred@freebsd.org] [#bsdcode/efnet/irc.prison.net] > 'Instead of asking why a piece of software is using "1970s technology," > start asking why software is ignoring 30 years of accumulated wisdom.' To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-fs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.31.0208230016390.9115-100000>