Re: [PATCH] fs: generic_copy_file_checks: Do not adjust count based on file size

2021-02-11 Thread Nicolas Boichat
On Thu, Jan 28, 2021 at 1:57 PM Darrick J. Wong wrote: > > On Thu, Jan 28, 2021 at 08:46:04AM +0800, Nicolas Boichat wrote: [snip] > > Okay, so, based on this and Al's reply, I see 2 things we can do: > > 1. Go should probably not use copy_file_range in a common library > > function, as I don't s

Re: [PATCH] fs: generic_copy_file_checks: Do not adjust count based on file size

2021-01-27 Thread Darrick J. Wong
On Thu, Jan 28, 2021 at 08:46:04AM +0800, Nicolas Boichat wrote: > On Wed, Jan 27, 2021 at 7:38 AM Dave Chinner wrote: > > > > On Tue, Jan 26, 2021 at 01:50:22PM +0800, Nicolas Boichat wrote: > > > copy_file_range (which calls generic_copy_file_checks) uses the > > > inode file size to adjust the

Re: [PATCH] fs: generic_copy_file_checks: Do not adjust count based on file size

2021-01-27 Thread Nicolas Boichat
On Wed, Jan 27, 2021 at 7:38 AM Dave Chinner wrote: > > On Tue, Jan 26, 2021 at 01:50:22PM +0800, Nicolas Boichat wrote: > > copy_file_range (which calls generic_copy_file_checks) uses the > > inode file size to adjust the copy count parameter. This breaks > > with special filesystems like procfs/

Re: [PATCH] fs: generic_copy_file_checks: Do not adjust count based on file size

2021-01-26 Thread Dave Chinner
On Tue, Jan 26, 2021 at 01:50:22PM +0800, Nicolas Boichat wrote: > copy_file_range (which calls generic_copy_file_checks) uses the > inode file size to adjust the copy count parameter. This breaks > with special filesystems like procfs/sysfs, where the file size > appears to be zero, but content is

Re: [PATCH] fs: generic_copy_file_checks: Do not adjust count based on file size

2021-01-26 Thread Al Viro
On Tue, Jan 26, 2021 at 01:50:22PM +0800, Nicolas Boichat wrote: > copy_file_range (which calls generic_copy_file_checks) uses the > inode file size to adjust the copy count parameter. This breaks > with special filesystems like procfs/sysfs, where the file size > appears to be zero, but content is

[PATCH] fs: generic_copy_file_checks: Do not adjust count based on file size

2021-01-26 Thread Nicolas Boichat
copy_file_range (which calls generic_copy_file_checks) uses the inode file size to adjust the copy count parameter. This breaks with special filesystems like procfs/sysfs, where the file size appears to be zero, but content is actually returned when a read operation is performed. This commit ignor