]> git.karo-electronics.de Git - linux-beck.git/commit
xfs: create xfs_bmap_util.[ch]
authorDave Chinner <dchinner@redhat.com>
Mon, 12 Aug 2013 10:49:42 +0000 (20:49 +1000)
committerBen Myers <bpm@sgi.com>
Mon, 12 Aug 2013 21:45:17 +0000 (16:45 -0500)
commit6898811459ff523ed256c07d1d5c54ba915d51ac
tree3079fecb7b8420aef10673d4d6b08d69645feacc
parentff55068c2010f39bcd899ca14b0a3d401d14da54
xfs: create xfs_bmap_util.[ch]

There is a bunch of code in xfs_bmap.c that is kernel specific and
not shared with userspace. To minimise the difference between the
kernel and userspace code, shift this unshared code to
xfs_bmap_util.c, and the declarations to xfs_bmap_util.h.

The biggest issue here is xfs_bmap_finish() - userspace has it's own
definition of this function, and so we need to move it out of
xfs_bmap.[ch]. This means several other files need to include
xfs_bmap_util.h as well.

It also introduces and interesting dance for the stack switching
code in xfs_bmapi_allocate(). The stack switching/workqueue code is
actually moved to xfs_bmap_util.c, so that userspace can simply use
a #define in a header file to connect the dots without needing to
know about the stack switch code at all.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Signed-off-by: Ben Myers <bpm@sgi.com>
20 files changed:
fs/xfs/Makefile
fs/xfs/xfs_aops.c
fs/xfs/xfs_attr.c
fs/xfs/xfs_attr_remote.c
fs/xfs/xfs_bmap.c
fs/xfs/xfs_bmap.h
fs/xfs/xfs_bmap_util.c [new file with mode: 0644]
fs/xfs/xfs_bmap_util.h [new file with mode: 0644]
fs/xfs/xfs_dfrag.c
fs/xfs/xfs_dquot.c
fs/xfs/xfs_filestream.c
fs/xfs/xfs_inode.c
fs/xfs/xfs_ioctl.c
fs/xfs/xfs_iomap.c
fs/xfs/xfs_iops.c
fs/xfs/xfs_rename.c
fs/xfs/xfs_rtalloc.c
fs/xfs/xfs_symlink.c
fs/xfs/xfs_trans_resv.c
fs/xfs/xfs_vnodeops.c