about XFS_IOC_RESVSP
Joe Hsu
nagual.hsu at gmail.com
Fri May 22 09:16:48 CDT 2009
I pre-allocate blocks for a file. Then I use "open" and "write" system
calls to generate the content for that file. After the file is really
written to the disk,
I want to set all the extent(s) of that file unwritten. Then I will
write new content to
the same file. Is that possible? That means:
I want to dis-care the content just written and use the same allocated blocks.
In another words, I want to restore the state of the file to the state
when it was
first pre-allocated.
Why am I doing this? Why not just over-write it? When doing
partial over-writing,
some blocks may be read for partial update before they are written
out. This hurts
some IO performance and If I can, I would prefer to dis-care old
content of the file and
use same (pre)allocated blocks. (In my case, I am doing intensive IO.)
Any one can give me some hints? Thanks.
--
The sun is shinny but the ice is slippery.
More information about the xfs
mailing list