Merge tag 'vfs-5.4-merge-1' of git://git.kernel.org/pub/scm/fs/xfs/xfs-linux
[linux-2.6-block.git] / include / linux / fs.h
index a2e3d446ba8ef1fb4605891fe1df60ca64fdcded..ae6648145d18536dea83454e354a23fafed32f51 100644 (file)
@@ -64,6 +64,8 @@ struct workqueue_struct;
 struct iov_iter;
 struct fscrypt_info;
 struct fscrypt_operations;
+struct fsverity_info;
+struct fsverity_operations;
 struct fs_context;
 struct fs_parameter_description;
 
@@ -723,6 +725,10 @@ struct inode {
        struct fscrypt_info     *i_crypt_info;
 #endif
 
+#ifdef CONFIG_FS_VERITY
+       struct fsverity_info    *i_verity_info;
+#endif
+
        void                    *i_private; /* fs or device private pointer */
 } __randomize_layout;
 
@@ -1427,6 +1433,10 @@ struct super_block {
        const struct xattr_handler **s_xattr;
 #ifdef CONFIG_FS_ENCRYPTION
        const struct fscrypt_operations *s_cop;
+       struct key              *s_master_keys; /* master crypto keys in use */
+#endif
+#ifdef CONFIG_FS_VERITY
+       const struct fsverity_operations *s_vop;
 #endif
        struct hlist_bl_head    s_roots;        /* alternate root dentries for NFS */
        struct list_head        s_mounts;       /* list of mounts; _not_ for fs use */
@@ -1965,6 +1975,7 @@ struct super_operations {
 #endif
 #define S_ENCRYPTED    16384   /* Encrypted file (using fs/crypto/) */
 #define S_CASEFOLD     32768   /* Casefolded file */
+#define S_VERITY       65536   /* Verity file (using fs/verity/) */
 
 /*
  * Note that nosuid etc flags are inode-specific: setting some file-system
@@ -2006,6 +2017,7 @@ static inline bool sb_rdonly(const struct super_block *sb) { return sb->s_flags
 #define IS_DAX(inode)          ((inode)->i_flags & S_DAX)
 #define IS_ENCRYPTED(inode)    ((inode)->i_flags & S_ENCRYPTED)
 #define IS_CASEFOLDED(inode)   ((inode)->i_flags & S_CASEFOLD)
+#define IS_VERITY(inode)       ((inode)->i_flags & S_VERITY)
 
 #define IS_WHITEOUT(inode)     (S_ISCHR(inode->i_mode) && \
                                 (inode)->i_rdev == WHITEOUT_DEV)
@@ -2598,6 +2610,12 @@ extern struct block_device *blkdev_get_by_path(const char *path, fmode_t mode,
                                               void *holder);
 extern struct block_device *blkdev_get_by_dev(dev_t dev, fmode_t mode,
                                              void *holder);
+extern struct block_device *bd_start_claiming(struct block_device *bdev,
+                                             void *holder);
+extern void bd_finish_claiming(struct block_device *bdev,
+                              struct block_device *whole, void *holder);
+extern void bd_abort_claiming(struct block_device *bdev,
+                             struct block_device *whole, void *holder);
 extern void blkdev_put(struct block_device *bdev, fmode_t mode);
 extern int __blkdev_reread_part(struct block_device *bdev);
 extern int blkdev_reread_part(struct block_device *bdev);