xfs
[Top] [All Lists]

Re: real-time device BUG

To: xfs@xxxxxxxxxxx
Subject: Re: real-time device BUG
From: Eric Sandeen <sandeen@xxxxxxxxxxx>
Date: Fri, 29 Jan 2016 21:11:06 -0600
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <20160129234036.GA24929@xxxxxxxxxxxxxxx>
References: <20160129230531.GA29895@xxxxxxxxxxxxxxx> <20160129234036.GA24929@xxxxxxxxxxxxxxx>
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.5.1

On 1/29/16 5:40 PM, Ross Zwisler wrote:
> On Fri, Jan 29, 2016 at 04:05:31PM -0700, Ross Zwisler wrote:
>> Today I was trying to get real-time devices working with XFS, and both a
>> manual pwrite() to a real-time device and xfs_rtcp end up with a lockdep spat
>> followed by a kernel BUG.  This behavior is consistent between kernel 
>> versions
>> v4.4 and v4.5-rc1.  I initially found this using some pmem block devices, but
>> it also happens with BRD.
> 
> This also happens with an mmap on the real-time file followed by a write.
> Essentially I think that any path that tries to allocate a block for the real
> time file his this same BUG.

Looks like an oversight from

commit eef334e5776c8ef547ada4cec17549929fe590b4
Author: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Date:   Fri Dec 6 12:30:17 2013 -0800

    xfs: assert that we hold the ilock for extent map access
    
    Make sure that xfs_bmapi_read has the ilock held in some way, and that
    xfs_bmapi_write, xfs_bmapi_delay, xfs_bunmapi and xfs_iread_extents are
    called with the ilock held exclusively.
    
    Signed-off-by: Christoph Hellwig <hch@xxxxxx>
    Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx>
    Signed-off-by: Ben Myers <bpm@xxxxxxx>

I think all we have to do is lock it for read here, I'll send a patch and
Dave or Christoph can smack me down if I'm wrong ;)

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