diff options
author | Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> | 2010-05-31 03:52:50 -0400 |
---|---|---|
committer | Eric Van Hensbergen <ericvh@gmail.com> | 2010-08-02 15:28:34 -0400 |
commit | eda25e46161527845572131b37706a458d9270ef (patch) | |
tree | b8a68c9185f7f53a135422a41dc68ef2c5f527ee /include/net/9p | |
parent | 0ef63f345c48afe5896c5cffcba57f0457d409b9 (diff) |
net/9p: Implement TXATTRCREATE 9p call
TXATTRCREATE: Prepare a fid for setting xattr value on a file system object.
size[4] TXATTRCREATE tag[2] fid[4] name[s] attr_size[8] flags[4]
size[4] RXATTRCREATE tag[2]
txattrcreate gets a fid pointing to xattr. This fid can later be
used to set the xattr value.
flag value is derived from set Linux setxattr. The manpage says
"The flags parameter can be used to refine the semantics of the operation.
XATTR_CREATE specifies a pure create, which fails if the named attribute
exists already. XATTR_REPLACE specifies a pure replace operation, which
fails if the named attribute does not already exist. By default (no flags),
the extended attribute will be created if need be, or will simply replace
the value if the attribute exists."
The actual setxattr operation happens when the fid is clunked. At that point
the written byte count and the attr_size specified in TXATTRCREATE should be
same otherwise an error will be returned.
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>
Diffstat (limited to 'include/net/9p')
-rw-r--r-- | include/net/9p/9p.h | 2 | ||||
-rw-r--r-- | include/net/9p/client.h | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/include/net/9p/9p.h b/include/net/9p/9p.h index 6fabb5e559ba..a8de812ccbc8 100644 --- a/include/net/9p/9p.h +++ b/include/net/9p/9p.h | |||
@@ -155,6 +155,8 @@ enum p9_msg_t { | |||
155 | P9_RSETATTR, | 155 | P9_RSETATTR, |
156 | P9_TXATTRWALK = 30, | 156 | P9_TXATTRWALK = 30, |
157 | P9_RXATTRWALK, | 157 | P9_RXATTRWALK, |
158 | P9_TXATTRCREATE = 32, | ||
159 | P9_RXATTRCREATE, | ||
158 | P9_TREADDIR = 40, | 160 | P9_TREADDIR = 40, |
159 | P9_RREADDIR, | 161 | P9_RREADDIR, |
160 | P9_TLINK = 70, | 162 | P9_TLINK = 70, |
diff --git a/include/net/9p/client.h b/include/net/9p/client.h index 60398b1a3f75..d1aa2cfb30f0 100644 --- a/include/net/9p/client.h +++ b/include/net/9p/client.h | |||
@@ -261,5 +261,6 @@ void p9stat_free(struct p9_wstat *); | |||
261 | int p9_is_proto_dotu(struct p9_client *clnt); | 261 | int p9_is_proto_dotu(struct p9_client *clnt); |
262 | int p9_is_proto_dotl(struct p9_client *clnt); | 262 | int p9_is_proto_dotl(struct p9_client *clnt); |
263 | struct p9_fid *p9_client_xattrwalk(struct p9_fid *, const char *, u64 *); | 263 | struct p9_fid *p9_client_xattrwalk(struct p9_fid *, const char *, u64 *); |
264 | int p9_client_xattrcreate(struct p9_fid *, const char *, u64, int); | ||
264 | 265 | ||
265 | #endif /* NET_9P_CLIENT_H */ | 266 | #endif /* NET_9P_CLIENT_H */ |