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: Thu, 16 Jun 2016 19:57:36 +0000
Accept-language: en-US
Cc: "xfs@xxxxxxxxxxx" <xfs@xxxxxxxxxxx>
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20160427234108.GK26977@dastard>
References: <97A4F433DEE099488FE21C1718A641D2139E86F5@xxxxxxxxxxxxxxxxxxxxxxxxxxx> <20160426222129.GD26977@dastard> <97A4F433DEE099488FE21C1718A641D2139E972E@xxxxxxxxxxxxxxxxxxxxxxxxxxx> <20160427234108.GK26977@dastard>
Thread-index: AdGf/VxhHvG/iQ6eTkuDbtQDeeIgSAALiVKAABWxo1AAH2EYAAnB/Hgw
Thread-topic: development APIs for used/free blocks information
Hi David,

I proceeded to parse the on-disk free blocks BTree for finding the free blocks 
information. Is there a way I could force a flush of BTree information to disk, 
so that in an online filesystem that is being changed I can also handle the 
changes in the BTree?

I was looking at XFS_FSOP_GOING_FLAGS_LOGFLUSH flag but it might do more then I 
need to do and actually shutdown the filesystem. Any other options? I don't 
mind about performance degradation so interested in any option.

Thanks,
Ben

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

On Wed, Apr 27, 2016 at 12:54:24PM +0000, Benjamin Wirth wrote:
> 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?

There are prototypes that need a bit of polishing to complete:

http://oss.sgi.com/archives/xfs/2016-04/msg00633.html

Cheers,

Dave.
--
Dave Chinner
david@xxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>
  • RE: development APIs for used/free blocks information, Benjamin Wirth <=