xfs
[Top] [All Lists]

Re: get allocated filesize after preallocate

To: Ying-Hung Chen <ying@xxxxxxxxxxxxxx>
Subject: Re: get allocated filesize after preallocate
From: Nathan Scott <nathans@xxxxxxx>
Date: Fri, 30 Sep 2005 07:51:18 +1000
Cc: linux-xfs@xxxxxxxxxxx
In-reply-to: <433BC5DC.8000109@yingternet.com>; from ying@yingternet.com on Thu, Sep 29, 2005 at 06:45:48PM +0800
References: <433BC5DC.8000109@yingternet.com>
Sender: linux-xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.2.5i
On Thu, Sep 29, 2005 at 06:45:48PM +0800, Ying-Hung Chen wrote:
> Hello all,
> 
>       one more question, after I preallocate with XFS_IOC_RESVSP, the
> filesize is 0. How do I get the 'allocated' filesize? fseek/lseek/stat
> all returns 0 instead of allocated size,

The XFS_IOC_GETBMAPX ioctl is the only way to figure this out
(this is what xfs_bmap uses), I believe.

cheers.

-- 
Nathan


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