]> git.baikalelectronics.ru Git - kernel.git/commit
ocfs2: charge quota for reflinked blocks
authorDarrick J. Wong <darrick.wong@oracle.com>
Tue, 22 Nov 2016 21:40:27 +0000 (13:40 -0800)
committerDarrick J. Wong <darrick.wong@oracle.com>
Sat, 10 Dec 2016 20:39:45 +0000 (12:39 -0800)
commit7b124be1dc719b4425e341c5b7208f8f3a6696c9
treeddf46c1ea7d89ea12b6828d1fead5b8bb5576d64
parentd9d068ef73dea9bb394d25183db149be2f49f11a
ocfs2: charge quota for reflinked blocks

When ocfs2 shares blocks from one file to another, it's necessary to
charge that many blocks to the quota because ocfs2 tallies block charges
according to the number of blocks mapped, not the number of physical
blocks used.

Without this patch, reflinking X blocks and then CoWing all of them
causes quota usage to *decrease* by X as seen in generic/305.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
fs/ocfs2/refcounttree.c