]> asedeno.scripts.mit.edu Git - linux.git/blobdiff - fs/ubifs/ubifs.h
Merge branch 'parisc-4.10-1' of git://git.kernel.org/pub/scm/linux/kernel/git/deller...
[linux.git] / fs / ubifs / ubifs.h
index 2df3c0d210209301bfd5f4c25918563bb02b7c3d..ca72382ce6cc9e58e955373649bec3b994f9d19f 100644 (file)
@@ -39,6 +39,7 @@
 #include <linux/security.h>
 #include <linux/xattr.h>
 #include <linux/fscrypto.h>
+#include <linux/random.h>
 #include "ubifs-media.h"
 
 /* Version of this UBIFS implementation */
@@ -1005,6 +1006,8 @@ struct ubifs_debug_info;
  *
  * @big_lpt: flag that LPT is too big to write whole during commit
  * @space_fixup: flag indicating that free space in LEBs needs to be cleaned up
+ * @double_hash: flag indicating that we can do lookups by hash
+ * @encrypted: flag indicating that this file system contains encrypted files
  * @no_chk_data_crc: do not check CRCs when reading data nodes (except during
  *                   recovery)
  * @bulk_read: enable bulk-reads
@@ -1247,6 +1250,8 @@ struct ubifs_info {
 
        unsigned int big_lpt:1;
        unsigned int space_fixup:1;
+       unsigned int double_hash:1;
+       unsigned int encrypted:1;
        unsigned int no_chk_data_crc:1;
        unsigned int bulk_read:1;
        unsigned int default_compr:2;
@@ -1513,25 +1518,29 @@ int ubifs_consolidate_log(struct ubifs_info *c);
 
 /* journal.c */
 int ubifs_jnl_update(struct ubifs_info *c, const struct inode *dir,
-                    const struct qstr *nm, const struct inode *inode,
+                    const struct fscrypt_name *nm, const struct inode *inode,
                     int deletion, int xent);
 int ubifs_jnl_write_data(struct ubifs_info *c, const struct inode *inode,
                         const union ubifs_key *key, const void *buf, int len);
 int ubifs_jnl_write_inode(struct ubifs_info *c, const struct inode *inode);
 int ubifs_jnl_delete_inode(struct ubifs_info *c, const struct inode *inode);
 int ubifs_jnl_xrename(struct ubifs_info *c, const struct inode *fst_dir,
-                     const struct dentry *fst_dentry,
+                     const struct inode *fst_inode,
+                     const struct fscrypt_name *fst_nm,
                      const struct inode *snd_dir,
-                     const struct dentry *snd_dentry, int sync);
+                     const struct inode *snd_inode,
+                     const struct fscrypt_name *snd_nm, int sync);
 int ubifs_jnl_rename(struct ubifs_info *c, const struct inode *old_dir,
-                    const struct dentry *old_dentry,
+                    const struct inode *old_inode,
+                    const struct fscrypt_name *old_nm,
                     const struct inode *new_dir,
-                    const struct dentry *new_dentry,
+                    const struct inode *new_inode,
+                    const struct fscrypt_name *new_nm,
                     const struct inode *whiteout, int sync);
 int ubifs_jnl_truncate(struct ubifs_info *c, const struct inode *inode,
                       loff_t old_size, loff_t new_size);
 int ubifs_jnl_delete_xattr(struct ubifs_info *c, const struct inode *host,
-                          const struct inode *inode, const struct qstr *nm);
+                          const struct inode *inode, const struct fscrypt_name *nm);
 int ubifs_jnl_change_xattr(struct ubifs_info *c, const struct inode *inode1,
                           const struct inode *inode2);
 
@@ -1566,7 +1575,9 @@ int ubifs_save_dirty_idx_lnums(struct ubifs_info *c);
 int ubifs_lookup_level0(struct ubifs_info *c, const union ubifs_key *key,
                        struct ubifs_znode **zn, int *n);
 int ubifs_tnc_lookup_nm(struct ubifs_info *c, const union ubifs_key *key,
-                       void *node, const struct qstr *nm);
+                       void *node, const struct fscrypt_name *nm);
+int ubifs_tnc_lookup_dh(struct ubifs_info *c, const union ubifs_key *key,
+                       void *node, uint32_t secondary_hash);
 int ubifs_tnc_locate(struct ubifs_info *c, const union ubifs_key *key,
                     void *node, int *lnum, int *offs);
 int ubifs_tnc_add(struct ubifs_info *c, const union ubifs_key *key, int lnum,
@@ -1574,16 +1585,16 @@ int ubifs_tnc_add(struct ubifs_info *c, const union ubifs_key *key, int lnum,
 int ubifs_tnc_replace(struct ubifs_info *c, const union ubifs_key *key,
                      int old_lnum, int old_offs, int lnum, int offs, int len);
 int ubifs_tnc_add_nm(struct ubifs_info *c, const union ubifs_key *key,
-                    int lnum, int offs, int len, const struct qstr *nm);
+                    int lnum, int offs, int len, const struct fscrypt_name *nm);
 int ubifs_tnc_remove(struct ubifs_info *c, const union ubifs_key *key);
 int ubifs_tnc_remove_nm(struct ubifs_info *c, const union ubifs_key *key,
-                       const struct qstr *nm);
+                       const struct fscrypt_name *nm);
 int ubifs_tnc_remove_range(struct ubifs_info *c, union ubifs_key *from_key,
                           union ubifs_key *to_key);
 int ubifs_tnc_remove_ino(struct ubifs_info *c, ino_t inum);
 struct ubifs_dent_node *ubifs_tnc_next_ent(struct ubifs_info *c,
                                           union ubifs_key *key,
-                                          const struct qstr *nm);
+                                          const struct fscrypt_name *nm);
 void ubifs_tnc_close(struct ubifs_info *c);
 int ubifs_tnc_has_node(struct ubifs_info *c, union ubifs_key *key, int level,
                       int lnum, int offs, int is_idx);
@@ -1640,6 +1651,7 @@ int ubifs_read_superblock(struct ubifs_info *c);
 struct ubifs_sb_node *ubifs_read_sb_node(struct ubifs_info *c);
 int ubifs_write_sb_node(struct ubifs_info *c, struct ubifs_sb_node *sup);
 int ubifs_fixup_free_space(struct ubifs_info *c);
+int ubifs_enable_encryption(struct ubifs_info *c);
 
 /* replay.c */
 int ubifs_validate_entry(struct ubifs_info *c,
@@ -1794,8 +1806,8 @@ int ubifs_decompress(const struct ubifs_info *c, const void *buf, int len,
 #define fscrypt_pullback_bio_page       fscrypt_notsupp_pullback_bio_page
 #define fscrypt_restore_control_page    fscrypt_notsupp_restore_control_page
 #define fscrypt_zeroout_range           fscrypt_notsupp_zeroout_range
-#define fscrypt_process_policy          fscrypt_notsupp_process_policy
-#define fscrypt_get_policy              fscrypt_notsupp_get_policy
+#define fscrypt_ioctl_set_policy       fscrypt_notsupp_ioctl_set_policy
+#define fscrypt_ioctl_get_policy       fscrypt_notsupp_ioctl_get_policy
 #define fscrypt_has_permitted_context   fscrypt_notsupp_has_permitted_context
 #define fscrypt_inherit_context         fscrypt_notsupp_inherit_context
 #define fscrypt_get_encryption_info     fscrypt_notsupp_get_encryption_info