xfs
[Top] [All Lists]

Re: development APIs for used/free blocks information

To: xfs@xxxxxxxxxxx
Subject: Re: development APIs for used/free blocks information
From: Eric Sandeen <sandeen@xxxxxxxxxxx>
Date: Tue, 26 Apr 2016 16:33:37 -0500
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <97A4F433DEE099488FE21C1718A641D2139E86F5@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
References: <97A4F433DEE099488FE21C1718A641D2139E86F5@xxxxxxxxxxxxxxxxxxxxxxxxxxx>
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.7.2
On 4/26/16 3:51 PM, Benjamin Wirth wrote:
> Hello,
> 
> I was looking for development APIs for XFS. The contents of
> xfsprogs-devel seem to only contain a few IOCTL commands, mostly
> file/inode based operations.
> 
> I need to query free/used blocks of an entire XFS filesystem and was
> hoping to find some user-space APIs for this. I have done the same
> task for EXT filesystem which seemed fairly easy as it provided
> simple open/query/close APIs. I know that XFS is a bit different as
> it manages free extents in two B+ trees per AG, but is this free/used
> block/extent information externalized somehow for developers to use?
> Am I not looking in the right place or these functionalities are
> simply not provided to application developers?
> 
> Any help/pointers would be greatly appreciated.

It's not exported for application developers, no; it's not
generally something applications need, AFAIK.

You could look at how the freesp_f function works in xfs_db, I suppose.

-Eric

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