aboutsummaryrefslogtreecommitdiffstats
path: root/net/9p/client.c
diff options
context:
space:
mode:
authorVenkateswararao Jujjuri (JV) <jvrao@linux.vnet.ibm.com>2010-10-22 13:13:12 -0400
committerEric Van Hensbergen <ericvh@gmail.com>2010-10-28 10:08:49 -0400
commitb165d60145b717261a0234f989c442c2b68b6ec0 (patch)
tree024f9f2c71ff85a806ed47cbbf451edeaa7111a5 /net/9p/client.c
parent7b3bb3fe166702b504f1068359c9550d3b277eaf (diff)
9p: Add datasync to client side TFSYNC/RFSYNC for dotl
SYNOPSIS size[4] Tfsync tag[2] fid[4] datasync[4] size[4] Rfsync tag[2] DESCRIPTION The Tfsync transaction transfers ("flushes") all modified in-core data of file identified by fid to the disk device (or other permanent storage device) where that file resides. If datasync flag is specified data will be fleshed but does not flush modified metadata unless that metadata is needed in order to allow a subsequent data retrieval to be correctly handled. Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com> Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
Diffstat (limited to 'net/9p/client.c')
-rw-r--r--net/9p/client.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/net/9p/client.c b/net/9p/client.c
index e3cfdff3732..8df80fb86f2 100644
--- a/net/9p/client.c
+++ b/net/9p/client.c
@@ -1165,17 +1165,18 @@ int p9_client_link(struct p9_fid *dfid, struct p9_fid *oldfid, char *newname)
1165} 1165}
1166EXPORT_SYMBOL(p9_client_link); 1166EXPORT_SYMBOL(p9_client_link);
1167 1167
1168int p9_client_fsync(struct p9_fid *fid) 1168int p9_client_fsync(struct p9_fid *fid, int datasync)
1169{ 1169{
1170 int err; 1170 int err;
1171 struct p9_client *clnt; 1171 struct p9_client *clnt;
1172 struct p9_req_t *req; 1172 struct p9_req_t *req;
1173 1173
1174 P9_DPRINTK(P9_DEBUG_9P, ">>> TFSYNC fid %d\n", fid->fid); 1174 P9_DPRINTK(P9_DEBUG_9P, ">>> TFSYNC fid %d datasync:%d\n",
1175 fid->fid, datasync);
1175 err = 0; 1176 err = 0;
1176 clnt = fid->clnt; 1177 clnt = fid->clnt;
1177 1178
1178 req = p9_client_rpc(clnt, P9_TFSYNC, "d", fid->fid); 1179 req = p9_client_rpc(clnt, P9_TFSYNC, "dd", fid->fid, datasync);
1179 if (IS_ERR(req)) { 1180 if (IS_ERR(req)) {
1180 err = PTR_ERR(req); 1181 err = PTR_ERR(req);
1181 goto error; 1182 goto error;