Hi...
Christoph Hellwig wrote:
On Tue, Aug 17, 2004 at 12:35:56AM +0200, Markus Lidel wrote:
1. Is there a facility to iterate over each used inode?
xfs_bulkstat. although I doubt it fits your needs.
Thanks the function is a good starting point.
2. how could i easily copy the inode to a free space outside the current
agi (i thought of setting pag.pagf_freeblks, pag.pagf_flcount,
pag.pagf_longest to 0).
You could try by marking the AG unavailable to the allocator and use
xfs_swapext()
Is it enough to set the pag values descirbed above to 0 or is there
anything else to do?
3. have i missed something or is there a better way to do it?
As it seems you're trying to implement online shrinking of a filesystem,
remember that moving an inode around actually changes the inode number
in XFS, which will you get all kinds of funnies not only with the kernel
but also userspace and nfs clients.
Thanks to remeber me... For now i would be glad if i could verify that
an AG is empty and only remove it if it is :-D If things get too
complicated (e. g. a file is opened in the AG, which should be freed) i
would simply do nothing for now...
Thank you very much for your help!
Best regards,
Markus Lidel
------------------------------------------
Markus Lidel (Senior IT Consultant)
Shadow Connect GmbH
Carl-Reisch-Weg 12
D-86381 Krumbach
Germany
Phone: +49 82 82/99 51-0
Fax: +49 82 82/99 51-11
E-Mail: Markus.Lidel@xxxxxxxxxxxxxxxxx
URL: http://www.shadowconnect.com
|