xfs
[Top] [All Lists]

Re: howto preallocate to minimize fragmentation

To: Eric Sandeen <sandeen@xxxxxxx>
Subject: Re: howto preallocate to minimize fragmentation
From: Ying-Hung Chen <ying@xxxxxxxxxxxxxx>
Date: Thu, 22 Sep 2005 23:39:35 +0800
Cc: linux-xfs@xxxxxxxxxxx, Ying-Hung Chen <ying@xxxxxxxxxxxxxx>
In-reply-to: <4332C813.2000702@xxxxxxx>
References: <43329839.2070005@xxxxxxxxxxxxxx> <4332A22B.6070708@xxxxxxx> <4332BFCC.8050803@xxxxxxxxxxxxxx> <4332C248.70503@xxxxxxx> <4332C636.9070509@xxxxxxxxxxxxxx> <4332C813.2000702@xxxxxxx>
Sender: linux-xfs-bounce@xxxxxxxxxxx
User-agent: Mozilla Thunderbird 1.0.6 (Windows/20050716)
> 
> Depends on if you truncate it before you re-write to it, I think.
> 
> But don't use dd - use xfs's preallocation calls, it will be MUCH more
> efficient.
> 

okay, I'll give it a try tomorrow,

just want to make sure,

int xfsctl (const char *path, int fd, int cmd, void *ptr);

path is actually the filename right? and fd is the FILE* where I open
the filename correct?

I'll be using XFS_IOC_RESVSP, and pass in xfs_flock64_t structure as the
final argument?

Thanks,

-Ying


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