Re: [Qemu-devel] [PATCH v2 9/9] block: Use common write req handling in truncate

2018-07-08 Thread Fam Zheng
On Fri, 07/06 17:12, Eric Blake wrote: > On 07/05/2018 02:37 AM, Fam Zheng wrote: > > Truncation is the last to convert from open coded req handling to > > reusing helpers. This time the permission check in prepare has to adapt > > to the new caller: it checks a different permission bit, and don't

Re: [Qemu-devel] [PATCH v2 9/9] block: Use common write req handling in truncate

2018-07-06 Thread Eric Blake
On 07/05/2018 02:37 AM, Fam Zheng wrote: Truncation is the last to convert from open coded req handling to reusing helpers. This time the permission check in prepare has to adapt to the new caller: it checks a different permission bit, and don't did you mean "won't" or "doesn't"? trigger the

[Qemu-devel] [PATCH v2 9/9] block: Use common write req handling in truncate

2018-07-05 Thread Fam Zheng
Truncation is the last to convert from open coded req handling to reusing helpers. This time the permission check in prepare has to adapt to the new caller: it checks a different permission bit, and don't trigger the before write notifier. Also, truncation should always trigger a