Re: [PATCH] direct-io: use read lock for DIO_LOCKING flag

2021-04-15 Thread Chao Yu
On 2021/4/16 8:43, Al Viro wrote: On Thu, Apr 15, 2021 at 12:24:13PM +0200, Jan Kara wrote: On Thu 15-04-21 17:43:32, Chao Yu wrote: 9902af79c01a ("parallel lookups: actual switch to rwsem") changes inode lock from mutex to rwsem, however, we forgot to adjust lock for DIO_LOCKING flag in do_blo

Re: [PATCH] direct-io: use read lock for DIO_LOCKING flag

2021-04-15 Thread Al Viro
On Thu, Apr 15, 2021 at 12:24:13PM +0200, Jan Kara wrote: > On Thu 15-04-21 17:43:32, Chao Yu wrote: > > 9902af79c01a ("parallel lookups: actual switch to rwsem") changes inode > > lock from mutex to rwsem, however, we forgot to adjust lock for > > DIO_LOCKING flag in do_blockdev_direct_IO(), The

Re: [PATCH] direct-io: use read lock for DIO_LOCKING flag

2021-04-15 Thread Jan Kara
On Thu 15-04-21 17:43:32, Chao Yu wrote: > 9902af79c01a ("parallel lookups: actual switch to rwsem") changes inode > lock from mutex to rwsem, however, we forgot to adjust lock for > DIO_LOCKING flag in do_blockdev_direct_IO(), so let's change to hold read > lock to mitigate performance regression

[PATCH] direct-io: use read lock for DIO_LOCKING flag

2021-04-15 Thread Chao Yu
9902af79c01a ("parallel lookups: actual switch to rwsem") changes inode lock from mutex to rwsem, however, we forgot to adjust lock for DIO_LOCKING flag in do_blockdev_direct_IO(), so let's change to hold read lock to mitigate performance regression in the case of read DIO vs read DIO, meanwhile it