Commit e95fc4a0 authored by Trond Myklebust's avatar Trond Myklebust

NFSv4.2: llseek(SEEK_HOLE) and llseek(SEEK_DATA) don't require data sync

We want to ensure that we write the cached data to the server, but
don't require it be synced to disk. If the server reboots, we will
get a stateid error, which will cause us to retry anyway.
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
parent 837bb1d7
...@@ -269,7 +269,11 @@ static loff_t _nfs42_proc_llseek(struct file *filep, ...@@ -269,7 +269,11 @@ static loff_t _nfs42_proc_llseek(struct file *filep,
if (status) if (status)
return status; return status;
nfs_wb_all(inode); status = nfs_filemap_write_and_wait_range(inode->i_mapping,
offset, LLONG_MAX);
if (status)
return status;
status = nfs4_call_sync(server->client, server, &msg, status = nfs4_call_sync(server->client, server, &msg,
&args.seq_args, &res.seq_res, 0); &args.seq_args, &res.seq_res, 0);
if (status == -ENOTSUPP) if (status == -ENOTSUPP)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment