Re: [PATCH v9 1/3] xfs: fix the calculation of length and end

2023-02-05 Thread Shiyang Ruan
在 2023/2/5 19:42, Matthew Wilcox 写道: On Sat, Feb 04, 2023 at 02:58:36PM +, Shiyang Ruan wrote: @@ -222,8 +222,8 @@ xfs_dax_notify_failure( len -= ddev_start - offset; offset = 0; } - if (offset + len > ddev_end) - len -= ddev_end

Re: [PATCH v9 1/3] xfs: fix the calculation of length and end

2023-02-05 Thread Matthew Wilcox
On Sat, Feb 04, 2023 at 02:58:36PM +, Shiyang Ruan wrote: > @@ -222,8 +222,8 @@ xfs_dax_notify_failure( > len -= ddev_start - offset; > offset = 0; > } > - if (offset + len > ddev_end) > - len -= ddev_end - offset; > + if (offset + len - 1 >

[PATCH v9 1/3] xfs: fix the calculation of length and end

2023-02-04 Thread Shiyang Ruan
The end should be start + length - 1. Also fix the calculation of the length when seeking for intersection of notify range and device. Signed-off-by: Shiyang Ruan Reviewed-by: Darrick J. Wong --- fs/xfs/xfs_notify_failure.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --