@@ -132,6 +132,96 @@ struct p9_client {
132132 char name [__NEW_UTS_LEN + 1 ];
133133};
134134
135+ /**
136+ * struct p9_fd_opts - holds client options during parsing
137+ * @msize: maximum data size negotiated by protocol
138+ * @prot-Oversion: 9P protocol version to use
139+ * @trans_mod: module API instantiated with this client
140+ *
141+ * These parsed options get transferred into client in
142+ * apply_client_options()
143+ */
144+ struct p9_client_opts {
145+ unsigned int msize ;
146+ unsigned char proto_version ;
147+ struct p9_trans_module * trans_mod ;
148+ };
149+
150+ /**
151+ * struct p9_fd_opts - per-transport options for fd transport
152+ * @rfd: file descriptor for reading (trans=fd)
153+ * @wfd: file descriptor for writing (trans=fd)
154+ * @port: port to connect to (trans=tcp)
155+ * @privport: port is privileged
156+ */
157+ struct p9_fd_opts {
158+ int rfd ;
159+ int wfd ;
160+ u16 port ;
161+ bool privport ;
162+ };
163+
164+ /**
165+ * struct p9_rdma_opts - Collection of mount options for rdma transport
166+ * @port: port of connection
167+ * @privport: Whether a privileged port may be used
168+ * @sq_depth: The requested depth of the SQ. This really doesn't need
169+ * to be any deeper than the number of threads used in the client
170+ * @rq_depth: The depth of the RQ. Should be greater than or equal to SQ depth
171+ * @timeout: Time to wait in msecs for CM events
172+ */
173+ struct p9_rdma_opts {
174+ short port ;
175+ bool privport ;
176+ int sq_depth ;
177+ int rq_depth ;
178+ long timeout ;
179+ };
180+
181+ /**
182+ * struct p9_session_opts - holds parsed options for v9fs_session_info
183+ * @flags: session options of type &p9_session_flags
184+ * @nodev: set to 1 to disable device mapping
185+ * @debug: debug level
186+ * @afid: authentication handle
187+ * @cache: cache mode of type &p9_cache_bits
188+ * @cachetag: the tag of the cache associated with this session
189+ * @uname: string user name to mount hierarchy as
190+ * @aname: mount specifier for remote hierarchy
191+ * @dfltuid: default numeric userid to mount hierarchy as
192+ * @dfltgid: default numeric groupid to mount hierarchy as
193+ * @uid: if %V9FS_ACCESS_SINGLE, the numeric uid which mounted the hierarchy
194+ * @session_lock_timeout: retry interval for blocking locks
195+ *
196+ * This strucure holds options which are parsed and will be transferred
197+ * to the v9fs_session_info structure when mounted, and therefore largely
198+ * duplicates struct v9fs_session_info.
199+ */
200+ struct p9_session_opts {
201+ unsigned int flags ;
202+ unsigned char nodev ;
203+ unsigned short debug ;
204+ unsigned int afid ;
205+ unsigned int cache ;
206+ #ifdef CONFIG_9P_FSCACHE
207+ char * cachetag ;
208+ #endif
209+ char * uname ;
210+ char * aname ;
211+ kuid_t dfltuid ;
212+ kgid_t dfltgid ;
213+ kuid_t uid ;
214+ long session_lock_timeout ;
215+ };
216+
217+ /* Used by mount API to store parsed mount options */
218+ struct v9fs_context {
219+ struct p9_client_opts client_opts ;
220+ struct p9_fd_opts fd_opts ;
221+ struct p9_rdma_opts rdma_opts ;
222+ struct p9_session_opts session_opts ;
223+ };
224+
135225/**
136226 * struct p9_fid - file system entity handle
137227 * @clnt: back pointer to instantiating &p9_client
0 commit comments