Return-Path: Received: from mail-eopbgr720136.outbound.protection.outlook.com ([40.107.72.136]:9058 "EHLO NAM05-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727554AbeJTAWV (ORCPT ); Fri, 19 Oct 2018 20:22:21 -0400 From: Trond Myklebust To: "anna.schumaker@netapp.com" , "olga.kornievskaia@gmail.com" CC: "viro@zeniv.linux.org.uk" , "linux-nfs@vger.kernel.org" , "linux-fsdevel@vger.kernel.org" Subject: Re: [PATCH v1 02/11] VFS permit cross device vfs_copy_file_range Date: Fri, 19 Oct 2018 16:14:52 +0000 Message-ID: References: <20181019152932.32462-1-olga.kornievskaia@gmail.com> <20181019152932.32462-3-olga.kornievskaia@gmail.com> In-Reply-To: <20181019152932.32462-3-olga.kornievskaia@gmail.com> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Sender: linux-nfs-owner@vger.kernel.org List-ID: T24gRnJpLCAyMDE4LTEwLTE5IGF0IDExOjI5IC0wNDAwLCBPbGdhIEtvcm5pZXZza2FpYSB3cm90 ZToNCj4gRnJvbTogT2xnYSBLb3JuaWV2c2thaWEgPGtvbGdhQG5ldGFwcC5jb20+DQo+IA0KPiBB bGxvdyBjb3B5X2ZpbGVfcmFuZ2UgdG8gY29weSBiZXR3ZWVuIGRpZmZlcmVudCBzdXBlcmJsb2Nr cyBidXQgb25seQ0KPiBvZiB0aGUgc2FtZSBmaWxlIHN5c3RlbSB0eXBlcy4gVGhpcyBmZWF0dXJl IHdhcyBvZiBpbnRlcmVzdCB0byBDSUZTDQo+IGFzIHdlbGwgYXMgTkZTLg0KPiANCj4gVGhpcyBm ZWF0dXJlIGlzIG5lZWRlZCBieSBORlN2NC4yIHRvIHBlcmZvcm0gZmlsZSBjb3B5IG9wZXJhdGlv biBvbg0KPiB0aGUgc2FtZSBzZXJ2ZXIgb3IgZmlsZSBjb3B5IGJldHdlZW4gZGlmZmVyZW50IE5G U3Y0LjIgc2VydmVycy4NC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