xfs
[Top] [All Lists]

Re: [PATCH 1/2] xfs: prevent recursion in xfs_buf_iorequest

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: [PATCH 1/2] xfs: prevent recursion in xfs_buf_iorequest
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Tue, 3 Jul 2012 10:27:16 +1000
Cc: xfs@xxxxxxxxxxx
In-reply-to: <20120702100034.627510436@xxxxxxxxxxxxxxxxxxxxxx>
References: <20120702100003.960640484@xxxxxxxxxxxxxxxxxxxxxx> <20120702100034.627510436@xxxxxxxxxxxxxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Mon, Jul 02, 2012 at 06:00:04AM -0400, Christoph Hellwig wrote:
> If the b_iodone handler is run in calling context in xfs_buf_iorequest we
> can run into a recursion where xfs_buf_iodone_callbacks keeps calling back
> into xfs_buf_iorequest because an I/O error happened, which keeps calling
> back into xfs_buf_iorequest.  This chain will usually not take long
> because the filesystem gets shut down because of log I/O errors, but even
> over a short time it can cause stack overflows if run on the same context.
> 
> As a short term workaround make sure we always call the iodone handler in
> workqueue context.
> 
> Signed-off-by: Christoph Hellwig <hch@xxxxxx>

Looks fine - final completion from io submission is a rare case so
this shouldn't cause issues....

Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx>

-- 
Dave Chinner
david@xxxxxxxxxxxxx

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