Skip to content

xfs: shrinking support

Jeff Liu linux-xfs 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest15 patches 5 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/15xfs: Add a new transaction for changing ag statefs/xfs/xfs_mount.h fs/xfs/xfs_trans.c fs/xfs/xfs_trans.h+18 -34 replies
2/15xfs: Introduce new structure members ag_state/agf_statefs/xfs/xfs_ag.h+10 -30 replies
3/15xfs: Introduce a new ioctl(2) to set AG statefs/xfs/xfs_ag.h fs/xfs/xfs_alloc.c fs/xfs/xfs_fs.h +3 more+104 -31 reply
4/15xfs: Introduce a new ioctl(2) to get AG statefs/xfs/xfs_ag.h fs/xfs/xfs_fs.h fs/xfs/xfs_fsops.c +1 more+75 -00 replies
5/15xfs: Teach inode/space allocator aware of XFS_AG_STATE_ALLOC_DENYfs/xfs/xfs_alloc.c fs/xfs/xfs_ialloc.c fs/xfs/xfs_super.c+29 -20 replies
6/15xfs: Introduce a new transaction type for inode swappingfs/xfs/xfs_trans.h+4 -20 replies
7/15xfs: Introduce a new ioctl(2) for swapping inodesfs/xfs/xfs_dfrag.c fs/xfs/xfs_dfrag.h fs/xfs/xfs_fs.h +1 more+290 -10 replies
8/15xfs: Add tracing support for inode swapfs/xfs/xfs_dfrag.c fs/xfs/xfs_trace.h+43 -00 replies
9/15xfs: Introduce a new mutex lock for shrinkfsfs/xfs/xfs_mount.h fs/xfs/xfs_super.c+2 -00 replies
10/15xfs: Introduce a new transaction for shrinking fs data sectionfs/xfs/xfs_mount.h fs/xfs/xfs_trans.c fs/xfs/xfs_trans.h +1 more+24 -20 replies
11/15xfs: Introduce a helper to check if an AG is empty or notfs/xfs/xfs_fsops.c+92 -00 replies
12/15xfs: Introduce a helper to remove an emptyfs/xfs/xfs_fsops.c+149 -00 replies
13/15xfs: Introduce a helper to truncate an AGfs/xfs/xfs_fsops.c+94 -00 replies
14/15xfs: Add shrink data ioctl(2)fs/xfs/xfs_fs.h fs/xfs/xfs_fsops.c fs/xfs/xfs_fsops.h +1 more+234 -20 replies
15/15xfs: Make xfs_trans_mod_sb() aware of negative deltasfs/xfs/xfs_trans.c+9 -30 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 00/15] xfs: shrinking support

Hello,

These days I have tried to implement shrinkfs feature according to Dave's previous design which can be found at:
http://www.xfs.org/index.php/Shrinking_Support

Here is a very initial patch set, it only support shrinking up to the latest empty AG since I have not add the data moving and extents swap functions to the user tools.

I know the current patches definitely looks stupid and there have many places need to fix. I'd like to post it eaiser to seek any directions so that I can continue to improve it, especially on inode swap semantics, AG metadata removing as well as the command interface.

- xfs_reno(8)
The following two links are referred to a couple of untested patches of inode swapping for xfs_reno(8).
http://marc.info/?l=linux-xfs&m=119552278931942&w=2
http://marc.info/?l=linux-xfs&m=119582841808985&w=2

The user patch does extents swapping after swapping inodes, I was confused because xfs_reno only do modify the inodes from 64bits to 32bits, inodes swap should be sufficient to perform it since it don't need to move the data extents(i.e. perform extents/blocks allocation for target files like xfs_fsr/xfs_shrinkfs).

- AG metadata clean up
For now, I only wipe the pre-allocated sectors/blocks out of an empty AG, I guess I missed something for btree info updates.

- xfs_shrinkfs CLI
I observed Dave has posted a patch to fetch the FS freespace via FIEMAP, but for now, I have to get the FS freespace via shell script(wrapper of xfs_db).
And also, I didn't add the data moving functions because there still has issues on inode swap routine, it would failed to swap directories :(, so it can only be used to reflect my current stupid ideas.

Last but not the least, I have not add the placeholder for log area shrink as well as compat_ioctl32 functions since this version can only be considered at input comments stage.

Any suggestions are appreciated!

Thanks,
-Jeff

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs