[PATCH] xfs: lock the rt summary inode when unmapping realtime extents

Eric Sandeen sandeen at sandeen.net
Wed Jun 29 15:20:49 CDT 2016


On 6/29/16 3:02 PM, Darrick J. Wong wrote:
> When we're deleting realtime extents, lock the summary inode
> in case we need to update the summary info.  This prevents an
> assert on the rsumip inode lock on a debug kernel.
> 
> (Same idea as "xfs: lock rt summary inode on allocation".)
> 
> Signed-off-by: Darrick J. Wong <darrick.wong at oracle.com>

Makes sense to me; I wonder how/when/why this is/got/was broken....

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

> ---
>  fs/xfs/libxfs/xfs_bmap.c |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c
> index 97820c1..9c7227b 100644
> --- a/fs/xfs/libxfs/xfs_bmap.c
> +++ b/fs/xfs/libxfs/xfs_bmap.c
> @@ -5524,6 +5524,8 @@ __xfs_bunmapi(
>  		 */
>  		xfs_ilock(mp->m_rbmip, XFS_ILOCK_EXCL);
>  		xfs_trans_ijoin(tp, mp->m_rbmip, XFS_ILOCK_EXCL);
> +		xfs_ilock(mp->m_rsumip, XFS_ILOCK_EXCL);
> +		xfs_trans_ijoin(tp, mp->m_rsumip, XFS_ILOCK_EXCL);
>  	}
>  
>  	extno = 0;
> 
> _______________________________________________
> xfs mailing list
> xfs at oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs
> 



More information about the xfs mailing list