]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit - include/xfs_trans.h
libxfs: fix xfs_trans_alloc reservation abuse
authorDarrick J. Wong <darrick.wong@oracle.com>
Thu, 4 Oct 2018 19:19:01 +0000 (14:19 -0500)
committerEric Sandeen <sandeen@redhat.com>
Thu, 4 Oct 2018 19:19:01 +0000 (14:19 -0500)
commit225e4bb2ddff2f4752b2c04c55a0152c146ecc1f
tree6fa64c1343aff4bf2a369892f9be6089c0208db5
parent1530d232c4a5364d2a81047662f3b9d0026945ed
libxfs: fix xfs_trans_alloc reservation abuse

Various xfsprogs tools have been abusing the transaction reservation
system by allocating the transaction with zero reservation.  This has
always worked in the past because userspace transactions do not require
reservations.  However, once we merge deferred ops into the transaction
structure, we will need to use a permanent reservation type to set up
any transaction that can roll.  tr_itruncate has all we need, so use
that as the reservation dummy.

[sandeen: tweaks to backport before libxfs updates]
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
include/xfs_trans.h
libxfs/trans.c
mkfs/proto.c
mkfs/xfs_mkfs.c
repair/phase5.c
repair/phase6.c
repair/rmap.c