How to allocate few bytes to a file automatically after creating it?
From: Vineet Joglekar (vinzip_at_indiatimes.com)
Date: 05/13/04
- Previous message: mjt: "Re: Need: Cmd line download tool"
- Next in thread: Jean-David Beyer: "Re: How to allocate few bytes to a file automatically after creating it?"
- Reply: Jean-David Beyer: "Re: How to allocate few bytes to a file automatically after creating it?"
- Reply: Chris F.A. Johnson: "Re: How to allocate few bytes to a file automatically after creating it?"
- Reply: Tauno Voipio: "Re: How to allocate few bytes to a file automatically after creating it?"
- Reply: Jimmy Brokaw: "Re: How to allocate few bytes to a file automatically after creating it?"
- Reply: Jack Strangio: "Re: How to allocate few bytes to a file automatically after creating it?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 12 May 2004 19:02:35 -0700
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
- Previous message: mjt: "Re: Need: Cmd line download tool"
- Next in thread: Jean-David Beyer: "Re: How to allocate few bytes to a file automatically after creating it?"
- Reply: Jean-David Beyer: "Re: How to allocate few bytes to a file automatically after creating it?"
- Reply: Chris F.A. Johnson: "Re: How to allocate few bytes to a file automatically after creating it?"
- Reply: Tauno Voipio: "Re: How to allocate few bytes to a file automatically after creating it?"
- Reply: Jimmy Brokaw: "Re: How to allocate few bytes to a file automatically after creating it?"
- Reply: Jack Strangio: "Re: How to allocate few bytes to a file automatically after creating it?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|