]> git-server-git.apps.pok.os.sepia.ceph.com Git - xfsprogs-dev.git/commit
xfs: fix log reservation overflows when allocating large rt extents libxfs-5.5-sync_2019-12-31
authorDarrick J. Wong <darrick.wong@oracle.com>
Wed, 4 Dec 2019 01:36:07 +0000 (17:36 -0800)
committerDarrick J. Wong <darrick.wong@oracle.com>
Tue, 24 Dec 2019 17:01:07 +0000 (09:01 -0800)
commit9007d94314fbe190b650efdf2d175375b0df5170
treeba7a8289abb31dddd2658f9aaa161d0ca51bb9ca
parente073a6acea88011b3eb76a8598c574be3988b861
xfs: fix log reservation overflows when allocating large rt extents

Omar Sandoval reported that a 4G fallocate on the realtime device causes
filesystem shutdowns due to a log reservation overflow that happens when
we log the rtbitmap updates.  Factor rtbitmap/rtsummary updates into the
the tr_write and tr_itruncate log reservation calculation.

"The following reproducer results in a transaction log overrun warning
for me:

    mkfs.xfs -f -r rtdev=/dev/vdc -d rtinherit=1 -m reflink=0 /dev/vdb
    mount -o rtdev=/dev/vdc /dev/vdb /mnt
    fallocate -l 4G /mnt/foo

Reported-by: Omar Sandoval <osandov@osandov.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
libxfs/xfs_trans_resv.c