Any better way to interact with xfs?

Dave Chinner david at fromorbit.com
Thu Jul 28 21:25:52 CDT 2016


On Thu, Jul 28, 2016 at 09:48:07AM +0300, Amir Goldstein wrote:
> Hi Ryan,
> 
> You could use the XFS_IOC_FSINUMBERS/XFS_IOC_FSBULKSTAT API to iterate
> over all inodes in the fs.

That's a read-only API - you can't use it to change the inodes
on disk.

> not having to readdir and recourse the directory tree should safe you
> some time (much less i/o).
> Also, the interface can be used to make your conversion work parallel
> by working on different inode ranges.

It cannot be used to make coherent, atomic changes to the inode
state.

> You can use xfsdump/xfsrestore code as reference.

xfsdump uses bulkstat scan and read inodes, not change anything on
disk.

Cheers,

Dave.
-- 
Dave Chinner
david at fromorbit.com



More information about the xfs mailing list