diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-05-08 05:51:58 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-05-08 05:51:58 +0200 |
commit | e5fef2a9732580c5bd30c0097f5e9091a3d58ce5 (patch) | |
tree | cb91b5a51f7e451300e06e203a50cbed8aabbc1c /fs/afs/vlclient.c | |
parent | Merge branch 'work.misc' of git://git.kernel.org/pub/scm/linux/kernel/git/vir... (diff) | |
parent | afs: Implement YFS ACL setting (diff) | |
download | linux-e5fef2a9732580c5bd30c0097f5e9091a3d58ce5.tar.xz linux-e5fef2a9732580c5bd30c0097f5e9091a3d58ce5.zip |
Merge tag 'afs-next-20190507' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs
Pull AFS updates from David Howells:
"A set of fix and development patches for AFS for 5.2.
Summary:
- Fix the AFS file locking so that sqlite can run on an AFS mount and
also so that firefox and gnome can use a homedir that's mounted
through AFS.
This required emulation of fine-grained locking when the server
will only support whole-file locks and no upgrade/downgrade. Four
modes are provided, settable by mount parameter:
"flock=local" - No reference to the server
"flock=openafs" - Fine-grained locks are local-only, whole-file
locks require sufficient server locks
"flock=strict" - All locks require sufficient server locks
"flock=write" - Always get an exclusive server lock
If the volume is a read-only or backup volume, then flock=local for
that volume.
- Log extra information for a couple of cases where the client mucks
up somehow: AFS vnode with undefined type and dir check failure -
in both cases we seem to end up with unfilled data, but the issues
happen infrequently and are difficult to reproduce at will.
- Implement silly rename for unlink() and rename().
- Set i_blocks so that du can get some information about usage.
- Fix xattr handlers to return the right amount of data and to not
overflow buffers.
- Implement getting/setting raw AFS and YFS ACLs as xattrs"
* tag 'afs-next-20190507' of git://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs:
afs: Implement YFS ACL setting
afs: Get YFS ACLs and information through xattrs
afs: implement acl setting
afs: Get an AFS3 ACL as an xattr
afs: Fix getting the afs.fid xattr
afs: Fix the afs.cell and afs.volume xattr handlers
afs: Calculate i_blocks based on file size
afs: Log more information for "kAFS: AFS vnode with undefined type\n"
afs: Provide mount-time configurable byte-range file locking emulation
afs: Add more tracepoints
afs: Implement sillyrename for unlink and rename
afs: Add directory reload tracepoint
afs: Handle lock rpc ops failing on a file that got deleted
afs: Improve dir check failure reports
afs: Add file locking tracepoints
afs: Further fix file locking
afs: Fix AFS file locking to allow fine grained locks
afs: Calculate lock extend timer from set/extend reply reception
afs: Split wait from afs_make_call()
Diffstat (limited to 'fs/afs/vlclient.c')
-rw-r--r-- | fs/afs/vlclient.c | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/fs/afs/vlclient.c b/fs/afs/vlclient.c index b0175b3ef0e8..dd9ba4e96fb3 100644 --- a/fs/afs/vlclient.c +++ b/fs/afs/vlclient.c @@ -167,7 +167,8 @@ struct afs_vldb_entry *afs_vl_get_entry_by_name_u(struct afs_vl_cursor *vc, memset((void *)bp + volnamesz, 0, padsz); trace_afs_make_vl_call(call); - return (struct afs_vldb_entry *)afs_make_call(&vc->ac, call, GFP_KERNEL, false); + afs_make_call(&vc->ac, call, GFP_KERNEL); + return (struct afs_vldb_entry *)afs_wait_for_call_to_complete(call, &vc->ac); } /* @@ -306,7 +307,8 @@ struct afs_addr_list *afs_vl_get_addrs_u(struct afs_vl_cursor *vc, r->uuid.node[i] = htonl(u->node[i]); trace_afs_make_vl_call(call); - return (struct afs_addr_list *)afs_make_call(&vc->ac, call, GFP_KERNEL, false); + afs_make_call(&vc->ac, call, GFP_KERNEL); + return (struct afs_addr_list *)afs_wait_for_call_to_complete(call, &vc->ac); } /* @@ -380,12 +382,11 @@ static const struct afs_call_type afs_RXVLGetCapabilities = { * We use this to probe for service upgrade to determine what the server at the * other end supports. */ -int afs_vl_get_capabilities(struct afs_net *net, - struct afs_addr_cursor *ac, - struct key *key, - struct afs_vlserver *server, - unsigned int server_index, - bool async) +struct afs_call *afs_vl_get_capabilities(struct afs_net *net, + struct afs_addr_cursor *ac, + struct key *key, + struct afs_vlserver *server, + unsigned int server_index) { struct afs_call *call; __be32 *bp; @@ -394,13 +395,14 @@ int afs_vl_get_capabilities(struct afs_net *net, call = afs_alloc_flat_call(net, &afs_RXVLGetCapabilities, 1 * 4, 16 * 4); if (!call) - return -ENOMEM; + return ERR_PTR(-ENOMEM); call->key = key; call->reply[0] = afs_get_vlserver(server); call->reply[1] = (void *)(long)server_index; call->upgrade = true; call->want_reply_time = true; + call->async = true; /* marshall the parameters */ bp = call->request; @@ -408,7 +410,8 @@ int afs_vl_get_capabilities(struct afs_net *net, /* Can't take a ref on server */ trace_afs_make_vl_call(call); - return afs_make_call(ac, call, GFP_KERNEL, async); + afs_make_call(ac, call, GFP_KERNEL); + return call; } /* @@ -651,5 +654,6 @@ struct afs_addr_list *afs_yfsvl_get_endpoints(struct afs_vl_cursor *vc, memcpy(bp, uuid, sizeof(*uuid)); /* Type opr_uuid */ trace_afs_make_vl_call(call); - return (struct afs_addr_list *)afs_make_call(&vc->ac, call, GFP_KERNEL, false); + afs_make_call(&vc->ac, call, GFP_KERNEL); + return (struct afs_addr_list *)afs_wait_for_call_to_complete(call, &vc->ac); } |