aboutsummaryrefslogtreecommitdiffstats
path: root/fs/afs/internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/afs/internal.h')
-rw-r--r--fs/afs/internal.h23
1 files changed, 13 insertions, 10 deletions
diff --git a/fs/afs/internal.h b/fs/afs/internal.h
index 5dfa56903a2d..a6901360fb81 100644
--- a/fs/afs/internal.h
+++ b/fs/afs/internal.h
@@ -11,6 +11,7 @@
11 11
12#include <linux/compiler.h> 12#include <linux/compiler.h>
13#include <linux/kernel.h> 13#include <linux/kernel.h>
14#include <linux/ktime.h>
14#include <linux/fs.h> 15#include <linux/fs.h>
15#include <linux/pagemap.h> 16#include <linux/pagemap.h>
16#include <linux/rxrpc.h> 17#include <linux/rxrpc.h>
@@ -90,7 +91,10 @@ struct afs_call {
90 unsigned request_size; /* size of request data */ 91 unsigned request_size; /* size of request data */
91 unsigned reply_max; /* maximum size of reply */ 92 unsigned reply_max; /* maximum size of reply */
92 unsigned first_offset; /* offset into mapping[first] */ 93 unsigned first_offset; /* offset into mapping[first] */
93 unsigned last_to; /* amount of mapping[last] */ 94 union {
95 unsigned last_to; /* amount of mapping[last] */
96 unsigned count2; /* count used in unmarshalling */
97 };
94 unsigned char unmarshall; /* unmarshalling phase */ 98 unsigned char unmarshall; /* unmarshalling phase */
95 bool incoming; /* T if incoming call */ 99 bool incoming; /* T if incoming call */
96 bool send_pages; /* T if data from mapping should be sent */ 100 bool send_pages; /* T if data from mapping should be sent */
@@ -127,12 +131,11 @@ struct afs_call_type {
127 */ 131 */
128struct afs_read { 132struct afs_read {
129 loff_t pos; /* Where to start reading */ 133 loff_t pos; /* Where to start reading */
130 loff_t len; /* How much to read */ 134 loff_t len; /* How much we're asking for */
131 loff_t actual_len; /* How much we're actually getting */ 135 loff_t actual_len; /* How much we're actually getting */
136 loff_t remain; /* Amount remaining */
132 atomic_t usage; 137 atomic_t usage;
133 unsigned int remain; /* Amount remaining */
134 unsigned int index; /* Which page we're reading into */ 138 unsigned int index; /* Which page we're reading into */
135 unsigned int pg_offset; /* Offset in page we're at */
136 unsigned int nr_pages; 139 unsigned int nr_pages;
137 void (*page_done)(struct afs_call *, struct afs_read *); 140 void (*page_done)(struct afs_call *, struct afs_read *);
138 struct page *pages[]; 141 struct page *pages[];
@@ -247,7 +250,7 @@ struct afs_cache_vhash {
247 */ 250 */
248struct afs_vlocation { 251struct afs_vlocation {
249 atomic_t usage; 252 atomic_t usage;
250 time_t time_of_death; /* time at which put reduced usage to 0 */ 253 time64_t time_of_death; /* time at which put reduced usage to 0 */
251 struct list_head link; /* link in cell volume location list */ 254 struct list_head link; /* link in cell volume location list */
252 struct list_head grave; /* link in master graveyard list */ 255 struct list_head grave; /* link in master graveyard list */
253 struct list_head update; /* link in master update list */ 256 struct list_head update; /* link in master update list */
@@ -258,7 +261,7 @@ struct afs_vlocation {
258 struct afs_cache_vlocation vldb; /* volume information DB record */ 261 struct afs_cache_vlocation vldb; /* volume information DB record */
259 struct afs_volume *vols[3]; /* volume access record pointer (index by type) */ 262 struct afs_volume *vols[3]; /* volume access record pointer (index by type) */
260 wait_queue_head_t waitq; /* status change waitqueue */ 263 wait_queue_head_t waitq; /* status change waitqueue */
261 time_t update_at; /* time at which record should be updated */ 264 time64_t update_at; /* time at which record should be updated */
262 spinlock_t lock; /* access lock */ 265 spinlock_t lock; /* access lock */
263 afs_vlocation_state_t state; /* volume location state */ 266 afs_vlocation_state_t state; /* volume location state */
264 unsigned short upd_rej_cnt; /* ENOMEDIUM count during update */ 267 unsigned short upd_rej_cnt; /* ENOMEDIUM count during update */
@@ -271,7 +274,7 @@ struct afs_vlocation {
271 */ 274 */
272struct afs_server { 275struct afs_server {
273 atomic_t usage; 276 atomic_t usage;
274 time_t time_of_death; /* time at which put reduced usage to 0 */ 277 time64_t time_of_death; /* time at which put reduced usage to 0 */
275 struct in_addr addr; /* server address */ 278 struct in_addr addr; /* server address */
276 struct afs_cell *cell; /* cell in which server resides */ 279 struct afs_cell *cell; /* cell in which server resides */
277 struct list_head link; /* link in cell's server list */ 280 struct list_head link; /* link in cell's server list */
@@ -374,8 +377,8 @@ struct afs_vnode {
374 struct rb_node server_rb; /* link in server->fs_vnodes */ 377 struct rb_node server_rb; /* link in server->fs_vnodes */
375 struct rb_node cb_promise; /* link in server->cb_promises */ 378 struct rb_node cb_promise; /* link in server->cb_promises */
376 struct work_struct cb_broken_work; /* work to be done on callback break */ 379 struct work_struct cb_broken_work; /* work to be done on callback break */
377 time_t cb_expires; /* time at which callback expires */ 380 time64_t cb_expires; /* time at which callback expires */
378 time_t cb_expires_at; /* time used to order cb_promise */ 381 time64_t cb_expires_at; /* time used to order cb_promise */
379 unsigned cb_version; /* callback version */ 382 unsigned cb_version; /* callback version */
380 unsigned cb_expiry; /* callback expiry time */ 383 unsigned cb_expiry; /* callback expiry time */
381 afs_callback_type_t cb_type; /* type of callback */ 384 afs_callback_type_t cb_type; /* type of callback */
@@ -557,7 +560,6 @@ extern const struct inode_operations afs_autocell_inode_operations;
557extern const struct file_operations afs_mntpt_file_operations; 560extern const struct file_operations afs_mntpt_file_operations;
558 561
559extern struct vfsmount *afs_d_automount(struct path *); 562extern struct vfsmount *afs_d_automount(struct path *);
560extern int afs_mntpt_check_symlink(struct afs_vnode *, struct key *);
561extern void afs_mntpt_kill_timer(void); 563extern void afs_mntpt_kill_timer(void);
562 564
563/* 565/*
@@ -718,6 +720,7 @@ extern int afs_writepages(struct address_space *, struct writeback_control *);
718extern void afs_pages_written_back(struct afs_vnode *, struct afs_call *); 720extern void afs_pages_written_back(struct afs_vnode *, struct afs_call *);
719extern ssize_t afs_file_write(struct kiocb *, struct iov_iter *); 721extern ssize_t afs_file_write(struct kiocb *, struct iov_iter *);
720extern int afs_writeback_all(struct afs_vnode *); 722extern int afs_writeback_all(struct afs_vnode *);
723extern int afs_flush(struct file *, fl_owner_t);
721extern int afs_fsync(struct file *, loff_t, loff_t, int); 724extern int afs_fsync(struct file *, loff_t, loff_t, int);
722 725
723 726