Re: [PATCH resend 1/2] btrfs: allow defrag on a file opened ro that has rw permissions

2018-08-01 Thread David Sterba
On Tue, Jul 24, 2018 at 10:35:28PM +0200, Adam Borowski wrote: > On Mon, Jul 23, 2018 at 05:26:24PM +0200, David Sterba wrote: > > On Wed, Jul 18, 2018 at 12:08:59AM +0200, Adam Borowski wrote: > (Combined with as-folded) > > | | btrfs: allow defrag on a file opened read-only that has rw permissio

Re: [PATCH resend 1/2] btrfs: allow defrag on a file opened ro that has rw permissions

2018-07-24 Thread Adam Borowski
On Mon, Jul 23, 2018 at 05:26:24PM +0200, David Sterba wrote: > On Wed, Jul 18, 2018 at 12:08:59AM +0200, Adam Borowski wrote: (Combined with as-folded) | | btrfs: allow defrag on a file opened read-only that has rw permissions | | > > Requiring a rw descriptor conflicts both ways with exec, retur

Re: [PATCH resend 1/2] btrfs: allow defrag on a file opened ro that has rw permissions

2018-07-23 Thread David Sterba
On Wed, Jul 18, 2018 at 12:08:59AM +0200, Adam Borowski wrote: > Requiring a rw descriptor conflicts both ways with exec, returning ETXTBSY > whenever you try to defrag a program that's currently being run, or > causing intermittent exec failures on a live system being defragged. > > As defrag doe

[PATCH resend 1/2] btrfs: allow defrag on a file opened ro that has rw permissions

2018-07-17 Thread Adam Borowski
Requiring a rw descriptor conflicts both ways with exec, returning ETXTBSY whenever you try to defrag a program that's currently being run, or causing intermittent exec failures on a live system being defragged. As defrag doesn't change the file's contents in any way, there's no reason to consider