xfs
[Top] [All Lists]

Re: [PATCH 11/11] xfs: fix btree cursor error cleanups

To: Brian Foster <bfoster@xxxxxxxxxx>
Subject: Re: [PATCH 11/11] xfs: fix btree cursor error cleanups
From: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date: Sun, 9 Aug 2015 01:03:37 -0700
Cc: xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <1438883072-28706-12-git-send-email-bfoster@xxxxxxxxxx>
References: <1438883072-28706-1-git-send-email-bfoster@xxxxxxxxxx> <1438883072-28706-12-git-send-email-bfoster@xxxxxxxxxx>
User-agent: Mutt/1.5.23 (2014-03-12)
On Thu, Aug 06, 2015 at 01:44:32PM -0400, Brian Foster wrote:
> The btree cursor cleanup function takes an error parameter that affects
> how buffers are released from the cursor. All buffers are released in
> the event of error. Several callers do not specify the XFS_BTREE_ERROR
> flag in the event of error, however. This can cause buffers to hang
> around locked or with an elevated hold count and thus lead to umount
> hangs in the event of errors.
> 
> Fix up the xfs_btree_del_cursor() callers to pass XFS_BTREE_ERROR if the
> cursor is being torn down due to error.
> 
> Signed-off-by: Brian Foster <bfoster@xxxxxxxxxx>

Looks fine,

Reviewed-by: Christoph Hellwig <hch@xxxxxx>

I wonder if we should change the second parameter of
xfs_btree_del_cursor to "int error" to make the life esier for the
callers.

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