CIFS: Move set_file_info to ops struct
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / fs / cifs / cifsglob.h
index 5b1751d819019edda3d02ebb12ac21f315b8d223..dff35830601f066e28a8ed2e188988cf6fbb8f66 100644 (file)
@@ -128,8 +128,10 @@ struct sdesc {
 struct cifs_secmech {
        struct crypto_shash *hmacmd5; /* hmac-md5 hash function */
        struct crypto_shash *md5; /* md5 hash function */
+       struct crypto_shash *hmacsha256; /* hmac-sha256 hash function */
        struct sdesc *sdeschmacmd5;  /* ctxt to generate ntlmv2 hash, CR1 */
        struct sdesc *sdescmd5; /* ctxt to generate cifs/smb signature */
+       struct sdesc *sdeschmacsha256;  /* ctxt to generate smb2 signature */
 };
 
 /* per smb session structure/fields */
@@ -250,6 +252,15 @@ struct smb_version_operations {
        int (*get_srv_inum)(const unsigned int, struct cifs_tcon *,
                            struct cifs_sb_info *, const char *,
                            u64 *uniqueid, FILE_ALL_INFO *);
+       /* set size by path */
+       int (*set_path_size)(const unsigned int, struct cifs_tcon *,
+                            const char *, __u64, struct cifs_sb_info *, bool);
+       /* set size by file handle */
+       int (*set_file_size)(const unsigned int, struct cifs_tcon *,
+                            struct cifsFileInfo *, __u64, bool);
+       /* set attributes */
+       int (*set_file_info)(struct inode *, const char *, FILE_BASIC_INFO *,
+                            const unsigned int);
        /* build a full path to the root of the mount */
        char * (*build_path_to_root)(struct smb_vol *, struct cifs_sb_info *,
                                     struct cifs_tcon *);
@@ -273,6 +284,13 @@ struct smb_version_operations {
        /* open, rename and delete file */
        int (*rename_pending_delete)(const char *, struct dentry *,
                                     const unsigned int);
+       /* send rename request */
+       int (*rename)(const unsigned int, struct cifs_tcon *, const char *,
+                     const char *, struct cifs_sb_info *);
+       /* send create hardlink request */
+       int (*create_hardlink)(const unsigned int, struct cifs_tcon *,
+                              const char *, const char *,
+                              struct cifs_sb_info *);
        /* open a file for non-posix mounts */
        int (*open)(const unsigned int, struct cifs_tcon *, const char *, int,
                    int, int, struct cifs_fid *, __u32 *, FILE_ALL_INFO *,
@@ -291,6 +309,10 @@ struct smb_version_operations {
        int (*sync_read)(const unsigned int, struct cifsFileInfo *,
                         struct cifs_io_parms *, unsigned int *, char **,
                         int *);
+       /* sync write to the server */
+       int (*sync_write)(const unsigned int, struct cifsFileInfo *,
+                         struct cifs_io_parms *, unsigned int *, struct kvec *,
+                         unsigned long);
 };
 
 struct smb_version_values {