On Wed, Dec 04, 2019 at 08:38:09AM -0800, Darrick J. Wong wrote: > From: Darrick J. Wong <darrick.wong@xxxxxxxxxx> > > 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@xxxxxxxxxxx> This one works, as well. Thanks! Reported-and-tested-by: Omar Sandoval <osandov@xxxxxx> > Signed-off-by: Darrick J. Wong <darrick.wong@xxxxxxxxxx> > --- > fs/xfs/libxfs/xfs_trans_resv.c | 96 ++++++++++++++++++++++++++++++++-------- > 1 file changed, 77 insertions(+), 19 deletions(-)