public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andreas Dilger <adilger@clusterfs.com>
To: Vineet Joglekar <vintya@excite.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: is there any prob in accessing new field added to inode mem structure, in some other functions?
Date: Wed, 15 Dec 2004 14:22:53 -0700	[thread overview]
Message-ID: <20041215212253.GL9923@schnapps.adilger.int> (raw)
In-Reply-To: <20041215164101.A52C3B740@xprdmailfe18.nwk.excite.com>

[-- Attachment #1: Type: text/plain, Size: 1236 bytes --]

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 #2: Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2004-12-15 21:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-12-15 16:41 is there any prob in accessing new field added to inode mem structure, in some other functions? Vineet Joglekar
2004-12-15 21:22 ` Andreas Dilger [this message]
  -- strict thread matches above, loose matches on Subject: below --
2004-12-15 21:42 Vineet Joglekar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20041215212253.GL9923@schnapps.adilger.int \
    --to=adilger@clusterfs.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=vintya@excite.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox