linux/fs/btrfs
Omar Sandoval 94a48aef49 btrfs: extend btrfs_dir_item type to store encryption status
For directories with encrypted files/filenames, we need to store a flag
indicating this fact. There's no room in other fields, so we'll need to
borrow a bit from dir_type. Since it's now a combination of type and
flags, we rename it to dir_flags to reflect its new usage.

The new flag, FT_ENCRYPTED, indicates a directory containing encrypted
data, which is orthogonal to file type; therefore, add the new
flag, and make conversion from directory type to file type strip the
flag.

As the file types almost never change we can afford to use the bits.
Actual usage will be guarded behind an incompat bit, this patch only
adds the support for later use by fscrypt.

Signed-off-by: Omar Sandoval <osandov@osandov.com>
Signed-off-by: Sweet Tea Dorminy <sweettea-kernel@dorminy.me>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2022-12-05 18:00:43 +01:00
..
tests btrfs: move accessor helpers into accessors.h 2022-12-05 18:00:42 +01:00
accessors.c btrfs: move btrfs_map_token to accessors 2022-12-05 18:00:42 +01:00
accessors.h btrfs: extend btrfs_dir_item type to store encryption status 2022-12-05 18:00:43 +01:00
acl.c btrfs: reserve correct number of items for inode creation 2022-05-16 17:03:08 +02:00
async-thread.c btrfs: simplify WQ_HIGHPRI handling in struct btrfs_workqueue 2022-05-16 17:03:15 +02:00
async-thread.h btrfs: remove unused typedefs get_extent_t and btrfs_work_func_t 2022-07-25 17:45:36 +02:00
backref.c btrfs: sink gfp_t parameter to btrfs_backref_iter_alloc 2022-12-05 18:00:43 +01:00
backref.h btrfs: sink gfp_t parameter to btrfs_backref_iter_alloc 2022-12-05 18:00:43 +01:00
block-group.c btrfs: move accessor helpers into accessors.h 2022-12-05 18:00:42 +01:00
block-group.h btrfs: skip update of block group item if used bytes are the same 2022-12-05 18:00:40 +01:00
block-rsv.c btrfs: move accessor helpers into accessors.h 2022-12-05 18:00:42 +01:00
block-rsv.h btrfs: add KCSAN annotations for unlocked access to block_rsv->full 2022-09-26 12:28:02 +02:00
btrfs_inode.h btrfs: move btrfs_print_data_csum_error into inode.c 2022-12-05 18:00:37 +01:00
check-integrity.c btrfs: move accessor helpers into accessors.h 2022-12-05 18:00:42 +01:00
check-integrity.h btrfs: check-integrity: split submit_bio from btrfsic checking 2022-05-16 17:03:12 +02:00
compression.c btrfs: move BTRFS_FS_STATE* definitions and helpers to fs.h 2022-12-05 18:00:42 +01:00
compression.h btrfs: make module init/exit match their sequence 2022-12-05 18:00:40 +01:00
ctree.c btrfs: move btrfs_map_token to accessors 2022-12-05 18:00:42 +01:00
ctree.h btrfs: use struct fscrypt_str instead of struct qstr 2022-12-05 18:00:43 +01:00
delalloc-space.c btrfs: move BTRFS_FS_STATE* definitions and helpers to fs.h 2022-12-05 18:00:42 +01:00
delalloc-space.h btrfs: add the ability to use NO_FLUSH for data reservations 2022-09-29 17:08:28 +02:00
delayed-inode.c btrfs: extend btrfs_dir_item type to store encryption status 2022-12-05 18:00:43 +01:00
delayed-inode.h btrfs: extend btrfs_dir_item type to store encryption status 2022-12-05 18:00:43 +01:00
delayed-ref.c btrfs: move mount option definitions to fs.h 2022-12-05 18:00:42 +01:00
delayed-ref.h btrfs: remove btrfs_delayed_extent_op::is_data 2022-05-16 17:17:31 +02:00
dev-replace.c btrfs: move accessor helpers into accessors.h 2022-12-05 18:00:42 +01:00
dev-replace.h btrfs: add struct declarations in dev-replace.h 2022-09-26 12:28:07 +02:00
dir-item.c btrfs: extend btrfs_dir_item type to store encryption status 2022-12-05 18:00:43 +01:00
discard.c btrfs: move mount option definitions to fs.h 2022-12-05 18:00:42 +01:00
discard.h
disk-io.c btrfs: move accessor helpers into accessors.h 2022-12-05 18:00:42 +01:00
disk-io.h btrfs: move btrfs_get_block_group helper out of disk-io.h 2022-12-05 18:00:36 +01:00
export.c btrfs: move accessor helpers into accessors.h 2022-12-05 18:00:42 +01:00
export.h btrfs: simplify generation check in btrfs_get_dentry 2022-12-05 18:00:41 +01:00
extent_io.c btrfs: move accessor helpers into accessors.h 2022-12-05 18:00:42 +01:00
extent_io.h btrfs: convert extent_io page op defines to enum bits 2022-12-05 18:00:40 +01:00
extent_map.c btrfs: move the printk helpers out of ctree.h 2022-12-05 18:00:41 +01:00
extent_map.h btrfs: get the next extent map during fiemap/lseek more efficiently 2022-12-05 18:00:38 +01:00
extent-io-tree.c btrfs: move the printk helpers out of ctree.h 2022-12-05 18:00:41 +01:00
extent-io-tree.h btrfs: remove unused unlock_extent_atomic 2022-12-05 18:00:41 +01:00
extent-tree.c btrfs: move accessor helpers into accessors.h 2022-12-05 18:00:42 +01:00
file-item.c btrfs: move accessor helpers into accessors.h 2022-12-05 18:00:42 +01:00
file.c btrfs: move accessor helpers into accessors.h 2022-12-05 18:00:42 +01:00
free-space-cache.c btrfs: move accessor helpers into accessors.h 2022-12-05 18:00:42 +01:00
free-space-cache.h btrfs: move free space cachep's out of ctree.h 2022-12-05 18:00:37 +01:00
free-space-tree.c btrfs: move accessor helpers into accessors.h 2022-12-05 18:00:42 +01:00
free-space-tree.h
fs.c btrfs: move accessor helpers into accessors.h 2022-12-05 18:00:42 +01:00
fs.h btrfs: move the compat/incompat flag masks to fs.h 2022-12-05 18:00:42 +01:00
inode-item.c btrfs: use struct fscrypt_str instead of struct qstr 2022-12-05 18:00:43 +01:00
inode-item.h btrfs: use struct fscrypt_str instead of struct qstr 2022-12-05 18:00:43 +01:00
inode.c btrfs: extend btrfs_dir_item type to store encryption status 2022-12-05 18:00:43 +01:00
ioctl.c btrfs: use struct fscrypt_str instead of struct qstr 2022-12-05 18:00:43 +01:00
Kconfig btrfs: use generic Kconfig option for 256kB page size limit 2022-01-20 08:52:55 +02:00
locking.c btrfs: move accessor helpers into accessors.h 2022-12-05 18:00:42 +01:00
locking.h btrfs: implement a nowait option for tree searches 2022-09-26 12:46:42 +02:00
lzo.c btrfs: move the printk helpers out of ctree.h 2022-12-05 18:00:41 +01:00
Makefile btrfs: rename struct-funcs.c to accessors.c 2022-12-05 18:00:42 +01:00
messages.h btrfs: push printk index code into their respective helpers 2022-12-05 18:00:41 +01:00
misc.h btrfs: add helper for bit enumeration 2022-12-05 18:00:40 +01:00
ordered-data.c btrfs: move the printk helpers out of ctree.h 2022-12-05 18:00:41 +01:00
ordered-data.h btrfs: use cached_state for btrfs_check_nocow_lock 2022-12-05 18:00:36 +01:00
orphan.c
print-tree.c btrfs: extend btrfs_dir_item type to store encryption status 2022-12-05 18:00:43 +01:00
print-tree.h
props.c btrfs: move accessor helpers into accessors.h 2022-12-05 18:00:42 +01:00
props.h btrfs: make module init/exit match their sequence 2022-12-05 18:00:40 +01:00
qgroup.c btrfs: sink gfp_t parameter to btrfs_qgroup_trace_extent 2022-12-05 18:00:43 +01:00
qgroup.h btrfs: sink gfp_t parameter to btrfs_qgroup_trace_extent 2022-12-05 18:00:43 +01:00
raid56.c btrfs: move the printk helpers out of ctree.h 2022-12-05 18:00:41 +01:00
raid56.h btrfs: properly abstract the parity raid bio handling 2022-09-26 12:27:59 +02:00
rcu-string.h
ref-verify.c btrfs: move accessor helpers into accessors.h 2022-12-05 18:00:42 +01:00
ref-verify.h
reflink.c btrfs: move accessor helpers into accessors.h 2022-12-05 18:00:42 +01:00
reflink.h
relocation.c btrfs: sink gfp_t parameter to btrfs_backref_iter_alloc 2022-12-05 18:00:43 +01:00
root-tree.c btrfs: use struct fscrypt_str instead of struct qstr 2022-12-05 18:00:43 +01:00
scrub.c btrfs: sink gfp_t parameter to alloc_scrub_sector 2022-12-05 18:00:43 +01:00
send.c btrfs: extend btrfs_dir_item type to store encryption status 2022-12-05 18:00:43 +01:00
send.h btrfs: send add define for v2 buffer size 2022-12-05 18:00:41 +01:00
space-info.c btrfs: move accessor helpers into accessors.h 2022-12-05 18:00:42 +01:00
space-info.h btrfs: introduce BTRFS_RESERVE_FLUSH_EMERGENCY 2022-12-05 18:00:38 +01:00
subpage.c btrfs: move the printk helpers out of ctree.h 2022-12-05 18:00:41 +01:00
subpage.h btrfs: make nodesize >= PAGE_SIZE case to reuse the non-subpage routine 2022-05-16 17:03:11 +02:00
super.c btrfs: use struct fscrypt_str instead of struct qstr 2022-12-05 18:00:43 +01:00
sysfs.c btrfs: move accessor helpers into accessors.h 2022-12-05 18:00:42 +01:00
sysfs.h
transaction.c btrfs: use struct fscrypt_str instead of struct qstr 2022-12-05 18:00:43 +01:00
transaction.h btrfs: remove fs_info::pending_changes and related code 2022-12-05 18:00:42 +01:00
tree-checker.c btrfs: extend btrfs_dir_item type to store encryption status 2022-12-05 18:00:43 +01:00
tree-checker.h btrfs: tree-checker: check extent buffer owner against owner rootid 2022-05-16 17:03:09 +02:00
tree-defrag.c btrfs: move accessor helpers into accessors.h 2022-12-05 18:00:42 +01:00
tree-log.c btrfs: extend btrfs_dir_item type to store encryption status 2022-12-05 18:00:43 +01:00
tree-log.h btrfs: use struct fscrypt_str instead of struct qstr 2022-12-05 18:00:43 +01:00
tree-mod-log.c btrfs: move accessor helpers into accessors.h 2022-12-05 18:00:42 +01:00
tree-mod-log.h btrfs: remove gfp_t flag from btrfs_tree_mod_log_insert_key() 2022-12-05 18:00:40 +01:00
ulist.c btrfs: move the printk helpers out of ctree.h 2022-12-05 18:00:41 +01:00
ulist.h
uuid-tree.c btrfs: move accessor helpers into accessors.h 2022-12-05 18:00:42 +01:00
verity.c btrfs: move accessor helpers into accessors.h 2022-12-05 18:00:42 +01:00
volumes.c btrfs: move accessor helpers into accessors.h 2022-12-05 18:00:42 +01:00
volumes.h btrfs: auto enable discard=async when possible 2022-12-05 18:00:41 +01:00
xattr.c btrfs: move accessor helpers into accessors.h 2022-12-05 18:00:42 +01:00
xattr.h
zlib.c btrfs: zlib: replace kmap() with kmap_local_page() in zlib_decompress_bio() 2022-07-25 17:45:41 +02:00
zoned.c btrfs: move accessor helpers into accessors.h 2022-12-05 18:00:42 +01:00
zoned.h btrfs: move the printk helpers out of ctree.h 2022-12-05 18:00:41 +01:00
zstd.c btrfs: zstd: replace kmap() with kmap_local_page() 2022-07-25 17:45:40 +02:00