Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
cifssmb.c File Reference
#include <linux/fs.h>
#include <linux/kernel.h>
#include <linux/vfs.h>
#include <linux/slab.h>
#include <linux/posix_acl_xattr.h>
#include <linux/pagemap.h>
#include <linux/swap.h>
#include <linux/task_io_accounting_ops.h>
#include <asm/uaccess.h>
#include "cifspdu.h"
#include "cifsglob.h"
#include "cifsacl.h"
#include "cifsproto.h"
#include "cifs_unicode.h"
#include "cifs_debug.h"
#include "fscache.h"

Go to the source code of this file.

Macros

#define CIFS_NUM_PROT   1
 

Functions

void cifs_mark_open_files_invalid (struct cifs_tcon *tcon)
 
int small_smb_init_no_tc (const int smb_command, const int wct, struct cifs_ses *ses, void **request_buf)
 
int CIFSSMBNegotiate (const unsigned int xid, struct cifs_ses *ses)
 
int CIFSSMBTDis (const unsigned int xid, struct cifs_tcon *tcon)
 
int CIFSSMBEcho (struct TCP_Server_Info *server)
 
int CIFSSMBLogoff (const unsigned int xid, struct cifs_ses *ses)
 
int CIFSPOSIXDelFile (const unsigned int xid, struct cifs_tcon *tcon, const char *fileName, __u16 type, const struct nls_table *nls_codepage, int remap)
 
int CIFSSMBDelFile (const unsigned int xid, struct cifs_tcon *tcon, const char *name, struct cifs_sb_info *cifs_sb)
 
int CIFSSMBRmDir (const unsigned int xid, struct cifs_tcon *tcon, const char *name, struct cifs_sb_info *cifs_sb)
 
int CIFSSMBMkDir (const unsigned int xid, struct cifs_tcon *tcon, const char *name, struct cifs_sb_info *cifs_sb)
 
int CIFSPOSIXCreate (const unsigned int xid, struct cifs_tcon *tcon, __u32 posix_flags, __u64 mode, __u16 *netfid, FILE_UNIX_BASIC_INFO *pRetData, __u32 *pOplock, const char *name, const struct nls_table *nls_codepage, int remap)
 
int SMBLegacyOpen (const unsigned int xid, struct cifs_tcon *tcon, const char *fileName, const int openDisposition, const int access_flags, const int create_options, __u16 *netfid, int *pOplock, FILE_ALL_INFO *pfile_info, const struct nls_table *nls_codepage, int remap)
 
int CIFSSMBOpen (const unsigned int xid, struct cifs_tcon *tcon, const char *fileName, const int openDisposition, const int access_flags, const int create_options, __u16 *netfid, int *pOplock, FILE_ALL_INFO *pfile_info, const struct nls_table *nls_codepage, int remap)
 
int cifs_readv_receive (struct TCP_Server_Info *server, struct mid_q_entry *mid)
 
int cifs_async_readv (struct cifs_readdata *rdata)
 
int CIFSSMBRead (const unsigned int xid, struct cifs_io_parms *io_parms, unsigned int *nbytes, char **buf, int *pbuf_type)
 
int CIFSSMBWrite (const unsigned int xid, struct cifs_io_parms *io_parms, unsigned int *nbytes, const char *buf, const char __user *ubuf, const int long_op)
 
void cifs_writedata_release (struct kref *refcount)
 
void cifs_writev_complete (struct work_struct *work)
 
struct cifs_writedatacifs_writedata_alloc (unsigned int nr_pages, work_func_t complete)
 
int cifs_async_writev (struct cifs_writedata *wdata)
 
int CIFSSMBWrite2 (const unsigned int xid, struct cifs_io_parms *io_parms, unsigned int *nbytes, struct kvec *iov, int n_vec)
 
int cifs_lockv (const unsigned int xid, struct cifs_tcon *tcon, const __u16 netfid, const __u8 lock_type, const __u32 num_unlock, const __u32 num_lock, LOCKING_ANDX_RANGE *buf)
 
int CIFSSMBLock (const unsigned int xid, struct cifs_tcon *tcon, const __u16 smb_file_id, const __u32 netpid, const __u64 len, const __u64 offset, const __u32 numUnlock, const __u32 numLock, const __u8 lockType, const bool waitFlag, const __u8 oplock_level)
 
int CIFSSMBPosixLock (const unsigned int xid, struct cifs_tcon *tcon, const __u16 smb_file_id, const __u32 netpid, const loff_t start_offset, const __u64 len, struct file_lock *pLockData, const __u16 lock_type, const bool waitFlag)
 
int CIFSSMBClose (const unsigned int xid, struct cifs_tcon *tcon, int smb_file_id)
 
int CIFSSMBFlush (const unsigned int xid, struct cifs_tcon *tcon, int smb_file_id)
 
int CIFSSMBRename (const unsigned int xid, struct cifs_tcon *tcon, const char *from_name, const char *to_name, struct cifs_sb_info *cifs_sb)
 
int CIFSSMBRenameOpenFile (const unsigned int xid, struct cifs_tcon *pTcon, int netfid, const char *target_name, const struct nls_table *nls_codepage, int remap)
 
int CIFSSMBCopy (const unsigned int xid, struct cifs_tcon *tcon, const char *fromName, const __u16 target_tid, const char *toName, const int flags, const struct nls_table *nls_codepage, int remap)
 
int CIFSUnixCreateSymLink (const unsigned int xid, struct cifs_tcon *tcon, const char *fromName, const char *toName, const struct nls_table *nls_codepage)
 
int CIFSUnixCreateHardLink (const unsigned int xid, struct cifs_tcon *tcon, const char *fromName, const char *toName, const struct nls_table *nls_codepage, int remap)
 
int CIFSCreateHardLink (const unsigned int xid, struct cifs_tcon *tcon, const char *from_name, const char *to_name, struct cifs_sb_info *cifs_sb)
 
int CIFSSMBUnixQuerySymLink (const unsigned int xid, struct cifs_tcon *tcon, const unsigned char *searchName, char **symlinkinfo, const struct nls_table *nls_codepage)
 
int SMBQueryInformation (const unsigned int xid, struct cifs_tcon *tcon, const char *search_name, FILE_ALL_INFO *data, const struct nls_table *nls_codepage, int remap)
 
int CIFSSMBQFileInfo (const unsigned int xid, struct cifs_tcon *tcon, u16 netfid, FILE_ALL_INFO *pFindData)
 
int CIFSSMBQPathInfo (const unsigned int xid, struct cifs_tcon *tcon, const char *search_name, FILE_ALL_INFO *data, int legacy, const struct nls_table *nls_codepage, int remap)
 
int CIFSSMBUnixQFileInfo (const unsigned int xid, struct cifs_tcon *tcon, u16 netfid, FILE_UNIX_BASIC_INFO *pFindData)
 
int CIFSSMBUnixQPathInfo (const unsigned int xid, struct cifs_tcon *tcon, const unsigned char *searchName, FILE_UNIX_BASIC_INFO *pFindData, const struct nls_table *nls_codepage, int remap)
 
int CIFSFindFirst (const unsigned int xid, struct cifs_tcon *tcon, const char *searchName, struct cifs_sb_info *cifs_sb, __u16 *pnetfid, __u16 search_flags, struct cifs_search_info *psrch_inf, bool msearch)
 
int CIFSFindNext (const unsigned int xid, struct cifs_tcon *tcon, __u16 searchHandle, __u16 search_flags, struct cifs_search_info *psrch_inf)
 
int CIFSFindClose (const unsigned int xid, struct cifs_tcon *tcon, const __u16 searchHandle)
 
int CIFSGetSrvInodeNumber (const unsigned int xid, struct cifs_tcon *tcon, const char *search_name, __u64 *inode_number, const struct nls_table *nls_codepage, int remap)
 
int CIFSGetDFSRefer (const unsigned int xid, struct cifs_ses *ses, const char *search_name, struct dfs_info3_param **target_nodes, unsigned int *num_of_nodes, const struct nls_table *nls_codepage, int remap)
 
int SMBOldQFSInfo (const unsigned int xid, struct cifs_tcon *tcon, struct kstatfs *FSData)
 
int CIFSSMBQFSInfo (const unsigned int xid, struct cifs_tcon *tcon, struct kstatfs *FSData)
 
int CIFSSMBQFSAttributeInfo (const unsigned int xid, struct cifs_tcon *tcon)
 
int CIFSSMBQFSDeviceInfo (const unsigned int xid, struct cifs_tcon *tcon)
 
int CIFSSMBQFSUnixInfo (const unsigned int xid, struct cifs_tcon *tcon)
 
int CIFSSMBSetFSUnixInfo (const unsigned int xid, struct cifs_tcon *tcon, __u64 cap)
 
int CIFSSMBQFSPosixInfo (const unsigned int xid, struct cifs_tcon *tcon, struct kstatfs *FSData)
 
int CIFSSMBSetEOF (const unsigned int xid, struct cifs_tcon *tcon, const char *file_name, __u64 size, struct cifs_sb_info *cifs_sb, bool set_allocation)
 
int CIFSSMBSetFileSize (const unsigned int xid, struct cifs_tcon *tcon, struct cifsFileInfo *cfile, __u64 size, bool set_allocation)
 
int CIFSSMBSetFileInfo (const unsigned int xid, struct cifs_tcon *tcon, const FILE_BASIC_INFO *data, __u16 fid, __u32 pid_of_opener)
 
int CIFSSMBSetFileDisposition (const unsigned int xid, struct cifs_tcon *tcon, bool delete_file, __u16 fid, __u32 pid_of_opener)
 
int CIFSSMBSetPathInfo (const unsigned int xid, struct cifs_tcon *tcon, const char *fileName, const FILE_BASIC_INFO *data, const struct nls_table *nls_codepage, int remap)
 
int CIFSSMBUnixSetFileInfo (const unsigned int xid, struct cifs_tcon *tcon, const struct cifs_unix_set_info_args *args, u16 fid, u32 pid_of_opener)
 
int CIFSSMBUnixSetPathInfo (const unsigned int xid, struct cifs_tcon *tcon, const char *file_name, const struct cifs_unix_set_info_args *args, const struct nls_table *nls_codepage, int remap)
 

Macro Definition Documentation

#define CIFS_NUM_PROT   1

Definition at line 85 of file cifssmb.c.

Function Documentation

int cifs_async_readv ( struct cifs_readdata rdata)

Definition at line 1576 of file cifssmb.c.

int cifs_async_writev ( struct cifs_writedata wdata)

Definition at line 2026 of file cifssmb.c.

int cifs_lockv ( const unsigned int  xid,
struct cifs_tcon tcon,
const __u16  netfid,
const __u8  lock_type,
const __u32  num_unlock,
const __u32  num_lock,
LOCKING_ANDX_RANGE *  buf 
)

Definition at line 2213 of file cifssmb.c.

void cifs_mark_open_files_invalid ( struct cifs_tcon tcon)

Definition at line 94 of file cifssmb.c.

int cifs_readv_receive ( struct TCP_Server_Info server,
struct mid_q_entry mid 
)

Definition at line 1420 of file cifssmb.c.

struct cifs_writedata* cifs_writedata_alloc ( unsigned int  nr_pages,
work_func_t  complete 
)
read

Definition at line 1953 of file cifssmb.c.

void cifs_writedata_release ( struct kref refcount)

Definition at line 1879 of file cifssmb.c.

void cifs_writev_complete ( struct work_struct work)

Definition at line 1922 of file cifssmb.c.

int CIFSCreateHardLink ( const unsigned int  xid,
struct cifs_tcon tcon,
const char from_name,
const char to_name,
struct cifs_sb_info cifs_sb 
)

Definition at line 2908 of file cifssmb.c.

int CIFSFindClose ( const unsigned int  xid,
struct cifs_tcon tcon,
const __u16  searchHandle 
)

Definition at line 4506 of file cifssmb.c.

int CIFSFindFirst ( const unsigned int  xid,
struct cifs_tcon tcon,
const char searchName,
struct cifs_sb_info cifs_sb,
__u16 pnetfid,
__u16  search_flags,
struct cifs_search_info psrch_inf,
bool  msearch 
)

Definition at line 4216 of file cifssmb.c.

int CIFSFindNext ( const unsigned int  xid,
struct cifs_tcon tcon,
__u16  searchHandle,
__u16  search_flags,
struct cifs_search_info psrch_inf 
)

Definition at line 4370 of file cifssmb.c.

int CIFSGetDFSRefer ( const unsigned int  xid,
struct cifs_ses ses,
const char search_name,
struct dfs_info3_param **  target_nodes,
unsigned int num_of_nodes,
const struct nls_table nls_codepage,
int  remap 
)

Definition at line 4744 of file cifssmb.c.

int CIFSGetSrvInodeNumber ( const unsigned int  xid,
struct cifs_tcon tcon,
const char search_name,
__u64 inode_number,
const struct nls_table nls_codepage,
int  remap 
)

Definition at line 4538 of file cifssmb.c.

int CIFSPOSIXCreate ( const unsigned int  xid,
struct cifs_tcon tcon,
__u32  posix_flags,
__u64  mode,
__u16 netfid,
FILE_UNIX_BASIC_INFO *  pRetData,
__u32 pOplock,
const char name,
const struct nls_table nls_codepage,
int  remap 
)

Definition at line 1017 of file cifssmb.c.

int CIFSPOSIXDelFile ( const unsigned int  xid,
struct cifs_tcon tcon,
const char fileName,
__u16  type,
const struct nls_table nls_codepage,
int  remap 
)

Definition at line 805 of file cifssmb.c.

int CIFSSMBClose ( const unsigned int  xid,
struct cifs_tcon tcon,
int  smb_file_id 
)

Definition at line 2461 of file cifssmb.c.

int CIFSSMBCopy ( const unsigned int  xid,
struct cifs_tcon tcon,
const char fromName,
const __u16  target_tid,
const char toName,
const int  flags,
const struct nls_table nls_codepage,
int  remap 
)

Definition at line 2666 of file cifssmb.c.

int CIFSSMBDelFile ( const unsigned int  xid,
struct cifs_tcon tcon,
const char name,
struct cifs_sb_info cifs_sb 
)

Definition at line 881 of file cifssmb.c.

int CIFSSMBEcho ( struct TCP_Server_Info server)

Definition at line 723 of file cifssmb.c.

int CIFSSMBFlush ( const unsigned int  xid,
struct cifs_tcon tcon,
int  smb_file_id 
)

Definition at line 2494 of file cifssmb.c.

int CIFSSMBLock ( const unsigned int  xid,
struct cifs_tcon tcon,
const __u16  smb_file_id,
const __u32  netpid,
const __u64  len,
const __u64  offset,
const __u32  numUnlock,
const __u32  numLock,
const __u8  lockType,
const bool  waitFlag,
const __u8  oplock_level 
)

Definition at line 2255 of file cifssmb.c.

int CIFSSMBLogoff ( const unsigned int  xid,
struct cifs_ses ses 
)

Definition at line 758 of file cifssmb.c.

int CIFSSMBMkDir ( const unsigned int  xid,
struct cifs_tcon tcon,
const char name,
struct cifs_sb_info cifs_sb 
)

Definition at line 972 of file cifssmb.c.

int CIFSSMBNegotiate ( const unsigned int  xid,
struct cifs_ses ses 
)

Definition at line 371 of file cifssmb.c.

int CIFSSMBOpen ( const unsigned int  xid,
struct cifs_tcon tcon,
const char fileName,
const int  openDisposition,
const int  access_flags,
const int  create_options,
__u16 netfid,
int pOplock,
FILE_ALL_INFO *  pfile_info,
const struct nls_table nls_codepage,
int  remap 
)

Definition at line 1291 of file cifssmb.c.

int CIFSSMBPosixLock ( const unsigned int  xid,
struct cifs_tcon tcon,
const __u16  smb_file_id,
const __u32  netpid,
const loff_t  start_offset,
const __u64  len,
struct file_lock pLockData,
const __u16  lock_type,
const bool  waitFlag 
)

Definition at line 2325 of file cifssmb.c.

int CIFSSMBQFileInfo ( const unsigned int  xid,
struct cifs_tcon tcon,
u16  netfid,
FILE_ALL_INFO *  pFindData 
)

Definition at line 3893 of file cifssmb.c.

int CIFSSMBQFSAttributeInfo ( const unsigned int  xid,
struct cifs_tcon tcon 
)

Definition at line 5018 of file cifssmb.c.

int CIFSSMBQFSDeviceInfo ( const unsigned int  xid,
struct cifs_tcon tcon 
)

Definition at line 5088 of file cifssmb.c.

int CIFSSMBQFSInfo ( const unsigned int  xid,
struct cifs_tcon tcon,
struct kstatfs FSData 
)

Definition at line 4938 of file cifssmb.c.

int CIFSSMBQFSPosixInfo ( const unsigned int  xid,
struct cifs_tcon tcon,
struct kstatfs FSData 
)

Definition at line 5303 of file cifssmb.c.

int CIFSSMBQFSUnixInfo ( const unsigned int  xid,
struct cifs_tcon tcon 
)

Definition at line 5159 of file cifssmb.c.

int CIFSSMBQPathInfo ( const unsigned int  xid,
struct cifs_tcon tcon,
const char search_name,
FILE_ALL_INFO *  data,
int  legacy,
const struct nls_table nls_codepage,
int  remap 
)

Definition at line 3960 of file cifssmb.c.

int CIFSSMBRead ( const unsigned int  xid,
struct cifs_io_parms io_parms,
unsigned int nbytes,
char **  buf,
int pbuf_type 
)

Definition at line 1640 of file cifssmb.c.

int CIFSSMBRename ( const unsigned int  xid,
struct cifs_tcon tcon,
const char from_name,
const char to_name,
struct cifs_sb_info cifs_sb 
)

Definition at line 2515 of file cifssmb.c.

int CIFSSMBRenameOpenFile ( const unsigned int  xid,
struct cifs_tcon pTcon,
int  netfid,
const char target_name,
const struct nls_table nls_codepage,
int  remap 
)

Definition at line 2584 of file cifssmb.c.

int CIFSSMBRmDir ( const unsigned int  xid,
struct cifs_tcon tcon,
const char name,
struct cifs_sb_info cifs_sb 
)

Definition at line 927 of file cifssmb.c.

int CIFSSMBSetEOF ( const unsigned int  xid,
struct cifs_tcon tcon,
const char file_name,
__u64  size,
struct cifs_sb_info cifs_sb,
bool  set_allocation 
)

Definition at line 5396 of file cifssmb.c.

int CIFSSMBSetFileDisposition ( const unsigned int  xid,
struct cifs_tcon tcon,
bool  delete_file,
__u16  fid,
__u32  pid_of_opener 
)

Definition at line 5632 of file cifssmb.c.

int CIFSSMBSetFileInfo ( const unsigned int  xid,
struct cifs_tcon tcon,
const FILE_BASIC_INFO *  data,
__u16  fid,
__u32  pid_of_opener 
)

Definition at line 5569 of file cifssmb.c.

int CIFSSMBSetFileSize ( const unsigned int  xid,
struct cifs_tcon tcon,
struct cifsFileInfo cfile,
__u64  size,
bool  set_allocation 
)

Definition at line 5487 of file cifssmb.c.

int CIFSSMBSetFSUnixInfo ( const unsigned int  xid,
struct cifs_tcon tcon,
__u64  cap 
)

Definition at line 5229 of file cifssmb.c.

int CIFSSMBSetPathInfo ( const unsigned int  xid,
struct cifs_tcon tcon,
const char fileName,
const FILE_BASIC_INFO *  data,
const struct nls_table nls_codepage,
int  remap 
)

Definition at line 5688 of file cifssmb.c.

int CIFSSMBTDis ( const unsigned int  xid,
struct cifs_tcon tcon 
)

Definition at line 669 of file cifssmb.c.

int CIFSSMBUnixQFileInfo ( const unsigned int  xid,
struct cifs_tcon tcon,
u16  netfid,
FILE_UNIX_BASIC_INFO *  pFindData 
)

Definition at line 4061 of file cifssmb.c.

int CIFSSMBUnixQPathInfo ( const unsigned int  xid,
struct cifs_tcon tcon,
const unsigned char searchName,
FILE_UNIX_BASIC_INFO *  pFindData,
const struct nls_table nls_codepage,
int  remap 
)

Definition at line 4130 of file cifssmb.c.

int CIFSSMBUnixQuerySymLink ( const unsigned int  xid,
struct cifs_tcon tcon,
const unsigned char searchName,
char **  symlinkinfo,
const struct nls_table nls_codepage 
)

Definition at line 2982 of file cifssmb.c.

int CIFSSMBUnixSetFileInfo ( const unsigned int  xid,
struct cifs_tcon tcon,
const struct cifs_unix_set_info_args args,
u16  fid,
u32  pid_of_opener 
)

Definition at line 5860 of file cifssmb.c.

int CIFSSMBUnixSetPathInfo ( const unsigned int  xid,
struct cifs_tcon tcon,
const char file_name,
const struct cifs_unix_set_info_args args,
const struct nls_table nls_codepage,
int  remap 
)

Definition at line 5924 of file cifssmb.c.

int CIFSSMBWrite ( const unsigned int  xid,
struct cifs_io_parms io_parms,
unsigned int nbytes,
const char buf,
const char __user ubuf,
const int  long_op 
)

Definition at line 1752 of file cifssmb.c.

int CIFSSMBWrite2 ( const unsigned int  xid,
struct cifs_io_parms io_parms,
unsigned int nbytes,
struct kvec iov,
int  n_vec 
)

Definition at line 2107 of file cifssmb.c.

int CIFSUnixCreateHardLink ( const unsigned int  xid,
struct cifs_tcon tcon,
const char fromName,
const char toName,
const struct nls_table nls_codepage,
int  remap 
)

Definition at line 2823 of file cifssmb.c.

int CIFSUnixCreateSymLink ( const unsigned int  xid,
struct cifs_tcon tcon,
const char fromName,
const char toName,
const struct nls_table nls_codepage 
)

Definition at line 2734 of file cifssmb.c.

int small_smb_init_no_tc ( const int  smb_command,
const int  wct,
struct cifs_ses ses,
void **  request_buf 
)

Definition at line 263 of file cifssmb.c.

int SMBLegacyOpen ( const unsigned int  xid,
struct cifs_tcon tcon,
const char fileName,
const int  openDisposition,
const int  access_flags,
const int  create_options,
__u16 netfid,
int pOplock,
FILE_ALL_INFO *  pfile_info,
const struct nls_table nls_codepage,
int  remap 
)

Definition at line 1184 of file cifssmb.c.

int SMBOldQFSInfo ( const unsigned int  xid,
struct cifs_tcon tcon,
struct kstatfs FSData 
)

Definition at line 4858 of file cifssmb.c.

int SMBQueryInformation ( const unsigned int  xid,
struct cifs_tcon tcon,
const char search_name,
FILE_ALL_INFO *  data,
const struct nls_table nls_codepage,
int  remap 
)

Definition at line 3825 of file cifssmb.c.

Variable Documentation

int index

Definition at line 62 of file cifssmb.c.

char* name

Definition at line 63 of file cifssmb.c.