Hi,
  raw_inode? what do you point to? I can not find it in structure inode of
2.6.20.

  Regards!

On Jan 21, 2008 2:31 PM, Mayuresh <[EMAIL PROTECTED]> wrote:

> Thanks for reply Wang. I appreciate your reply to rather unexplored
> question.
>
> Looks like ext2_inode_info[and hence vfs inode] is only allocated in
> alloc_inode[as name suggests]; it is not filled with fields of raw_inode.
> Filling vfs inode is done in read_inode where I have a pointer to raw_inode.
>
>
>
> On Jan 18, 2008 9:20 AM, Wang Yu <[EMAIL PROTECTED]> wrote:
>
> >  Hi,
> >
> > On Jan 17, 2008 9:22 PM, Mayuresh <[EMAIL PROTECTED]> wrote:
> >
> > > Hi,
> > >
> > > I want to use 'l_i_reserved2' field of ext2_inode for my purpose. I
> > > need to initialise this field when a new inode is created. I traced
> > > sys_create call and found that 'alloc_inode' from 'struct
> > > super_operations' is called for new inode[correct me here]. But looks
> > > like there is no way one can access raw inode[ext2_inode] from
> > > alloc_inode.
> > >
> > > Is it possible to initialise 'l_i_reserved2' in alloc_inode ? What
> > > could be other way to do it ?
> > >
> >
> >    ext2_inode_info is the data structure of memory inode, while
> > ext2_inode is the data structure of disk inode. You should differentiate
> > them. ext2_alloc_inode is for    allocating the first type of inode, whereas
> > ext2_get_inode may be for allocating the second type of inode.
> >
> > >
> > >  static struct inode *ext2_alloc_inode(struct super_block *sb)
> > >  {
> > >  struct ext2_inode_info *ei;
> > >  ei = (struct ext2_inode_info *)kmem_cache_alloc(ext2_inode_cachep,
> > > GFP_KERNEL);
> > >  if (!ei)
> > >  return NULL;
> > >  #ifdef CONFIG_EXT2_FS_POSIX_ACL
> > >  ei->i_acl = EXT2_ACL_NOT_CACHED;
> > >  ei->i_default_acl = EXT2_ACL_NOT_CACHED;
> > >  #endif
> > >  ei->vfs_inode.i_version = 1;
> > >  }
> > >
> > > LXR link for ext2_alloc_inode:
> > > http://lxr.linux.no/linux/fs/ext2/super.c#L141
> > >
> > > Thanks.
> > >
> > > --
> > > To unsubscribe from this list: send an email with
> > > "unsubscribe kernelnewbies" to [EMAIL PROTECTED]
> > > Please read the FAQ at http://kernelnewbies.org/FAQ
> > >
> > >
> >
> >
> > --
> > National Research Center for Intelligent Computing Systems
> > Institute of Computing Technology, Chinese Academy of Sciences
>
>
>


-- 
National Research Center for Intelligent Computing Systems
Institute of Computing Technology, Chinese Academy of Sciences

Reply via email to