aboutsummaryrefslogtreecommitdiffstats
path: root/fs/cifs/cifsproto.h
diff options
context:
space:
mode:
Diffstat (limited to 'fs/cifs/cifsproto.h')
-rw-r--r--fs/cifs/cifsproto.h20
1 files changed, 13 insertions, 7 deletions
diff --git a/fs/cifs/cifsproto.h b/fs/cifs/cifsproto.h
index 503e73d8bdb..96192c1e380 100644
--- a/fs/cifs/cifsproto.h
+++ b/fs/cifs/cifsproto.h
@@ -77,7 +77,7 @@ extern int SendReceive(const unsigned int /* xid */ , struct cifs_ses *,
77 struct smb_hdr * /* out */ , 77 struct smb_hdr * /* out */ ,
78 int * /* bytes returned */ , const int long_op); 78 int * /* bytes returned */ , const int long_op);
79extern int SendReceiveNoRsp(const unsigned int xid, struct cifs_ses *ses, 79extern int SendReceiveNoRsp(const unsigned int xid, struct cifs_ses *ses,
80 struct smb_hdr *in_buf, int flags); 80 char *in_buf, int flags);
81extern int cifs_check_receive(struct mid_q_entry *mid, 81extern int cifs_check_receive(struct mid_q_entry *mid,
82 struct TCP_Server_Info *server, bool log_error); 82 struct TCP_Server_Info *server, bool log_error);
83extern int SendReceive2(const unsigned int /* xid */ , struct cifs_ses *, 83extern int SendReceive2(const unsigned int /* xid */ , struct cifs_ses *,
@@ -91,9 +91,8 @@ extern int SendReceiveBlockingLock(const unsigned int xid,
91extern void cifs_add_credits(struct TCP_Server_Info *server, 91extern void cifs_add_credits(struct TCP_Server_Info *server,
92 const unsigned int add); 92 const unsigned int add);
93extern void cifs_set_credits(struct TCP_Server_Info *server, const int val); 93extern void cifs_set_credits(struct TCP_Server_Info *server, const int val);
94extern int checkSMB(struct smb_hdr *smb, __u16 mid, unsigned int length); 94extern int checkSMB(char *buf, unsigned int length);
95extern bool is_valid_oplock_break(struct smb_hdr *smb, 95extern bool is_valid_oplock_break(char *, struct TCP_Server_Info *);
96 struct TCP_Server_Info *);
97extern bool backup_cred(struct cifs_sb_info *); 96extern bool backup_cred(struct cifs_sb_info *);
98extern bool is_size_safe_to_change(struct cifsInodeInfo *, __u64 eof); 97extern bool is_size_safe_to_change(struct cifsInodeInfo *, __u64 eof);
99extern void cifs_update_eof(struct cifsInodeInfo *cifsi, loff_t offset, 98extern void cifs_update_eof(struct cifsInodeInfo *cifsi, loff_t offset,
@@ -107,7 +106,7 @@ extern int cifs_convert_address(struct sockaddr *dst, const char *src, int len);
107extern int cifs_set_port(struct sockaddr *addr, const unsigned short int port); 106extern int cifs_set_port(struct sockaddr *addr, const unsigned short int port);
108extern int cifs_fill_sockaddr(struct sockaddr *dst, const char *src, int len, 107extern int cifs_fill_sockaddr(struct sockaddr *dst, const char *src, int len,
109 const unsigned short int port); 108 const unsigned short int port);
110extern int map_smb_to_linux_error(struct smb_hdr *smb, bool logErr); 109extern int map_smb_to_linux_error(char *buf, bool logErr);
111extern void header_assemble(struct smb_hdr *, char /* command */ , 110extern void header_assemble(struct smb_hdr *, char /* command */ ,
112 const struct cifs_tcon *, int /* length of 111 const struct cifs_tcon *, int /* length of
113 fixed section (word count) in two byte units */); 112 fixed section (word count) in two byte units */);
@@ -116,7 +115,7 @@ extern int small_smb_init_no_tc(const int smb_cmd, const int wct,
116 void **request_buf); 115 void **request_buf);
117extern int CIFS_SessSetup(unsigned int xid, struct cifs_ses *ses, 116extern int CIFS_SessSetup(unsigned int xid, struct cifs_ses *ses,
118 const struct nls_table *nls_cp); 117 const struct nls_table *nls_cp);
119extern __u16 GetNextMid(struct TCP_Server_Info *server); 118extern __u64 GetNextMid(struct TCP_Server_Info *server);
120extern struct timespec cifs_NTtimeToUnix(__le64 utc_nanoseconds_since_1601); 119extern struct timespec cifs_NTtimeToUnix(__le64 utc_nanoseconds_since_1601);
121extern u64 cifs_UnixTimeToNT(struct timespec); 120extern u64 cifs_UnixTimeToNT(struct timespec);
122extern struct timespec cnvrtDosUnixTm(__le16 le_date, __le16 le_time, 121extern struct timespec cnvrtDosUnixTm(__le16 le_date, __le16 le_time,
@@ -484,18 +483,25 @@ int cifs_async_readv(struct cifs_readdata *rdata);
484/* asynchronous write support */ 483/* asynchronous write support */
485struct cifs_writedata { 484struct cifs_writedata {
486 struct kref refcount; 485 struct kref refcount;
486 struct list_head list;
487 struct completion done;
487 enum writeback_sync_modes sync_mode; 488 enum writeback_sync_modes sync_mode;
488 struct work_struct work; 489 struct work_struct work;
489 struct cifsFileInfo *cfile; 490 struct cifsFileInfo *cfile;
490 __u64 offset; 491 __u64 offset;
492 pid_t pid;
491 unsigned int bytes; 493 unsigned int bytes;
492 int result; 494 int result;
495 void (*marshal_iov) (struct kvec *iov,
496 struct cifs_writedata *wdata);
493 unsigned int nr_pages; 497 unsigned int nr_pages;
494 struct page *pages[1]; 498 struct page *pages[1];
495}; 499};
496 500
497int cifs_async_writev(struct cifs_writedata *wdata); 501int cifs_async_writev(struct cifs_writedata *wdata);
498struct cifs_writedata *cifs_writedata_alloc(unsigned int nr_pages); 502void cifs_writev_complete(struct work_struct *work);
503struct cifs_writedata *cifs_writedata_alloc(unsigned int nr_pages,
504 work_func_t complete);
499void cifs_writedata_release(struct kref *refcount); 505void cifs_writedata_release(struct kref *refcount);
500 506
501#endif /* _CIFSPROTO_H */ 507#endif /* _CIFSPROTO_H */