]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit - fs/xfs/xfs_reflink.c
xfs: move mappings from cow fork to data fork after copy-write
authorDarrick J. Wong <darrick.wong@oracle.com>
Mon, 3 Oct 2016 16:11:35 +0000 (09:11 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Wed, 5 Oct 2016 20:55:40 +0000 (13:55 -0700)
commit43caeb187deb92b3cc343fce9c2310512f6ac9cd
treebd45c48042fec0ce1748f800733a5919b1dc5c18
parent4862cfe825c0087c14452b362e708a35da675f5e
xfs: move mappings from cow fork to data fork after copy-write

After the write component of a copy-write operation finishes, clean up
the bookkeeping left behind.  On error, we simply free the new blocks
and pass the error up.  If we succeed, however, then we must remove
the old data fork mapping and move the cow fork mapping to the data
fork.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
[hch: Call the CoW failure function during xfs_cancel_ioend]
Signed-off-by: Christoph Hellwig <hch@lst.de>
fs/xfs/xfs_aops.c
fs/xfs/xfs_reflink.c
fs/xfs/xfs_reflink.h