From: Tom Haynes <loghyr@primarydata.com>
To: "J. Bruce Fields" <bfields@redhat.com>
Cc: Linux NFS Mailing list <linux-nfs@vger.kernel.org>
Subject: [PATCH pynfs 06/12] Add xdr for Flex Files Layout Type
Date: Sat, 26 Nov 2016 22:26:35 -0800 [thread overview]
Message-ID: <1480228001-64821-7-git-send-email-loghyr@primarydata.com> (raw)
In-Reply-To: <1480228001-64821-1-git-send-email-loghyr@primarydata.com>
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 <loghyr@primarydata.com>
---
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 =3D 0x1,
LAYOUT4_OSD2_OBJECTS =3D 0x2,
- LAYOUT4_BLOCK_VOLUME =3D 0x3
+ LAYOUT4_BLOCK_VOLUME =3D 0x3,
+ LAYOUT4_FLEX_FILES =3D 0x4
};
=20
struct layout_content4 {
@@ -3040,6 +3041,100 @@ default:
void;
};
=20
+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 =3D 0x00000001;
+const FF_FLAGS_NO_IO_THRU_MDS =3D 0x00000002;
+const FF_FLAGS_NO_READ_IO =3D 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 =3D -2,
+ FF_RCA4_TYPE_MASK_RW =3D -1
+};
=20
/*
* Operation arrays (the rest)
--=20
2.3.6
next prev parent reply other threads:[~2016-11-27 6:27 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-27 6:26 [PATCH pynfs 00/12] Flex File support Tom Haynes
2016-11-27 6:26 ` [PATCH pynfs 01/12] According to RFC7863, this is not an array Tom Haynes
2016-11-27 6:26 ` [PATCH pynfs 02/12] Close the files opened in the OPEN tests Tom Haynes
2016-11-27 6:26 ` [PATCH pynfs 03/12] Some more file closes to cleanup state on the server Tom Haynes
2016-11-27 6:26 ` [PATCH pynfs 04/12] Get rid of the client records as well as the session records Tom Haynes
2016-11-27 6:26 ` [PATCH pynfs 05/12] Really, really close those open temp files to remove state on the server Tom Haynes
2016-11-27 6:26 ` Tom Haynes [this message]
2016-11-27 6:26 ` [PATCH pynfs 07/12] Simple tests of the flex file layout type Tom Haynes
2016-11-27 6:26 ` [PATCH pynfs 08/12] Add a check to see if NFS4ERR_OLD_STATEID is issued on concurrent layoutgets Tom Haynes
2016-11-27 6:26 ` [PATCH pynfs 09/12] Check that the flex file access uid/gid are correct for the different iomodes Tom Haynes
2016-11-27 6:26 ` [PATCH pynfs 10/12] FFLS1: Simulate LAYOUTSTATS for 20 small file creations Tom Haynes
2016-11-27 6:26 ` [PATCH pynfs 11/12] Factor out checking seqid for flex file layouts Tom Haynes
2016-11-27 6:26 ` [PATCH pynfs 12/12] Add layoutstats tests for flex files Tom Haynes
2016-11-28 17:22 ` J. Bruce Fields
2016-11-28 17:52 ` Tom Haynes
2016-11-28 16:33 ` [PATCH pynfs 00/12] Flex File support J. Bruce Fields
2016-11-28 16:53 ` Tom Haynes
2016-11-28 21:47 ` J. Bruce Fields
2016-11-28 23:38 ` Tom Haynes
2016-11-29 1:55 ` J. Bruce Fields
2016-11-29 23:44 ` Frank Filz
2016-11-30 14:24 ` J. Bruce Fields
2016-11-30 16:56 ` Frank Filz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1480228001-64821-7-git-send-email-loghyr@primarydata.com \
--to=loghyr@primarydata.com \
--cc=bfields@redhat.com \
--cc=linux-nfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).