xfs
[Top] [All Lists]

Re: [PATCH,reflink] xfs: use GPF_NOFS in xfs_refcountbt_init_cursor

To: Christoph Hellwig <hch@xxxxxx>
Subject: Re: [PATCH,reflink] xfs: use GPF_NOFS in xfs_refcountbt_init_cursor
From: "Darrick J. Wong" <darrick.wong@xxxxxxxxxx>
Date: Mon, 23 May 2016 18:30:09 -0700
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1464016077-26513-1-git-send-email-hch@xxxxxx>
References: <1464016077-26513-1-git-send-email-hch@xxxxxx>
User-agent: Mutt/1.5.24 (2015-08-30)
On Mon, May 23, 2016 at 05:07:57PM +0200, Christoph Hellwig wrote:
> As it can be called under the ilock.
> 
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>
> ---
>  fs/xfs/libxfs/xfs_refcount_btree.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/xfs/libxfs/xfs_refcount_btree.c 
> b/fs/xfs/libxfs/xfs_refcount_btree.c
> index 770aee5..3391cbd 100644
> --- a/fs/xfs/libxfs/xfs_refcount_btree.c
> +++ b/fs/xfs/libxfs/xfs_refcount_btree.c
> @@ -339,7 +339,7 @@ xfs_refcountbt_init_cursor(
>  
>       ASSERT(agno != NULLAGNUMBER);
>       ASSERT(agno < mp->m_sb.sb_agcount);
> -     cur = kmem_zone_zalloc(xfs_btree_cur_zone, KM_SLEEP);
> +     cur = kmem_zone_zalloc(xfs_btree_cur_zone, KM_NOFS);

Looks reasonable, though I suspect the rmapbt cursor needs the same
treatment, since it too can be called that way, I think.

/me has been wondering if all of those cursor allocations ought to be
KM_NOFS, though I haven't had time to investigate that.

--D

>  
>       cur->bc_tp = tp;
>       cur->bc_mp = mp;
> -- 
> 2.1.4
> 

<Prev in Thread] Current Thread [Next in Thread>