lkml.org 
[lkml]   [2004]   [Apr]   [28]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: How can I allocate few bytes to a file to store info about that file?
On Apr 28, 2004  16:14 -0400, Vineet Joglekar wrote:
> I was going through the functions like generic_file_write,
> generic_file_direct_IO, generic_direct_IO and filemap_fdatasync. I was
> thinking about calling these functions or calling functions written on
> similar lines to add new few bytes to the file when the inode is created
> by "ext2_create()". Can any1 please tell me how to do this? What I mean
> is, I want to add few bytes to the file as soon as it is created. I want
> to store some information regarding the file in that area.

See sys_setxattr(). You need support for extended attributes in your kernel
and filesystem. This includes ext2/ext3 for 2.6, but only if you apply a
patch for 2.4 I believe.

Cheers, Andreas
--
Andreas Dilger
http://sourceforge.net/projects/ext2resize/
http://www-mddsp.enel.ucalgary.ca/People/adilger/

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:02    [W:0.296 / U:0.232 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site