• C
    xfs: replace i_flock with a sleeping bitlock · 474fce06
    Christoph Hellwig 提交于
    We almost never block on i_flock, the exception is synchronous inode
    flushing.  Instead of bloating the inode with a 16/24-byte completion
    that we abuse as a semaphore just implement it as a bitlock that uses
    a bit waitqueue for the rare sleeping path.  This primarily is a
    tradeoff between a much smaller inode and a faster non-blocking
    path vs faster wakeups, and we are much better off with the former.
    
    A small downside is that we will lose lockdep checking for i_flock, but
    given that it's always taken inside the ilock that should be acceptable.
    
    Note that for example the inode writeback locking is implemented in a
    very similar way.
    Signed-off-by: NChristoph Hellwig <hch@lst.de>
    Reviewed-by: NAlex Elder <aelder@sgi.com>
    Signed-off-by: NBen Myers <bpm@sgi.com>
    474fce06
xfs_inode.c 107.9 KB