Re: [PATCH] vfs: allow FILE_EXTENT_SAME (dedupe_file_range) on a file opened ro
From: Mark Fasheh
Date: Mon Jul 18 2016 - 15:52:26 EST
On Mon, Jul 18, 2016 at 12:13:38AM +0200, Adam Borowski wrote:
> Instead of checking the mode of the file descriptor, let's check whether it
> could have been opened rw. This allows fixing intermittent exec failures
> when deduping a live system: anyone trying to exec a file currently being
> deduped gets ETXTBSY.
>
> Issuing this ioctl on a ro file was already allowed for root/cap.
>
> Tested on btrfs and not-yet-merged xfs, as only them implement this ioctl.
>
> Signed-off-by: Adam Borowski <kilobyte@xxxxxxxxxx>
Reviewed-by: Mark Fasheh <mfasheh@xxxxxxx>
--Mark
--
Mark Fasheh