From: "Vineet Joglekar" <vintya@excite.com>
To: linux-c-programming@vger.kernel.org
Subject: How to allocate few bytes to a file automatically after creating it?
Date: Wed, 12 May 2004 21:53:53 -0400 (EDT) [thread overview]
Message-ID: <20040513015353.37BCC1E453@xprdmailfe25.nwk.excite.com> (raw)
My aim is to allocate few bytes to a file; with some valid data in it as soon as it is created. Will the following approach work?
Calling the function ext2_direct_IO() with the appropriate parameters after creating a new inode. The appro. parameters are rw flag, inode, iobuf, blocknr, blocksize.
If I want to add just 100 bytes to the file, I guess blocknr should be 1 and blocksize should be 512 or 1024 .. is that right? Also, how to fill in "iobuf" which is of the type "struct kiobuf *" to add these 100 bytes?
Please help.. I am trying to work on this problem for a long time now.
Thanks and regards,
Vineet
_______________________________________________
Join Excite! - http://www.excite.com
The most personalized portal on the Web!
next reply other threads:[~2004-05-13 1:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-05-13 1:53 Vineet Joglekar [this message]
2004-05-13 7:53 ` How to allocate few bytes to a file automatically after creating it? Charlie Gordon
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=20040513015353.37BCC1E453@xprdmailfe25.nwk.excite.com \
--to=vintya@excite.com \
--cc=linux-c-programming@vger.kernel.org \
/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).