2007-07-11 02:57:28 +04:00
|
|
|
/*
|
|
|
|
* include/net/9p/client.h
|
|
|
|
*
|
|
|
|
* 9P Client Definitions
|
|
|
|
*
|
2008-02-07 04:25:03 +03:00
|
|
|
* Copyright (C) 2008 by Eric Van Hensbergen <ericvh@gmail.com>
|
2007-07-11 02:57:28 +04:00
|
|
|
* Copyright (C) 2007 by Latchesar Ionkov <lucho@ionkov.net>
|
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License version 2
|
|
|
|
* as published by the Free Software Foundation.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program; if not, write to:
|
|
|
|
* Free Software Foundation
|
|
|
|
* 51 Franklin Street, Fifth Floor
|
|
|
|
* Boston, MA 02111-1301 USA
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef NET_9P_CLIENT_H
|
|
|
|
#define NET_9P_CLIENT_H
|
|
|
|
|
2013-08-21 21:24:47 +04:00
|
|
|
#include <linux/utsname.h>
|
2018-07-12 00:02:22 +03:00
|
|
|
#include <linux/idr.h>
|
2013-08-21 21:24:47 +04:00
|
|
|
|
2008-10-14 03:45:23 +04:00
|
|
|
/* Number of requests per row */
|
|
|
|
#define P9_ROW_MAXTAG 255
|
|
|
|
|
2010-03-05 21:49:11 +03:00
|
|
|
/** enum p9_proto_versions - 9P protocol versions
|
|
|
|
* @p9_proto_legacy: 9P Legacy mode, pre-9P2000.u
|
|
|
|
* @p9_proto_2000u: 9P2000.u extension
|
2010-03-08 20:33:04 +03:00
|
|
|
* @p9_proto_2000L: 9P2000.L extension
|
2010-03-05 21:49:11 +03:00
|
|
|
*/
|
|
|
|
|
|
|
|
enum p9_proto_versions{
|
2011-05-06 17:05:32 +04:00
|
|
|
p9_proto_legacy,
|
|
|
|
p9_proto_2000u,
|
|
|
|
p9_proto_2000L,
|
2010-03-05 21:49:11 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2008-10-14 03:45:25 +04:00
|
|
|
/**
|
|
|
|
* enum p9_trans_status - different states of underlying transports
|
|
|
|
* @Connected: transport is connected and healthy
|
|
|
|
* @Disconnected: transport has been disconnected
|
|
|
|
* @Hung: transport is connected by wedged
|
|
|
|
*
|
|
|
|
* This enumeration details the various states a transport
|
|
|
|
* instatiation can be in.
|
|
|
|
*/
|
|
|
|
|
|
|
|
enum p9_trans_status {
|
|
|
|
Connected,
|
2010-03-30 03:13:59 +04:00
|
|
|
BeginDisconnect,
|
2008-10-14 03:45:25 +04:00
|
|
|
Disconnected,
|
|
|
|
Hung,
|
|
|
|
};
|
|
|
|
|
2008-10-14 03:45:23 +04:00
|
|
|
/**
|
2011-05-08 22:46:38 +04:00
|
|
|
* enum p9_req_status_t - status of a request
|
2008-10-14 03:45:23 +04:00
|
|
|
* @REQ_STATUS_ALLOC: request has been allocated but not sent
|
2008-10-14 03:45:22 +04:00
|
|
|
* @REQ_STATUS_UNSENT: request waiting to be sent
|
2008-10-14 03:45:23 +04:00
|
|
|
* @REQ_STATUS_SENT: request sent to server
|
|
|
|
* @REQ_STATUS_RCVD: response received from server
|
|
|
|
* @REQ_STATUS_FLSHD: request has been flushed
|
2008-10-14 03:45:22 +04:00
|
|
|
* @REQ_STATUS_ERROR: request encountered an error on the client side
|
2008-10-14 03:45:23 +04:00
|
|
|
*/
|
|
|
|
|
|
|
|
enum p9_req_status_t {
|
|
|
|
REQ_STATUS_ALLOC,
|
2008-10-14 03:45:22 +04:00
|
|
|
REQ_STATUS_UNSENT,
|
2008-10-14 03:45:23 +04:00
|
|
|
REQ_STATUS_SENT,
|
|
|
|
REQ_STATUS_RCVD,
|
|
|
|
REQ_STATUS_FLSHD,
|
|
|
|
REQ_STATUS_ERROR,
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* struct p9_req_t - request slots
|
|
|
|
* @status: status of this request slot
|
|
|
|
* @t_err: transport error
|
|
|
|
* @wq: wait_queue for the client to block on for this request
|
|
|
|
* @tc: the request fcall structure
|
|
|
|
* @rc: the response fcall structure
|
|
|
|
* @aux: transport specific data (provided for trans_fd migration)
|
2008-10-14 03:45:22 +04:00
|
|
|
* @req_list: link for higher level objects to chain requests
|
2008-10-14 03:45:23 +04:00
|
|
|
*/
|
|
|
|
struct p9_req_t {
|
|
|
|
int status;
|
|
|
|
int t_err;
|
2018-08-14 20:43:42 +03:00
|
|
|
struct kref refcount;
|
2018-07-12 00:02:23 +03:00
|
|
|
wait_queue_head_t wq;
|
2018-07-30 08:55:19 +03:00
|
|
|
struct p9_fcall tc;
|
|
|
|
struct p9_fcall rc;
|
2008-10-14 03:45:23 +04:00
|
|
|
void *aux;
|
2008-10-14 03:45:22 +04:00
|
|
|
struct list_head req_list;
|
2008-10-14 03:45:23 +04:00
|
|
|
};
|
|
|
|
|
2008-03-05 16:08:09 +03:00
|
|
|
/**
|
|
|
|
* struct p9_client - per client instance state
|
2018-07-12 00:02:24 +03:00
|
|
|
* @lock: protect @fids and @reqs
|
2008-03-05 16:08:09 +03:00
|
|
|
* @msize: maximum data size negotiated by protocol
|
2010-03-05 21:49:11 +03:00
|
|
|
* @proto_version: 9P protocol version to use
|
2008-03-05 16:08:09 +03:00
|
|
|
* @trans_mod: module API instantiated with this client
|
2018-07-12 00:02:24 +03:00
|
|
|
* @status: connection state
|
2008-03-05 16:08:09 +03:00
|
|
|
* @trans: tranport instance state and API
|
2018-07-12 00:02:22 +03:00
|
|
|
* @fids: All active FID handles
|
2018-07-12 00:02:24 +03:00
|
|
|
* @reqs: All active requests.
|
|
|
|
* @name: node name used as client id
|
2008-03-05 16:08:09 +03:00
|
|
|
*
|
|
|
|
* The client structure is used to keep track of various per-client
|
|
|
|
* state that has been instantiated.
|
|
|
|
*/
|
2007-07-11 02:57:28 +04:00
|
|
|
struct p9_client {
|
2018-07-12 00:02:24 +03:00
|
|
|
spinlock_t lock;
|
2011-08-26 20:57:40 +04:00
|
|
|
unsigned int msize;
|
2010-03-05 21:49:11 +03:00
|
|
|
unsigned char proto_version;
|
2008-02-07 04:25:03 +03:00
|
|
|
struct p9_trans_module *trans_mod;
|
2008-10-14 03:45:25 +04:00
|
|
|
enum p9_trans_status status;
|
|
|
|
void *trans;
|
2018-07-30 09:14:37 +03:00
|
|
|
struct kmem_cache *fcall_cache;
|
2007-07-11 02:57:28 +04:00
|
|
|
|
2017-07-05 18:25:37 +03:00
|
|
|
union {
|
|
|
|
struct {
|
|
|
|
int rfd;
|
|
|
|
int wfd;
|
|
|
|
} fd;
|
|
|
|
struct {
|
|
|
|
u16 port;
|
|
|
|
bool privport;
|
|
|
|
|
|
|
|
} tcp;
|
|
|
|
} trans_opts;
|
|
|
|
|
2018-07-12 00:02:22 +03:00
|
|
|
struct idr fids;
|
2018-07-12 00:02:24 +03:00
|
|
|
struct idr reqs;
|
2013-08-21 21:24:47 +04:00
|
|
|
|
|
|
|
char name[__NEW_UTS_LEN + 1];
|
2007-07-11 02:57:28 +04:00
|
|
|
};
|
|
|
|
|
2008-03-05 16:08:09 +03:00
|
|
|
/**
|
|
|
|
* struct p9_fid - file system entity handle
|
|
|
|
* @clnt: back pointer to instantiating &p9_client
|
|
|
|
* @fid: numeric identifier for this handle
|
|
|
|
* @mode: current mode of this fid (enum?)
|
|
|
|
* @qid: the &p9_qid server identifier this handle points to
|
|
|
|
* @iounit: the server reported maximum transaction size for this file
|
|
|
|
* @uid: the numeric uid of the local user who owns this handle
|
2009-11-02 17:39:28 +03:00
|
|
|
* @rdir: readdir accounting structure (allocated on demand)
|
2008-03-05 16:08:09 +03:00
|
|
|
* @dlist: per-dentry fid tracking
|
|
|
|
*
|
|
|
|
* TODO: This needs lots of explanation.
|
|
|
|
*/
|
|
|
|
|
2007-07-11 02:57:28 +04:00
|
|
|
struct p9_fid {
|
|
|
|
struct p9_client *clnt;
|
|
|
|
u32 fid;
|
|
|
|
int mode;
|
|
|
|
struct p9_qid qid;
|
|
|
|
u32 iounit;
|
2013-01-30 23:48:53 +04:00
|
|
|
kuid_t uid;
|
2007-07-11 02:57:28 +04:00
|
|
|
|
2009-11-02 17:39:28 +03:00
|
|
|
void *rdir;
|
|
|
|
|
2013-02-28 07:51:08 +04:00
|
|
|
struct hlist_node dlist; /* list of all fids attached to a dentry */
|
2007-07-11 02:57:28 +04:00
|
|
|
};
|
|
|
|
|
2010-06-04 17:41:26 +04:00
|
|
|
/**
|
|
|
|
* struct p9_dirent - directory entry structure
|
|
|
|
* @qid: The p9 server qid for this dirent
|
|
|
|
* @d_off: offset to the next dirent
|
|
|
|
* @d_type: type of file
|
|
|
|
* @d_name: file name
|
|
|
|
*/
|
|
|
|
|
|
|
|
struct p9_dirent {
|
|
|
|
struct p9_qid qid;
|
|
|
|
u64 d_off;
|
|
|
|
unsigned char d_type;
|
|
|
|
char d_name[256];
|
|
|
|
};
|
|
|
|
|
2015-04-02 03:17:51 +03:00
|
|
|
struct iov_iter;
|
|
|
|
|
2017-07-05 18:25:37 +03:00
|
|
|
int p9_show_client_options(struct seq_file *m, struct p9_client *clnt);
|
2010-03-25 15:45:30 +03:00
|
|
|
int p9_client_statfs(struct p9_fid *fid, struct p9_rstatfs *sb);
|
2011-06-28 14:11:16 +04:00
|
|
|
int p9_client_rename(struct p9_fid *fid, struct p9_fid *newdirfid,
|
|
|
|
const char *name);
|
|
|
|
int p9_client_renameat(struct p9_fid *olddirfid, const char *old_name,
|
|
|
|
struct p9_fid *newdirfid, const char *new_name);
|
2008-02-07 04:25:03 +03:00
|
|
|
struct p9_client *p9_client_create(const char *dev_name, char *options);
|
2007-07-11 02:57:28 +04:00
|
|
|
void p9_client_destroy(struct p9_client *clnt);
|
|
|
|
void p9_client_disconnect(struct p9_client *clnt);
|
2010-03-30 03:13:59 +04:00
|
|
|
void p9_client_begin_disconnect(struct p9_client *clnt);
|
2007-07-11 02:57:28 +04:00
|
|
|
struct p9_fid *p9_client_attach(struct p9_client *clnt, struct p9_fid *afid,
|
2017-01-12 12:01:17 +03:00
|
|
|
const char *uname, kuid_t n_uname, const char *aname);
|
2011-03-31 14:19:39 +04:00
|
|
|
struct p9_fid *p9_client_walk(struct p9_fid *oldfid, uint16_t nwname,
|
2017-01-12 12:01:17 +03:00
|
|
|
const unsigned char * const *wnames, int clone);
|
2007-07-11 02:57:28 +04:00
|
|
|
int p9_client_open(struct p9_fid *fid, int mode);
|
2017-01-12 12:01:17 +03:00
|
|
|
int p9_client_fcreate(struct p9_fid *fid, const char *name, u32 perm, int mode,
|
2007-07-11 02:57:28 +04:00
|
|
|
char *extension);
|
2017-01-12 12:01:17 +03:00
|
|
|
int p9_client_link(struct p9_fid *fid, struct p9_fid *oldfid, const char *newname);
|
|
|
|
int p9_client_symlink(struct p9_fid *fid, const char *name, const char *symname,
|
|
|
|
kgid_t gid, struct p9_qid *qid);
|
|
|
|
int p9_client_create_dotl(struct p9_fid *ofid, const char *name, u32 flags, u32 mode,
|
2013-01-30 04:09:41 +04:00
|
|
|
kgid_t gid, struct p9_qid *qid);
|
2007-07-11 02:57:28 +04:00
|
|
|
int p9_client_clunk(struct p9_fid *fid);
|
2010-10-22 21:13:12 +04:00
|
|
|
int p9_client_fsync(struct p9_fid *fid, int datasync);
|
2007-07-11 02:57:28 +04:00
|
|
|
int p9_client_remove(struct p9_fid *fid);
|
2011-06-28 14:11:18 +04:00
|
|
|
int p9_client_unlinkat(struct p9_fid *dfid, const char *name, int flags);
|
2015-04-02 06:42:28 +03:00
|
|
|
int p9_client_read(struct p9_fid *fid, u64 offset, struct iov_iter *to, int *err);
|
2015-04-02 03:17:51 +03:00
|
|
|
int p9_client_write(struct p9_fid *fid, u64 offset, struct iov_iter *from, int *err);
|
2010-06-04 17:41:26 +04:00
|
|
|
int p9_client_readdir(struct p9_fid *fid, char *data, u32 count, u64 offset);
|
2011-08-06 23:16:59 +04:00
|
|
|
int p9dirent_read(struct p9_client *clnt, char *buf, int len,
|
|
|
|
struct p9_dirent *dirent);
|
2008-10-16 17:30:07 +04:00
|
|
|
struct p9_wstat *p9_client_stat(struct p9_fid *fid);
|
2007-07-11 02:57:28 +04:00
|
|
|
int p9_client_wstat(struct p9_fid *fid, struct p9_wstat *wst);
|
9p: Implement client side of setattr for 9P2000.L protocol.
SYNOPSIS
size[4] Tsetattr tag[2] attr[n]
size[4] Rsetattr tag[2]
DESCRIPTION
The setattr command changes some of the file status information.
attr resembles the iattr structure used in Linux kernel. It
specifies which status parameter is to be changed and to what
value. It is laid out as follows:
valid[4]
specifies which status information is to be changed. Possible
values are:
ATTR_MODE (1 << 0)
ATTR_UID (1 << 1)
ATTR_GID (1 << 2)
ATTR_SIZE (1 << 3)
ATTR_ATIME (1 << 4)
ATTR_MTIME (1 << 5)
ATTR_ATIME_SET (1 << 7)
ATTR_MTIME_SET (1 << 8)
The last two bits represent whether the time information
is being sent by the client's user space. In the absense
of these bits the server always uses server's time.
mode[4]
File permission bits
uid[4]
Owner id of file
gid[4]
Group id of the file
size[8]
File size
atime_sec[8]
Time of last file access, seconds
atime_nsec[8]
Time of last file access, nanoseconds
mtime_sec[8]
Time of last file modification, seconds
mtime_nsec[8]
Time of last file modification, nanoseconds
Explanation of the patches:
--------------------------
*) The kernel just copies relevent contents of iattr structure to
p9_iattr_dotl structure and passes it down to the client. The
only check it has is calling inode_change_ok()
*) The p9_iattr_dotl structure does not have ctime and ia_file
parameters because I don't think these are needed in our case.
The client user space can request updating just ctime by calling
chown(fd, -1, -1). This is handled on server side without a need
for putting ctime on the wire.
*) The server currently supports changing mode, time, ownership and
size of the file.
*) 9P RFC says "Either all the changes in wstat request happen, or
none of them does: if the request succeeds, all changes were made;
if it fails, none were."
I have not done anything to implement this specifically because I
don't see a reason.
Signed-off-by: Sripathi Kodi <sripathik@in.ibm.com>
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
2010-06-18 10:20:10 +04:00
|
|
|
int p9_client_setattr(struct p9_fid *fid, struct p9_iattr_dotl *attr);
|
2007-07-11 02:57:28 +04:00
|
|
|
|
9p: getattr client implementation for 9P2000.L protocol.
SYNOPSIS
size[4] Tgetattr tag[2] fid[4] request_mask[8]
size[4] Rgetattr tag[2] lstat[n]
DESCRIPTION
The getattr transaction inquires about the file identified by fid.
request_mask is a bit mask that specifies which fields of the
stat structure is the client interested in.
The reply will contain a machine-independent directory entry,
laid out as follows:
st_result_mask[8]
Bit mask that indicates which fields in the stat structure
have been populated by the server
qid.type[1]
the type of the file (directory, etc.), represented as a bit
vector corresponding to the high 8 bits of the file's mode
word.
qid.vers[4]
version number for given path
qid.path[8]
the file server's unique identification for the file
st_mode[4]
Permission and flags
st_uid[4]
User id of owner
st_gid[4]
Group ID of owner
st_nlink[8]
Number of hard links
st_rdev[8]
Device ID (if special file)
st_size[8]
Size, in bytes
st_blksize[8]
Block size for file system IO
st_blocks[8]
Number of file system blocks allocated
st_atime_sec[8]
Time of last access, seconds
st_atime_nsec[8]
Time of last access, nanoseconds
st_mtime_sec[8]
Time of last modification, seconds
st_mtime_nsec[8]
Time of last modification, nanoseconds
st_ctime_sec[8]
Time of last status change, seconds
st_ctime_nsec[8]
Time of last status change, nanoseconds
st_btime_sec[8]
Time of creation (birth) of file, seconds
st_btime_nsec[8]
Time of creation (birth) of file, nanoseconds
st_gen[8]
Inode generation
st_data_version[8]
Data version number
request_mask and result_mask bit masks contain the following bits
#define P9_STATS_MODE 0x00000001ULL
#define P9_STATS_NLINK 0x00000002ULL
#define P9_STATS_UID 0x00000004ULL
#define P9_STATS_GID 0x00000008ULL
#define P9_STATS_RDEV 0x00000010ULL
#define P9_STATS_ATIME 0x00000020ULL
#define P9_STATS_MTIME 0x00000040ULL
#define P9_STATS_CTIME 0x00000080ULL
#define P9_STATS_INO 0x00000100ULL
#define P9_STATS_SIZE 0x00000200ULL
#define P9_STATS_BLOCKS 0x00000400ULL
#define P9_STATS_BTIME 0x00000800ULL
#define P9_STATS_GEN 0x00001000ULL
#define P9_STATS_DATA_VERSION 0x00002000ULL
#define P9_STATS_BASIC 0x000007ffULL
#define P9_STATS_ALL 0x00003fffULL
This patch implements the client side of getattr implementation for
9P2000.L. It introduces a new structure p9_stat_dotl for getting
Linux stat information along with QID. The data layout is similar to
stat structure in Linux user space with the following major
differences:
inode (st_ino) is not part of data. Instead qid is.
device (st_dev) is not part of data because this doesn't make sense
on the client.
All time variables are 64 bit wide on the wire. The kernel seems to use
32 bit variables for these variables. However, some of the architectures
have used 64 bit variables and glibc exposes 64 bit variables to user
space on some architectures. Hence to be on the safer side we have made
these 64 bit in the protocol. Refer to the comments in
include/asm-generic/stat.h
There are some additional fields: st_btime_sec, st_btime_nsec, st_gen,
st_data_version apart from the bitmask, st_result_mask. The bit mask
is filled by the server to indicate which stat fields have been
populated by the server. Currently there is no clean way for the
server to obtain these additional fields, so it sends back just the
basic fields.
Signed-off-by: Sripathi Kodi <sripathik@in.ibm.com>
Signed-off-by: Eric Van Hensbegren <ericvh@gmail.com>
2010-07-12 18:37:23 +04:00
|
|
|
struct p9_stat_dotl *p9_client_getattr_dotl(struct p9_fid *fid,
|
|
|
|
u64 request_mask);
|
|
|
|
|
2017-01-12 12:01:17 +03:00
|
|
|
int p9_client_mknod_dotl(struct p9_fid *oldfid, const char *name, int mode,
|
2013-01-30 04:09:41 +04:00
|
|
|
dev_t rdev, kgid_t gid, struct p9_qid *);
|
2017-01-12 12:01:17 +03:00
|
|
|
int p9_client_mkdir_dotl(struct p9_fid *fid, const char *name, int mode,
|
2013-01-30 04:09:41 +04:00
|
|
|
kgid_t gid, struct p9_qid *);
|
9p: Implement TLOCK
Synopsis
size[4] TLock tag[2] fid[4] flock[n]
size[4] RLock tag[2] status[1]
Description
Tlock is used to acquire/release byte range posix locks on a file
identified by given fid. The reply contains status of the lock request
flock structure:
type[1] - Type of lock: F_RDLCK, F_WRLCK, F_UNLCK
flags[4] - Flags could be either of
P9_LOCK_FLAGS_BLOCK - Blocked lock request, if there is a
conflicting lock exists, wait for that lock to be released.
P9_LOCK_FLAGS_RECLAIM - Reclaim lock request, used when client is
trying to reclaim a lock after a server restrart (due to crash)
start[8] - Starting offset for lock
length[8] - Number of bytes to lock
If length is 0, lock all bytes starting at the location 'start'
through to the end of file
pid[4] - PID of the process that wants to take lock
client_id[4] - Unique client id
status[1] - Status of the lock request, can be
P9_LOCK_SUCCESS(0), P9_LOCK_BLOCKED(1), P9_LOCK_ERROR(2) or
P9_LOCK_GRACE(3)
P9_LOCK_SUCCESS - Request was successful
P9_LOCK_BLOCKED - A conflicting lock is held by another process
P9_LOCK_ERROR - Error while processing the lock request
P9_LOCK_GRACE - Server is in grace period, it can't accept new lock
requests in this period (except locks with
P9_LOCK_FLAGS_RECLAIM flag set)
Signed-off-by: M. Mohan Kumar <mohan@in.ibm.com>
Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com>
Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
2010-09-27 10:04:24 +04:00
|
|
|
int p9_client_lock_dotl(struct p9_fid *fid, struct p9_flock *flock, u8 *status);
|
2010-09-27 10:52:13 +04:00
|
|
|
int p9_client_getlock_dotl(struct p9_fid *fid, struct p9_getlock *fl);
|
2018-07-30 08:55:19 +03:00
|
|
|
void p9_fcall_fini(struct p9_fcall *fc);
|
2008-10-14 03:45:23 +04:00
|
|
|
struct p9_req_t *p9_tag_lookup(struct p9_client *, u16);
|
2018-08-14 20:43:42 +03:00
|
|
|
|
|
|
|
static inline void p9_req_get(struct p9_req_t *r)
|
|
|
|
{
|
|
|
|
kref_get(&r->refcount);
|
|
|
|
}
|
|
|
|
|
|
|
|
static inline int p9_req_try_get(struct p9_req_t *r)
|
|
|
|
{
|
|
|
|
return kref_get_unless_zero(&r->refcount);
|
|
|
|
}
|
|
|
|
|
|
|
|
int p9_req_put(struct p9_req_t *r);
|
|
|
|
|
2014-01-17 21:31:00 +04:00
|
|
|
void p9_client_cb(struct p9_client *c, struct p9_req_t *req, int status);
|
2008-10-14 03:45:23 +04:00
|
|
|
|
2008-10-23 03:47:39 +04:00
|
|
|
int p9_parse_header(struct p9_fcall *, int32_t *, int8_t *, int16_t *, int);
|
2011-08-06 23:16:59 +04:00
|
|
|
int p9stat_read(struct p9_client *, char *, int, struct p9_wstat *);
|
2008-10-16 17:30:07 +04:00
|
|
|
void p9stat_free(struct p9_wstat *);
|
|
|
|
|
2010-03-05 21:50:14 +03:00
|
|
|
int p9_is_proto_dotu(struct p9_client *clnt);
|
|
|
|
int p9_is_proto_dotl(struct p9_client *clnt);
|
2010-05-31 11:52:45 +04:00
|
|
|
struct p9_fid *p9_client_xattrwalk(struct p9_fid *, const char *, u64 *);
|
2010-05-31 11:52:50 +04:00
|
|
|
int p9_client_xattrcreate(struct p9_fid *, const char *, u64, int);
|
2010-09-28 18:29:25 +04:00
|
|
|
int p9_client_readlink(struct p9_fid *fid, char **target);
|
2008-10-16 17:29:30 +04:00
|
|
|
|
2018-07-12 00:02:24 +03:00
|
|
|
int p9_client_init(void);
|
|
|
|
void p9_client_exit(void);
|
|
|
|
|
2007-07-11 02:57:28 +04:00
|
|
|
#endif /* NET_9P_CLIENT_H */
|