From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Chow Subject: Re: getting buffer of inode Date: Sun, 23 Feb 2003 02:49:11 +0800 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: <3E57C627.4070506@shaolinmicro.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Cc: anil vijarnia , linux-fsdevel@vger.kernel.org Return-path: To: Bryan Henderson List-Id: linux-fsdevel.vger.kernel.org Bryan Henderson wrote: > > > > >>i'm trying to implement journaling in vfat (like in ext3).if i >>have an inode structure how can i get the struct buffer_head >>containing this inode structure.in ext2 the union in inode >>structure conatins pointer to buffer,but there's no such pointer >>in fat superblock. >>can anyone please tell how to get buffer of this inode >>structure. >> >> > >Since it's been a day and no one has responded, let me try to respond by >saying I can't figure out what you're asking. > >Inodes don't have buffers that I know of. I don't find any union in the >ext2 inode structure that contains a pointer to something I would call a >buffer. I assume a buffer_head is a buffer head (struct buf), but I've >never heard of a buffer head containing an inode structure. > No, I know what this man is asking. He probably new to buffer_head operations and looked into the ext2 code. The union he refers to the fs.h struct inode unions of all the fses. Of course, eventually everything that read/write to block devices via buffer cache gets into the buffer_heads. This is rather fs specific questions, many be some hints on fs specific data (the union stuff in struct inode in fs.h). I think this question really need to be answered by some vfat gurus as they know about the on disk structure of the file system such that this man can read that buffer properly from buffer cache. One thing must be clear is that the struct inode in the dcache is handled by VFS , although it is physically (on disk) describing some inode structures. However, the struct inode is generated via the iget() interface and fs specific driver fill in the blanks themselves. Hope this give you some direction. regards, David Chow