[nfsv4] Server-side copy question

"Mora, Jorge" <Jorge.Mora@netapp.com> Wed, 15 February 2017 22:24 UTC

Return-Path: <Jorge.Mora@netapp.com>
X-Original-To: nfsv4@ietfa.amsl.com
Delivered-To: nfsv4@ietfa.amsl.com
Received: from localhost (localhost [127.0.0.1]) by ietfa.amsl.com (Postfix) with ESMTP id 124B412987D for <nfsv4@ietfa.amsl.com>; Wed, 15 Feb 2017 14:24:23 -0800 (PST)
X-Virus-Scanned: amavisd-new at amsl.com
X-Spam-Flag: NO
X-Spam-Score: -6.921
X-Spam-Level:
X-Spam-Status: No, score=-6.921 tagged_above=-999 required=5 tests=[BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_HI=-5, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RP_MATCHES_RCVD=-0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
Authentication-Results: ietfa.amsl.com (amavisd-new); dkim=pass (1024-bit key) header.d=netapp.onmicrosoft.com
Received: from mail.ietf.org ([4.31.198.44]) by localhost (ietfa.amsl.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id KcU3iLeh4W5N for <nfsv4@ietfa.amsl.com>; Wed, 15 Feb 2017 14:24:21 -0800 (PST)
Received: from mx141.netapp.com (mx141.netapp.com [216.240.21.12]) (using TLSv1.2 with cipher RC4-SHA (128/128 bits)) (No client certificate requested) by ietfa.amsl.com (Postfix) with ESMTPS id 1DBC4129544 for <nfsv4@ietf.org>; Wed, 15 Feb 2017 14:24:21 -0800 (PST)
X-IronPort-AV: E=Sophos;i="5.35,167,1484035200"; d="scan'208,217";a="183727190"
Received: from hioexcmbx08-prd.hq.netapp.com ([10.122.105.41]) by mx141-out.netapp.com with ESMTP; 15 Feb 2017 14:11:49 -0800
Received: from VMWEXCCAS06-PRD.hq.netapp.com (10.122.105.22) by hioexcmbx08-prd.hq.netapp.com (10.122.105.41) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Wed, 15 Feb 2017 14:19:15 -0800
Received: from NAM02-SN1-obe.outbound.protection.outlook.com (10.120.60.153) by VMWEXCCAS06-PRD.hq.netapp.com (10.122.105.22) with Microsoft SMTP Server (TLS) id 15.0.1210.3 via Frontend Transport; Wed, 15 Feb 2017 14:19:15 -0800
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=netapp.onmicrosoft.com; s=selector1-netapp-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=mxeNQtg21IoBevXmCtR/hSFwIqON3837gNpARgmSpws=; b=jvZ3MQjk8eBvjYLgnb4hSQ/BwFLNTviAXz83f5tXKSGKFjdnpKO1WbcAuGyrqN10oLRPcPO/ZfIu+evZeeViOT10TvgQl2v6Q1EAN7sUOOAHaoCVxryUi/J2AR2FkQBr9fHEZbVmoPI5SoOyyekuAAuA4/yNBLVPgIny1LBMRC4=
Received: from BLUPR06MB547.namprd06.prod.outlook.com (10.141.205.22) by BLUPR06MB548.namprd06.prod.outlook.com (10.141.205.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.16; Wed, 15 Feb 2017 22:19:13 +0000
Received: from BLUPR06MB547.namprd06.prod.outlook.com ([10.141.205.22]) by BLUPR06MB547.namprd06.prod.outlook.com ([10.141.205.22]) with mapi id 15.01.0888.030; Wed, 15 Feb 2017 22:19:13 +0000
From: "Mora, Jorge" <Jorge.Mora@netapp.com>
To: "nfsv4@ietf.org" <nfsv4@ietf.org>
Thread-Topic: Server-side copy question
Thread-Index: AQHSh9mJMdo0XM5LV0SkJ1E945V/hw==
Date: Wed, 15 Feb 2017 22:19:13 +0000
Message-ID: <B65A07BE-E379-4507-A9B8-6927DF61A0A5@netapp.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach:
X-MS-TNEF-Correlator:
user-agent: Microsoft-MacOutlook/f.1e.0.170107
authentication-results: spf=none (sender IP is ) smtp.mailfrom=Jorge.Mora@netapp.com;
x-ms-exchange-messagesentrepresentingtype: 1
x-originating-ip: [2605:6000:1305:2a:19e7:2a71:feb9:8f4]
x-ms-office365-filtering-correlation-id: 1b8711e6-2f47-485c-8891-08d455f0ac6b
x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:BLUPR06MB548;
x-microsoft-exchange-diagnostics: 1; BLUPR06MB548; 7:t/0cSM9roAdIpleQ0tIvaNvTGIhp7foeOu1wG8SW4ERmWKiZUer8EYr6QmbmJy7xVBW5a6mlLwbBeQoWPsgzjPNWhkMeKCIlSejLzMQuFmMC7wm6SZCxxD+q6UAuwtAicPMe6s+sDQvUwspgHm/yl0sn2PhrEbWaA3phmpC6oQYPYyk1hBQq5UJv332taS3QpYpG9/lhWyiNTj5kS+z1Zd/6V6DOfVbpc4wbHjWU/f9L3f2pLDhBZBjcZHkNeQsxeiu+UQVKCkLibaBRgFOTneF1+7qB5w7Cx50Zbj1YXBLRjJdlh3xOwGS0nz5Qxn3MwxuYUgSYmyEXT/u14YWiiQ==
x-microsoft-antispam-prvs: <BLUPR06MB548773359F1D680FC2DEDBFE15B0@BLUPR06MB548.namprd06.prod.outlook.com>
x-exchange-antispam-report-test: UriScan:(158342451672863)(21748063052155);
x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(10201501046)(3002001)(6055026)(6041248)(20161123555025)(20161123564025)(20161123562025)(20161123560025)(20161123558025)(6072148); SRVR:BLUPR06MB548; BCL:0; PCL:0; RULEID:; SRVR:BLUPR06MB548;
x-forefront-prvs: 021975AE46
x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(6009001)(7916002)(39450400003)(199003)(189002)(101416001)(2900100001)(97736004)(8936002)(6486002)(86362001)(92566002)(189998001)(77096006)(83506001)(6506006)(82746002)(36756003)(2501003)(110136004)(6116002)(9326002)(5660300001)(53936002)(83716003)(68736007)(4001350100001)(3480700004)(122556002)(38730400002)(106356001)(106116001)(6916009)(105586002)(54896002)(3280700002)(6512007)(54356999)(6436002)(25786008)(450100001)(2906002)(99286003)(6306002)(5640700003)(81166006)(50986999)(33656002)(7736002)(81156014)(8676002)(2351001)(389900002)(102836003)(3660700001)(104396002); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR06MB548; H:BLUPR06MB547.namprd06.prod.outlook.com; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en;
received-spf: None (protection.outlook.com: netapp.com does not designate permitted sender hosts)
spamdiagnosticoutput: 1:99
spamdiagnosticmetadata: NSPM
Content-Type: multipart/alternative; boundary="_000_B65A07BEE3794507A9B86927DF61A0A5netappcom_"
MIME-Version: 1.0
X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Feb 2017 22:19:13.7113 (UTC)
X-MS-Exchange-CrossTenant-fromentityheader: Hosted
X-MS-Exchange-CrossTenant-id: 4b0911a0-929b-4715-944b-c03745165b3a
X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR06MB548
X-OriginatorOrg: netapp.com
Archived-At: <https://mailarchive.ietf.org/arch/msg/nfsv4/HVueODkvr1Of6LXQpHqt95E28E4>
Subject: [nfsv4] Server-side copy question
X-BeenThere: nfsv4@ietf.org
X-Mailman-Version: 2.1.17
Precedence: list
List-Id: NFSv4 Working Group <nfsv4.ietf.org>
List-Unsubscribe: <https://www.ietf.org/mailman/options/nfsv4>, <mailto:nfsv4-request@ietf.org?subject=unsubscribe>
List-Archive: <https://mailarchive.ietf.org/arch/browse/nfsv4/>
List-Post: <mailto:nfsv4@ietf.org>
List-Help: <mailto:nfsv4-request@ietf.org?subject=help>
List-Subscribe: <https://www.ietf.org/mailman/listinfo/nfsv4>, <mailto:nfsv4-request@ietf.org?subject=subscribe>
X-List-Received-Date: Wed, 15 Feb 2017 22:24:23 -0000

Hello,

The NFSv4.2 spec (RFC 7862) on section 15.2.3 (COPY description) says the following:

If the source offset or the source offset plus count is greater than
the size of the source file, the operation MUST fail with
NFS4ERR_INVAL.

I can understand failing with NFS4ERR_INVAL when the source offset is beyond the end of the file,
but do you think failing with NFS4ERR_INVAL is too strict when the source offset plus the count is beyond the end of the file?
What is the rationalization for failing on this specific instance?
Why not return a short copy instead?

As of right now, the implementation on the Linux server adheres to the spec but copy_file_range succeeds
when it is called against the local file system, NFSv4.x or NFSv3.
For the local file system, NFSv4.x or NFSv3 copy_file_range falls back to regular copy by
reading from the source file and then writing to the destination file but I do believe the
syscall should be consistent regardless of the underlying file system.


--Jorge