Re: [RFC PATCH] ext4: Don't release mutex for DAX write

From: Waiman Long
Date: Tue May 03 2016 - 11:59:56 EST


On 05/03/2016 04:43 AM, Christoph Hellwig wrote:
As explained in another thread I really think we need to get DAX
to stop pretending to be direct I/O, which should also take care
of the locking. The same issue also exists for ext2 and XFS so it
needs to be solved at a higher level.

I think the DAX code was in the DIO path because it didn't want to use buffer cache at all. Taking DAX out from DIO will mean having a third mode of doing I/O which is similar to DIO in certain ways, but not exactly the same. There will be a certain amount of code duplication in this case. Do we really want to do that?

As for the locking problem, xfs doesn't seem to have issue as it uses a rwsem in the xfs inode for synchronization. I haven't looked into the ext2 code to see if there is any issue there.

Cheers,
Longman