diff options
author | David Howells <dhowells@redhat.com> | 2019-05-09 17:17:05 +0200 |
---|---|---|
committer | David Howells <dhowells@redhat.com> | 2019-05-16 17:25:21 +0200 |
commit | 87182759cd6f94875d6aaaac74eaa52aa6aa6f98 (patch) | |
tree | 3a143ae4a411fd26b1d98bffff3f66770e027901 /fs/afs/afs.h | |
parent | afs: Get rid of afs_call::reply[] (diff) | |
download | linux-87182759cd6f94875d6aaaac74eaa52aa6aa6f98.tar.xz linux-87182759cd6f94875d6aaaac74eaa52aa6aa6f98.zip |
afs: Fix order-1 allocation in afs_do_lookup()
afs_do_lookup() will do an order-1 allocation to allocate status records if
there are more than 39 vnodes to stat.
Fix this by allocating an array of {status,callback} records for each vnode
we want to examine using vmalloc() if larger than a page.
This not only gets rid of the order-1 allocation, but makes it easier to
grow beyond 50 records for YFS servers. It also allows us to move to
{status,callback} tuples for other calls too and makes it easier to lock
across the application of the status and the callback to the vnode.
Fixes: 5cf9dd55a0ec ("afs: Prospectively look up extra files when doing a single lookup")
Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'fs/afs/afs.h')
-rw-r--r-- | fs/afs/afs.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/afs/afs.h b/fs/afs/afs.h index 74913c707bba..8fa0dffff1cc 100644 --- a/fs/afs/afs.h +++ b/fs/afs/afs.h @@ -147,6 +147,12 @@ struct afs_file_status { u32 abort_code; /* Abort if bulk-fetching this failed */ }; +struct afs_status_cb { + struct afs_file_status status; + struct afs_callback callback; + bool have_cb; /* True if cb record was retrieved */ +}; + /* * AFS file status change request */ |