diff options
Diffstat (limited to 'fs/cifs/cifsproto.h')
| -rw-r--r-- | fs/cifs/cifsproto.h | 56 |
1 files changed, 44 insertions, 12 deletions
diff --git a/fs/cifs/cifsproto.h b/fs/cifs/cifsproto.h index 8df28e925e5b..6f4e243e0f62 100644 --- a/fs/cifs/cifsproto.h +++ b/fs/cifs/cifsproto.h | |||
| @@ -69,8 +69,9 @@ extern struct mid_q_entry *AllocMidQEntry(const struct smb_hdr *smb_buffer, | |||
| 69 | struct TCP_Server_Info *server); | 69 | struct TCP_Server_Info *server); |
| 70 | extern void DeleteMidQEntry(struct mid_q_entry *midEntry); | 70 | extern void DeleteMidQEntry(struct mid_q_entry *midEntry); |
| 71 | extern int cifs_call_async(struct TCP_Server_Info *server, struct kvec *iov, | 71 | extern int cifs_call_async(struct TCP_Server_Info *server, struct kvec *iov, |
| 72 | unsigned int nvec, mid_callback_t *callback, | 72 | unsigned int nvec, mid_receive_t *receive, |
| 73 | void *cbdata, bool ignore_pend); | 73 | mid_callback_t *callback, void *cbdata, |
| 74 | bool ignore_pend); | ||
| 74 | extern int SendReceive(const unsigned int /* xid */ , struct cifs_ses *, | 75 | extern int SendReceive(const unsigned int /* xid */ , struct cifs_ses *, |
| 75 | struct smb_hdr * /* input */ , | 76 | struct smb_hdr * /* input */ , |
| 76 | struct smb_hdr * /* out */ , | 77 | struct smb_hdr * /* out */ , |
| @@ -90,6 +91,7 @@ extern int SendReceiveBlockingLock(const unsigned int xid, | |||
| 90 | extern int checkSMB(struct smb_hdr *smb, __u16 mid, unsigned int length); | 91 | extern int checkSMB(struct smb_hdr *smb, __u16 mid, unsigned int length); |
| 91 | extern bool is_valid_oplock_break(struct smb_hdr *smb, | 92 | extern bool is_valid_oplock_break(struct smb_hdr *smb, |
| 92 | struct TCP_Server_Info *); | 93 | struct TCP_Server_Info *); |
| 94 | extern bool backup_cred(struct cifs_sb_info *); | ||
| 93 | extern bool is_size_safe_to_change(struct cifsInodeInfo *, __u64 eof); | 95 | extern bool is_size_safe_to_change(struct cifsInodeInfo *, __u64 eof); |
| 94 | extern void cifs_update_eof(struct cifsInodeInfo *cifsi, loff_t offset, | 96 | extern void cifs_update_eof(struct cifsInodeInfo *cifsi, loff_t offset, |
| 95 | unsigned int bytes_written); | 97 | unsigned int bytes_written); |
| @@ -145,12 +147,19 @@ extern int cifs_get_inode_info_unix(struct inode **pinode, | |||
| 145 | extern int cifs_acl_to_fattr(struct cifs_sb_info *cifs_sb, | 147 | extern int cifs_acl_to_fattr(struct cifs_sb_info *cifs_sb, |
| 146 | struct cifs_fattr *fattr, struct inode *inode, | 148 | struct cifs_fattr *fattr, struct inode *inode, |
| 147 | const char *path, const __u16 *pfid); | 149 | const char *path, const __u16 *pfid); |
| 148 | extern int mode_to_cifs_acl(struct inode *inode, const char *path, __u64); | 150 | extern int id_mode_to_cifs_acl(struct inode *inode, const char *path, __u64, |
| 151 | uid_t, gid_t); | ||
| 149 | extern struct cifs_ntsd *get_cifs_acl(struct cifs_sb_info *, struct inode *, | 152 | extern struct cifs_ntsd *get_cifs_acl(struct cifs_sb_info *, struct inode *, |
| 150 | const char *, u32 *); | 153 | const char *, u32 *); |
| 151 | extern int set_cifs_acl(struct cifs_ntsd *, __u32, struct inode *, | 154 | extern int set_cifs_acl(struct cifs_ntsd *, __u32, struct inode *, |
| 152 | const char *); | 155 | const char *, int); |
| 153 | 156 | ||
| 157 | extern void dequeue_mid(struct mid_q_entry *mid, bool malformed); | ||
| 158 | extern int cifs_read_from_socket(struct TCP_Server_Info *server, char *buf, | ||
| 159 | unsigned int to_read); | ||
| 160 | extern int cifs_readv_from_socket(struct TCP_Server_Info *server, | ||
| 161 | struct kvec *iov_orig, unsigned int nr_segs, | ||
| 162 | unsigned int to_read); | ||
| 154 | extern void cifs_setup_cifs_sb(struct smb_vol *pvolume_info, | 163 | extern void cifs_setup_cifs_sb(struct smb_vol *pvolume_info, |
| 155 | struct cifs_sb_info *cifs_sb); | 164 | struct cifs_sb_info *cifs_sb); |
| 156 | extern int cifs_match_super(struct super_block *, void *); | 165 | extern int cifs_match_super(struct super_block *, void *); |
| @@ -359,14 +368,17 @@ extern int CIFSGetSrvInodeNumber(const int xid, struct cifs_tcon *tcon, | |||
| 359 | const struct nls_table *nls_codepage, | 368 | const struct nls_table *nls_codepage, |
| 360 | int remap_special_chars); | 369 | int remap_special_chars); |
| 361 | 370 | ||
| 371 | extern int cifs_lockv(const int xid, struct cifs_tcon *tcon, const __u16 netfid, | ||
| 372 | const __u8 lock_type, const __u32 num_unlock, | ||
| 373 | const __u32 num_lock, LOCKING_ANDX_RANGE *buf); | ||
| 362 | extern int CIFSSMBLock(const int xid, struct cifs_tcon *tcon, | 374 | extern int CIFSSMBLock(const int xid, struct cifs_tcon *tcon, |
| 363 | const __u16 netfid, const __u64 len, | 375 | const __u16 netfid, const __u32 netpid, const __u64 len, |
| 364 | const __u64 offset, const __u32 numUnlock, | 376 | const __u64 offset, const __u32 numUnlock, |
| 365 | const __u32 numLock, const __u8 lockType, | 377 | const __u32 numLock, const __u8 lockType, |
| 366 | const bool waitFlag, const __u8 oplock_level); | 378 | const bool waitFlag, const __u8 oplock_level); |
| 367 | extern int CIFSSMBPosixLock(const int xid, struct cifs_tcon *tcon, | 379 | extern int CIFSSMBPosixLock(const int xid, struct cifs_tcon *tcon, |
| 368 | const __u16 smb_file_id, const int get_flag, | 380 | const __u16 smb_file_id, const __u32 netpid, |
| 369 | const __u64 len, struct file_lock *, | 381 | const int get_flag, const __u64 len, struct file_lock *, |
| 370 | const __u16 lock_type, const bool waitFlag); | 382 | const __u16 lock_type, const bool waitFlag); |
| 371 | extern int CIFSSMBTDis(const int xid, struct cifs_tcon *tcon); | 383 | extern int CIFSSMBTDis(const int xid, struct cifs_tcon *tcon); |
| 372 | extern int CIFSSMBEcho(struct TCP_Server_Info *server); | 384 | extern int CIFSSMBEcho(struct TCP_Server_Info *server); |
| @@ -380,11 +392,12 @@ extern void tconInfoFree(struct cifs_tcon *); | |||
| 380 | extern int cifs_sign_smb(struct smb_hdr *, struct TCP_Server_Info *, __u32 *); | 392 | extern int cifs_sign_smb(struct smb_hdr *, struct TCP_Server_Info *, __u32 *); |
| 381 | extern int cifs_sign_smb2(struct kvec *iov, int n_vec, struct TCP_Server_Info *, | 393 | extern int cifs_sign_smb2(struct kvec *iov, int n_vec, struct TCP_Server_Info *, |
| 382 | __u32 *); | 394 | __u32 *); |
| 383 | extern int cifs_verify_signature(struct smb_hdr *, | 395 | extern int cifs_verify_signature(struct kvec *iov, unsigned int nr_iov, |
| 384 | struct TCP_Server_Info *server, | 396 | struct TCP_Server_Info *server, |
| 385 | __u32 expected_sequence_number); | 397 | __u32 expected_sequence_number); |
| 386 | extern int SMBNTencrypt(unsigned char *, unsigned char *, unsigned char *); | 398 | extern int SMBNTencrypt(unsigned char *, unsigned char *, unsigned char *, |
| 387 | extern int setup_ntlm_response(struct cifs_ses *); | 399 | const struct nls_table *); |
| 400 | extern int setup_ntlm_response(struct cifs_ses *, const struct nls_table *); | ||
| 388 | extern int setup_ntlmv2_rsp(struct cifs_ses *, const struct nls_table *); | 401 | extern int setup_ntlmv2_rsp(struct cifs_ses *, const struct nls_table *); |
| 389 | extern int cifs_crypto_shash_allocate(struct TCP_Server_Info *); | 402 | extern int cifs_crypto_shash_allocate(struct TCP_Server_Info *); |
| 390 | extern void cifs_crypto_shash_release(struct TCP_Server_Info *); | 403 | extern void cifs_crypto_shash_release(struct TCP_Server_Info *); |
| @@ -419,7 +432,7 @@ extern int CIFSSMBSetEA(const int xid, struct cifs_tcon *tcon, | |||
| 419 | extern int CIFSSMBGetCIFSACL(const int xid, struct cifs_tcon *tcon, | 432 | extern int CIFSSMBGetCIFSACL(const int xid, struct cifs_tcon *tcon, |
| 420 | __u16 fid, struct cifs_ntsd **acl_inf, __u32 *buflen); | 433 | __u16 fid, struct cifs_ntsd **acl_inf, __u32 *buflen); |
| 421 | extern int CIFSSMBSetCIFSACL(const int, struct cifs_tcon *, __u16, | 434 | extern int CIFSSMBSetCIFSACL(const int, struct cifs_tcon *, __u16, |
| 422 | struct cifs_ntsd *, __u32); | 435 | struct cifs_ntsd *, __u32, int); |
| 423 | extern int CIFSSMBGetPosixACL(const int xid, struct cifs_tcon *tcon, | 436 | extern int CIFSSMBGetPosixACL(const int xid, struct cifs_tcon *tcon, |
| 424 | const unsigned char *searchName, | 437 | const unsigned char *searchName, |
| 425 | char *acl_inf, const int buflen, const int acl_type, | 438 | char *acl_inf, const int buflen, const int acl_type, |
| @@ -436,10 +449,29 @@ extern int CIFSCheckMFSymlink(struct cifs_fattr *fattr, | |||
| 436 | const unsigned char *path, | 449 | const unsigned char *path, |
| 437 | struct cifs_sb_info *cifs_sb, int xid); | 450 | struct cifs_sb_info *cifs_sb, int xid); |
| 438 | extern int mdfour(unsigned char *, unsigned char *, int); | 451 | extern int mdfour(unsigned char *, unsigned char *, int); |
| 439 | extern int E_md4hash(const unsigned char *passwd, unsigned char *p16); | 452 | extern int E_md4hash(const unsigned char *passwd, unsigned char *p16, |
| 453 | const struct nls_table *codepage); | ||
| 440 | extern int SMBencrypt(unsigned char *passwd, const unsigned char *c8, | 454 | extern int SMBencrypt(unsigned char *passwd, const unsigned char *c8, |
| 441 | unsigned char *p24); | 455 | unsigned char *p24); |
| 442 | 456 | ||
| 457 | /* asynchronous read support */ | ||
| 458 | struct cifs_readdata { | ||
| 459 | struct cifsFileInfo *cfile; | ||
| 460 | struct address_space *mapping; | ||
| 461 | __u64 offset; | ||
| 462 | unsigned int bytes; | ||
| 463 | pid_t pid; | ||
| 464 | int result; | ||
| 465 | struct list_head pages; | ||
| 466 | struct work_struct work; | ||
| 467 | unsigned int nr_iov; | ||
| 468 | struct kvec iov[1]; | ||
| 469 | }; | ||
| 470 | |||
| 471 | struct cifs_readdata *cifs_readdata_alloc(unsigned int nr_pages); | ||
| 472 | void cifs_readdata_free(struct cifs_readdata *rdata); | ||
| 473 | int cifs_async_readv(struct cifs_readdata *rdata); | ||
| 474 | |||
| 443 | /* asynchronous write support */ | 475 | /* asynchronous write support */ |
| 444 | struct cifs_writedata { | 476 | struct cifs_writedata { |
| 445 | struct kref refcount; | 477 | struct kref refcount; |
