From patchwork Sun Nov 27 06:26:35 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Haynes X-Patchwork-Id: 9448709 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C43F26071C for ; Sun, 27 Nov 2016 06:27:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AD9CE20855 for ; Sun, 27 Nov 2016 06:27:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A25E822376; Sun, 27 Nov 2016 06:27:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3230D20855 for ; Sun, 27 Nov 2016 06:27:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753362AbcK0G1t (ORCPT ); Sun, 27 Nov 2016 01:27:49 -0500 Received: from us-smtp-delivery-194.mimecast.com ([63.128.21.194]:37472 "EHLO us-smtp-delivery-194.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753341AbcK0G1q (ORCPT ); Sun, 27 Nov 2016 01:27:46 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=PrimaryData.onmicrosoft.com; s=selector1-primarydata-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=8Z7Vyp3r/p3plhw3xSPDx7hKFORa+aKzE0eA4ntbujU=; b=JgnfDXtQDCGujsq9b9VPiR/eRZwLyuq+Abk05NvJHUsa05QtflDbn/8BUlscqrvR1XBrfRScqVCMzgCZqs1I8S4qtX5maic6vHzvnI39AQcrlV3/ObQHsecc59jKN+Hom0ra4AhrOYODAa+wk0XY9nBzu1M8ITtmOdjfNY9Ni5Y= Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02lp0024.outbound.protection.outlook.com [216.32.180.24]) (Using TLS) by us-smtp-1.mimecast.com with ESMTP id us-mta-92-1AalaI6xOeiNgBV9ETgTPQ-5; Sun, 27 Nov 2016 01:27:34 -0500 Received: from jhereg.localdomain (73.202.55.195) by BN6PR11MB1364.namprd11.prod.outlook.com (10.173.33.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.747.10; Sun, 27 Nov 2016 06:27:22 +0000 From: Tom Haynes To: "J. Bruce Fields" CC: Linux NFS Mailing list Subject: [PATCH pynfs 06/12] Add xdr for Flex Files Layout Type Date: Sat, 26 Nov 2016 22:26:35 -0800 Message-ID: <1480228001-64821-7-git-send-email-loghyr@primarydata.com> X-Mailer: git-send-email 2.3.6 In-Reply-To: <1480228001-64821-1-git-send-email-loghyr@primarydata.com> References: <1480228001-64821-1-git-send-email-loghyr@primarydata.com> MIME-Version: 1.0 X-Originating-IP: [73.202.55.195] X-ClientProxiedBy: DM2PR07CA0047.namprd07.prod.outlook.com (10.141.52.175) To BN6PR11MB1364.namprd11.prod.outlook.com (10.173.33.8) X-MS-Office365-Filtering-Correlation-Id: 0fe7cc48-87b6-4136-8303-08d4168e72cc X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:BN6PR11MB1364; X-Microsoft-Exchange-Diagnostics: 1; BN6PR11MB1364; 3:dUzihNrEk0CKOiA0YG25t7WWnXVAQU+VxMa/MZAdzIMB4Lsx3Y5KRI32tsVABZnP+ifXn2ppaMwInyK/Dg0KtwP3TmIuVH+oD0g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y/wsxjwYMZ1zO6V0O/NyhlNIN/yL7+1TI8LqyG9keFaWdepypTftDvWtostU7GUPANivpyxmW4mF/EA4TX4mRxdjA1Xh7RFTUEtMadmVsv3EN3nCFZXLt3ngtfRfVnUnVL2eBaOWtefpR7Cc2w8EJJee9k5nvaqQI/l0IUh1BKzEDEi4qCifD/C/H5at2nS3x1ZR7YaZ18xNIS/RiYbmZhAGT0BKJx0jvJNo=; 20:QAAda557fbwsLLx8677uKSFRsQ9hs3evT+L2TPMo2FMQ6g44FVOdHmaod1kpc1YzQJmsQJ7yeF7vjohgdBmWGMMH5ddNIvpwBcn6+fqM3m023m6DnM1pJzO/YLg3a6TM/ugnAwbAKNlvsRIVwg9MilJmRcGXZ4N9L+NqZSScAxo= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6060326)(6045199)(6040361)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(6041248)(6061324)(20161123560025)(2016111802025)(20161123555025)(20161123564025)(20161123562025)(6043046)(6042181); SRVR:BN6PR11MB1364; BCL:0; PCL:0; RULEID:; SRVR:BN6PR11MB1364; X-Microsoft-Exchange-Diagnostics: 1; BN6PR11MB1364; 4:ddH0JdDvlhDZykMzCp/kJ4mwK3q3eElgAUBAVoAaETM6SlmElkzpUeYU//zhG21MX82w4PfbinNwG0RyEVrRDu6C0VUJN0l96tr2GGLyuqY3Rn6wJH+sS1oamkwyH0w6c0uM1DUXM4T5zSUAXj3Zg35Sku/cTo0oYdYqBBT4FE2ZjHM29At1RHAijtGHWPb/VmKF1iOL8weo+DczkuqkFJ7/Z+G8dw3O88MJp19Pqp3043jOMPsPP/f/pncFH8TqshUT3O3rppIZPgWcVMlpvt+vhR8DoCaeHeV/XWGM5T4ZIgA1BrMuqnLzwmpOEDUphin6BadvqL5ng+59rguYXEc3Pcb6WTm9wNSvLyLPhHd0d5FZ0sJGr/+zOfHmUmDyRFPKskqSh3RfFtrS62D//S/CUFGJoNtlqH+pl65yZSn8PUjwISKvi5yU4B26mb09rcYG8gw8FqpLs9p7P+4llpgrGBPgX3vIcWYW9qVS434CEny3OO+SBzPf69gExIluwgISLOrQiKNGYHktszcRt+6RZPrBvN52r2J7U6B1Ihi+OuIC2BtXadXQFSETUavndiF0ZSHiQzQVydhhXHlXf9Dec8GNRP9f8WMtM7zuqkNHm+HYi1Hxz77IpfL70aEqoKpA8s+y4Ig7BUnBqi0p/AXeZntlnZNldIULKNE6An4blOB5sjCCgtCWHMitH3LR X-Forefront-PRVS: 0139052FDB X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(4630300001)(6009001)(7916002)(199003)(189002)(50986999)(86362001)(5003940100001)(68736007)(305945005)(7736002)(7846002)(105586002)(101416001)(97736004)(42186005)(92566002)(76176999)(36756003)(66066001)(38730400001)(47776003)(110136003)(33646002)(106356001)(733004)(2950100002)(50466002)(8676002)(6916009)(6666003)(81166006)(81156014)(4326007)(50226002)(5660300001)(48376002)(2906002)(6116002)(3846002)(6486002)(189998001); DIR:OUT; SFP:1102; SCL:1; SRVR:BN6PR11MB1364; H:jhereg.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN6PR11MB1364; 23:d2UYNUiR+ZYQgXXrjUzkWtOyANEFWzt6doUgrtT4C?= =?us-ascii?Q?veBbgHkv4nFL2gPf8VsEZ0QkaSOHZUWLEdMEueO3oKXIi0pGkXq+js0s1KSi?= =?us-ascii?Q?nJH0/jgHMCIyKLAP7fYRfcmrI81jNbuSlq4/i4JXxhVnlXQmhpDh2b5W1iS2?= =?us-ascii?Q?a235vbxAo6vP6ZhVvkr8Nf+09O8snbGjfkXcXsmls1j6ZABbmIlafQ8D5qCD?= =?us-ascii?Q?l71f4cVYi2GYxxlSzFYXke1WxCxT0GJ2qTTd9E6Hm9STMIwTLmNcoekl34xs?= =?us-ascii?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h8TB3sN98VaYmf74u9qemZQ7DOGM5QgzrIV8AXODa9Mfn90OYKe5Ks5L26sq+iwdVNOHqMkE8fDOnEouE+WyZ+8BQFiuJAsMA0QJB/2/o3xrC0gpa1Vl/wa1N9EhZeETfTgk7j40gNEE4bqNaiAw==; 20:WSWFHeeHHbVX4YB2WY3DarBSGLqIOoKwTuAOdGhQaE0KqPPukDhf2eZATgOKzlf1U7BvFGolHe81cAw9zt5geJUDACcfRCDKta7c9VQYn8RaQHeW0e7ru9CAkGZS08o4k51ALcIYJsc2WoN/uEAhVDhZqZflDqm0zzHJCh3qQCw= X-OriginatorOrg: primarydata.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Nov 2016 06:27:22.9391 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR11MB1364 X-MC-Unique: 1AalaI6xOeiNgBV9ETgTPQ-5 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Note that unlike the block layout, we don't create a new file as there are too many dependencies on existing types. Signed-off-by: Tom Haynes --- nfs4.1/xdrdef/nfs4.x | 97 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 96 insertions(+), 1 deletion(-) diff --git a/nfs4.1/xdrdef/nfs4.x b/nfs4.1/xdrdef/nfs4.x index 16870f7..c2c9361 100644 --- a/nfs4.1/xdrdef/nfs4.x +++ b/nfs4.1/xdrdef/nfs4.x @@ -572,7 +572,8 @@ struct stateid4 { enum layouttype4 { LAYOUT4_NFSV4_1_FILES = 0x1, LAYOUT4_OSD2_OBJECTS = 0x2, - LAYOUT4_BLOCK_VOLUME = 0x3 + LAYOUT4_BLOCK_VOLUME = 0x3, + LAYOUT4_FLEX_FILES = 0x4 }; struct layout_content4 { @@ -3040,6 +3041,100 @@ default: void; }; +struct ff_device_versions4 { + uint32_t ffdv_version; + uint32_t ffdv_minorversion; + uint32_t ffdv_rsize; + uint32_t ffdv_wsize; + bool ffdv_tightly_coupled; +}; + +struct ff_device_addr4 { + multipath_list4 ffda_netaddrs; + ff_device_versions4 ffda_versions<>; +}; + +const FF_FLAGS_NO_LAYOUTCOMMIT = 0x00000001; +const FF_FLAGS_NO_IO_THRU_MDS = 0x00000002; +const FF_FLAGS_NO_READ_IO = 0x00000004; +typedef uint32_t ff_flags4; + +struct ff_data_server4 { + deviceid4 ffds_deviceid; + uint32_t ffds_efficiency; + stateid4 ffds_stateid; + nfs_fh4 ffds_fh_vers<>; + fattr4_owner ffds_user; + fattr4_owner_group ffds_group; +}; + +struct ff_mirror4 { + ff_data_server4 ffm_data_servers<>; +}; + +struct ff_layout4 { + length4 ffl_stripe_unit; + ff_mirror4 ffl_mirrors<>; + ff_flags4 ffl_flags; + uint32_t ffl_stats_collect_hint; +}; + +struct ff_ioerr4 { + offset4 ffie_offset; + length4 ffie_length; + stateid4 ffie_stateid; + device_error4 ffie_errors<>; +}; + +struct ff_io_latency4 { + uint64_t ffil_ops_requested; + uint64_t ffil_bytes_requested; + uint64_t ffil_ops_completed; + uint64_t ffil_bytes_completed; + uint64_t ffil_bytes_not_delivered; + nfstime4 ffil_total_busy_time; + nfstime4 ffil_aggregate_completion_time; +}; + +struct ff_layoutupdate4 { + netaddr4 ffl_addr; + nfs_fh4 ffl_fhandle; + ff_io_latency4 ffl_read; + ff_io_latency4 ffl_write; + nfstime4 ffl_duration; + bool ffl_local; +}; + +struct ff_iostats4 { + offset4 ffis_offset; + length4 ffis_length; + stateid4 ffis_stateid; + io_info4 ffis_read; + io_info4 ffis_write; + deviceid4 ffis_deviceid; + ff_layoutupdate4 ffis_layoutupdate; +}; + +struct ff_layoutreturn4 { + ff_ioerr4 fflr_ioerr_report<>; + ff_iostats4 fflr_iostats_report<>; +}; + +union ff_mirrors_hint switch (bool ffmc_valid) { + case TRUE: + uint32_t ffmc_mirrors; + case FALSE: + void; +}; + +struct ff_layouthint4 { + ff_mirrors_hint fflh_mirrors_hint; +}; + +enum ff_cb_recall_any_mask { + FF_RCA4_TYPE_MASK_READ = -2, + FF_RCA4_TYPE_MASK_RW = -1 +}; /* * Operation arrays (the rest)