On Mon, Dec 03, 2012 at 05:42:22PM -0600, Mark Tinguely wrote:
> From: Dave Chinner <[email protected]>
> 
> Upstream commit: 507630b29f13a3d8689895618b12015308402e22
> 
> For the direct IO write path, we only really need the ilock to be taken in
> exclusive mode during IO submission if we need to do extent allocation
> instead of all the time.
> 
> Change the block mapping code to take the ilock in shared mode for the
> initial block mapping, and only retake it exclusively when we actually
> have to perform extent allocations.  We were already dropping the ilock
> for the transaction allocation, so this doesn't introduce new race windows.
> 

I'm nervous about changing locking like this in -stable kernels.
It's a performance optimisation, not a bug fix, and it wasn't a
problem that xfstests uncovered. Also, xfstests doesn't really
stress the correctness of this code, which is another reason I'm
nervous about it....

Cheers,

Dave.
-- 
Dave Chinner
[email protected]
--
To unsubscribe from this list: send the line "unsubscribe stable" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to