Re: [PATCH] xfs: reduce IOCB_NOWAIT judgment for retry exclusive unaligned DIO

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

 



On 5/18/22 09:01, xiakaixu1987@xxxxxxxxx wrote:
> From: Kaixu Xia <kaixuxia@xxxxxxxxxxx>
> 
> Retry unaligned DIO with exclusive blocking semantics only when the
> IOCB_NOWAIT flag is not set. If we are doing nonblocking user I/O,
> propagate the error directly.
> 
> Signed-off-by: Kaixu Xia <kaixuxia@xxxxxxxxxxx>
> ---

Looks good.

Reviewed-by: Chaitanya Kulkarni <kch@xxxxxxxxxx>

-ck

>   fs/xfs/xfs_file.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/fs/xfs/xfs_file.c b/fs/xfs/xfs_file.c
> index 5bddb1e9e0b3..250a3f97400d 100644
> --- a/fs/xfs/xfs_file.c
> +++ b/fs/xfs/xfs_file.c
> @@ -576,9 +576,9 @@ xfs_file_dio_write_unaligned(
>   	 * don't even bother trying the fast path in this case.
>   	 */
>   	if (iocb->ki_pos > isize || iocb->ki_pos + count >= isize) {
> -retry_exclusive:
>   		if (iocb->ki_flags & IOCB_NOWAIT)
>   			return -EAGAIN;
> +retry_exclusive:
>   		iolock = XFS_IOLOCK_EXCL;
>   		flags = IOMAP_DIO_FORCE_WAIT;
>   	}




[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux