xfs
[Top] [All Lists]

RE: development APIs for used/free blocks information

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: RE: development APIs for used/free blocks information
From: Benjamin Wirth <Benjamin.Wirth@xxxxxxxxxxxx>
Date: Wed, 27 Apr 2016 12:54:24 +0000
Accept-language: en-US
Cc: "xfs@xxxxxxxxxxx" <xfs@xxxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20160426222129.GD26977@dastard>
References: <97A4F433DEE099488FE21C1718A641D2139E86F5@xxxxxxxxxxxxxxxxxxxxxxxxxxx> <20160426222129.GD26977@dastard>
Thread-index: AdGf/VxhHvG/iQ6eTkuDbtQDeeIgSAALiVKAABWxo1A=
Thread-topic: development APIs for used/free blocks information
Hello Dave,

Thanks for your response.

And I apologize, reading back my email I wasn't clear about what I was looking 
for.

I want to be able to query which blocks are free or used, not just the counts. 
In EXT I was able to use ext2fs_test_block_bitmap() for that. XFS has a BTree 
with the free extents ordered by block number which I was hoping to be able to 
access from user-space, but couldn't find any APIs for it (or the headers 
containing the structure definitions) in the xfsprogs-devel package. Am I 
trying to do something impossible here?

Thanks,
Ben

-----Original Message-----
From: Dave Chinner [mailto:david@xxxxxxxxxxxxx] 
Sent: Tuesday, April 26, 2016 6:21 PM
To: Benjamin Wirth
Cc: xfs@xxxxxxxxxxx
Subject: Re: development APIs for used/free blocks information

On Tue, Apr 26, 2016 at 08:51:10PM +0000, 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.

$ man 2 statvfs

Cheers,

Dave.
--
Dave Chinner
david@xxxxxxxxxxxxx

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