Re: [PATCH v3 1/2] vfs: allow dedupe of user owned read-only files

2018-06-07 Thread Mark Fasheh
Hi Darrick, On Thu, Jun 07, 2018 at 11:17:51AM -0700, Darrick J. Wong wrote: > Looks ok, but could you please update the manpage for > ioctl_fideduperange to elaborate on when userspace can expect EPERM? > > Acked-by: Darrick J. Wong Yes, good idea. I can handle that. Thanks, --Mark

Re: [PATCH v3 1/2] vfs: allow dedupe of user owned read-only files

2018-06-07 Thread Darrick J. Wong
On Thu, Jun 07, 2018 at 10:38:53AM -0700, Mark Fasheh wrote: > The permission check in vfs_dedupe_file_range() is too coarse - We > only allow dedupe of the destination file if the user is root, or > they have the file open for write. > > This effectively limits a non-root user from deduping

[PATCH v3 1/2] vfs: allow dedupe of user owned read-only files

2018-06-07 Thread Mark Fasheh
The permission check in vfs_dedupe_file_range() is too coarse - We only allow dedupe of the destination file if the user is root, or they have the file open for write. This effectively limits a non-root user from deduping their own read-only files. In addition, the write file descriptor that the