Re: [PATCH v2 11/12] NFS: Remove inode->i_dio_count from the NFS O_DIRECT code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> On Jun 22, 2016, at 12:42, Christoph Hellwig <hch@xxxxxxxxxxxxx> wrote:
> 
> On Tue, Jun 21, 2016 at 05:34:52PM -0400, Trond Myklebust wrote:
>> Now that we can serialise O_DIRECT and write/truncate using the
>> inode->i_rwsem, we no longer need inode->i_dio_count.
> 
> For the AIO case that's not true, we can't hold i_rwsem until
> aio completes.  So for something that does block allocations we'll
> need something like i_dio_count still.  This probably includes the
> block / scsi layout code.

Why can’t we hold the i_rwsem until aio completes? It is only a read lock, so we’re not blocking the aio engine from adding more requests. As long as notify_change() holds the i_rwsem for write, then we have exclusion.

Cheers
  Trond

--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux