kernel_optimize_test/fs/btrfs
Filipe Manana 7c3c7cb99c Btrfs: scrub, move setup of nofs contexts higher in the stack
Since scrub workers only do memory allocation with GFP_KERNEL when they
need to perform repair, we can move the recent setup of the nofs context
up to scrub_handle_errored_block() instead of setting it up down the call
chain at insert_full_stripe_lock() and scrub_add_page_to_wr_bio(),
removing some duplicate code and comment. So the only paths for which a
scrub worker can do memory allocations using GFP_KERNEL are the following:

 scrub_bio_end_io_worker()
   scrub_block_complete()
     scrub_handle_errored_block()
       lock_full_stripe()
         insert_full_stripe_lock()
           -> kmalloc with GFP_KERNEL

  scrub_bio_end_io_worker()
    scrub_block_complete()
      scrub_handle_errored_block()
        scrub_write_page_to_dev_replace()
          scrub_add_page_to_wr_bio()
            -> kzalloc with GFP_KERNEL

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
2018-12-17 14:51:48 +01:00
..
tests btrfs: remove always true if branch in find_delalloc_range 2018-12-17 14:51:44 +01:00
acl.c
async-thread.c
async-thread.h
backref.c btrfs: Remove needless tree locking in iterate_inode_extrefs 2018-12-17 14:51:30 +01:00
backref.h
btrfs_inode.h Btrfs: fix fsync of files with multiple hard links in new directories 2018-12-17 14:51:43 +01:00
check-integrity.c btrfs: use PAGE_ALIGNED instead of open-coding it 2018-12-17 14:51:45 +01:00
check-integrity.h
compression.c btrfs: use PAGE_ALIGNED instead of open-coding it 2018-12-17 14:51:45 +01:00
compression.h
ctree.c btrfs: Remove fsid/metadata_fsid fields from btrfs_info 2018-12-17 14:51:37 +01:00
ctree.h btrfs: rework btrfs_check_space_for_delayed_refs 2018-12-17 14:51:47 +01:00
dedupe.h
delayed-inode.c Btrfs: kill btrfs_clear_path_blocking 2018-10-15 17:23:38 +02:00
delayed-inode.h Btrfs: delayed-inode: use rb_first_cached for ins_root and del_root 2018-10-15 17:23:33 +02:00
delayed-ref.c btrfs: introduce delayed_refs_rsv 2018-12-17 14:51:46 +01:00
delayed-ref.h btrfs: add btrfs_delete_ref_head helper 2018-12-17 14:51:46 +01:00
dev-replace.c btrfs: dev-replace: open code trivial locking helpers 2018-12-17 14:51:45 +01:00
dev-replace.h btrfs: dev-replace: open code trivial locking helpers 2018-12-17 14:51:45 +01:00
dir-item.c btrfs: Remove root parameter from btrfs_insert_dir_item 2018-10-15 17:23:25 +02:00
disk-io.c btrfs: introduce delayed_refs_rsv 2018-12-17 14:51:46 +01:00
disk-io.h btrfs: drop extra enum initialization where using defaults 2018-12-17 14:51:43 +01:00
export.c btrfs: Remove 'objectid' member from struct btrfs_root 2018-10-15 17:23:25 +02:00
export.h
extent_io.c btrfs: use offset_in_page instead of open-coding it 2018-12-17 14:51:45 +01:00
extent_io.h btrfs: remove always true if branch in find_delalloc_range 2018-12-17 14:51:44 +01:00
extent_map.c Btrfs: extent_map: use rb_first_cached 2018-10-15 17:23:33 +02:00
extent_map.h btrfs: switch EXTENT_FLAG_* to enums 2018-12-17 14:51:43 +01:00
extent-tree.c btrfs: rework btrfs_check_space_for_delayed_refs 2018-12-17 14:51:47 +01:00
file-item.c btrfs: replace btrfs_io_bio::end_io with a simple helper 2018-12-17 14:51:40 +01:00
file.c btrfs: use offset_in_page instead of open-coding it 2018-12-17 14:51:45 +01:00
free-space-cache.c Btrfs: fix deadlock on tree root leaf when finding free extent 2018-11-06 16:42:32 +01:00
free-space-cache.h
free-space-tree.c btrfs: use EXPORT_FOR_TESTS for conditionally exported functions 2018-12-17 14:51:37 +01:00
free-space-tree.h
inode-item.c
inode-map.c
inode-map.h
inode.c btrfs: fix truncate throttling 2018-12-17 14:51:47 +01:00
ioctl.c btrfs: Remove fsid/metadata_fsid fields from btrfs_info 2018-12-17 14:51:37 +01:00
Kconfig
locking.c
locking.h
lzo.c
Makefile
math.h
ordered-data.c Btrfs: remove no longer used stuff for tracking pending ordered extents 2018-12-17 14:51:25 +01:00
ordered-data.h btrfs: switch BTRFS_ORDERED_* to enums 2018-12-17 14:51:43 +01:00
orphan.c
print-tree.c
print-tree.h
props.c
props.h
qgroup.c Btrfs: fix deadlock when enabling quotas due to concurrent snapshot creation 2018-12-17 14:51:39 +01:00
qgroup.h btrfs: drop extra enum initialization where using defaults 2018-12-17 14:51:43 +01:00
raid56.c
raid56.h
rcu-string.h
reada.c btrfs: dev-replace: open code trivial locking helpers 2018-12-17 14:51:45 +01:00
ref-verify.c btrfs: Remove 'objectid' member from struct btrfs_root 2018-10-15 17:23:25 +02:00
ref-verify.h
relocation.c btrfs: add helper to describe block group flags 2018-12-17 14:51:39 +01:00
root-tree.c
scrub.c Btrfs: scrub, move setup of nofs contexts higher in the stack 2018-12-17 14:51:48 +01:00
send.c btrfs: use offset_in_page instead of open-coding it 2018-12-17 14:51:45 +01:00
send.h
struct-funcs.c
super.c btrfs: Remove fsid/metadata_fsid fields from btrfs_info 2018-12-17 14:51:37 +01:00
sysfs.c btrfs: Add sysfs support for metadata_uuid feature 2018-12-17 14:51:37 +01:00
sysfs.h btrfs: drop extra enum initialization where using defaults 2018-12-17 14:51:43 +01:00
transaction.c btrfs: don't run delayed refs in the end transaction logic 2018-12-17 14:51:47 +01:00
transaction.h btrfs: drop extra enum initialization where using defaults 2018-12-17 14:51:43 +01:00
tree-checker.c btrfs: tree-checker: Don't check max block group size as current max chunk size limit is unreliable 2018-12-04 15:05:30 +01:00
tree-checker.h
tree-defrag.c
tree-log.c Btrfs: fix fsync of files with multiple hard links in new directories 2018-12-17 14:51:43 +01:00
tree-log.h Btrfs: remove no longer used io_err from btrfs_log_ctx 2018-12-17 14:51:31 +01:00
ulist.c
ulist.h
uuid-tree.c
volumes.c btrfs: use offset_in_page instead of open-coding it 2018-12-17 14:51:45 +01:00
volumes.h btrfs: remove btrfs_bio_end_io_t 2018-12-17 14:51:40 +01:00
xattr.c
xattr.h
zlib.c
zstd.c