diff mbox series

[02/12] libxfs: set m_finobt_nores when initializing library

Message ID 155839421389.68606.12844536360638603273.stgit@magnolia (mailing list archive)
State Accepted
Headers show
Series xfsprogs-5.1: fix various problems | expand

Commit Message

Darrick J. Wong May 20, 2019, 11:16 p.m. UTC
From: Darrick J. Wong <darrick.wong@oracle.com>

We don't generally set up per-ag reservations in userspace, so set this
flag to true to force transactions to set up block reservations.  This
isn't necessary for userspace (since we never touch the finobt) but we
shouldn't leave a logic bomb.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
---
 libxfs/init.c |    1 +
 1 file changed, 1 insertion(+)

Comments

Eric Sandeen May 21, 2019, 4:33 p.m. UTC | #1
On 5/20/19 6:16 PM, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
> 
> We don't generally set up per-ag reservations in userspace, so set this
> flag to true to force transactions to set up block reservations.  This
> isn't necessary for userspace (since we never touch the finobt) but we
> shouldn't leave a logic bomb.
> 
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>

Reviewed-by: Eric Sandeen <sandeen@redhat.com>

> ---
>  libxfs/init.c |    1 +
>  1 file changed, 1 insertion(+)
> 
> 
> diff --git a/libxfs/init.c b/libxfs/init.c
> index 2f6decc8..1baccb31 100644
> --- a/libxfs/init.c
> +++ b/libxfs/init.c
> @@ -640,6 +640,7 @@ libxfs_mount(
>  
>  	libxfs_buftarg_init(mp, dev, logdev, rtdev);
>  
> +	mp->m_finobt_nores = true;
>  	mp->m_flags = (LIBXFS_MOUNT_32BITINODES|LIBXFS_MOUNT_32BITINOOPT);
>  	mp->m_sb = *sb;
>  	INIT_RADIX_TREE(&mp->m_perag_tree, GFP_KERNEL);
>
diff mbox series

Patch

diff --git a/libxfs/init.c b/libxfs/init.c
index 2f6decc8..1baccb31 100644
--- a/libxfs/init.c
+++ b/libxfs/init.c
@@ -640,6 +640,7 @@  libxfs_mount(
 
 	libxfs_buftarg_init(mp, dev, logdev, rtdev);
 
+	mp->m_finobt_nores = true;
 	mp->m_flags = (LIBXFS_MOUNT_32BITINODES|LIBXFS_MOUNT_32BITINOOPT);
 	mp->m_sb = *sb;
 	INIT_RADIX_TREE(&mp->m_perag_tree, GFP_KERNEL);