xfs
[Top] [All Lists]

Re: about XFS_IOC_RESVSP

To: xfs@xxxxxxxxxxx
Subject: Re: about XFS_IOC_RESVSP
From: Joe Hsu <nagual.hsu@xxxxxxxxx>
Date: Sun, 24 May 2009 15:08:37 +0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=srF7QvfaUdbYRXh4ql4y8KuLXWqPliMuJXD+/Qc5mc0=; b=c/qxPqgH3nP0Niwx3t9PMzndhenxtPn0ux7e/0If9FvOURUL+fW5GsSWDdAOFI9yjJ uEweqGkmRipzrcXffWRhCgtN2CBWKG7m1asKgBJOoUiqSm2hgxyW1vfYI/LQih8M8mSH gxWoZ30twFmSDgr3TtZgKaF27RFtGBJ8x0tjU=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=eu8+GAN9frFc9b6knddFZoZkieaC2d8iEg9Z45I5ZxN/YJJbzP5m392PcGWEnEP5sV KFqGVACQFEjUY4Z79/8yRrsAjqZq4e8QbjFlPR56DLuJWoDFRyA6LrZVIxGfYQPjgppM AgaGFkX5S1szTEUsecmwxUBX0Qy/hW84O/JAE=
In-reply-to: <7fe205990905220716v7d06b9bch40fe6136af17e345@xxxxxxxxxxxxxx>
References: <7fe205990905220716v7d06b9bch40fe6136af17e345@xxxxxxxxxxxxxx>
      After days of testing(I only ftruncate to 0 and re-preallocate
files if needed),
fragmentation become much more serious, sigh

2009/5/22 Joe Hsu <nagual.hsu@xxxxxxxxx>:
>        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.
>



-- 
The sun is shinny but the ice is slippery.

<Prev in Thread] Current Thread [Next in Thread>