From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S262504AbULOVmo (ORCPT ); Wed, 15 Dec 2004 16:42:44 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S262505AbULOVmn (ORCPT ); Wed, 15 Dec 2004 16:42:43 -0500 Received: from nn7.excitenetwork.com ([207.159.120.61]:32340 "EHLO excite.com") by vger.kernel.org with ESMTP id S262504AbULOVmk (ORCPT ); Wed, 15 Dec 2004 16:42:40 -0500 To: adilger@clusterfs.com, vintya@excite.com Subject: Re: is there any prob in accessing new field added to inode mem structure, in some other functions? X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: ID = 41790ee39c7967bbf4ef314fad615410 Reply-To: vintya@excite.com From: "Vineet Joglekar" MIME-Version: 1.0 X-Mailer: PHP Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: linux-kernel@vger.kernel.org Message-Id: <20041215214240.295918AEBA@xprdmailfe2.nwk.excite.com> Date: Wed, 15 Dec 2004 16:42:40 -0500 (EST) Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org I am sorry, typing my mistake. I was changing (adding a pointer in) ext2_inode_info and NOT ext2_inode. still it was giving the problem. someone mentioned about extended attributes. I dont have much idea about them, but will try to search on google. --- On Wed 12/15, Andreas Dilger < adilger@clusterfs.com > wrote: From: Andreas Dilger [mailto: adilger@clusterfs.com] To: vintya@excite.com Cc: linux-kernel@vger.kernel.org Date: Wed, 15 Dec 2004 14:22:53 -0700 Subject: Re: is there any prob in accessing new field added to inode mem structure, in some other functions? On Dec 15, 2004 11:41 -0500, Vineet Joglekar wrote:
> I am using linux 2.4.21 and I am trying to play with the etx2 file system. My aim is to allocate a data structure dynamically to every file that is opened, at the time of opening.
> What I tried to do was: added the structure pointer in the inode data structure "ext2_inode" say "x_ptr". In the function "ext2_read_inode" which reads the hard disk copy of inode into memory, I allocated memory to this pointer and filled the appropriate value. I chose this function as I thought when a file is opened, this function will be always called once. Upto this is working fine.
>
> Now when I try to use this pointer "x_ptr" in some other function, that is, "do_generic_file_read" - which is called while reading a file, I am not getting any value in that pointer, but a null. (which is supposed to be there as I am filling up appropriate value in function ext2_read_inode)

You are confusing "ext2_inode" (on disk structure, never change that) with
"ext2_inode_info" (in memory structure, what you want to change).

Cheers, Andreas
--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://members.shaw.ca/adilger/ http://members.shaw.ca/golinux/

Attachment: Attachment (0.19KB)
_______________________________________________ Join Excite! - http://www.excite.com The most personalized portal on the Web!