| To: | xfs@xxxxxxxxxxx |
|---|---|
| Subject: | about XFS_IOC_RESVSP |
| From: | Joe Hsu <nagual.hsu@xxxxxxxxx> |
| Date: | Fri, 22 May 2009 22:16:48 +0800 |
| Dkim-signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type:content-transfer-encoding; bh=I2Y0OCUCf/qzvDz3Co7qCPYInIqvRxumNhToZ84hmug=; b=d2uvR0CCrPL4+U2gzGDzvPuOzx5H9cWXReaDKFaFL9h3qp13CTrXtAr6rh0zlwGhtw 56dqtrGQgUmBz01MPIDLz1w3Io0SadrLz6igKfwNoSk975asVreRmpzz8THMxqjurbJm 9TOY/wVxHJzzIS8PqNzVQ6ymPhaBxECv7HlzM= |
| Domainkey-signature: | a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type :content-transfer-encoding; b=wvVjJKjIS0Q6FFJ1iBs8vqMlusIrG6sjXV+uluiqD6QF8ZnTB8NVa4ZHxNUqv5BFiK qJGBUOhAj8Rn5Orq9yUYjNJeB2oE4hzjafPo5Eh19Klp1oUY/5NX1Zx6mS0he7tKcTHR 48yHrfAceq2egS4BFYN/JCVq77JPf0stfxnaw= |
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.
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Your message to xfs awaits moderator approval, xfs-bounces |
|---|---|
| Next by Date: | Re: about XFS_IOC_RESVSP, Eric Sandeen |
| Previous by Thread: | [XFS updates] XFS development tree annotated tag, v2.6.30-rc4, created. v2.6.30-rc4, xfs |
| Next by Thread: | Re: about XFS_IOC_RESVSP, Eric Sandeen |
| Indexes: | [Date] [Thread] [Top] [All Lists] |