From: Vadiraj C S <vadiraj@mail.cyberneme.com>
To: vintya@excite.com
Cc: linux-c-programming@vger.kernel.org
Subject: Re: Can I allocate few bytes in a file to store info about that file; not visible to user?
Date: Thu, 29 Apr 2004 09:28:07 +0530 [thread overview]
Message-ID: <20040429092807.173ac98d.vadiraj@mail.cyberneme.com> (raw)
In-Reply-To: <20040428181507.B489EB786@xprdmailfe20.nwk.excite.com>
>
> 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?
>
> I guess it would have been simpler to call these functions in the call sys_open() when a new file is created, but I want to make changes in kernel code only in ext2 module. playing with sys_open will be like modifying kernel code apart from the ext2 fs module which I dont want.
If you need the kernel to read your information, you can write your own open() for the module, if you have good hold on filesystem
then this wont be much scary. ext2 filesystem stores all the information in an inode, now you want to write some more at the start
of the datablock.
--
With Best Regards
Vadiraj C S
next prev parent reply other threads:[~2004-04-29 3:58 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-28 18:15 Can I allocate few bytes in a file to store info about that file; not visible to user? Vineet Joglekar
2004-04-29 3:58 ` Vadiraj C S [this message]
-- strict thread matches above, loose matches on Subject: below --
2004-04-26 14:32 Vineet Joglekar
2004-04-26 17:05 ` Glynn Clements
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=20040429092807.173ac98d.vadiraj@mail.cyberneme.com \
--to=vadiraj@mail.cyberneme.com \
--cc=linux-c-programming@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;
as well as URLs for NNTP newsgroup(s).