]> www.infradead.org Git - users/hch/xfsprogs.git/commit
tools: libxfs kernel sync script
authorEric Sandeen <sandeen@redhat.com>
Thu, 2 Jul 2015 03:03:23 +0000 (13:03 +1000)
committerDave Chinner <david@fromorbit.com>
Thu, 2 Jul 2015 03:03:23 +0000 (13:03 +1000)
commita902a3c54e73cc0ee4b832d1f7610384f1e5bd05
tree7631e4e575cde0ef4d8457e16b0fb1fb4bc6fbee
parentd21bcdafc2f4b93e22dcc083c6ae2add62a72bfe
tools: libxfs kernel sync script

This script takes either a patch name or a commit ID in the current
tree, and massages that change into a libxfs patch for the other tree;
i.e. it applies a kernel libxfs patch to xfsprogs, or vice versa.
It'll create a guilt patch if it looks like a guilt dir, or just smack
it in with "patch" if not.

It can surely be improved, but it's a start.

Example below, and script at the end.  Requires filterdiff.

# git log
commit 9681b791929795cd7dc6c7a79c3a69354f34e0b0
...
# libxfs-apply /mnt/test2/git/linux-xfs/ 9681b791929795cd7dc6c7a79c3a69354f34e0b0
Filtered patch for /mnt/test2/git/linux-xfs/ contains:
a/fs/xfs/libxfs/xfs_alloc.c
a/fs/xfs/libxfs/xfs_alloc_btree.c
a/fs/xfs/libxfs/xfs_attr_leaf.c
a/fs/xfs/libxfs/xfs_attr_remote.c
a/fs/xfs/libxfs/xfs_bmap_btree.c
a/fs/xfs/libxfs/xfs_btree.c
a/fs/xfs/libxfs/xfs_da_btree.c
a/fs/xfs/libxfs/xfs_dir2_block.c
a/fs/xfs/libxfs/xfs_dir2_data.c
a/fs/xfs/libxfs/xfs_dir2_leaf.c
a/fs/xfs/libxfs/xfs_dir2_node.c
a/fs/xfs/libxfs/xfs_dquot_buf.c
a/fs/xfs/libxfs/xfs_format.h
a/fs/xfs/libxfs/xfs_ialloc.c
a/fs/xfs/libxfs/xfs_ialloc_btree.c
a/fs/xfs/libxfs/xfs_inode_buf.c
a/fs/xfs/libxfs/xfs_sb.c
a/fs/xfs/libxfs/xfs_symlink_remote.c
/mnt/test2/git/linux-xfs/ looks like a guilt directory.
Top patch is: percpu-2
Create new Guilt patch? (Enter patch name or return to skip) new-uuid
Applying patch..new-uuid
Patch applied.
Patch was applied in /mnt/test2/git/linux-xfs/; check for rejects, guilt push -f, etc
#

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Dave Chinner <dchinner@redhat.com>
tools/libxfs-apply [new file with mode: 0755]