linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [GIT PULL] Btrfs updates for 5.2
@ 2019-05-06 13:31  2% David Sterba
  0 siblings, 0 replies; 105+ results
From: David Sterba @ 2019-05-06 13:31 UTC (permalink / raw)
  To: torvalds; +Cc: David Sterba, clm, linux-btrfs, linux-kernel

Hi,

this time the majority of changes are cleanups, though there's still a
number of changes of user interest. Please pull, thanks.

User visible changes:

- better read time and write checks to catch errors early and before
  writing data to disk (to catch potential memory corruption on data that
  get checksummed)

- qgroups + metadata relocation: last speed up patch int the series to
  address the slowness, there should be no overhead comparing balance with
  and without qgroups

- FIEMAP ioctl does not start a transaction unnecessarily, this can result
  in a speed up and less blocking due to IO

- LOGICAL_INO (v1, v2) does not start transaction unnecessarily, this can
  speed up the mentioned ioctl and scrub as well

- fsync on files with many (but not too many) hardlinks is faster, finer
  decision if the links should be fsynced individually or completely

- send tries harder to find ranges to clone

- trim/discard will skip unallocated chunks that haven't been touched
  since the last mount


Fixes:

- send flushes delayed allocation before start, otherwise it could miss
  some changes in case of a very recent rw->ro switch of a subvolume

- fix fallocate with qgroups that could lead to space accounting underflow,
  reported as a warning

- trim/discard ioctl honours the requested range

- starting send and dedupe on a subvolume at the same time will let only
  one of them succeed, this is to prevent changes that send could miss due
  to dedupe; both operations are restartable


Core changes:

- more tree-checker validations, errors reported by fuzzing tools
  - device item
  - inode item
  - block group profiles

- tracepoints for extent buffer locking

- async cow preallocates memory to avoid errors happening too deep in the
  call chain

- metadata reservations for delalloc reworked to better adapt in
  many-writers/low-space scenarios

- improved space flushing logic for intense DIO vs buffered workloads

- lots of cleanups
  - removed unused struct members
  - redundant argument removal
  - properties and xattrs
  - extent buffer locking
  - selftests
  - use common file type conversions
  - many-argument functions reduction

----------------------------------------------------------------
The following changes since commit 37624b58542fb9f2d9a70e6ea006ef8a5f66c30b:

  Linux 5.1-rc7 (2019-04-28 17:04:13 -0700)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-5.2-tag

for you to fetch changes up to b1c16ac978fd40ae636e629bb69a652df7eebdc2:

  btrfs: Use kvmalloc for allocating compressed path context (2019-05-02 13:48:19 +0200)

----------------------------------------------------------------
Anand Jain (22):
      btrfs: merge _btrfs_set_prop helpers
      btrfs: drop redundant forward declaration in props.c
      btrfs: rename fs_info argument to fs_private
      btrfs: refactor btrfs_set_prop and add btrfs_set_prop_trans
      btrfs: drop unused parameter in mount_subvol
      btrfs: prop: open code btrfs_set_prop in inherit_prop
      btrfs: rename btrfs_setxattr to btrfs_setxattr_trans
      btrfs: rename do_setxattr to btrfs_setxattr
      btrfs: export btrfs_setxattr
      btrfs: remove redundant readonly root check in btrfs_setxattr_trans
      btrfs: split btrfs_setxattr calls regarding transaction
      btrfs: cleanup btrfs_setxattr_trans and drop transaction parameter
      btrfs: refactor btrfs_set_props to validate externally
      btrfs: export btrfs_set_prop
      btrfs: start transaction in btrfs_ioctl_setflags()
      btrfs: drop useless inode i_flags copy and restore
      btrfs: modify local copy of btrfs_inode flags
      btrfs: drop old_fsflags in btrfs_ioctl_setflags
      btrfs: drop local copy of inode i_mode
      btrfs: start transaction in xattr_handler_set_prop
      btrfs: delete unused function btrfs_set_prop_trans
      btrfs: merge calls of btrfs_setxattr and btrfs_setxattr_trans in btrfs_set_prop

Arnd Bergmann (1):
      btrfs: use BUG() instead of BUG_ON(1)

David Sterba (107):
      btrfs: scrub: return EAGAIN when fs is closing
      btrfs: switch extent_io_tree::track_uptodate to bool
      btrfs: add assertion helpers for spinning writers
      btrfs: use assertion helpers for spinning writers
      btrfs: add assertion helpers for spinning readers
      btrfs: use assertion helpers for spinning readers
      btrfs: add assertion helpers for extent buffer read lock counters
      btrfs: use assertion helpers for extent buffer read lock counters
      btrfs: add assertion helpers for extent buffer write lock counters
      btrfs: use assertion helpers for extent buffer write lock counters
      btrfs: switch extent_buffer::lock_nested to bool
      btrfs: tests: handle fs_info allocation failure in extent_io tests
      btrfs: tests: don't leak fs_info in extent_io bitmap tests
      btrfs: tests: print file:line for error messages
      btrfs: tests: add table of most common errors
      btrfs: tests: use standard error message after fs_info allocation failure
      btrfs: tests: use standard error message after root allocation failure
      btrfs: tests: use standard error message after extent buffer allocation failure
      btrfs: tests: use standard error message after path allocation failure
      btrfs: tests: use standard error message after inode allocation failure
      btrfs: tests: use standard error message after block group allocation failure
      btrfs: tests: properly initialize fs_info of extent buffer
      btrfs: tests: return errors from extent map tests
      btrfs: tests: return errors from extent map test case 1
      btrfs: tests: return errors from extent map test case 2
      btrfs: tests: return errors from extent map test case 3
      btrfs: tests: return errors from extent map test case 4
      btrfs: tests: return error from all extent map test cases
      btrfs: tests: use standard error message after extent map allocation failure
      btrfs: tests: use SZ_ constants everywhere
      btrfs: tests: fix comments about tested extent map ranges
      btrfs: tests: drop messages when some tests finish
      btrfs: tests: unify messages when tests start
      btrfs: remove stale definition of BUFFER_LRU_MAX
      btrfs: move tree block wait and write helpers to tree-log
      btrfs: get fs_info from eb in lock_extent_buffer_for_io
      btrfs: get fs_info from eb in repair_eb_io_failure
      btrfs: get fs_info from eb in write_one_eb
      btrfs: get fs_info from eb in leaf_data_end
      btrfs: get fs_info from eb in btrfs_exclude_logged_extents
      btrfs: get fs_info from eb in check_tree_block_fsid
      btrfs: get fs_info from eb in tree_mod_log_eb_copy
      btrfs: get fs_info from eb in clean_tree_block
      btrfs: get fs_info from eb in btrfs_leaf_free_space
      btrfs: get fs_info from eb in read_node_slot
      btrfs: get fs_info from eb in btree_read_extent_buffer_pages
      btrfs: get fs_info from eb in btrfs_verify_level_key
      btrfs: qgroup: remove obsolete fs_info members
      btrfs: tree-checker: get fs_info from eb in generic_err
      btrfs: tree-checker: get fs_info from eb in file_extent_err
      btrfs: tree-checker: get fs_info from eb in check_csum_item
      btrfs: tree-checker: get fs_info from eb in dir_item_err
      btrfs: tree-checker: get fs_info from eb in check_dir_item
      btrfs: tree-checker: get fs_info from eb in block_group_err
      btrfs: tree-checker: get fs_info from eb in check_block_group_item
      btrfs: tree-checker: get fs_info from eb in check_extent_data_item
      btrfs: tree-checker: get fs_info from eb in check_leaf_item
      btrfs: tree-checker: get fs_info from eb in check_leaf
      btrfs: tree-checker: get fs_info from eb in chunk_err
      btrfs: tree-checker: get fs_info from eb in dev_item_err
      btrfs: tree-checker: get fs_info from eb in check_dev_item
      btrfs: tree-checker: get fs_info from eb in check_inode_item
      btrfs: get fs_info from eb in btrfs_check_leaf_full
      btrfs: get fs_info from eb in btrfs_check_leaf_relaxed
      btrfs: get fs_info from eb in btrfs_check_node
      btrfs: get fs_info from eb in should_balance_chunk
      btrfs: get fs_info from eb in btrfs_check_chunk_valid
      btrfs: get fs_info from eb in read_one_chunk
      btrfs: get fs_info from eb in read_one_dev
      btrfs: get fs_info from trans in write_one_cache_group
      btrfs: get fs_info from trans in btrfs_setup_space_cache
      btrfs: get fs_info from trans in btrfs_write_dirty_block_groups
      btrfs: get fs_info from trans in update_block_group
      btrfs: get fs_info from trans in btrfs_create_tree
      btrfs: get fs_info from trans in btrfs_need_log_full_commit
      btrfs: get fs_info from trans in btrfs_set_log_full_commit
      btrfs: get fs_info from trans in create_free_space_inode
      btrfs: get fs_info from trans in btrfs_write_out_cache
      btrfs: get fs_info from trans in push_node_left
      btrfs: get fs_info from trans in balance_node_right
      btrfs: get fs_info from trans in insert_ptr
      btrfs: get fs_info from trans in copy_for_split
      btrfs: get fs_info from trans in init_first_rw_device
      btrfs: get fs_info from trans in btrfs_finish_sprout
      btrfs: get fs_info from trans in btrfs_run_dev_stats
      btrfs: get fs_info from trans in btrfs_run_dev_replace
      btrfs: get fs_info from block group in next_block_group
      btrfs: get fs_info from block group in pin_down_extent
      btrfs: get fs_info from block group in lookup_free_space_inode
      btrfs: get fs_info from block group in load_free_space_cache
      btrfs: get fs_info from block group in write_pinned_extent_entries
      btrfs: get fs_info from block group in btrfs_find_space_cluster
      btrfs: get fs_info from block group in search_free_space_info
      btrfs: get fs_info from eb in __push_leaf_right
      btrfs: get fs_info from eb in __push_leaf_left
      btrfs: get fs_info from device in btrfs_rm_dev_item
      btrfs: get fs_info from device in btrfs_scrub_cancel_dev
      btrfs: get fs_info from device in btrfs_rm_dev_replace_free_srcdev
      btrfs: remove unused parameter fs_info from split_item
      btrfs: remove unused parameter fs_info from btrfs_truncate_item
      btrfs: remove unused parameter fs_info from btrfs_extend_item
      btrfs: remove unused parameter fs_info from tree_move_down
      btrfs: remove unused parameter fs_info from from tree_advance
      btrfs: remove unused parameter fs_info from CHECK_FE_ALIGNED
      btrfs: remove unused parameter fs_info from emit_last_fiemap_cache
      btrfs: remove unused parameter fs_info from btrfs_add_delayed_extent_op
      btrfs: remove unused parameter fs_info from btrfs_set_disk_extent_flags

Dennis Zhou (1):
      btrfs: zstd: remove indirect calls for local functions

Filipe Manana (8):
      Btrfs: remove no longer used 'sync' member from transaction handle
      Btrfs: remove no longer used member num_dirty_bgs from transaction
      Btrfs: remove no longer used function to run delayed refs asynchronously
      Btrfs: do not start a transaction at iterate_extent_inodes()
      Btrfs: do not start a transaction during fiemap
      Btrfs: send, flush dellaloc in order to avoid data loss
      Btrfs: fix race between send and deduplication that lead to failures and crashes
      Btrfs: improve performance on fsync of files with multiple hardlinks

Goldwyn Rodrigues (2):
      btrfs: Initialize inode::i_mapping once in btrfs_symlink
      btrfs: Perform locking/unlocking in btrfs_remap_file_range()

Jeff Mahoney (1):
      btrfs: replace pending/pinned chunks lists with io tree

Johannes Thumshirn (3):
      btrfs: factor our read/write stage off csum_tree_block into its callers
      btrfs: warn if extent buffer mapping crosses a page boundary in csum_tree_block
      btrfs: reduce kmap_atomic time for checksumming

Josef Bacik (3):
      btrfs: fix panic during relocation after ENOSPC before writeback happens
      btrfs: track DIO bytes in flight
      btrfs: reserve delalloc metadata differently

Nathan Chancellor (1):
      btrfs: Turn an 'else if' into an 'else' in btrfs_uuid_tree_add

Nikolay Borisov (36):
      btrfs: Remove EXTENT_WRITEBACK
      btrfs: Remove EXTENT_IOBITS
      btrfs: Exploit the fact that pages passed to extent_readpages are always contiguous
      btrfs: Remove unused -EIO assignment in end_bio_extent_readpage
      btrfs: Correctly free extent buffer in case btree_read_extent_buffer_pages fails
      btrfs: Use less confusing condition for uptodate parameter to btrfs_writepage_endio_finish_ordered
      btrfs: Honour FITRIM range constraints during free space trim
      btrfs: combine device update operations during transaction commit
      btrfs: Handle pending/pinned chunks before blockgroup relocation during device shrink
      btrfs: Rename and export clear_btree_io_tree
      btrfs: Populate ->orig_block_len during read_one_chunk
      btrfs: Introduce new bits for device allocation tree
      btrfs: Implement set_extent_bits_nowait
      btrfs: Stop using call_rcu for device freeing
      btrfs: Transpose btrfs_close_devices/btrfs_mapping_tree_free in close_ctree
      btrfs: Remove 'trans' argument from find_free_dev_extent(_start)
      btrfs: Factor out in_range macro
      btrfs: Optimize unallocated chunks discard
      btrfs: Implement find_first_clear_extent_bit
      btrfs: Switch btrfs_trim_free_extents to find_first_clear_extent_bit
      btrfs: Remove redundant inode argument from btrfs_add_ordered_sum
      btrfs: Define submit_bio_hook's type directly
      btrfs: Change submit_bio_hook to taking an inode directly
      btrfs: Remove 'tree' argument from read_extent_buffer_pages
      btrfs: Pass 0 for bio_offset to btrfs_wq_submit_bio
      btrfs: Always pass 0 bio_offset for btree_submit_bio_start
      btrfs: Remove bio_offset argument from submit_bio_hook
      btrfs: Document btrfs_csum_one_bio
      btrfs: Preallocate chunks in cow_file_range_async
      btrfs: Rename async_cow to async_chunk
      btrfs: Remove fs_info from struct async_chunk
      btrfs: Make compress_file_range take only struct async_chunk
      btrfs: Replace clear_extent_bit with unlock_extent
      btrfs: Set io_tree only once in submit_compressed_extents
      btrfs: Factor out common extent locking code in submit_compressed_extents
      btrfs: Use kvmalloc for allocating compressed path context

Phillip Potter (1):
      btrfs: use common file type conversion

Qu Wenruo (39):
      btrfs: Don't panic when we can't find a root key
      btrfs: Introduce fs_info to extent_io_tree
      btrfs: Introduce extent_io_tree::owner to distinguish different io_trees
      btrfs: tracepoints: Add trace events for extent_io_tree
      btrfs: reloc: Fix NULL pointer dereference due to expanded reloc_root lifespan
      btrfs: Make btrfs_(set|clear)_header_flag return void
      btrfs: Check the first key and level for cached extent buffer
      btrfs: Always output error message when key/level verification fails
      btrfs: extent_io: Move the BUG_ON() in flush_write_bio() one level up
      btrfs: extent_io: Handle errors better in extent_write_full_page()
      btrfs: extent_io: Handle errors better in btree_write_cache_pages()
      btrfs: extent_io: Kill dead condition in extent_write_cache_pages()
      btrfs: extent_io: Handle errors better in extent_write_locked_range()
      btrfs: extent_io: add proper error handling to lock_extent_buffer_for_io()
      btrfs: extent_io: Handle errors better in extent_writepages()
      btrfs: disk-io: Show the timing of corrupted tree block explicitly
      btrfs: Move btrfs_check_chunk_valid() to tree-check.[ch] and export it
      btrfs: tree-checker: Make chunk item checker messages more readable
      btrfs: tree-checker: Make btrfs_check_chunk_valid() return EUCLEAN instead of EIO
      btrfs: tree-checker: Check chunk item at tree block read time
      btrfs: tree-checker: Verify dev item
      btrfs: tree-checker: Enhance chunk checker to validate chunk profile
      btrfs: tree-checker: Verify inode item
      btrfs: inode: Verify inode mode to avoid NULL pointer dereference
      btrfs: tree-checker: Remove comprehensive root owner check
      btrfs: Do mandatory tree block check before submitting bio
      btrfs: trace: Introduce trace events for sleepable tree lock
      btrfs: trace: Introduce trace events for all btrfs tree locking events
      btrfs: delayed-ref: Introduce better documented delayed ref structures
      btrfs: extent-tree: Open-code process_func in __btrfs_mod_ref
      btrfs: delayed-ref: Use btrfs_ref to refactor btrfs_add_delayed_tree_ref()
      btrfs: delayed-ref: Use btrfs_ref to refactor btrfs_add_delayed_data_ref()
      btrfs: ref-verify: Use btrfs_ref to refactor btrfs_ref_tree_mod()
      btrfs: extent-tree: Use btrfs_ref to refactor add_pinned_bytes()
      btrfs: extent-tree: Use btrfs_ref to refactor btrfs_inc_extent_ref()
      btrfs: extent-tree: Use btrfs_ref to refactor btrfs_free_extent()
      btrfs: qgroup: Don't scan leaf if we're modifying reloc tree
      btrfs: tree-checker: Allow error injection for tree-checker
      btrfs: ctree: Dump the leaf before BUG_ON in btrfs_set_item_key_safe

Robbie Ko (2):
      Btrfs: send, improve clone range
      Btrfs: fix data bytes_may_use underflow with fallocate due to failed quota reserve

 fs/btrfs/acl.c                         |   6 +-
 fs/btrfs/backref.c                     |  38 +-
 fs/btrfs/btrfs_inode.h                 |   8 -
 fs/btrfs/compression.c                 |   2 +-
 fs/btrfs/ctree.c                       | 254 +++++++------
 fs/btrfs/ctree.h                       |  78 ++--
 fs/btrfs/delayed-inode.c               |   5 +-
 fs/btrfs/delayed-ref.c                 |  46 ++-
 fs/btrfs/delayed-ref.h                 | 122 +++++-
 fs/btrfs/dev-replace.c                 |   8 +-
 fs/btrfs/dev-replace.h                 |   3 +-
 fs/btrfs/dir-item.c                    |   5 +-
 fs/btrfs/disk-io.c                     | 225 ++++++------
 fs/btrfs/disk-io.h                     |   7 +-
 fs/btrfs/extent-tree.c                 | 651 ++++++++++++---------------------
 fs/btrfs/extent_io.c                   | 356 ++++++++++++------
 fs/btrfs/extent_io.h                   |  89 +++--
 fs/btrfs/extent_map.c                  |  38 ++
 fs/btrfs/file-item.c                   |  32 +-
 fs/btrfs/file.c                        |  47 ++-
 fs/btrfs/free-space-cache.c            |  45 +--
 fs/btrfs/free-space-cache.h            |  18 +-
 fs/btrfs/free-space-tree.c             |  24 +-
 fs/btrfs/free-space-tree.h             |   1 -
 fs/btrfs/inode-item.c                  |   8 +-
 fs/btrfs/inode.c                       | 329 +++++++++--------
 fs/btrfs/ioctl.c                       | 181 ++++-----
 fs/btrfs/locking.c                     | 157 ++++++--
 fs/btrfs/ordered-data.c                |  14 +-
 fs/btrfs/ordered-data.h                |   3 +-
 fs/btrfs/print-tree.c                  |   2 +-
 fs/btrfs/props.c                       | 242 ++++++------
 fs/btrfs/props.h                       |   7 +-
 fs/btrfs/qgroup.c                      |   5 +-
 fs/btrfs/ref-verify.c                  |  53 +--
 fs/btrfs/ref-verify.h                  |  10 +-
 fs/btrfs/relocation.c                  | 123 ++++---
 fs/btrfs/root-tree.c                   |  13 +-
 fs/btrfs/scrub.c                       |   6 +-
 fs/btrfs/send.c                        | 114 +++++-
 fs/btrfs/super.c                       |   4 +-
 fs/btrfs/tests/btrfs-tests.c           |  17 +-
 fs/btrfs/tests/btrfs-tests.h           |  17 +-
 fs/btrfs/tests/extent-buffer-tests.c   |   8 +-
 fs/btrfs/tests/extent-io-tests.c       |  35 +-
 fs/btrfs/tests/extent-map-tests.c      | 213 +++++++----
 fs/btrfs/tests/free-space-tests.c      |  11 +-
 fs/btrfs/tests/free-space-tree-tests.c |  14 +-
 fs/btrfs/tests/inode-tests.c           |  34 +-
 fs/btrfs/tests/qgroup-tests.c          |  20 +-
 fs/btrfs/transaction.c                 |  64 +---
 fs/btrfs/transaction.h                 |   4 +-
 fs/btrfs/tree-checker.c                | 513 ++++++++++++++++++++------
 fs/btrfs/tree-checker.h                |  11 +-
 fs/btrfs/tree-log.c                    | 289 +++++++++++----
 fs/btrfs/tree-log.h                    |  10 +-
 fs/btrfs/uuid-tree.c                   |   6 +-
 fs/btrfs/volumes.c                     | 469 ++++++++----------------
 fs/btrfs/volumes.h                     |  39 +-
 fs/btrfs/xattr.c                       |  65 ++--
 fs/btrfs/xattr.h                       |   7 +-
 fs/btrfs/zstd.c                        |  11 +-
 include/trace/events/btrfs.h           | 243 +++++++++++-
 include/uapi/linux/btrfs_tree.h        |   2 +
 64 files changed, 3287 insertions(+), 2194 deletions(-)

^ permalink raw reply	[relevance 2%]

* [GIT PULL] Btrfs updates for 6.1
@ 2022-10-04  6:31  2% David Sterba
  0 siblings, 0 replies; 105+ results
From: David Sterba @ 2022-10-04  6:31 UTC (permalink / raw)
  To: torvalds; +Cc: David Sterba, linux-btrfs, linux-kernel

Hi,

please pull the following updates for btrfs. There's a bunch of
performance improvements, most notably the FIEMAP speedup, the new block
group tree to speed up mount on large filesystems, more io_uring
integration, some sysfs exports and the usual fixes and core updates.

Thanks.

---

Performance:

- outstanding FIEMAP speed improvement
  - algorithmic change how extents are enumerated leads to orders of
    magnitude speed boost (uncached and cached)
  - extent sharing check speedup (2.2x uncached, 3x cached)
  - add more cancellation points, allowing to interrupt seeking in files
    with large number of extents
  - more efficient hole and data seeking (4x uncached, 1.3x cached)
  - sample results:
    256M, 32K extents:   4s ->  29ms  (~150x)
    512M, 64K extents:  30s ->  59ms  (~550x)
    1G,  128K extents: 225s -> 120ms (~1800x)

- improved inode logging, especially for directories (on dbench workload
  throughput +25%, max latency -21%)

- improved buffered IO, remove redundant extent state tracking, lowering
  memory consumption and avoiding rb tree traversal

- add sysfs tunable to let qgroup temporarily skip exact accounting when
  deleting snapshot, leading to a speedup but requiring a rescan after
  that, will be used by snapper

- support io_uring and buffered writes, until now it was just for direct
  IO, with the no-wait semantics implemented in the buffered write path
  it now works and leads to speed improvement in IOPS (2x), throughput
  (2.2x), latency (depends, 2x to 150x)

- small performance improvements when dropping and searching for extent
  maps as well as when flushing delalloc in COW mode (throughput +5MB/s)

User visible changes:

- new incompatible feature block-group-tree adding a dedicated tree for
  tracking block groups, this allows a much faster load during mount and
  avoids seeking unlike when it's scattered in the extent tree items
  - this reduces mount time for many-terabyte sized filesystems
  - conversion tool will be provided so existing filesystem can also be
    updated in place
  - to reduce test matrix and feature combinations requires no-holes
    and free-space-tree (mkfs defaults since 5.15)

- improved reporting of super block corruption detected by scrub

- scrub also tries to repair super block and does not wait until next
  commit

- discard stats and tunables are exported in sysfs
  (/sys/fs/btrfs/FSID/discard)

- qgroup status is exported in sysfs (/sys/sys/fs/btrfs/FSID/qgroups/)

- verify that super block was not modified when thawing filesystem

Fixes:

- FIEMAP fixes
  - fix extent sharing status, does not depend on the cached status where
    merged
  - flush delalloc so compressed extents are reported correctly

- fix alignment of VMA for memory mapped files on THP

- send: fix failures when processing inodes with no links (orphan files
  and directories)

- fix race between quota enable and quota rescan ioctl

- handle more corner cases for read-only compat feature verification

- fix missed extent on fsync after dropping extent maps

Core:

- lockdep annotations to validate various transactions states and state
  transitions

- preliminary support for fs-verity in send

- more effective memory use in scrub for subpage where sector is smaller
  than page

- block group caching progress logic has been removed, load is now
  synchronous

- simplify end IO callbacks and bio handling, use chained bios instead
  of own tracking

- add no-wait semantics to several functions (tree search, nocow,
  flushing, buffered write

- cleanups and refactoring

MM changes:

- export balance_dirty_pages_ratelimited_flags

----------------------------------------------------------------
The following changes since commit f76349cf41451c5c42a99f18a9163377e4b364ff:

  Linux 6.0-rc7 (2022-09-25 14:01:02 -0700)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-6.1-tag

for you to fetch changes up to cbddcc4fa3443fe8cfb2ff8e210deb1f6a0eea38:

  btrfs: set generation before calling btrfs_clean_tree_block in btrfs_init_new_buffer (2022-09-29 17:08:31 +0200)

----------------------------------------------------------------
Alexander Zhu (1):
      btrfs: fix alignment of VMA for memory mapped files on THP

BingJing Chang (2):
      btrfs: send: refactor arguments of get_inode_info()
      btrfs: send: fix failures when processing inodes with no links

Boris Burkov (1):
      btrfs: send: add support for fs-verity

Christoph Hellwig (13):
      btrfs: don't create integrity bioset for btrfs_bioset
      btrfs: move btrfs_bio allocation to volumes.c
      btrfs: pass the operation to btrfs_bio_alloc
      btrfs: don't take a bio_counter reference for cloned bios
      btrfs: use chained bios when cloning
      btrfs: properly abstract the parity raid bio handling
      btrfs: give struct btrfs_bio a real end_io handler
      btrfs: factor out low-level bio setup from submit_stripe_bio
      btrfs: decide bio cloning inside submit_stripe_bio
      btrfs: add fast path for single device io in __btrfs_map_block
      btrfs: stop allocation a btrfs_io_context for simple I/O
      btrfs: zoned: refactor device checks in btrfs_check_zoned_mode
      btrfs: stop tracking failed reads in the I/O tree

Christophe JAILLET (1):
      btrfs: qgroup: fix a typo in a comment

David Sterba (3):
      btrfs: sysfs: use sysfs_streq for string matching
      btrfs: sysfs: show discard stats and tunables in non-debug build
      btrfs: add KCSAN annotations for unlocked access to block_rsv->full

Ethan Lien (1):
      btrfs: remove unnecessary EXTENT_UPTODATE state in buffered I/O path

Filipe Manana (42):
      btrfs: don't drop dir index range items when logging a directory
      btrfs: remove the root argument from log_new_dir_dentries()
      btrfs: update stale comment for log_new_dir_dentries()
      btrfs: free list element sooner at log_new_dir_dentries()
      btrfs: avoid memory allocation at log_new_dir_dentries() for common case
      btrfs: remove root argument from btrfs_delayed_item_reserve_metadata()
      btrfs: store index number instead of key in struct btrfs_delayed_item
      btrfs: remove unused logic when looking up delayed items
      btrfs: shrink the size of struct btrfs_delayed_item
      btrfs: search for last logged dir index if it's not cached in the inode
      btrfs: move need_log_inode() to above log_conflicting_inodes()
      btrfs: move log_new_dir_dentries() above btrfs_log_inode()
      btrfs: log conflicting inodes without holding log mutex of the initial inode
      btrfs: skip logging parent dir when conflicting inode is not a dir
      btrfs: use delayed items when logging a directory
      btrfs: simplify adding and replacing references during log replay
      btrfs: simplify error handling at btrfs_del_root_ref()
      btrfs: fix race between quota enable and quota rescan ioctl
      btrfs: allow hole and data seeking to be interruptible
      btrfs: make hole and data seeking a lot more efficient
      btrfs: remove check for impossible block start for an extent map at fiemap
      btrfs: remove zero length check when entering fiemap
      btrfs: properly flush delalloc when entering fiemap
      btrfs: allow fiemap to be interruptible
      btrfs: rename btrfs_check_shared() to a more descriptive name
      btrfs: speedup checking for extent sharedness during fiemap
      btrfs: skip unnecessary extent buffer sharedness checks during fiemap
      btrfs: make fiemap more efficient and accurate reporting extent sharedness
      btrfs: remove useless used space increment during space reservation
      btrfs: fix missed extent on fsync after dropping extent maps
      btrfs: move btrfs_drop_extent_cache() to extent_map.c
      btrfs: use extent_map_end() at btrfs_drop_extent_map_range()
      btrfs: use cond_resched_rwlock_write() during inode eviction
      btrfs: move open coded extent map tree deletion out of inode eviction
      btrfs: add helper to replace extent map range with a new extent map
      btrfs: remove the refcount warning/check at free_extent_map()
      btrfs: remove unnecessary extent map initializations
      btrfs: assert tree is locked when clearing extent map from logging
      btrfs: remove unnecessary NULL pointer checks when searching extent maps
      btrfs: remove unnecessary next extent map search
      btrfs: avoid pointless extent map tree search when flushing delalloc
      btrfs: drop extent map range more efficiently

Gaosheng Cui (1):
      btrfs: remove btrfs_bit_radix_cachep declaration

Ioannis Angelakopoulos (7):
      btrfs: add macros for annotating wait events with lockdep
      btrfs: add lockdep annotations for num_writers wait event
      btrfs: add lockdep annotations for num_extwriters wait event
      btrfs: add lockdep annotations for transaction states wait events
      btrfs: add lockdep annotations for pending_ordered wait event
      btrfs: change the lockdep class of free space inode's invalidate_lock
      btrfs: add lockdep annotations for the ordered extents wait event

Jeff Layton (1):
      btrfs: remove stale prototype of btrfs_write_inode

Josef Bacik (65):
      btrfs: use btrfs_fs_closing for background bg work
      btrfs: simplify arguments of btrfs_update_space_info and rename
      btrfs: handle space_info setting of bg in btrfs_add_bg_to_space_info
      btrfs: convert block group bit field to use bit helpers
      btrfs: remove lock protection for BLOCK_GROUP_FLAG_TO_COPY
      btrfs: simplify block group traversal in btrfs_put_block_group_cache
      btrfs: remove BLOCK_GROUP_FLAG_HAS_CACHING_CTL
      btrfs: remove lock protection for BLOCK_GROUP_FLAG_RELOCATING_REPAIR
      btrfs: delete btrfs_wait_space_cache_v1_finished
      btrfs: call __btrfs_remove_free_space_cache_locked on cache load failure
      btrfs: remove use btrfs_remove_free_space_cache instead of variant
      btrfs: rename clean_io_failure and remove extraneous args
      btrfs: unexport internal failrec functions
      btrfs: convert the io_failure_tree to a plain rb_tree
      btrfs: use find_first_extent_bit in btrfs_clean_io_failure
      btrfs: separate out the extent state and extent buffer init code
      btrfs: separate out the eb and extent state leak helpers
      btrfs: temporarily export alloc_extent_state helpers
      btrfs: move extent state init and alloc functions to their own file
      btrfs: convert BUG_ON(EXTENT_BIT_LOCKED) checks to ASSERT's
      btrfs: move simple extent bit helpers out of extent_io.c
      btrfs: export wait_extent_bit
      btrfs: move btrfs_debug_check_extent_io_range into extent-io-tree.c
      btrfs: temporarily export and move core extent_io_tree tree functions
      btrfs: temporarily export and then move extent state helpers
      btrfs: move a few exported extent_io_tree helpers to extent-io-tree.c
      btrfs: move core extent_io_tree functions to extent-io-tree.c
      btrfs: unexport btrfs_debug_check_extent_io_range
      btrfs: unexport all the temporary exports for extent-io-tree.c
      btrfs: remove struct tree_entry in extent-io-tree.c
      btrfs: use next_state instead of rb_next where we can
      btrfs: make tree_search return struct extent_state
      btrfs: make tree_search_for_insert return extent_state
      btrfs: make tree_search_prev_next return extent_state's
      btrfs: use next_state/prev_state in merge_state
      btrfs: move extent io tree unrelated prototypes to their appropriate header
      btrfs: drop exclusive_bits from set_extent_bit
      btrfs: remove the wake argument from clear_extent_bits
      btrfs: remove failed_start argument from set_extent_bit
      btrfs: drop extent_changeset from set_extent_bit
      btrfs: unify the lock/unlock extent variants
      btrfs: remove extent_io_tree::track_uptodate
      btrfs: get rid of extent_io_tree::dirty_bytes
      btrfs: don't clear CTL bits when trying to release extent state
      btrfs: replace delete argument with EXTENT_CLEAR_ALL_BITS
      btrfs: don't init io tree with private data for non-inodes
      btrfs: remove is_data_inode() checks in extent-io-tree.c
      btrfs: move btrfs_caching_type to block-group.h
      btrfs: move btrfs_full_stripe_locks_tree into block-group.h
      btrfs: move btrfs_init_async_reclaim_work prototype to space-info.h
      btrfs: move btrfs_pinned_by_swapfile prototype into volumes.h
      btrfs: move btrfs_swapfile_pin into volumes.h
      btrfs: move fs_info forward declarations to the top of ctree.h
      btrfs: move btrfs_csum_ptr to inode.c
      btrfs: move the fs_info related helpers closer to fs_info in ctree.h
      btrfs: move btrfs_ordered_sum_size into file-item.c
      btrfs: open code and remove btrfs_inode_sectorsize helper
      btrfs: open code and remove btrfs_insert_inode_hash helper
      btrfs: use a runtime flag to indicate an inode is a free space inode
      btrfs: add struct declarations in dev-replace.h
      btrfs: implement a nowait option for tree searches
      btrfs: make can_nocow_extent nowait compatible
      btrfs: add the ability to use NO_FLUSH for data reservations
      btrfs: add btrfs_try_lock_ordered_range
      btrfs: make btrfs_check_nocow_lock nowait compatible

Maciej S. Szmigiero (1):
      btrfs: don't print information about space cache or tree every remount

Omar Sandoval (2):
      btrfs: rename btrfs_insert_file_extent() to btrfs_insert_hole_extent()
      btrfs: get rid of block group caching progress logic

Qu Wenruo (26):
      btrfs: dump extra info if one free space cache has more bitmaps than it should
      btrfs: scrub: properly report super block errors in system log
      btrfs: scrub: try to fix super block errors
      btrfs: scrub: remove impossible sanity checks
      btrfs: scrub: use pointer array to replace sblocks_for_recheck
      btrfs: scrub: factor out initialization of scrub_block into helper
      btrfs: scrub: factor out allocation and initialization of scrub_sector into helper
      btrfs: scrub: introduce scrub_block::pages for more efficient memory usage for subpage
      btrfs: scrub: remove scrub_sector::page and use scrub_block::pages instead
      btrfs: scrub: move logical/physical/dev/mirror_num from scrub_sector to scrub_block
      btrfs: scrub: use larger block size for data extent scrub
      btrfs: check superblock to ensure the fs was not modified at thaw time
      btrfs: output human readable space info flag
      btrfs: dump all space infos if we abort transaction due to ENOSPC
      btrfs: enhance unsupported compat RO flags handling
      btrfs: don't save block group root into super block
      btrfs: separate BLOCK_GROUP_TREE compat RO flag from EXTENT_TREE_V2
      btrfs: sysfs: introduce global qgroup attribute group
      btrfs: introduce BTRFS_QGROUP_STATUS_FLAGS_MASK for later expansion
      btrfs: introduce BTRFS_QGROUP_RUNTIME_FLAG_CANCEL_RESCAN
      btrfs: introduce BTRFS_QGROUP_RUNTIME_FLAG_NO_ACCOUNTING to skip qgroup accounting
      btrfs: skip subtree scan if it's too high to avoid low stall in btrfs_commit_transaction()
      btrfs: update the comment for submit_extent_page()
      btrfs: switch page and disk_bytenr argument position for submit_extent_page()
      btrfs: move end_io_func argument to btrfs_bio_ctrl structure
      btrfs: relax block-group-tree feature dependency checks

Stefan Roesch (7):
      mm: export balance_dirty_pages_ratelimited_flags()
      btrfs: make prepare_pages nowait compatible
      btrfs: make lock_and_cleanup_extent_if_need nowait compatible
      btrfs: plumb NOWAIT through the write path
      btrfs: make btrfs_buffered_write nowait compatible
      btrfs: assert nowait mode is not used for some btree search functions
      btrfs: enable nowait async buffered writes

Tetsuo Handa (1):
      btrfs: set generation before calling btrfs_clean_tree_block in btrfs_init_new_buffer

Uros Bizjak (1):
      btrfs: use atomic_try_cmpxchg in free_extent_buffer

zhang songyi (1):
      btrfs: remove the unnecessary result variables

 fs/btrfs/Makefile                 |    2 +-
 fs/btrfs/backref.c                |  155 +-
 fs/btrfs/backref.h                |   20 +-
 fs/btrfs/block-group.c            |  182 +--
 fs/btrfs/block-group.h            |   39 +-
 fs/btrfs/block-rsv.c              |    3 +-
 fs/btrfs/block-rsv.h              |    9 +
 fs/btrfs/btrfs_inode.h            |   25 +-
 fs/btrfs/compression.c            |   54 +-
 fs/btrfs/ctree.c                  |   43 +-
 fs/btrfs/ctree.h                  |  370 ++---
 fs/btrfs/delalloc-space.c         |   13 +-
 fs/btrfs/delalloc-space.h         |    3 +-
 fs/btrfs/delayed-inode.c          |  292 ++--
 fs/btrfs/delayed-inode.h          |   34 +-
 fs/btrfs/dev-replace.c            |   16 +-
 fs/btrfs/dev-replace.h            |    4 +
 fs/btrfs/disk-io.c                |  303 ++--
 fs/btrfs/disk-io.h                |    7 +-
 fs/btrfs/extent-io-tree.c         | 1673 +++++++++++++++++++++
 fs/btrfs/extent-io-tree.h         |  126 +-
 fs/btrfs/extent-tree.c            |   33 +-
 fs/btrfs/extent_io.c              | 2923 +++++++++----------------------------
 fs/btrfs/extent_io.h              |   17 +-
 fs/btrfs/extent_map.c             |  347 ++++-
 fs/btrfs/extent_map.h             |    8 +
 fs/btrfs/file-item.c              |   38 +-
 fs/btrfs/file.c                   |  805 ++++++----
 fs/btrfs/free-space-cache.c       |  115 +-
 fs/btrfs/free-space-cache.h       |    1 -
 fs/btrfs/free-space-tree.c        |    8 -
 fs/btrfs/inode.c                  |  516 +++----
 fs/btrfs/ioctl.c                  |   24 +-
 fs/btrfs/locking.c                |   25 +
 fs/btrfs/locking.h                |    1 +
 fs/btrfs/misc.h                   |   35 +
 fs/btrfs/ordered-data.c           |   50 +-
 fs/btrfs/ordered-data.h           |   13 +-
 fs/btrfs/props.c                  |    5 +-
 fs/btrfs/qgroup.c                 |   96 +-
 fs/btrfs/qgroup.h                 |    3 +
 fs/btrfs/raid56.c                 |   45 +-
 fs/btrfs/raid56.h                 |    4 +-
 fs/btrfs/reflink.c                |   10 +-
 fs/btrfs/relocation.c             |   40 +-
 fs/btrfs/root-tree.c              |   16 +-
 fs/btrfs/scrub.c                  |  668 +++++----
 fs/btrfs/send.c                   |  461 +++---
 fs/btrfs/send.h                   |   15 +-
 fs/btrfs/space-info.c             |   96 +-
 fs/btrfs/space-info.h             |    9 +-
 fs/btrfs/super.c                  |  112 +-
 fs/btrfs/sysfs.c                  |  172 ++-
 fs/btrfs/tests/btrfs-tests.c      |    2 +-
 fs/btrfs/tests/extent-io-tests.c  |    7 +-
 fs/btrfs/tests/free-space-tests.c |   22 +-
 fs/btrfs/tests/inode-tests.c      |   10 +-
 fs/btrfs/transaction.c            |  162 +-
 fs/btrfs/tree-log.c               | 1593 ++++++++++++--------
 fs/btrfs/tree-log.h               |    8 +
 fs/btrfs/verity.c                 |    3 +-
 fs/btrfs/volumes.c                |  353 +++--
 fs/btrfs/volumes.h                |   50 +-
 fs/btrfs/zoned.c                  |  142 +-
 fs/verity/fsverity_private.h      |    2 -
 include/linux/fsverity.h          |    3 +
 include/trace/events/btrfs.h      |    2 -
 include/uapi/linux/btrfs.h        |    6 +
 include/uapi/linux/btrfs_tree.h   |    4 +
 mm/page-writeback.c               |    1 +
 70 files changed, 7212 insertions(+), 5242 deletions(-)
 create mode 100644 fs/btrfs/extent-io-tree.c

^ permalink raw reply	[relevance 2%]

* [GIT PULL] Btrfs updates for 5.11
@ 2020-12-14 15:15  2% David Sterba
  0 siblings, 0 replies; 105+ results
From: David Sterba @ 2020-12-14 15:15 UTC (permalink / raw)
  To: torvalds; +Cc: David Sterba, linux-btrfs, linux-kernel

Hi,

we have a mix of all kinds of changes, feature updates, core stuff,
performance improvements and lots of cleanups and preparatory changes.

There are no merge conflicts against current master branch, in past
weeks some conflicts emerged in linux-next but IIRC were trivial.
Please pull, thanks.

User visible:

- export filesystem generation in sysfs

- new features for mount option 'rescue'
  - what's currently supported is exported in sysfs
  - ignorebadroots/ibadroots - continue even if some essential tree
    roots are not usable (extent, uuid, data reloc, device, csum, free
    space)
  - ignoredatacsums/idatacsums - skip checksum verification on data
  - all - now enables ignorebadroots + ignoredatacsums + nologreplay

- export read mirror policy settings to sysfs, new policies will be
  added in the future

- remove inode number cache feature (mount -o inode_cache), obsoleted
  in 5.9

User visible fixes:

- async discard scheduling fixes on high loads

- update inode byte counter atomically so stat() does not report wrong
  value in some cases

- free space tree fixes
  - correctly report status of v2 after remount
  - clear v1 cache inodes when v2 is newly enabled after remount

Core:

- switch own tree lock implementation to standard rw semaphore
  - one-level lock nesting is not required anymore, the last use of this
    was in free space that's now loaded asynchronously
  - own implementation of adaptive spinning before taking mutex has been
    part of rwsem
  - performance seems to be better in general, much better (+tens of
    percents) for some workloads
  - lockdep does not complain

- finish direct IO conversion to iomap infrastructure, remove temporary
  workaround for DSYNC after iomap API updates

- preparatory work to support data and metadata blocks smaller than page
  - generalize code that assumes sectorsize == PAGE_SIZE, lots of
    refactoring
  - planned namely for 64K pages (eg. arm64, ppc64)
  - scrub read-only support

- preparatory work for zoned allocation mode (SMR/ZBC/ZNS friendly)
  - disable incompatible features
  - round-robin superblock write

- free space cache (v1) is loaded asynchronously, remove tree path
  recursion

- slightly improved time tacking for transaction kthread wake ups

Performance improvements (note that the numbers depend on load type or
other features and weren't run on the same machine):

- skip unnecessary work:
  - do not start readahead for csum tree when scrubbing non-data block
    groups
  - do not start and wait for delalloc on snapshot roots on transaction
    commit
  - fix race when defragmenting leads to unnecessary IO

- dbench speedups (+throughput%/-max latency%)
  - skip unnecessary searches for xattrs when logging an inode
    (+10.8/-8.2)
  - stop incrementing log batch when joining log transaction (1-2)
  - unlock path before checking if extent is shared during nocow
    writeback (+5.0/-20.5), on fio load +9.7% throughput/-9.8% runtime
  - several tree log improvements, eg. removing unnecessary operations,
    fixing races that lead to additional work (+12.7/-8.2)

- tree-checker error branches annotated with unlikely() (+3% throughput)

Other:

- cleanups

- lockdep fixes

- more btrfs_inode conversions

- error variable cleanups

----------------------------------------------------------------
The following changes since commit 0477e92881850d44910a7e94fc2c46f96faa131f:

  Linux 5.10-rc7 (2020-12-06 14:25:12 -0800)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-5.11-tag

for you to fetch changes up to b42fe98c92698d2a10094997e5f4d2dd968fd44f:

  btrfs: scrub: allow scrub to work with subpage sectorsize (2020-12-09 19:16:11 +0100)

----------------------------------------------------------------
Anand Jain (7):
      btrfs: sysfs: export filesystem generation
      btrfs: add helper for string match ignoring leading/trailing whitespace
      btrfs: create read policy framework
      btrfs: sysfs: add per-fs attribute for read policy
      btrfs: drop unused argument step from btrfs_free_extra_devids
      btrfs: drop never met disk total bytes check in verify_one_dev_extent
      btrfs: remove unused argument seed from btrfs_find_device

Boris Burkov (12):
      btrfs: lift read-write mount setup from mount and remount
      btrfs: start orphan cleanup on ro->rw remount
      btrfs: only mark bg->needs_free_space if free space tree is on
      btrfs: create free space tree on ro->rw remount
      btrfs: clear oneshot options on mount and remount
      btrfs: clear free space tree on ro->rw remount
      btrfs: keep sb cache_generation consistent with space_cache
      btrfs: use superblock state to print space_cache mount option
      btrfs: warn when remount will not change the free space tree
      btrfs: remove free space items when disabling space cache v1
      btrfs: skip space_cache v1 setup when not using it
      btrfs: fix lockdep warning when creating free space tree

David Sterba (22):
      btrfs: use the right number of levels for lockdep keysets
      btrfs: generate lockdep keyset names at compile time
      btrfs: send: use helpers to access root_item::ctransid
      btrfs: check-integrity: use proper helper to access btrfs_header
      btrfs: use root_item helpers for limit and flags in btrfs_create_tree
      btrfs: add set/get accessors for root_item::drop_level
      btrfs: remove unnecessary casts in printk
      btrfs: use precalculated sectorsize_bits from fs_info
      btrfs: replace div_u64 by shift in free_space_bitmap_size
      btrfs: replace s_blocksize_bits with fs_info::sectorsize_bits
      btrfs: store precalculated csum_size in fs_info
      btrfs: precalculate checksums per leaf once
      btrfs: use cached value of fs_info::csum_size everywhere
      btrfs: switch cached fs_info::csum_size from u16 to u32
      btrfs: remove unnecessary local variables for checksum size
      btrfs: check integrity: remove local copy of csum_size
      btrfs: scrub: remove local copy of csum_size from context
      btrfs: reorder extent buffer members for better packing
      btrfs: remove stub device info from messages when we have no fs_info
      btrfs: tree-checker: annotate all error branches as unlikely
      btrfs: drop casts of bio bi_sector
      btrfs: remove recalc_thresholds from free space ops

Filipe Manana (16):
      btrfs: assert we are holding the reada_lock when releasing a readahead zone
      btrfs: do not start readahead for csum tree when scrubbing non-data block groups
      btrfs: do not start and wait for delalloc on snapshot roots on transaction commit
      btrfs: refactor btrfs_drop_extents() to make it easier to extend
      btrfs: fix race when defragmenting leads to unnecessary IO
      btrfs: update the number of bytes used by an inode atomically
      btrfs: skip unnecessary searches for xattrs when logging an inode
      btrfs: stop incrementing log batch when joining log transaction
      btrfs: remove unnecessary attempt to drop extent maps after adding inline extent
      btrfs: unlock path before checking if extent is shared during nocow writeback
      btrfs: fix race causing unnecessary inode logging during link and rename
      btrfs: fix race that results in logging old extents during a fast fsync
      btrfs: fix race that causes unnecessary logging of ancestor inodes
      btrfs: fix race that makes inode logging fallback to transaction commit
      btrfs: fix race leading to unnecessary transaction commit when logging inode
      btrfs: do not block inode logging for so long during transaction commit

Goldwyn Rodrigues (14):
      btrfs: calculate num_pages, reserve_bytes once in btrfs_buffered_write
      btrfs: use iosize while reading compressed pages
      btrfs: use round_down while calculating start position in btrfs_dirty_pages()
      btrfs: set EXTENT_NORESERVE bits side btrfs_dirty_pages()
      btrfs: split btrfs_direct_IO to read and write
      btrfs: move pos increment and pagecache extension to btrfs_buffered_write
      btrfs: check FS error state bit early during write
      btrfs: introduce btrfs_write_check()
      btrfs: introduce btrfs_inode_lock()/unlock()
      btrfs: push inode locking and unlocking into buffered/direct write
      btrfs: use shared lock for direct writes within EOF
      btrfs: remove btrfs_inode::dio_sem
      btrfs: call iomap_dio_complete() without inode_lock
      btrfs: remove dio iomap DSYNC workaround

Josef Bacik (41):
      btrfs: unify the ro checking for mount options
      btrfs: push the NODATASUM check into btrfs_lookup_bio_sums
      btrfs: sysfs: export supported rescue= mount options
      btrfs: add a helper to print out rescue= options
      btrfs: show rescue=usebackuproot in /proc/mounts
      btrfs: introduce mount option rescue=ignorebadroots
      btrfs: introduce mount option rescue=ignoredatacsums
      btrfs: introduce mount option rescue=all
      btrfs: switch extent buffer tree lock to rw_semaphore
      btrfs: locking: remove all the blocking helpers
      btrfs: locking: rip out path->leave_spinning
      btrfs: do not shorten unpin len for caching block groups
      btrfs: update last_byte_to_unpin in switch_commit_roots
      btrfs: explicitly protect ->last_byte_to_unpin in unpin_extent_range
      btrfs: cleanup btrfs_discard_update_discardable usage
      btrfs: load free space cache into a temporary ctl
      btrfs: load the free space cache inode extents from commit root
      btrfs: load free space cache asynchronously
      btrfs: protect fs_info->caching_block_groups by block_group_cache_lock
      btrfs: remove lockdep classes for the fs tree
      btrfs: cleanup extent buffer readahead
      btrfs: use btrfs_read_node_slot in btrfs_realloc_node
      btrfs: use btrfs_read_node_slot in walk_down_reloc_tree
      btrfs: use btrfs_read_node_slot in do_relocation
      btrfs: use btrfs_read_node_slot in replace_path
      btrfs: use btrfs_read_node_slot in walk_down_tree
      btrfs: use btrfs_read_node_slot in qgroup_trace_extent_swap
      btrfs: use btrfs_read_node_slot in qgroup_trace_new_subtree_blocks
      btrfs: use btrfs_read_node_slot in btrfs_qgroup_trace_subtree
      btrfs: pass root owner to read_tree_block
      btrfs: pass the root owner and level around for readahead
      btrfs: pass the owner_root and level to alloc_extent_buffer
      btrfs: set the lockdep class for extent buffers on creation
      btrfs: cleanup the locking in btrfs_next_old_leaf
      btrfs: unlock to current level in btrfs_next_old_leaf
      btrfs: remove btrfs_path::recurse
      btrfs: locking: remove the recursion handling code
      btrfs: merge back btrfs_read_lock_root_node helpers
      btrfs: use btrfs_tree_read_lock in btrfs_search_slot
      btrfs: remove the recurse parameter from __btrfs_tree_read_lock
      btrfs: remove extent_buffer::recursed

Naohiro Aota (9):
      btrfs: introduce ZONED feature flag
      btrfs: get zone information of zoned block devices
      btrfs: check and enable ZONED mode
      btrfs: introduce max_zone_append_size
      btrfs: disallow space_cache in ZONED mode
      btrfs: disallow NODATACOW in ZONED mode
      btrfs: disable fallocate in ZONED mode
      btrfs: disallow mixed-bg in ZONED mode
      btrfs: implement log-structured superblock for ZONED mode

Nikolay Borisov (31):
      btrfs: use helpers to convert from seconds to jiffies in transaction_kthread
      btrfs: remove redundant time check in transaction kthread loop
      btrfs: record delta directly in transaction_kthread
      btrfs: calculate more accurate remaining time to sleep in transaction_kthread
      btrfs: open code insert_orphan_item
      btrfs: make btrfs_inode_safe_disk_i_size_write take btrfs_inode
      btrfs: make insert_prealloc_file_extent take btrfs_inode
      btrfs: make btrfs_truncate_inode_items take btrfs_inode
      btrfs: make btrfs_finish_ordered_io btrfs_inode-centric
      btrfs: make btrfs_delayed_update_inode take btrfs_inode
      btrfs: make btrfs_update_inode_item take btrfs_inode
      btrfs: make btrfs_update_inode take btrfs_inode
      btrfs: make maybe_insert_hole take btrfs_inode
      btrfs: make find_first_non_hole take btrfs_inode
      btrfs: make btrfs_insert_replace_extent take btrfs_inode
      btrfs: make btrfs_truncate_block take btrfs_inode
      btrfs: make btrfs_cont_expand take btrfs_inode
      btrfs: make btrfs_update_inode_fallback take btrfs_inode
      btrfs: merge __set_extent_bit and set_extent_bit
      btrfs: remove useless return value statement in split_node
      btrfs: simplify return values in setup_nodes_for_search
      btrfs: remove err variable from btrfs_delete_subvolume
      btrfs: eliminate err variable from merge_reloc_root
      btrfs: remove err variable from do_relocation
      btrfs: return bool from should_end_transaction
      btrfs: return bool from btrfs_should_end_transaction
      btrfs: move btrfs_find_highest_objectid/btrfs_find_free_objectid to disk-io.c
      btrfs: replace calls to btrfs_find_free_ino with btrfs_find_free_objectid
      btrfs: remove inode number cache feature
      btrfs: remove crc_check logic from free space
      btrfs: always set NODATASUM/NODATACOW in __create_free_space_inode

Pavel Begunkov (4):
      btrfs: discard: speed up async discard up to iops_limit
      btrfs: discard: store async discard delay as ns not as jiffies
      btrfs: don't miss async discards after scheduled work override
      btrfs: discard: reschedule work after sysfs param update

Qu Wenruo (41):
      btrfs: fix the comment on lock_extent_buffer_for_io
      btrfs: update the comment for find_first_extent_bit
      btrfs: sink the failed_start parameter to set_extent_bit
      btrfs: replace fs_info and private_data with inode in btrfs_wq_submit_bio
      btrfs: sink parameter start and len to check_data_csum
      btrfs: rename pages_locked in process_pages_contig()
      btrfs: only require sector size alignment for page read
      btrfs: rename page_size to io_size in submit_extent_page
      btrfs: assert page mapping lock in attach_extent_buffer_page
      btrfs: make buffer_radix take sector size units
      btrfs: grab fs_info from extent_buffer in btrfs_mark_buffer_dirty
      btrfs: make csum_tree_block() handle node smaller than page
      btrfs: extract extent buffer verification from btrfs_validate_metadata_buffer()
      btrfs: pass bvec to csum_dirty_buffer instead of page
      btrfs: scrub: distinguish scrub page from regular page
      btrfs: scrub: remove the force parameter from scrub_pages
      btrfs: scrub: refactor scrub_find_csum()
      btrfs: tests: remove invalid extent-io test
      btrfs: add structure to keep track of extent range in end_bio_extent_readpage
      btrfs: introduce helper to handle page status update in end_bio_extent_readpage()
      btrfs: use fixed width int type for extent_state::state
      btrfs: scrub: remove the anonymous structure from scrub_page
      btrfs: remove unused parameter phy_offset from btrfs_validate_metadata_buffer
      btrfs: only clear EXTENT_LOCK bit in extent_invalidatepage
      btrfs: use nodesize to determine if we need readahead in btrfs_lookup_bio_sums
      btrfs: use detach_page_private() in alloc_extent_buffer()
      btrfs: rename bio_offset of extent_submit_bio_start_t to dio_file_offset
      btrfs: pass bio_offset to check_data_csum() directly
      btrfs: make btrfs_verify_data_csum follow sector size
      btrfs: factor out btree page submission code to a helper
      btrfs: calculate inline extent buffer page size based on page size
      btrfs: don't allow tree block to cross page boundary for subpage support
      btrfs: update num_extent_pages to support subpage sized extent buffer
      btrfs: handle sectorsize < PAGE_SIZE case for extent buffer accessors
      btrfs: remove btrfs_find_ordered_sum call from btrfs_lookup_bio_sums
      btrfs: refactor btrfs_lookup_bio_sums to handle out-of-order bvecs
      btrfs: scrub: reduce width of extent_len/stripe_len from 64 to 32 bits
      btrfs: scrub: always allocate one full page for one sector for RAID56
      btrfs: scrub: support subpage tree block scrub
      btrfs: scrub: support subpage data scrub
      btrfs: scrub: allow scrub to work with subpage sectorsize

Tom Rix (1):
      btrfs: sysfs: remove unneeded semicolon

 fs/btrfs/Makefile                 |   3 +-
 fs/btrfs/backref.c                |  19 +-
 fs/btrfs/block-group.c            | 268 ++++++-------
 fs/btrfs/block-group.h            |   2 +
 fs/btrfs/block-rsv.c              |   8 +
 fs/btrfs/btrfs_inode.h            |  23 +-
 fs/btrfs/check-integrity.c        |  11 +-
 fs/btrfs/compression.c            |  28 +-
 fs/btrfs/ctree.c                  | 258 +++---------
 fs/btrfs/ctree.h                  | 213 +++++++---
 fs/btrfs/delayed-inode.c          |  23 +-
 fs/btrfs/delayed-inode.h          |   3 +-
 fs/btrfs/dev-replace.c            |  20 +-
 fs/btrfs/dir-item.c               |   1 -
 fs/btrfs/discard.c                |  46 ++-
 fs/btrfs/discard.h                |   3 +-
 fs/btrfs/disk-io.c                | 689 ++++++++++++++++++--------------
 fs/btrfs/disk-io.h                |  25 +-
 fs/btrfs/export.c                 |   1 -
 fs/btrfs/extent-io-tree.h         |  71 ++--
 fs/btrfs/extent-tree.c            | 111 ++----
 fs/btrfs/extent_io.c              | 656 ++++++++++++++++++------------
 fs/btrfs/extent_io.h              |  50 +--
 fs/btrfs/file-item.c              | 344 ++++++++++------
 fs/btrfs/file.c                   | 737 ++++++++++++++++++----------------
 fs/btrfs/free-space-cache.c       | 558 +++++++++++---------------
 fs/btrfs/free-space-cache.h       |  22 +-
 fs/btrfs/free-space-tree.c        |  26 +-
 fs/btrfs/inode-item.c             |   6 -
 fs/btrfs/inode-map.c              | 582 ---------------------------
 fs/btrfs/inode-map.h              |  16 -
 fs/btrfs/inode.c                  | 815 ++++++++++++++++++++------------------
 fs/btrfs/ioctl.c                  |  64 ++-
 fs/btrfs/locking.c                | 459 ++-------------------
 fs/btrfs/locking.h                |  24 +-
 fs/btrfs/ordered-data.c           |  45 ---
 fs/btrfs/ordered-data.h           |   5 +-
 fs/btrfs/print-tree.c             |  15 +-
 fs/btrfs/qgroup.c                 |  52 +--
 fs/btrfs/raid56.c                 |   8 +-
 fs/btrfs/reada.c                  |  34 +-
 fs/btrfs/ref-verify.c             |  27 +-
 fs/btrfs/reflink.c                |  18 +-
 fs/btrfs/relocation.c             | 116 ++----
 fs/btrfs/scrub.c                  | 340 +++++++++-------
 fs/btrfs/send.c                   |   6 +-
 fs/btrfs/struct-funcs.c           |  18 +-
 fs/btrfs/super.c                  | 179 ++++++---
 fs/btrfs/sysfs.c                  | 117 +++++-
 fs/btrfs/tests/btrfs-tests.c      |   3 +-
 fs/btrfs/tests/extent-io-tests.c  |  26 +-
 fs/btrfs/tests/free-space-tests.c |   1 -
 fs/btrfs/tests/qgroup-tests.c     |   4 -
 fs/btrfs/transaction.c            | 126 +++---
 fs/btrfs/transaction.h            |   3 +-
 fs/btrfs/tree-checker.c           | 337 ++++++++--------
 fs/btrfs/tree-defrag.c            |   1 -
 fs/btrfs/tree-log.c               | 183 +++++----
 fs/btrfs/uuid-tree.c              |   3 +-
 fs/btrfs/volumes.c                | 143 ++++---
 fs/btrfs/volumes.h                |  21 +-
 fs/btrfs/xattr.c                  |   8 +-
 fs/btrfs/zoned.c                  | 616 ++++++++++++++++++++++++++++
 fs/btrfs/zoned.h                  | 160 ++++++++
 include/uapi/linux/btrfs.h        |   1 +
 include/uapi/linux/btrfs_tree.h   |   3 +-
 66 files changed, 4491 insertions(+), 4313 deletions(-)
 delete mode 100644 fs/btrfs/inode-map.c
 delete mode 100644 fs/btrfs/inode-map.h
 create mode 100644 fs/btrfs/zoned.c
 create mode 100644 fs/btrfs/zoned.h

^ permalink raw reply	[relevance 2%]

* [GIT PULL] Btrfs updates for 6.7
@ 2023-10-30 17:35  2% David Sterba
  0 siblings, 0 replies; 105+ results
From: David Sterba @ 2023-10-30 17:35 UTC (permalink / raw)
  To: torvalds; +Cc: David Sterba, linux-btrfs, linux-kernel

Hi,

this time around we have 3 new features, described below, and the rest
is refactoring, cleanups and some performance improvements.

The branch for this pull request is base for the vfs timestamps updates
(https://lore.kernel.org/all/20231027-vfs-ctime-6271b23ced64@brauner/)
and there will be merge conflicts.

I'll send another pull request for btrfs with fixes and minor cleanups
that have been sent after the base branch for vfs was frozen. The
patches would have been part of this pull request but sending them
separately will reduce merge conflicts with vfs branches.  (Branch
for-6.7-part2).  I can pick only the fixes and send them after rc1 if
you'd prefer that.

Please pull, thanks.

New features:

- raid-stripe-tree
  New tree for logical file extent mapping where the physical mapping
  may not match on multiple devices. This is now used in zoned mode to
  implement RAID0/RAID1* profiles, but can be used in non-zoned mode as
  well. The support for RAID56 is in development and will eventually
  fix the problems with the current implementation. This is a backward
  incompatible feature and has to be enabled at mkfs time.

- simple quota accounting (squota)
  A simplified mode of qgroup that accounts all space on the initial
  extent owners (a subvolume), the snapshots are then cheap to create
  and delete. The deletion of snapshots in fully accounting qgroups is a
  known CPU/IO performance bottleneck.
  The squota is not suitable for the general use case but works well for
  containers where the original subvolume exists for the whole time.
  This is a backward incompatible feature as it needs extending some
  structures, but can be enabled on an existing filesystem.

- temporary filesystem fsid (temp_fsid)
  The fsid identifies a filesystem and is hard coded in the structures,
  which disallows mounting the same fsid found on different devices.
  For a single device filesystem this is not strictly necessary, a new
  temporary fsid can be generated on mount e.g. after a device is
  cloned. This will be used by Steam Deck for root partition A/B
  testing, or can be used for VM root images.

Other user visible changes:

- filesystems with partially finished metadata_uuid conversion cannot
  be mounted anymore and the uuid fixup has to be done by btrfs-progs
  (btrfstune).

Performance improvements:

- reduce reservations for checksum deletions (with enabled free space
  tree by factor of 4), on a sample workload on file with many extents
  the deletion time decreased by 12%

- make extent state merges more efficient during insertions, reduce
  rb-tree iterations (run time of critical functions reduced by 5%)

Core changes:

- the integrity check functionality has been removed, this was a
  debugging feature and removal does not affect other integrity checks
  like checksums or tree-checker

- space reservation changes
  - more efficient delayed ref reservations, this avoids building up too
    much work or overusing or exhausting the global block reserve in
    some situations
  - move delayed refs reservation to the transaction start time, this
    prevents some ENOSPC corner cases related to exhaustion of global
    reserve
  - improvements in reducing excessive reservations for block group
    items
  - adjust overcommit logic in near full situations, account for one
    more chunk to eventually allocate metadata chunk, this is mostly
    relevant for small filesystems (<10GiB)

- single device filesystems are scanned but not registered (except seed
  devices), this allows temp_fsid to work

- qgroup iterations do not need GFP_ATOMIC allocations anymore

- cleanups, refactoring, reduced data structure size, function parameter
  simplifications, error handling fixes

----------------------------------------------------------------
The following changes since commit 401644852d0b2a278811de38081be23f74b5bb04:

  Merge tag 'fs_for_v6.6-rc6' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs (2023-10-11 14:21:15 -0700)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git tags/for-6.7-tag

for you to fetch changes up to c6e8f898f56fae2cb5bc4396bec480f23cd8b066:

  btrfs: open code timespec64 in struct btrfs_inode (2023-10-12 16:44:19 +0200)

----------------------------------------------------------------
Anand Jain (11):
      btrfs: sipmlify uuid parameters of alloc_fs_devices()
      btrfs: comment about fsid and metadata_uuid relationship
      btrfs: scan but don't register device on single device filesystem
      btrfs: reject devices with CHANGING_FSID_V2
      btrfs: remove incomplete metadata_uuid conversion fixup logic
      btrfs: add helper function find_fsid_by_disk
      btrfs: support cloned-device mount capability
      btrfs: update comment for temp-fsid, fsid, and metadata_uuid
      btrfs: disable the seed feature for temp-fsid
      btrfs: disable the device add feature for temp-fsid
      btrfs: sysfs: show temp_fsid feature

Boris Burkov (18):
      btrfs: qgroup: introduce quota mode
      btrfs: qgroup: add new quota mode for simple quotas
      btrfs: sysfs: expose quota mode via sysfs
      btrfs: sysfs: add simple_quota incompat feature entry
      btrfs: qgroup: flush reservations during quota disable
      btrfs: create qgroup earlier in snapshot creation
      btrfs: add helper for recording simple quota deltas
      btrfs: rename tree_ref and data_ref owning_root
      btrfs: track owning root in btrfs_ref
      btrfs: track original extent owner in head_ref
      btrfs: new inline ref storing owning subvol of data extents
      btrfs: add helper for inline owner ref lookup
      btrfs: record simple quota deltas in delayed refs
      btrfs: qgroup: simple quota auto hierarchy for nested subvolumes
      btrfs: qgroup: check generation when recording simple quota delta
      btrfs: qgroup: track metadata relocation COW with simple quota
      btrfs: track data relocation with simple quota
      btrfs: qgroup: only set QUOTA_ENABLED when done reading qgroups

Christoph Hellwig (4):
      btrfs: zoned: introduce a zone_info struct in btrfs_load_block_group_zone_info
      btrfs: zoned: factor out per-zone logic from btrfs_load_block_group_zone_info
      btrfs: zoned: factor out single bg handling from btrfs_load_block_group_zone_info
      btrfs: zoned: factor out DUP bg handling from btrfs_load_block_group_zone_info

Colin Ian King (1):
      btrfs: remove redundant initialization of variable dirty in btrfs_update_time()

David Sterba (24):
      btrfs: move functions comments from qgroup.h to qgroup.c
      btrfs: reformat remaining kdoc style comments
      btrfs: drop __must_check annotations
      btrfs: reduce parameters of btrfs_pin_reserved_extent
      btrfs: reduce parameters of btrfs_pin_extent_for_log_replay
      btrfs: reduce arguments of helpers space accounting root item
      btrfs: reduce size of prelim_ref::level
      btrfs: reduce size and reorder compression members in struct btrfs_inode
      btrfs: reduce size of struct btrfs_ref
      btrfs: move extent_buffer::lock_owner to debug section
      btrfs: rename errno identifiers to error
      btrfs: merge ordered work callbacks in btrfs_work into one
      btrfs: relocation: use more natural types for tree_block bitfields
      btrfs: relocation: use enum for stages
      btrfs: relocation: switch bitfields to bool in reloc_control
      btrfs: relocation: open code mapping_tree_init
      btrfs: switch btrfs_backref_cache::is_reloc to bool
      btrfs: relocation: return bool from btrfs_should_ignore_reloc_root
      btrfs: relocation: constify parameters where possible
      btrfs: add specific helper for range bit test exists
      btrfs: change test_range_bit to scan the whole range
      btrfs: open code btrfs_ordered_inode_tree in btrfs_inode
      btrfs: reorder btrfs_inode to fill gaps
      btrfs: open code timespec64 in struct btrfs_inode

Filipe Manana (55):
      btrfs: update comment for reservation of metadata space for delayed items
      btrfs: pass a space_info argument to btrfs_reserve_metadata_bytes()
      btrfs: remove unnecessary logic when running new delayed references
      btrfs: remove the refcount warning/check at btrfs_put_delayed_ref()
      btrfs: remove refs_to_add argument from __btrfs_inc_extent_ref()
      btrfs: remove refs_to_drop argument from __btrfs_free_extent()
      btrfs: initialize key where it's used when running delayed data ref
      btrfs: remove pointless 'ref_root' variable from run_delayed_data_ref()
      btrfs: use a single variable for return value at run_delayed_extent_op()
      btrfs: use a single variable for return value at lookup_inline_extent_backref()
      btrfs: return -EUCLEAN if extent item is missing when searching inline backref
      btrfs: simplify check for extent item overrun at lookup_inline_extent_backref()
      btrfs: allow to run delayed refs by bytes to be released instead of count
      btrfs: reserve space for delayed refs on a per ref basis
      btrfs: remove pointless initialization at btrfs_delayed_refs_rsv_release()
      btrfs: stop doing excessive space reservation for csum deletion
      btrfs: always reserve space for delayed refs when starting transaction
      btrfs: abort transaction on generation mismatch when marking eb as dirty
      btrfs: use btrfs_crit at btrfs_mark_buffer_dirty()
      btrfs: mark transaction id check as unlikely at btrfs_mark_buffer_dirty()
      btrfs: remove pointless loop from btrfs_update_block_group()
      btrfs: remove stale comment from btrfs_free_extent()
      btrfs: remove useless comment from btrfs_pin_extent_for_log_replay()
      btrfs: simplify error check condition at btrfs_dirty_inode()
      btrfs: remove noinline from btrfs_update_inode()
      btrfs: remove redundant root argument from btrfs_update_inode_fallback()
      btrfs: remove redundant root argument from btrfs_update_inode()
      btrfs: remove redundant root argument from btrfs_update_inode_item()
      btrfs: remove redundant root argument from btrfs_delayed_update_inode()
      btrfs: remove redundant root argument from maybe_insert_hole()
      btrfs: remove redundant root argument from fixup_inode_link_count()
      btrfs: move btrfs_defrag_root() to defrag.{c,h}
      btrfs: remove noinline attribute from btrfs_cow_block()
      btrfs: use round_down() to align block offset at btrfs_cow_block()
      btrfs: rename and export __btrfs_cow_block()
      btrfs: export comp_keys() from ctree.c as btrfs_comp_keys()
      btrfs: move btrfs_realloc_node() from ctree.c into defrag.c
      btrfs: make extent state merges more efficient during insertions
      btrfs: update stale comment at extent_io_tree_release()
      btrfs: make wait_extent_bit() static
      btrfs: remove redundant memory barrier from extent_io_tree_release()
      btrfs: collapse wait_on_state() to its caller wait_extent_bit()
      btrfs: make tree iteration in extent_io_tree_release() more efficient
      btrfs: use extent_io_tree_release() to empty dirty log pages
      btrfs: make sure we cache next state in find_first_extent_bit()
      btrfs: stop reserving excessive space for block group item updates
      btrfs: stop reserving excessive space for block group item insertions
      btrfs: add and use helpers for reading and writing last_log_commit
      btrfs: add and use helpers for reading and writing log_transid
      btrfs: add and use helpers for reading and writing fs_info->generation
      btrfs: add and use helpers for reading and writing last_trans_committed
      btrfs: remove pointless barrier from btrfs_sync_file()
      btrfs: update comment for struct btrfs_inode::lock
      btrfs: remove pointless empty log context list check when syncing log
      btrfs: remove redundant log root tree index assignment during log sync

Jiapeng Chong (1):
      btrfs: qgroup: remove unused helpers for ulist aux data

Johannes Thumshirn (12):
      btrfs: add raid stripe tree definitions
      btrfs: read raid stripe tree from disk
      btrfs: add support for inserting raid stripe extents
      btrfs: delete stripe extent on extent deletion
      btrfs: lookup physical address from stripe extent
      btrfs: scrub: implement raid stripe tree support
      btrfs: zoned: support RAID0/1/10 on top of raid stripe tree
      btrfs: add raid stripe tree pretty printer
      btrfs: sysfs: announce presence of raid-stripe-tree
      btrfs: tracepoints: add events for raid stripe tree
      btrfs: tree-checker: add support for raid stripe tree
      btrfs: add raid stripe tree to features enabled with debug config

Josef Bacik (15):
      btrfs: move btrfs_crc32c_final into free-space-cache.c
      btrfs: remove btrfs_crc32c wrapper
      btrfs: move btrfs_extref_hash into inode-item.h
      btrfs: move btrfs_name_hash to dir-item.h
      btrfs: include asm/unaligned.h in accessors.h
      btrfs: include linux/iomap.h in file.c
      btrfs: add fscrypt related dependencies to respective headers
      btrfs: add btrfs_delayed_ref_head declaration to extent-tree.h
      btrfs: include trace header in where necessary
      btrfs: include linux/security.h in super.c
      btrfs: remove extraneous includes from ctree.h
      btrfs: don't arbitrarily slow down delalloc if we're committing
      btrfs: fix ->free_chunk_space math in btrfs_shrink_device
      btrfs: increase ->free_chunk_space in btrfs_grow_device
      btrfs: adjust overcommit logic when very close to full

Qu Wenruo (15):
      btrfs: do not require EXTENT_NOWAIT for btrfs_redirty_list_add()
      btrfs: qgroup: iterate qgroups without memory allocation for qgroup_reserve()
      btrfs: qgroup: use qgroup_iterator in btrfs_qgroup_free_refroot()
      btrfs: qgroup: use qgroup_iterator in qgroup_convert_meta()
      btrfs: qgroup: use qgroup_iterator in __qgroup_excl_accounting()
      btrfs: qgroup: use qgroup_iterator to replace tmp ulist in qgroup_update_refcnt()
      btrfs: qgroup: use qgroup_iterator_nested to in qgroup_update_refcnt()
      btrfs: qgroup: pre-allocate btrfs_qgroup to reduce GFP_ATOMIC usage
      btrfs: qgroup: prealloc btrfs_qgroup_list for __add_relation_rb()
      btrfs: check-integrity: remove btrfsic_check_bio() function
      btrfs: check-integrity: remove btrfsic_mount() function
      btrfs: check-integrity: remove btrfsic_unmount() function
      btrfs: check-integrity: remove CONFIG_BTRFS_FS_CHECK_INTEGRITY option
      btrfs: remove the need_raid_map parameter from btrfs_map_block()
      btrfs: warn on tree blocks which are not nodesize aligned

 fs/btrfs/Kconfig                     |   21 -
 fs/btrfs/Makefile                    |    3 +-
 fs/btrfs/accessors.h                 |   16 +
 fs/btrfs/async-thread.c              |   12 +-
 fs/btrfs/async-thread.h              |    6 +-
 fs/btrfs/backref.c                   |    5 +-
 fs/btrfs/backref.h                   |   10 +-
 fs/btrfs/bio.c                       |   47 +-
 fs/btrfs/block-group.c               |  178 +--
 fs/btrfs/block-rsv.c                 |   24 +-
 fs/btrfs/btrfs_inode.h               |   80 +-
 fs/btrfs/check-integrity.c           | 2871 ----------------------------------
 fs/btrfs/check-integrity.h           |   20 -
 fs/btrfs/compression.c               |    6 +-
 fs/btrfs/ctree.c                     |  340 ++--
 fs/btrfs/ctree.h                     |  142 +-
 fs/btrfs/defrag.c                    |  152 +-
 fs/btrfs/defrag.h                    |    2 +-
 fs/btrfs/delalloc-space.c            |    6 +-
 fs/btrfs/delayed-inode.c             |   27 +-
 fs/btrfs/delayed-inode.h             |    1 -
 fs/btrfs/delayed-ref.c               |  199 ++-
 fs/btrfs/delayed-ref.h               |   70 +-
 fs/btrfs/dev-replace.c               |    3 +-
 fs/btrfs/dir-item.c                  |    8 +-
 fs/btrfs/dir-item.h                  |    9 +
 fs/btrfs/disk-io.c                   |  142 +-
 fs/btrfs/disk-io.h                   |    3 +-
 fs/btrfs/extent-io-tree.c            |  272 ++--
 fs/btrfs/extent-io-tree.h            |    7 +-
 fs/btrfs/extent-tree.c               |  538 ++++---
 fs/btrfs/extent-tree.h               |   15 +-
 fs/btrfs/extent_io.c                 |   39 +-
 fs/btrfs/extent_io.h                 |    4 +-
 fs/btrfs/file-item.c                 |   17 +-
 fs/btrfs/file.c                      |   61 +-
 fs/btrfs/free-space-cache.c          |   28 +-
 fs/btrfs/free-space-tree.c           |   17 +-
 fs/btrfs/fs.h                        |   69 +-
 fs/btrfs/inode-item.c                |   21 +-
 fs/btrfs/inode-item.h                |    8 +
 fs/btrfs/inode.c                     |  182 +--
 fs/btrfs/ioctl.c                     |   23 +-
 fs/btrfs/locking.c                   |   20 +-
 fs/btrfs/messages.c                  |   32 +-
 fs/btrfs/messages.h                  |   14 +-
 fs/btrfs/ordered-data.c              |  127 +-
 fs/btrfs/ordered-data.h              |   17 +-
 fs/btrfs/print-tree.c                |   35 +
 fs/btrfs/props.c                     |    1 +
 fs/btrfs/qgroup.c                    |  872 +++++++----
 fs/btrfs/qgroup.h                    |  149 +-
 fs/btrfs/raid-stripe-tree.c          |  274 ++++
 fs/btrfs/raid-stripe-tree.h          |   50 +
 fs/btrfs/ref-verify.c                |    9 +-
 fs/btrfs/reflink.c                   |    3 +-
 fs/btrfs/relocation.c                |  208 ++-
 fs/btrfs/relocation.h                |    9 +-
 fs/btrfs/root-tree.c                 |   12 +-
 fs/btrfs/root-tree.h                 |    8 +-
 fs/btrfs/scrub.c                     |   78 +-
 fs/btrfs/send.c                      |    6 +-
 fs/btrfs/space-info.c                |   64 +-
 fs/btrfs/space-info.h                |    3 +-
 fs/btrfs/super.c                     |   87 +-
 fs/btrfs/sysfs.c                     |   53 +-
 fs/btrfs/tests/extent-buffer-tests.c |    6 +-
 fs/btrfs/tests/inode-tests.c         |   12 +-
 fs/btrfs/transaction.c               |  231 +--
 fs/btrfs/transaction.h               |   20 +-
 fs/btrfs/tree-checker.c              |   48 +-
 fs/btrfs/tree-log.c                  |   81 +-
 fs/btrfs/ulist.c                     |    3 +-
 fs/btrfs/uuid-tree.c                 |    6 +-
 fs/btrfs/verity.c                    |    4 +-
 fs/btrfs/volumes.c                   |  417 +++--
 fs/btrfs/volumes.h                   |   39 +-
 fs/btrfs/xattr.c                     |   12 +-
 fs/btrfs/zoned.c                     |  452 ++++--
 fs/btrfs/zstd.c                      |   11 +-
 include/trace/events/btrfs.h         |   83 +-
 include/uapi/linux/btrfs.h           |    3 +
 include/uapi/linux/btrfs_tree.h      |   60 +-
 83 files changed, 4030 insertions(+), 5293 deletions(-)
 delete mode 100644 fs/btrfs/check-integrity.c
 delete mode 100644 fs/btrfs/check-integrity.h
 create mode 100644 fs/btrfs/raid-stripe-tree.c
 create mode 100644 fs/btrfs/raid-stripe-tree.h

^ permalink raw reply	[relevance 2%]

* [GIT PULL] Btrfs updates for 5.7
@ 2020-03-30 18:37  2% David Sterba
  0 siblings, 0 replies; 105+ results
From: David Sterba @ 2020-03-30 18:37 UTC (permalink / raw)
  To: torvalds; +Cc: David Sterba, linux-btrfs, linux-kernel

Hi,

there's a number of core changes that make things work better in
general, code is simpler and cleaner. Please pull, thanks.

Core changes:

 - per-inode file extent tree, for in memory tracking of contiguous
   extent ranges to make sure i_size adjustments are accurate

 - tree root structures are protected by reference counts, replacing
   SRCU that did not cover some cases

 - leak detetctor for tree root structures

 - per-transaction pinned extent tracking

 - buffer heads are replaced by bios for super block access

 - speedup of extent back reference resolution, on an example test
   scenario the runtime of send went down from a hour to minutes

 - factor out locking scheme used for subvolume writer and NOCOW
   exclusion, abstracted as DREW lock, double reader-writer exclusion
   (allow either readers or writers)

 - cleanup and abstract extent allocation policies, preparation for
   zoned device support

 - make reflink/clone_range work on inline extents

 - add more cancellation point for relocation, improves long response
   from 'balance cancel'

 - add page migration callback for data pages

 - switch to guid for uuids, with additional cleanups of the interface

 - make ranged full fsyncs more efficient

 - removal of obsolete ioctl flag BTRFS_SUBVOL_CREATE_ASYNC

 - remove b-tree readahead from delayed refs paths, avoiding seek and
   read unnecessary blocks

Features:

 - v2 of ioctl to delete subvolumes, allowing to delete by id and more
   future extensions

Fixes:

 - fix qgroup rescan worker that could block umount

 - fix crash during unmount due to race with delayed inode workers

 - fix dellaloc flushing logic that could create unnecessary chunks
   under heavy load

 - fix missing file extent item for hole after ranged fsync

 - several fixes in relocation error handling

Other:

 - more documentation of relocation, device replace, space reservations

 - many random cleanups

----------------------------------------------------------------
The following changes since commit 16fbf79b0f83bc752cee8589279f1ebfe57b3b6e:

  Linux 5.6-rc7 (2020-03-22 18:31:56 -0700)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-5.7-tag

for you to fetch changes up to 6ff06729c22ec0b7498d900d79cc88cfb8aceaeb:

  btrfs: fix missing semaphore unlock in btrfs_sync_file (2020-03-25 16:29:16 +0100)

----------------------------------------------------------------
Anand Jain (4):
      btrfs: sysfs, use btrfs_sysfs_remove_fsid to celanup errors in add_fsid
      btrfs: sysfs, rename device_link add/remove functions
      btrfs: sysfs, unify handler name of devinfo/missing
      btrfs: slightly simplify global block reserve calculations

Andy Shevchenko (4):
      uuid: Add inline helpers to import / export UUIDs
      uuid: Provide a GUID generator for raw buffer
      btrfs: switch to use new generic UUID API
      uuid: Remove no more needed macro

David Sterba (29):
      btrfs: move root node locking helpers to locking.c
      btrfs: add wrapper for transaction abort predicate
      btrfs: remove extent_page_data::tree
      btrfs: drop argument tree from submit_extent_page
      btrfs: add assertions for tree == inode->io_tree to extent IO helpers
      btrfs: drop argument tree from btrfs_lock_and_flush_ordered_range
      btrfs: sink argument tree to extent_read_full_page
      btrfs: sink argument tree to __extent_read_full_page
      btrfs: sink arugment tree to contiguous_readpages
      btrfs: sink argument tree to __do_readpage
      btrfs: raid56: simplify tracking of Q stripe presence
      btrfs: define support masks for ioctl volume args v2
      btrfs: use ioctl args support mask for subvolume create/delete
      btrfs: use ioctl args support mask for device delete
      btrfs: use struct_size to calculate size of raid hash table
      btrfs: move mapping of block for discard to its caller
      btrfs: open code trivial helper btrfs_header_fsid
      btrfs: open code trivial helper btrfs_header_chunk_tree_uuid
      btrfs: simplify parameters of btrfs_set_disk_extent_flags
      btrfs: adjust message level for unrecognized mount option
      btrfs: raid56: simplify sort_parity_stripes
      btrfs: replace u_long type cast with unsigned long
      btrfs: adjust delayed refs message level
      btrfs: reduce pointer intdirections in btree_readpage_end_io_hook
      btrfs: merge unlocking to common exit block in btrfs_commit_transaction
      btrfs: inline checksum name and driver definitions
      btrfs: simplify tree block checksumming loop
      btrfs: return void from csum_tree_block
      btrfs: balance: factor out convert profile validation

Filipe Manana (10):
      Btrfs: don't iterate mod seq list when putting a tree mod seq
      Btrfs: avoid unnecessary splits when setting bits on an extent io tree
      Btrfs: fix crash during unmount due to race with delayed inode workers
      Btrfs: move all reflink implementation code into its own file
      Btrfs: simplify inline extent handling when doing reflinks
      Btrfs: implement full reflink support for inline extents
      btrfs: fix missing file extent item for hole after ranged fsync
      btrfs: add helper to get the end offset of a file extent item
      btrfs: factor out inode items copy loop from btrfs_log_inode()
      btrfs: make ranged full fsyncs more efficient

Gustavo A. R. Silva (3):
      btrfs: delayed-inode: Replace zero-length array with flexible-array member
      btrfs: rcu-string: Replace zero-length array with flexible-array member
      btrfs: scrub: Replace zero-length array with flexible-array member

Johannes Thumshirn (11):
      btrfs: don't kmap() pages from block devices
      btrfs: reduce scope of btrfs_scratch_superblocks()
      btrfs: use the page cache for super block reading
      btrfs: use bios instead of buffer_heads from super block writeout
      btrfs: remove btrfsic_submit_bh()
      btrfs: remove buffer_heads from btrfsic_process_written_block()
      btrfs: remove buffer_heads form super block mirror integrity checking
      btrfs: use inode from io_ctl in io_ctl_prepare_pages
      btrfs: make the uptodate argument of io_ctl_add_pages() boolean
      btrfs: use standard debug config option to enable free-space-cache debug prints
      btrfs: simplify error handling in __btrfs_write_out_cache()

Josef Bacik (80):
      btrfs: use btrfs_ordered_update_i_size in clone_finish_inode_update
      btrfs: introduce per-inode file extent tree
      btrfs: use the file extent tree infrastructure
      btrfs: replace all uses of btrfs_ordered_update_i_size
      btrfs: delete the ordered isize update code
      btrfs: push __setup_root into btrfs_alloc_root
      btrfs: move fs root init stuff into btrfs_init_fs_root
      btrfs: make btrfs_find_orphan_roots use btrfs_get_fs_root
      btrfs: export and use btrfs_read_tree_root for tree-log
      btrfs: make relocation use btrfs_read_tree_root()
      btrfs: remove btrfs_read_fs_root, not used anymore
      btrfs: open code btrfs_read_fs_root_no_name
      btrfs: make the fs root init functions static
      btrfs: handle NULL roots in btrfs_put/btrfs_grab_fs_root
      btrfs: add a comment describing block reserves
      btrfs: add a comment describing delalloc space reservation
      btrfs: describe the space reservation system in general
      btrfs: hold a ref on fs roots while they're in the radix tree
      btrfs: hold a ref on the root in resolve_indirect_ref
      btrfs: hold a root ref in btrfs_get_dentry
      btrfs: hold a ref on the root in __btrfs_run_defrag_inode
      btrfs: hold a ref on the root in fixup_tree_root_location
      btrfs: hold a ref on the root in create_subvol
      btrfs: hold a ref on the root in search_ioctl
      btrfs: hold a ref on the root in btrfs_search_path_in_tree
      btrfs: hold a ref on the root in btrfs_search_path_in_tree_user
      btrfs: hold a ref on the root in btrfs_ioctl_get_subvol_info
      btrfs: hold ref on root in btrfs_ioctl_default_subvol
      btrfs: hold a ref on the root in build_backref_tree
      btrfs: hold a ref on the root in prepare_to_merge
      btrfs: hold a ref on the root in merge_reloc_roots
      btrfs: hold a ref on the root in record_reloc_root_in_trans
      btrfs: hold a ref on the root in find_data_references
      btrfs: hold a ref on the root in create_reloc_inode
      btrfs: hold a ref on the root in btrfs_recover_relocation
      btrfs: push grab_fs_root into read_fs_root
      btrfs: hold a ref for the root in btrfs_find_orphan_roots
      btrfs: hold a ref on the root in scrub_print_warning_inode
      btrfs: hold a ref on the root in btrfs_ioctl_send
      btrfs: hold a ref on the root in get_subvol_name_from_objectid
      btrfs: hold a ref on the root in create_pending_snapshot
      btrfs: hold a ref on the root in btrfs_recover_log_trees
      btrfs: hold a ref on the root in btrfs_check_uuid_tree_entry
      btrfs: export and rename free_fs_info
      btrfs: hold a ref on the root in open_ctree
      btrfs: use btrfs_put_fs_root to free roots always
      btrfs: push btrfs_grab_fs_root into btrfs_get_fs_root
      btrfs: free more things in btrfs_free_fs_info
      btrfs: move fs_info init work into it's own helper function
      btrfs: make the init of static elements in fs_info separate
      btrfs: add a leak check for roots
      btrfs: rename btrfs_put_fs_root and btrfs_grab_fs_root
      btrfs: handle logged extent failure properly
      btrfs: bail out of uuid tree scanning if we're closing
      btrfs: set update the uuid generation as soon as possible
      btrfs: fix btrfs_calc_reclaim_metadata_size calculation
      btrfs: fix ref-verify to catch operations on 0 ref extents
      btrfs: drop block from cache on error in relocation
      btrfs: unset reloc control if we fail to recover
      btrfs: reloc: clean dirty subvols if we fail to start a transaction
      btrfs: do not init a reloc root if we aren't relocating
      btrfs: free the reloc_control in a consistent way
      btrfs: clear DEAD_RELOC_TREE before dropping the reloc root
      btrfs: hold a ref on the root->reloc_root
      btrfs: remove a BUG_ON() from merge_reloc_roots()
      btrfs: make the extent buffer leak check per fs info
      btrfs: move ino_cache_inode dropping out of btrfs_free_fs_root
      btrfs: move the root freeing stuff into btrfs_put_root
      btrfs: make inodes hold a ref on their roots
      btrfs: hold a ref on the root on the dead roots list
      btrfs: don't take an extra root ref at allocation time
      btrfs: make btrfs_cleanup_fs_roots use the radix tree lock
      btrfs: kill the subvol_srcu
      btrfs: do not use readahead for running delayed refs
      btrfs: do not readahead in build_backref_tree
      btrfs: reloc: reorder reservation before root selection
      btrfs: restart relocate_tree_blocks properly
      btrfs: track reloc roots based on their commit root bytenr
      btrfs: do not resolve backrefs for roots that are being deleted
      btrfs: use nofs allocations for running delayed items

Jules Irenge (1):
      btrfs: Add missing lock annotation for release_extent_buffer()

Madhuparna Bhowmik (1):
      btrfs: add RCU locks around block group initialization

Marcos Paulo de Souza (3):
      btrfs: export helpers for subvolume name/id resolution
      btrfs: add new BTRFS_IOC_SNAP_DESTROY_V2 ioctl
      btrfs: ioctl: resize: only show message if size is changed

Naohiro Aota (21):
      btrfs: change full_search to bool in find_free_extent_update_loop
      btrfs: handle invalid profile in chunk allocation
      btrfs: introduce chunk allocation policy
      btrfs: refactor find_free_dev_extent_start()
      btrfs: introduce alloc_chunk_ctl
      btrfs: factor out init_alloc_chunk_ctl
      btrfs: factor out gather_device_info()
      btrfs: factor out decide_stripe_size()
      btrfs: factor out create_chunk()
      btrfs: parameterize dev_extent_min for chunk allocation
      btrfs: introduce extent allocation policy
      btrfs: move hint_byte into find_free_extent_ctl
      btrfs: move variables for clustered allocation into find_free_extent_ctl
      btrfs: factor out do_allocation() for extent allocation
      btrfs: drop unnecessary arguments from clustered allocation functions
      btrfs: factor out release_block_group()
      btrfs: factor out found_extent() for extent allocation
      btrfs: drop unnecessary arguments from find_free_extent_update_loop()
      btrfs: factor out chunk_allocation_failed() for extent allocation
      btrfs: skip LOOP_NO_EMPTY_SIZE if not clustered allocation
      btrfs: factor out prepare_allocation() for extent allocation

Nikolay Borisov (25):
      btrfs: Perform pinned cleanup directly in btrfs_destroy_delayed_refs
      btrfs: Make btrfs_pin_extent take trans handle
      btrfs: Introduce unaccount_log_buffer
      btrfs: Call btrfs_pin_reserved_extent only during active transaction
      btrfs: Make btrfs_pin_reserved_extent take transaction handle
      btrfs: Make btrfs_pin_extent_for_log_replay take transaction handle
      btrfs: Make pin_down_extent take transaction handle
      btrfs: Pass transaction handle to write_pinned_extent_entries
      btrfs: Mark pinned log extents as excluded
      btrfs: Factor out pinned extent clean up in btrfs_delete_unused_bgs
      btrfs: switch to per-transaction pinned extents
      btrfs: Export btrfs_release_disk_super
      btrfs: call btrfs_check_uuid_tree_entry directly in btrfs_uuid_tree_iterate
      btrfs: make btrfs_check_uuid_tree private to disk-io.c
      btrfs: Implement DREW lock
      btrfs: convert snapshot/nocow exlcusion to drew lock
      btrfs: Rename __btrfs_alloc_chunk to btrfs_alloc_chunk
      btrfs: Remove impossible BUG_ON in get_tree_block_key
      btrfs: Open code insert_extent_backref
      btrfs: Remove __ prefix from btrfs_block_rsv_release
      btrfs: Remove block_rsv parameter from btrfs_drop_snapshot
      btrfs: account ticket size at add/delete time
      btrfs: Remove BTRFS_SUBVOL_CREATE_ASYNC support
      btrfs: Remove transid argument from btrfs_ioctl_snap_create_transid
      btrfs: Remove async_transid from btrfs_mksubvol/create_subvol/create_snapshot

Qu Wenruo (10):
      btrfs: Add overview of device replace
      btrfs: relocation: Add introduction of how relocation works
      btrfs: relocation: Remove is_cowonly_root()
      btrfs: Don't submit any btree write bio if the fs has errors
      btrfs: qgroup: ensure qgroup_rescan_running is only set when the worker is at least queued
      btrfs: qgroup: Remove the unnecesaary spin lock for qgroup_rescan_running
      btrfs: relocation: add error injection points for cancelling balance
      btrfs: relocation: Check cancel request after each data page read
      btrfs: relocation: Check cancel request after each extent found
      btrfs: relocation: Use btrfs_find_all_leafs to locate data extent parent tree leaves

Robbie Ko (1):
      btrfs: fix missing semaphore unlock in btrfs_sync_file

Roman Gushchin (1):
      btrfs: implement migratepage callback for data pages

Su Yue (1):
      btrfs: update the comment of btrfs_control_ioctl()

Takashi Iwai (1):
      btrfs: sysfs: Use scnprintf() instead of snprintf()

ethanwu (4):
      btrfs: backref, only collect file extent items matching backref offset
      btrfs: backref, don't add refs from shared block when resolving normal backref
      btrfs: backref, only search backref entries from leaves of the same root
      btrfs: backref, use correct count to resolve normal data refs

 fs/btrfs/Makefile             |    2 +-
 fs/btrfs/async-thread.c       |    8 +
 fs/btrfs/async-thread.h       |    1 +
 fs/btrfs/backref.c            |  185 +++++---
 fs/btrfs/backref.h            |    4 +
 fs/btrfs/block-group.c        |   87 ++--
 fs/btrfs/block-rsv.c          |  105 ++++-
 fs/btrfs/block-rsv.h          |   12 +-
 fs/btrfs/btrfs_inode.h        |    6 +
 fs/btrfs/check-integrity.c    |  200 ++------
 fs/btrfs/check-integrity.h    |    2 -
 fs/btrfs/ctree.c              |   74 +--
 fs/btrfs/ctree.h              |   82 ++--
 fs/btrfs/delalloc-space.c     |  106 ++++-
 fs/btrfs/delayed-inode.c      |   24 +-
 fs/btrfs/delayed-inode.h      |    2 +-
 fs/btrfs/delayed-ref.c        |    3 +-
 fs/btrfs/dev-replace.c        |   44 +-
 fs/btrfs/disk-io.c            |  914 ++++++++++++++++++-----------------
 fs/btrfs/disk-io.h            |   34 +-
 fs/btrfs/export.c             |   32 +-
 fs/btrfs/export.h             |    5 +
 fs/btrfs/extent-io-tree.h     |    7 +-
 fs/btrfs/extent-tree.c        |  493 ++++++++++---------
 fs/btrfs/extent_io.c          |  204 +++++---
 fs/btrfs/extent_io.h          |   11 +-
 fs/btrfs/file-item.c          |  131 ++++-
 fs/btrfs/file.c               |   80 ++--
 fs/btrfs/free-space-cache.c   |   43 +-
 fs/btrfs/free-space-tree.c    |    4 +-
 fs/btrfs/inode-map.c          |    2 +-
 fs/btrfs/inode.c              |  154 ++++--
 fs/btrfs/ioctl.c              | 1050 ++++++++---------------------------------
 fs/btrfs/locking.c            |  135 ++++++
 fs/btrfs/locking.h            |   20 +
 fs/btrfs/ordered-data.c       |  140 +-----
 fs/btrfs/ordered-data.h       |   10 +-
 fs/btrfs/props.c              |    2 +-
 fs/btrfs/qgroup.c             |   28 +-
 fs/btrfs/raid56.c             |   41 +-
 fs/btrfs/rcu-string.h         |    2 +-
 fs/btrfs/ref-verify.c         |    9 +
 fs/btrfs/reflink.c            |  804 +++++++++++++++++++++++++++++++
 fs/btrfs/reflink.h            |   12 +
 fs/btrfs/relocation.c         |  661 ++++++++++++--------------
 fs/btrfs/root-tree.c          |   43 +-
 fs/btrfs/scrub.c              |    7 +-
 fs/btrfs/send.c               |   79 +---
 fs/btrfs/space-info.c         |  202 +++++++-
 fs/btrfs/space-info.h         |    7 +
 fs/btrfs/super.c              |   35 +-
 fs/btrfs/sysfs.c              |   73 ++-
 fs/btrfs/sysfs.h              |    4 +-
 fs/btrfs/tests/btrfs-tests.c  |   44 +-
 fs/btrfs/tests/qgroup-tests.c |    2 +
 fs/btrfs/transaction.c        |  113 +++--
 fs/btrfs/transaction.h        |   13 +
 fs/btrfs/tree-log.c           |  483 +++++++++++--------
 fs/btrfs/uuid-tree.c          |   57 ++-
 fs/btrfs/volumes.c            |  774 ++++++++++++++++--------------
 fs/btrfs/volumes.h            |   12 +-
 include/linux/uuid.h          |   22 +-
 include/trace/events/btrfs.h  |    6 +-
 include/uapi/linux/btrfs.h    |   37 +-
 lib/uuid.c                    |   10 +
 65 files changed, 4462 insertions(+), 3536 deletions(-)
 create mode 100644 fs/btrfs/reflink.c
 create mode 100644 fs/btrfs/reflink.h

^ permalink raw reply	[relevance 2%]

* [GIT PULL] Btrfs updates for 5.20
@ 2022-08-01 16:40  2% David Sterba
  0 siblings, 0 replies; 105+ results
From: David Sterba @ 2022-08-01 16:40 UTC (permalink / raw)
  To: torvalds; +Cc: linux-btrfs, linux-kernel

Hi,

this update brings some long awaited changes, the send protocol bump,
otherwise lots of small improvements and fixes. The main core part is
reworking bio handling, cleaning up the submission and endio and
improving error handling.

There are some non-btrfs patches adding helpers or updating API,
listed at the end of the changelog.

Please pull, thanks.

Features:

- sysfs:
  - export chunk size, in debug mode add tunable for setting its size
  - show zoned among features (was only in debug mode)
  - show commit stats (number, last/max/total duration)

- send protocol updated to 2
  - new commands:
    - ability write larger data chunks than 64K
    - send raw compressed extents (uses the encoded data ioctls), ie. no
      decompression on send side, no compression needed on receive side
      if supported
    - send 'otime' (inode creation time) among other timestamps
    - send file attributes (a.k.a file flags and xflags)
  - this is first version bump, backward compatibility on send and
    receive side is provided
  - there are still some known and wanted commands that will be
    implemented in the near future, another version bump will be needed,
    however we want to minimize that to avoid causing usability issues

- print checksum type and implementation at mount time

- don't print some messages at mount (mentioned as people asked about
  it), we want to print messages namely for new features so let's make
  some space for that
  - big metadata - this has been supported for a long time and is not a
                   feature that's worth mentioning
  - skinny metadata - same reason, set by default by mkfs

Performance improvements:

- reduced amount of reserved metadata for delayed items
  - when inserted items can be batched into one leaf
  - when deleting batched directory index items
  - when deleting delayed items used for deletion
  - overall improved count of files/sec, decreased subvolume lock
    contention

- metadata item access bounds checker micro-optimized, with a few
  percent of improved runtime for metadata-heavy operations

- increase direct io limit for read to 256 sectors, improved throughput
  by 3x on sample workload

Notable fixes:

- raid56
  - reduce parity writes, skip sectors of stripe when there are no data
    updates
  - restore reading from stripe cache instead of triggering new read

- refuse to replay log with unknown incompat read-only feature bit set

- zoned
  - fix page locking when COW fails in the middle of allocation
  - improved tracking of active zones, ZNS drives may limit the number
    and there are ENOSPC errors due to that limit and not actual lack of
    space
  - adjust maximum extent size for zone append so it does not cause late
    ENOSPC due to underreservation

- mirror reading error messages show the mirror number

- don't fallback to buffered IO for NOWAIT direct IO writes, we don't
  have the NOWAIT semantics for buffered io yet

- send, fix sending link commands for existing file paths when there are
  deleted and created hardlinks for same files

- repair all mirrors for profiles with more than 1 copy (raid1c34)

- fix repair of compressed extents, unify where error detection and
  repair happen

Core changes:

- bio completion cleanups
  - don't double defer compression bios
  - simplify endio workqueues
  - add more data to btrfs_bio to avoid allocation for read requests
  - rework bio error handling so it's same what block layer does, the
    submission works and errors are consumed in endio
  - when asynchronous bio offload fails fall back to synchronous
    checksum calculation to avoid errors under writeback or memory
    pressure

- new trace points
  - raid56 events
  - ordered extent operations

- super block log_root_transid deprecated (never used)

- mixed_backref and big_metadata sysfs feature files removed, they've
  been default for sufficiently long time, there are no known users and
  mixed_backref could be confused with mixed_groups

Non-btrfs changes, API updates:

- minor highmem API update to cover const arguments

- switch all kmap/kmap_atomic to kmap_local

- remove redundant flush_dcache_page()

- address_space_operations::writepage callback removed

- add bdev_max_segments() helper

----------------------------------------------------------------
The following changes since commit e0dccc3b76fb35bb257b4118367a883073d7390e:

  Linux 5.19-rc8 (2022-07-24 13:26:27 -0700)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-5.20-tag

for you to fetch changes up to 0b078d9db8793b1bd911e97be854e3c964235c78:

  btrfs: don't call btrfs_page_set_checked in finish_compressed_bio_read (2022-07-25 19:56:16 +0200)

----------------------------------------------------------------
BingJing Chang (2):
      btrfs: send: introduce recorded_ref_alloc and recorded_ref_free
      btrfs: send: fix sending link commands for existing file paths

Christoph Hellwig (37):
      btrfs: factor out a helper to end a single sector buffer I/O
      btrfs: refactor end_bio_extent_readpage code flow
      btrfs: factor out a btrfs_csum_ptr helper
      btrfs: use btrfs_bio_for_each_sector in btrfs_check_read_dio_bio
      btrfs: move more work into btrfs_end_bioc
      btrfs: simplify code flow in btrfs_submit_dio_bio
      btrfs: split btrfs_submit_data_bio to read and write parts
      btrfs: defer I/O completion based on the btrfs_raid_bio
      btrfs: don't double-defer bio completions for compressed reads
      btrfs: don't use btrfs_bio_wq_end_io for compressed writes
      btrfs: centralize setting REQ_META
      btrfs: remove btrfs_end_io_wq
      btrfs: factor stripe submission logic out of btrfs_map_bio
      btrfs: do not allocate a btrfs_bio for low-level bios
      btrfs: don't use bio->bi_private to pass the inode to submit_one_bio
      btrfs: merge end_write_bio and flush_write_bio
      btrfs: pass the btrfs_bio_ctrl to submit_one_bio
      btrfs: stop looking at btrfs_bio->iter in index_one_bio
      btrfs: split discard handling out of btrfs_map_block
      btrfs: remove the finish_func argument to btrfs_mark_ordered_io_finished
      btrfs: increase direct io read size limit to 256 sectors
      btrfs: remove extent writepage address space operation
      btrfs: raid56: use fixed stripe length everywhere
      btrfs: do not return errors from btrfs_map_bio
      btrfs: do not return errors from raid56_parity_write
      btrfs: do not return errors from raid56_parity_recover
      btrfs: raid56: transfer the bio counter reference to the raid submission helpers
      btrfs: simplify sync/async submission in btrfs_submit_data_write_bio
      btrfs: handle allocation failure in btrfs_wq_submit_bio gracefully
      btrfs: do not return errors from btrfs_submit_dio_bio
      btrfs: merge btrfs_dev_stat_print_on_error with its only caller
      btrfs: repair all known bad mirrors
      btrfs: simplify the pending I/O counting in struct compressed_bio
      btrfs: pass a btrfs_bio to btrfs_repair_one_sector
      btrfs: remove the start argument to check_data_csum and export
      btrfs: fix repair of compressed extents
      btrfs: don't call btrfs_page_set_checked in finish_compressed_bio_read

David Sterba (30):
      btrfs: fix typos in comments
      btrfs: remove redundant calls to flush_dcache_page
      btrfs: remove redundant check in up check_setget_bounds
      btrfs: sysfs: advertise zoned support among features
      btrfs: open code rbtree search in split_state
      btrfs: open code rbtree search in insert_state
      btrfs: lift start and end parameters to callers of insert_state
      btrfs: pass bits by value not by pointer for extent_state helpers
      btrfs: add fast path for extent_state insertion
      btrfs: remove node and parent parameters from insert_state
      btrfs: open code inexact rbtree search in tree_search
      btrfs: make tree search for insert more generic and use it for tree_search
      btrfs: unify tree search helper returning prev and next nodes
      btrfs: call inode_to_path directly and drop indirection
      btrfs: simplify parameters of backref iterators
      btrfs: sink iterator parameter to btrfs_ioctl_logical_to_ino
      btrfs: remove unused typedefs get_extent_t and btrfs_work_func_t
      btrfs: send: drop __KERNEL__ ifdef from send.h
      btrfs: send: simplify includes
      btrfs: send: remove old TODO regarding ERESTARTSYS
      btrfs: send: use boolean types for current inode status
      btrfs: send: add OTIME as utimes attribute for proto 2+ by default
      btrfs: send: add new command FILEATTR for file attributes
      btrfs: print checksum type and implementation at mount time
      btrfs: use mask for all RAID1* profiles in btrfs_calc_avail_data_space
      btrfs: merge calculations for simple striped profiles in btrfs_rmap_block
      btrfs: clean up chained assignments
      btrfs: switch btrfs_block_rsv::full to bool
      btrfs: switch btrfs_block_rsv::failfast to bool
      btrfs: use enum for btrfs_block_rsv::type

Fabio M. De Francesco (7):
      btrfs: replace kmap() with kmap_local_page() in inode.c
      btrfs: replace kmap() with kmap_local_page() in lzo.c
      highmem: Make __kunmap_{local,atomic}() take const void pointer
      btrfs: zstd: replace kmap() with kmap_local_page()
      btrfs: zlib: replace kmap() with kmap_local_page() in zlib_compress_pages()
      btrfs: zlib: replace kmap() with kmap_local_page() in zlib_decompress_bio()
      btrfs: replace kmap_atomic() with kmap_local_page()

Fanjun Kong (1):
      btrfs: use PAGE_ALIGNED instead of IS_ALIGNED

Filipe Manana (18):
      btrfs: balance btree dirty pages and delayed items after a rename
      btrfs: free the path earlier when creating a new inode
      btrfs: balance btree dirty pages and delayed items after clone and dedupe
      btrfs: add assertions when deleting batches of delayed items
      btrfs: deal with deletion errors when deleting delayed items
      btrfs: refactor the delayed item deletion entry point
      btrfs: improve batch deletion of delayed dir index items
      btrfs: assert that delayed item is a dir index item when adding it
      btrfs: improve batch insertion of delayed dir index items
      btrfs: do not BUG_ON() on failure to reserve metadata for delayed item
      btrfs: set delayed item type when initializing it
      btrfs: reduce amount of reserved metadata for delayed item insertion
      btrfs: remove the inode cache check at btrfs_is_free_space_inode()
      btrfs: don't fallback to buffered IO for NOWAIT direct IO writes
      btrfs: set the objectid of the btree inode's location key
      btrfs: add optimized btrfs_ino() version for 64 bits systems
      btrfs: send: always use the rbtree based inode ref management infrastructure
      btrfs: join running log transaction when logging new name

Ioannis Angelakopoulos (2):
      btrfs: collect commit stats, count, duration
      btrfs: sysfs: export commit stats

Johannes Thumshirn (1):
      btrfs: add tracepoints for ordered extents

Josef Bacik (3):
      btrfs: do not batch insert non-consecutive dir indexes during log replay
      btrfs: tree-log: make the return value for log syncing consistent
      btrfs: reset block group chunk force if we have to wait

Naohiro Aota (17):
      btrfs: ensure pages are unlocked on cow_file_range() failure
      btrfs: extend btrfs_cleanup_ordered_extents for NULL locked_page
      btrfs: fix error handling of fallback uncompress write
      btrfs: replace unnecessary goto with direct return at cow_file_range()
      block: add bdev_max_segments() helper
      btrfs: zoned: revive max_zone_append_bytes
      btrfs: replace BTRFS_MAX_EXTENT_SIZE with fs_info->max_extent_size
      btrfs: convert count_max_extents() to use fs_info->max_extent_size
      btrfs: use fs_info->max_extent_size in get_extent_max_capacity()
      btrfs: let can_allocate_chunk return error
      btrfs: zoned: finish least available block group on data bg allocation
      btrfs: zoned: introduce space_info->active_total_bytes
      btrfs: zoned: disable metadata overcommit for zoned
      btrfs: zoned: activate metadata block group on flush_space
      btrfs: zoned: activate necessary block group
      btrfs: zoned: write out partially allocated region
      btrfs: zoned: wait until zone is finished when allocation didn't progress

Nikolay Borisov (9):
      btrfs: introduce btrfs_try_lock_balance
      btrfs: use btrfs_try_lock_balance in btrfs_ioctl_balance
      btrfs: batch up release of reserved metadata for delayed items used for deletion
      btrfs: properly flag filesystem with BTRFS_FEATURE_INCOMPAT_BIG_METADATA
      btrfs: don't print 'flagging with big metadata' anymore on mount
      btrfs: don't print 'has skinny extents' anymore on mount
      btrfs: sysfs: remove MIXED_BACKREF feature file
      btrfs: sysfs: remove BIG_METADATA feature files
      btrfs: simplify error handling in btrfs_lookup_dentry

Omar Sandoval (7):
      btrfs: send: remove unused send_ctx::{total,cmd}_send_size
      btrfs: send: explicitly number commands and attributes
      btrfs: send: add stream v2 definitions
      btrfs: send: write larger chunks when using stream v2
      btrfs: send: get send buffer pages for protocol v2
      btrfs: send: send compressed extents with encoded writes
      btrfs: send: enable support for stream v2 and compressed writes

Pankaj Raghav (1):
      btrfs: zoned: fix comment description for sb_write_pointer logic

Qu Wenruo (25):
      btrfs: quit early if the fs has no RAID56 support for raid56 related checks
      btrfs: introduce a data checksum checking helper
      btrfs: remove duplicated parameters from submit_data_read_repair()
      btrfs: add a helper to iterate through a btrfs_bio with sector sized chunks
      btrfs: use integrated bitmaps for btrfs_raid_bio::dbitmap and finish_pbitmap
      btrfs: use integrated bitmaps for scrub_parity::dbitmap and ebitmap
      btrfs: only write the sectors in the vertical stripe which has data stripes
      btrfs: update stripe_sectors::uptodate in steal_rbio
      btrfs: add trace event for submitted RAID56 bio
      btrfs: make btrfs_super_block::log_root_transid deprecated
      btrfs: reject log replay if there is unsupported RO compat flag
      btrfs: raid56: avoid double for loop inside finish_rmw()
      btrfs: raid56: avoid double for loop inside __raid56_parity_recover()
      btrfs: raid56: avoid double for loop inside alloc_rbio_essential_pages()
      btrfs: raid56: avoid double for loop inside raid56_rmw_stripe()
      btrfs: raid56: avoid double for loop inside raid56_parity_scrub_stripe()
      btrfs: remove parameter dev_extent_len from scrub_stripe()
      btrfs: use btrfs_chunk_max_errors() to replace tolerance calculation
      btrfs: use btrfs_raid_array to calculate number of parity stripes
      btrfs: use ncopies from btrfs_raid_array in btrfs_num_copies()
      btrfs: use named constant for reserved device space
      btrfs: warn about dev extents that are inside the reserved range
      btrfs: raid56: don't trust any cached sector in __raid56_parity_recover()
      btrfs: output mirror number for bad metadata
      btrfs: return proper mapped length for RAID56 profiles in __btrfs_map_block()

Stefan Roesch (3):
      btrfs: store chunk size in space-info struct
      btrfs: sysfs: export chunk size in space infos
      btrfs: sysfs: add force_chunk_alloc trigger to force allocation

 arch/parisc/include/asm/cacheflush.h |   6 +-
 arch/parisc/kernel/cache.c           |   2 +-
 fs/btrfs/async-thread.h              |   1 -
 fs/btrfs/backref.c                   |  88 ++--
 fs/btrfs/backref.h                   |   3 +-
 fs/btrfs/block-group.c               |  34 +-
 fs/btrfs/block-rsv.c                 |  21 +-
 fs/btrfs/block-rsv.h                 |  15 +-
 fs/btrfs/btrfs_inode.h               |  25 +-
 fs/btrfs/compression.c               | 359 ++++----------
 fs/btrfs/compression.h               |  18 +-
 fs/btrfs/ctree.h                     | 105 ++++-
 fs/btrfs/delalloc-space.c            |   6 +-
 fs/btrfs/delayed-inode.c             | 395 +++++++++++-----
 fs/btrfs/delayed-inode.h             |  11 +
 fs/btrfs/delayed-ref.c               |   4 +-
 fs/btrfs/dev-replace.c               |   3 +-
 fs/btrfs/disk-io.c                   | 268 ++++-------
 fs/btrfs/disk-io.h                   |  17 +-
 fs/btrfs/extent-tree.c               | 149 +++---
 fs/btrfs/extent_io.c                 | 873 ++++++++++++++++-------------------
 fs/btrfs/extent_io.h                 |  15 +-
 fs/btrfs/file.c                      |  29 +-
 fs/btrfs/free-space-cache.c          |   3 +-
 fs/btrfs/inode.c                     | 764 +++++++++++++++---------------
 fs/btrfs/ioctl.c                     | 150 +++---
 fs/btrfs/lzo.c                       |  28 +-
 fs/btrfs/ordered-data.c              |  40 +-
 fs/btrfs/ordered-data.h              |   5 +-
 fs/btrfs/raid56.c                    | 792 +++++++++++++++----------------
 fs/btrfs/raid56.h                    | 168 ++++++-
 fs/btrfs/reflink.c                   |  19 +-
 fs/btrfs/scrub.c                     |  71 ++-
 fs/btrfs/send.c                      | 781 +++++++++++++++++++++----------
 fs/btrfs/send.h                      | 169 ++++---
 fs/btrfs/space-info.c                | 110 ++++-
 fs/btrfs/space-info.h                |   8 +-
 fs/btrfs/struct-funcs.c              |  11 +-
 fs/btrfs/subpage.c                   |   4 +-
 fs/btrfs/super.c                     |  36 +-
 fs/btrfs/sysfs.c                     | 186 +++++++-
 fs/btrfs/tests/btrfs-tests.c         |   1 +
 fs/btrfs/tests/extent-buffer-tests.c |   3 +-
 fs/btrfs/transaction.c               |  26 +-
 fs/btrfs/tree-log.c                  |  29 +-
 fs/btrfs/tree-log.h                  |   3 +
 fs/btrfs/volumes.c                   | 362 +++++++--------
 fs/btrfs/volumes.h                   |  46 +-
 fs/btrfs/zlib.c                      |  42 +-
 fs/btrfs/zoned.c                     | 131 +++++-
 fs/btrfs/zoned.h                     |  18 +
 fs/btrfs/zstd.c                      |  33 +-
 include/linux/blkdev.h               |   5 +
 include/linux/highmem-internal.h     |  10 +-
 include/trace/events/btrfs.h         | 158 +++++++
 include/uapi/linux/btrfs.h           |  10 +-
 mm/highmem.c                         |   2 +-
 57 files changed, 3842 insertions(+), 2829 deletions(-)

^ permalink raw reply	[relevance 2%]

* [GIT PULL] Btrfs updates for 6.5
@ 2023-06-26 18:14  2% David Sterba
  0 siblings, 0 replies; 105+ results
From: David Sterba @ 2023-06-26 18:14 UTC (permalink / raw)
  To: torvalds; +Cc: David Sterba, linux-btrfs, linux-kernel

Hi,

there are mainly core changes, refactoring and optimizations.
Performance is improved in some areas, overall there may be a cumulative
improvement due to refactoring that removed lookups in the IO path or
simplified IO submission tracking.

No merge conflicts. Please pull, thanks.

Core:

- submit IO synchronously for fast checksums (crc32c and xxhash), remove
  high priority worker kthread

- read extent buffer in one go, simplify IO tracking, bio submission and
  locking

- remove additional tracking of redirtied extent buffers, originally
  added for zoned mode but actually not needed

- track ordered extent pointer in bio to avoid rbtree lookups during IO

- scrub, use recovered data stripes as cache to avoid unnecessary read

- in zoned mode, optimize logical to physical mappings of extents

- remove PageError handling, not set by VFS nor writeback

- cleanups, refactoring, better structure packing

- lots of error handling improvements

- more assertions, lockdep annotations

- print assertion failure with the exact line where it happens

- tracepoint updates

- more debugging prints

Performance:

- speedup in fsync(), better tracking of inode logged status can avoid
  transaction commit

- IO path structures track logical offsets in data structures and does
  not need to look it up

User visible changes:

- don't commit transaction for every created subvolume, this can reduce
  time when many subvolumes are created in a batch

- print affected files when relocation fails

- trigger orphan file cleanup during START_SYNC ioctl

Notable fixes:

- fix crash when disabling quota and relocation

- fix crashes when removing roots from drity list

- fix transacion abort during relocation when converting from newer
  profiles not covered by fallback

- in zoned mode, stop reclaiming block groups if filesystem becomes
  read-only

- fix rare race condition in tree mod log rewind that can miss some
  btree node slots

- with enabled fsverity, drop up-to-date page bit in case the
  verification fails

----------------------------------------------------------------
The following changes since commit 45a3e24f65e90a047bef86f927ebdc4c710edaa1:

  Linux 6.4-rc7 (2023-06-18 14:06:27 -0700)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-6.5

for you to fetch changes up to 8a4a0b2a3eaf75ca8854f856ef29690c12b2f531:

  btrfs: fix race between quota disable and relocation (2023-06-19 20:29:25 +0200)

----------------------------------------------------------------
Anand Jain (11):
      btrfs: use SECTOR_SHIFT to convert physical offset to LBA
      btrfs: use SECTOR_SHIFT to convert LBA to physical offset
      btrfs: reduce struct btrfs_fs_devices size by moving fsid_change
      btrfs: streamline fsid checks in alloc_fs_devices
      btrfs: merge calls to alloc_fs_devices in device_list_add
      btrfs: add comment about metadata_uuid in btrfs_fs_devices
      btrfs: return bool from check_tree_block_fsid instead of int
      btrfs: simplify fsid and metadata_uuid comparisons
      btrfs: simplify how changed fsid and metadata_uuid is checked
      btrfs: consolidate uuid comparisons in btrfs_validate_super
      btrfs: add and fix comments in btrfs_fs_devices

Ben Dooks (1):
      btrfs: make btrfs_compressed_bioset static

Boris Burkov (2):
      btrfs: warn on invalid slot in tree mod log rewind
      btrfs: insert tree mod log move in push_node_left

Christoph Hellwig (80):
      btrfs: submit IO synchronously for fast checksum implementations
      btrfs: determine synchronous writers from bio or writeback control
      btrfs: remove hipri_workers workqueue
      btrfs: fix dirty_metadata_bytes for redirtied buffers
      btrfs: don't hold an extra reference for redirtied buffers
      btrfs: mark extent_buffer_under_io static
      btrfs: subpage: fix error handling in end_bio_subpage_eb_writepage
      btrfs: move setting the buffer uptodate out of validate_extent_buffer
      btrfs: merge verify_parent_transid and btrfs_buffer_uptodate
      btrfs: always read the entire extent_buffer
      btrfs: don't use btrfs_bio_ctrl for extent buffer reading
      btrfs: remove the mirror_num argument to btrfs_submit_compressed_read
      btrfs: use a separate end_io handler for read_extent_buffer
      btrfs: do not try to unlock the extent for non-subpage metadata reads
      btrfs: return bool from lock_extent_buffer_for_io
      btrfs: submit a writeback bio per extent_buffer
      btrfs: move page locking from lock_extent_buffer_for_io to write_one_eb
      btrfs: don't use btrfs_bio_ctrl for extent buffer writing
      btrfs: use a separate end_io handler for extent_buffer writing
      btrfs: remove the extent_buffer lookup in btree block checksumming
      btrfs: remove the io_pages field in struct extent_buffer
      btrfs: stop using PageError for extent_buffers
      btrfs: don't check for uptodate pages in read_extent_buffer_pages
      btrfs: stop using lock_extent in btrfs_buffer_uptodate
      btrfs: use per-buffer locking for extent_buffer reading
      btrfs: merge write_one_subpage_eb into write_one_eb
      btrfs: fix the btrfs_get_global_root return value
      btrfs: convert btrfs_get_global_root to use a switch statement
      btrfs: remove a pointless NULL check in btrfs_lookup_fs_root
      btrfs: optimize out btrfs_is_zoned for !CONFIG_BLK_DEV_ZONED
      btrfs: don't call btrfs_record_physical_zoned for failed append
      btrfs: mark the len field in struct btrfs_ordered_sum as unsigned
      btrfs: rename the bytenr field in struct btrfs_ordered_sum to logical
      btrfs: optimize the logical to physical mapping for zoned writes
      btrfs: record orig_physical only for the original bio
      btrfs: move split_extent_map to extent_map.c
      btrfs: reorder conditions in btrfs_extract_ordered_extent
      btrfs: return the new ordered_extent from btrfs_split_ordered_extent
      btrfs: split btrfs_alloc_ordered_extent to allocation and insertion helpers
      btrfs: atomically insert the new extent in btrfs_split_ordered_extent
      btrfs: handle completed ordered extents in btrfs_split_ordered_extent
      btrfs: defer splitting of ordered extents until I/O completion
      btrfs: pass the new logical address to split_extent_map
      btrfs: remove unused BTRFS_MAP_DISCARD
      btrfs: optimize simple reads in btrfsic_map_block
      btrfs: remove unused btrfs_map_block
      btrfs: rename __btrfs_map_block to btrfs_map_block
      btrfs: open code btrfs_map_sblock
      btrfs: open code need_full_stripe conditions
      btrfs: fix range_end calculation in extent_write_locked_range
      btrfs: factor out a btrfs_verify_page helper
      btrfs: fix fsverify read error handling in end_page_read
      btrfs: don't check PageError in btrfs_verify_page
      btrfs: don't fail writeback when allocating the compression context fails
      btrfs: rename cow_file_range_async to run_delalloc_compressed
      btrfs: don't check PageError in __extent_writepage
      btrfs: stop setting PageError in the data I/O path
      btrfs: remove PAGE_SET_ERROR
      btrfs: remove non-standard extent handling in __extent_writepage_io
      btrfs: move writeback_control::nr_to_write update to __extent_writepage
      btrfs: only call __extent_writepage_io from extent_write_locked_range
      btrfs: don't treat zoned writeback as being from an async helper thread
      btrfs: fix file_offset for REQ_BTRFS_ONE_ORDERED bios that get split
      btrfs: limit write bios to a single ordered extent
      btrfs: merge the two calls to btrfs_add_ordered_extent in run_delalloc_nocow
      btrfs: pass an ordered_extent to btrfs_reloc_clone_csums
      btrfs: pass an ordered_extent to btrfs_submit_compressed_write
      btrfs: remove btrfs_add_ordered_extent
      btrfs: add a is_data_bbio helper
      btrfs: open code btrfs_bio_end_io in btrfs_dio_submit_io
      btrfs: add an ordered_extent pointer to struct btrfs_bio
      btrfs: use bbio->ordered in btrfs_csum_one_bio
      btrfs: factor out a can_finish_ordered_extent helper
      btrfs: factor out a btrfs_queue_ordered_fn helper
      btrfs: add a btrfs_finish_ordered_extent helper
      btrfs: open code end_extent_writepage in end_bio_extent_writepage
      btrfs: use btrfs_finish_ordered_extent to complete compressed writes
      btrfs: use btrfs_finish_ordered_extent to complete direct writes
      btrfs: use btrfs_finish_ordered_extent to complete buffered writes
      btrfs: set FMODE_CAN_ODIRECT instead of a dummy direct_IO method

David Sterba (13):
      btrfs: open code set_extent_defrag
      btrfs: open code set_extent_delalloc
      btrfs: open code set_extent_new
      btrfs: open code set_extent_dirty
      btrfs: open code set_extent_bits_nowait
      btrfs: open code set_extent_bits
      btrfs: drop NOFAIL from set_extent_bit allocation masks
      btrfs: pass NOWAIT for set/clear extent bits as another bit
      btrfs: drop gfp from parameter extent state helpers
      btrfs: print assertion failure report and stack trace from the same line
      btrfs: add xxhash to fast checksum implementations
      btrfs: disable allocation warnings for compression workspaces
      btrfs: add block-group tree to lockdep classes

Filipe Manana (51):
      btrfs: unexport btrfs_prev_leaf()
      btrfs: make btrfs_free_device() static
      btrfs: tag as unlikely the key comparison when checking sibling keys
      btrfs: avoid extra memory allocation when copying free space cache
      btrfs: avoid searching twice for previous node when merging free space entries
      btrfs: use precomputed end offsets at do_trimming()
      btrfs: simplify arguments to tree_insert_offset()
      btrfs: assert proper locks are held at tree_insert_offset()
      btrfs: assert tree lock is held when searching for free space entries
      btrfs: assert tree lock is held when linking free space
      btrfs: assert tree lock is held when removing free space entries
      btrfs: use inode_logged() at need_log_inode()
      btrfs: use inode_logged() at btrfs_record_unlink_dir()
      btrfs: update comments at btrfs_record_unlink_dir() to be more clear
      btrfs: remove pointless label and goto at btrfs_record_unlink_dir()
      btrfs: change for_rename argument of btrfs_record_unlink_dir() to bool
      btrfs: fix comment referring to no longer existing btrfs_clean_tree_block()
      btrfs: reorder some members of struct btrfs_delayed_ref_head
      btrfs: remove unused is_head field from struct btrfs_delayed_ref_node
      btrfs: remove pointless in_tree field from struct btrfs_delayed_ref_node
      btrfs: use a bool to track qgroup record insertion when adding ref head
      btrfs: make insert_delayed_ref() return a bool instead of an int
      btrfs: get rid of label and goto at insert_delayed_ref()
      btrfs: assert correct lock is held at btrfs_select_ref_head()
      btrfs: use bool type for delayed ref head fields that are used as booleans
      btrfs: use a single switch statement when initializing delayed ref head
      btrfs: remove unnecessary prototype declarations at disk-io.c
      btrfs: make btrfs_destroy_delayed_refs() return void
      btrfs: update documentation for a block group's bg_list member
      btrfs: add missing error handling when logging operation while COWing extent buffer
      btrfs: fix extent buffer leak after tree mod log failure at split_node()
      btrfs: avoid tree mod log ENOMEM failures when we don't need to log
      btrfs: do not BUG_ON() on tree mod log failure at __btrfs_cow_block()
      btrfs: do not BUG_ON() on tree mod log failure at balance_level()
      btrfs: rename enospc label to out at balance_level()
      btrfs: avoid unnecessarily setting the fs to RO and error state at balance_level()
      btrfs: abort transaction at balance_level() when left child is missing
      btrfs: abort transaction at update_ref_for_cow() when ref count is zero
      btrfs: do not BUG_ON() on tree mod log failures at push_nodes_for_insert()
      btrfs: do not BUG_ON() on tree mod log failure at insert_new_root()
      btrfs: do not BUG_ON() on tree mod log failures at insert_ptr()
      btrfs: do not BUG_ON() on tree mod log failures at btrfs_del_ptr()
      btrfs: replace BUG_ON() at split_item() with proper error handling
      btrfs: do not BUG_ON() when dropping inode items from log root
      btrfs: send: do not BUG_ON() on unexpected symlink data extent
      btrfs: do not BUG_ON on failure to get dir index for new snapshot
      btrfs: do not BUG_ON after failure to migrate space during truncation
      btrfs: fix race when deleting quota root from the dirty cow roots list
      btrfs: fix race when deleting free space root from the dirty cow roots list
      btrfs: add comment to struct btrfs_fs_info::dirty_cowonly_roots
      btrfs: fix race between quota disable and relocation

Jeff Layton (1):
      btrfs: update i_version in update_dev_time

Jiapeng Chong (1):
      btrfs: scrub: remove more unused functions

Johannes Thumshirn (1):
      btrfs: unexport btrfs_run_discard_work and make it static

Josef Bacik (12):
      btrfs: move btrfs_check_trunc_cache_free_space into block-rsv.c
      btrfs: remove level argument from btrfs_set_block_flags
      btrfs: simplify btrfs_check_leaf_* helpers into a single helper
      btrfs: add btrfs_tree_block_status definitions to tree-checker.h
      btrfs: use btrfs_tree_block_status for leaf item errors
      btrfs: extend btrfs_leaf_check to return btrfs_tree_block_status
      btrfs: add __btrfs_check_node helper
      btrfs: move btrfs_verify_level_key into tree-checker.c
      btrfs: move split_flags/combine_flags helpers to inode-item.h
      btrfs: add __KERNEL__ check for btrfs_no_printk
      btrfs: add a btrfs_csum_type_size helper
      btrfs: rename del_ptr to btrfs_del_ptr and export it

Matt Corallo (1):
      btrfs: add handling for RAID1C23/DUP to btrfs_reduce_alloc_profile

Naohiro Aota (6):
      btrfs: export bitmap_test_range_all_{set,zero}
      btrfs: delete unused BGs while reclaiming BGs
      btrfs: move out now unused BG from the reclaim list
      btrfs: bail out reclaim process if filesystem is read-only
      btrfs: reinsert BGs failed to reclaim
      btrfs: tracepoints: also show actual number of the outstanding extents

Qu Wenruo (11):
      btrfs: print-tree: pass const extent buffer pointer
      btrfs: improve leaf dump and error handling
      btrfs: output affected files when relocation fails
      btrfs: scrub: use recovered data stripes as cache to avoid unnecessary read
      btrfs: handle tree backref walk error properly
      btrfs: trigger orphan inode cleanup during START_SYNC ioctl
      btrfs: subpage: dump extra subpage bitmaps for debug
      btrfs: subpage: make alloc_extent_buffer() handle previously uptodate range efficiently
      btrfs: use the same uptodate variable for end_bio_extent_readpage()
      btrfs: scrub: remove scrub_ctx::csum_list member
      btrfs: scrub: remove btrfs_fs_info::scrub_wr_completion_workers

Sweet Tea Dorminy (1):
      btrfs: don't commit transaction for every subvol create

Tejun Heo (1):
      btrfs: use alloc_ordered_workqueue() to create ordered workqueues

Tom Rix (1):
      btrfs: simplify transid initialization in btrfs_ioctl_wait_sync

 fs/btrfs/async-thread.c          |  44 +-
 fs/btrfs/async-thread.h          |   3 +
 fs/btrfs/bio.c                   | 122 +++---
 fs/btrfs/bio.h                   |  29 +-
 fs/btrfs/block-group.c           |  47 ++-
 fs/btrfs/block-group.h           |   9 +-
 fs/btrfs/block-rsv.c             |  19 +
 fs/btrfs/block-rsv.h             |   2 +
 fs/btrfs/btrfs_inode.h           |  23 +-
 fs/btrfs/check-integrity.c       |  21 +-
 fs/btrfs/compression.c           |  50 +--
 fs/btrfs/compression.h           |   7 +-
 fs/btrfs/ctree.c                 | 429 +++++++++++++-------
 fs/btrfs/ctree.h                 |   6 +-
 fs/btrfs/defrag.c                |   3 +-
 fs/btrfs/delayed-ref.c           | 110 ++---
 fs/btrfs/delayed-ref.h           |  25 +-
 fs/btrfs/dev-replace.c           |   6 +-
 fs/btrfs/discard.c               |  34 +-
 fs/btrfs/discard.h               |   1 -
 fs/btrfs/disk-io.c               | 451 ++++-----------------
 fs/btrfs/disk-io.h               |   7 +-
 fs/btrfs/extent-io-tree.c        |  37 +-
 fs/btrfs/extent-io-tree.h        |  62 +--
 fs/btrfs/extent-tree.c           | 186 ++++-----
 fs/btrfs/extent-tree.h           |   2 +-
 fs/btrfs/extent_io.c             | 848 +++++++++++----------------------------
 fs/btrfs/extent_io.h             |  11 +-
 fs/btrfs/extent_map.c            | 110 ++++-
 fs/btrfs/extent_map.h            |   6 +-
 fs/btrfs/file-item.c             |  90 ++---
 fs/btrfs/file-item.h             |   1 +
 fs/btrfs/file.c                  |  12 +-
 fs/btrfs/free-space-cache.c      | 122 +++---
 fs/btrfs/free-space-cache.h      |   2 -
 fs/btrfs/free-space-tree.c       |   3 +
 fs/btrfs/fs.h                    |   5 +-
 fs/btrfs/inode-item.h            |  16 +
 fs/btrfs/inode.c                 | 592 ++++++++++++++++-----------
 fs/btrfs/ioctl.c                 |  23 +-
 fs/btrfs/locking.c               |   5 +-
 fs/btrfs/lzo.c                   |   6 +-
 fs/btrfs/messages.c              |   8 -
 fs/btrfs/messages.h              |  15 +-
 fs/btrfs/misc.h                  |  20 +
 fs/btrfs/ordered-data.c          | 442 +++++++++++---------
 fs/btrfs/ordered-data.h          |  27 +-
 fs/btrfs/print-tree.c            |  16 +-
 fs/btrfs/print-tree.h            |   4 +-
 fs/btrfs/qgroup.c                |  20 +-
 fs/btrfs/raid56.c                |  49 ++-
 fs/btrfs/raid56.h                |   3 +
 fs/btrfs/relocation.c            |  61 +--
 fs/btrfs/relocation.h            |   3 +-
 fs/btrfs/scrub.c                 | 125 ++----
 fs/btrfs/send.c                  |  16 +-
 fs/btrfs/subpage.c               |  97 ++---
 fs/btrfs/subpage.h               |  12 +-
 fs/btrfs/super.c                 |   1 -
 fs/btrfs/tests/extent-io-tests.c |  16 +-
 fs/btrfs/transaction.c           |  16 +-
 fs/btrfs/transaction.h           |   3 -
 fs/btrfs/tree-checker.c          | 158 ++++++--
 fs/btrfs/tree-checker.h          |  29 +-
 fs/btrfs/tree-log.c              |  62 +--
 fs/btrfs/tree-log.h              |   2 +-
 fs/btrfs/tree-mod-log.c          | 257 ++++++++++--
 fs/btrfs/volumes.c               | 173 ++++----
 fs/btrfs/volumes.h               |  57 ++-
 fs/btrfs/zlib.c                  |   2 +-
 fs/btrfs/zoned.c                 | 159 ++++----
 fs/btrfs/zoned.h                 |   8 +-
 fs/btrfs/zstd.c                  |   2 +-
 include/trace/events/btrfs.h     |  39 +-
 tools/objtool/check.c            |   1 -
 75 files changed, 2780 insertions(+), 2710 deletions(-)

^ permalink raw reply	[relevance 2%]

* [GIT PULL] Btrfs updates for 5.19
@ 2022-05-24 15:50  2% David Sterba
  0 siblings, 0 replies; 105+ results
From: David Sterba @ 2022-05-24 15:50 UTC (permalink / raw)
  To: torvalds; +Cc: linux-btrfs, linux-kernel

Hi,

please pull the following updates, thanks. There are some minor changes
to code outside of btrfs (VFS, iomap), adding simple helpers or exports.
No merge conflicts but there were some trivial reported in linux-next in
the iomap code.

Features:

- subpage:
  - support on PAGE_SIZE > 4K (previously only 64K)
  - make it work with raid56

- repair super block num_devices automatically if it does not match
  the number of device items

- defrag can convert inline extents to regular extents, up to now inline
  files were skipped but the setting of mount option max_inline could
  affect the decision logic

- zoned:
  - minimal accepted zone size is explicitly set to 4MiB
  - make zone reclaim less aggressive and don't reclaim if there are
    enough free zones
  - add per-profile sysfs tunable of the reclaim threshold

- allow automatic block group reclaim for non-zoned filesystems, with
  sysfs tunables

- tree-checker: new check, compare extent buffer owner against owner
  rootid

Performance:

- avoid blocking on space reservation when doing nowait direct io
  writes, (+7% throughput for reads and writes)

- NOCOW write throughput improvement due to refined locking (+3%)

- send: reduce pressure to page cache by dropping extent pages right
  after they're processed

Core:

- convert all radix trees to xarray

- add iterators for b-tree node items

- support printk message index

- user bulk page allocation for extent buffers

- switch to bio_alloc API, use on-stack bios where convenient, other bio
  cleanups

- use rw lock for block groups to favor concurrent reads

- simplify workques, don't allocate high priority threads for all normal
  queues as we need only one

- refactor scrub, process chunks based on their constraints and
  similarity

- allocate direct io structures on stack and pass around only pointers,
  avoids allocation and reduces potential error handling

Fixes:

- fix count of reserved transaction items for various inode operations

- fix deadlock between concurrent dio writes when low on free data space

- fix a few cases when zones need to be finished

VFS, iomap:

- add helper to check if sb write has started (usable for assertions)

- new helper iomap_dio_alloc_bio, export iomap_dio_bio_end_io

----------------------------------------------------------------
The following changes since commit 42226c989789d8da4af1de0c31070c96726d990c:

  Linux 5.18-rc7 (2022-05-15 18:08:58 -0700)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-5.19-tag

for you to fetch changes up to 0a05fafe9def0d9f0fbef3dfc8094925af9e3185:

  btrfs: zoned: introduce a minimal zone size 4M and reject mount (2022-05-17 20:15:25 +0200)

----------------------------------------------------------------
Anand Jain (1):
      btrfs: use a local variable for fs_devices pointer in btrfs_dev_replace_finishing

Christoph Hellwig (28):
      btrfs: factor check and flush helpers from __btrfsic_submit_bio
      btrfs: check-integrity: split submit_bio from btrfsic checking
      btrfs: check-integrity: simplify bio allocation in btrfsic_read_block
      btrfs: use on-stack bio in repair_io_failure
      btrfs: use on-stack bio in scrub_recheck_block
      btrfs: use on-stack bio in scrub_repair_page_from_good_copy
      btrfs: move the call to bio_set_dev out of submit_stripe_bio
      btrfs: pass a block_device to btrfs_bio_clone
      btrfs: pass bio opf to rbio_add_io_page
      btrfs: don't allocate a btrfs_bio for raid56 per-stripe bios
      btrfs: don't allocate a btrfs_bio for scrub bios
      btrfs: stop using the btrfs_bio saved iter in index_rbio_pages
      btrfs: remove the zoned/zone_size union in struct btrfs_fs_info
      btrfs: move btrfs_readpage to extent_io.c
      btrfs: remove unused bio_flags argument to btrfs_submit_metadata_bio
      btrfs: do not return errors from btrfs_submit_metadata_bio
      btrfs: do not return errors from btrfs_submit_compressed_read
      btrfs: do not return errors from submit_bio_hook_t instances
      btrfs: simplify WQ_HIGHPRI handling in struct btrfs_workqueue
      btrfs: use normal workqueues for scrub
      btrfs: use a normal workqueue for rmw_workers
      btrfs: add a btrfs_dio_rw wrapper
      iomap: allow the file system to provide a bio_set for direct I/O
      iomap: add per-iomap_iter private data
      btrfs: allocate dio_data on stack
      btrfs: remove the disk_bytenr in struct btrfs_dio_private
      btrfs: move struct btrfs_dio_private to inode.c
      btrfs: allocate the btrfs_dio_private as part of the iomap dio bio

David Sterba (9):
      btrfs: sink parameter is_data to btrfs_set_disk_extent_flags
      btrfs: remove btrfs_delayed_extent_op::is_data
      btrfs: remove unused parameter bio_flags from btrfs_wq_submit_bio
      btrfs: remove trivial helper update_nr_written
      btrfs: simplify handling of bio_ctrl::bio_flags
      btrfs: open code extent_set_compress_type helpers
      btrfs: rename io_failure_record::bio_flags to compress_type
      btrfs: rename bio_flags in parameters and switch type
      btrfs: rename bio_ctrl::bio_flags to compress_type

Filipe Manana (31):
      btrfs: avoid unnecessary btree search restarts when reading node
      btrfs: release upper nodes when reading stale btree node from disk
      btrfs: update outdated comment for read_block_for_search()
      btrfs: remove trivial wrapper btrfs_read_buffer()
      btrfs: only reserve the needed data space amount during fallocate
      btrfs: remove useless dio wait call when doing fallocate zero range
      btrfs: remove inode_dio_wait() calls when starting reflink operations
      btrfs: remove ordered extent check and wait during fallocate
      btrfs: lock the inode first before flushing range when punching hole
      btrfs: remove ordered extent check and wait during hole punching and zero range
      btrfs: add and use helper to assert an inode range is clean
      btrfs: avoid blocking on page locks with nowait dio on compressed range
      btrfs: avoid blocking nowait dio when locking file range
      btrfs: avoid double nocow check when doing nowait dio writes
      btrfs: stop allocating a path when checking if cross reference exists
      btrfs: free path at can_nocow_extent() before checking for checksum items
      btrfs: release path earlier at can_nocow_extent()
      btrfs: avoid blocking when allocating context for nowait dio read/write
      btrfs: avoid blocking on space revervation when doing nowait dio writes
      btrfs: move common NOCOW checks against a file extent into a helper
      btrfs: do not test for free space inode during NOCOW check against file extent
      btrfs: use BTRFS_DIR_START_INDEX at btrfs_create_new_inode()
      btrfs: remove search start argument from first_logical_byte()
      btrfs: use rbtree with leftmost node cached for tracking lowest block group
      btrfs: use a read/write lock for protecting the block groups tree
      btrfs: return block group directly at btrfs_next_block_group()
      btrfs: avoid double search for block group during NOCOW writes
      btrfs: fix deadlock between concurrent dio writes when low on free data space
      btrfs: send: keep the current inode open while processing it
      btrfs: send: avoid trashing the page cache
      btrfs: do not account twice for inode ref when reserving metadata units

Gabriel Niebler (18):
      btrfs: introduce btrfs_for_each_slot iterator macro
      btrfs: use btrfs_for_each_slot in find_first_block_group
      btrfs: use btrfs_for_each_slot in mark_block_group_to_copy
      btrfs: use btrfs_for_each_slot in btrfs_search_dir_index_item
      btrfs: use btrfs_for_each_slot in btrfs_real_readdir
      btrfs: use btrfs_for_each_slot in did_create_dir
      btrfs: use btrfs_for_each_slot in can_rmdir
      btrfs: use btrfs_for_each_slot in is_ancestor
      btrfs: use btrfs_for_each_slot in process_all_refs
      btrfs: use btrfs_for_each_slot in process_all_new_xattrs
      btrfs: use btrfs_for_each_slot in process_all_extents
      btrfs: use btrfs_for_each_slot in btrfs_unlink_all_paths
      btrfs: use btrfs_for_each_slot in btrfs_read_chunk_tree
      btrfs: use btrfs_for_each_slot in btrfs_listxattr
      btrfs: turn delayed_nodes_tree into an XArray
      btrfs: turn name_cache radix tree into XArray in send_ctx
      btrfs: turn fs_info member buffer_radix into XArray
      btrfs: turn fs_roots_radix in btrfs_fs_info into an XArray

Goldwyn Rodrigues (2):
      btrfs: do not pass compressed_bio to submit_compressed_bio()
      btrfs: derive compression type from extent map during reads

Johannes Thumshirn (2):
      btrfs: zoned: make auto-reclaim less aggressive
      btrfs: zoned: introduce a minimal zone size 4M and reject mount

Jonathan Lassoff (1):
      btrfs: add messages to printk index

Josef Bacik (3):
      btrfs: make the bg_reclaim_threshold per-space info
      btrfs: allow block group background reclaim for non-zoned filesystems
      btrfs: change the bg_reclaim_threshold valid region from 0 to 100

Lv Ruyi (1):
      btrfs: remove unnecessary check of iput argument

Naohiro Aota (8):
      fs: add a lockdep check function for sb_start_write()
      btrfs: assert that relocation is protected with sb_start_write()
      btrfs: zoned: introduce btrfs_zoned_bg_is_full
      btrfs: zoned: consolidate zone finish functions
      btrfs: zoned: finish block group when there are no more allocatable bytes left
      btrfs: zoned: properly finish block group on metadata write
      btrfs: zoned: zone finish unused block group
      btrfs: zoned: fix comparison of alloc_offset vs meta_write_pointer

Nikolay Borisov (3):
      btrfs: remove checks for arg argument in btrfs_ioctl_balance
      btrfs: simplify code flow in btrfs_ioctl_balance
      btrfs: improve error reporting in lookup_inline_extent_backref

Omar Sandoval (16):
      btrfs: reserve correct number of items for unlink and rmdir
      btrfs: reserve correct number of items for rename
      btrfs: fix anon_dev leak in create_subvol()
      btrfs: get rid of btrfs_add_nondir()
      btrfs: remove unnecessary btrfs_i_size_write(0) calls
      btrfs: remove unnecessary inode_set_bytes(0) call
      btrfs: remove unnecessary set_nlink() in btrfs_create_subvol_root()
      btrfs: remove unused mnt_userns parameter from __btrfs_set_acl
      btrfs: remove redundant name and name_len parameters to create_subvol
      btrfs: don't pass parent objectid to btrfs_new_inode() explicitly
      btrfs: move btrfs_get_free_objectid() call into btrfs_new_inode()
      btrfs: set inode flags earlier in btrfs_new_inode()
      btrfs: allocate inode outside of btrfs_new_inode()
      btrfs: factor out common part of btrfs_{mknod,create,mkdir}()
      btrfs: reserve correct number of items for inode creation
      btrfs: move common inode creation code into btrfs_create_new_inode()

Qu Wenruo (44):
      btrfs: scrub: rename members related to scrub_block::pagev
      btrfs: scrub: rename scrub_page to scrub_sector
      btrfs: scrub: rename scrub_bio::pagev and related members
      btrfs: warn when extent buffer leak test fails
      btrfs: tree-checker: check extent buffer owner against owner rootid
      btrfs: replace memset with memzero_page in data checksum verification
      btrfs: use dummy extent buffer for super block sys chunk array read
      btrfs: make nodesize >= PAGE_SIZE case to reuse the non-subpage routine
      btrfs: expand subpage support to any PAGE_SIZE > 4K
      btrfs: simplify parameters of submit_read_repair() and rename
      btrfs: avoid double clean up when submit_one_bio() failed
      btrfs: fix the error handling for submit_extent_page() for btrfs_do_readpage()
      btrfs: return correct error number for __extent_writepage_io()
      btrfs: repair super block num_devices automatically
      btrfs: reduce width for stripe_len from u64 to u32
      btrfs: raid56: open code rbio_nr_pages()
      btrfs: raid56: make btrfs_raid_bio more compact
      btrfs: raid56: introduce new cached members for btrfs_raid_bio
      btrfs: raid56: introduce btrfs_raid_bio::stripe_sectors
      btrfs: raid56: introduce btrfs_raid_bio::bio_sectors
      btrfs: raid56: make rbio_add_io_page() subpage compatible
      btrfs: raid56: make finish_parity_scrub() subpage compatible
      btrfs: raid56: make __raid_recover_endio_io() subpage compatible
      btrfs: raid56: make finish_rmw() subpage compatible
      btrfs: raid56: open code rbio_stripe_page_index()
      btrfs: raid56: make raid56_add_scrub_pages() subpage compatible
      btrfs: raid56: remove btrfs_raid_bio::bio_pages array
      btrfs: raid56: make set_bio_pages_uptodate() subpage compatible
      btrfs: raid56: make steal_rbio() subpage compatible
      btrfs: raid56: make alloc_rbio_essential_pages() subpage compatible
      btrfs: raid56: enable subpage support for RAID56
      btrfs: move definition of btrfs_raid_types to volumes.h
      btrfs: use ilog2() to replace if () branches for btrfs_bg_flags_to_raid_index()
      btrfs: calculate physical_end using dev_extent_len directly in scrub_stripe()
      btrfs: scrub: introduce a helper to locate an extent item
      btrfs: scrub: introduce dedicated helper to scrub simple-mirror based range
      btrfs: scrub: introduce dedicated helper to scrub simple-stripe based range
      btrfs: scrub: cleanup the non-RAID56 branches in scrub_stripe()
      btrfs: scrub: use scrub_simple_mirror() to handle RAID56 data stripe scrub
      btrfs: scrub: refactor scrub_raid56_parity()
      btrfs: scrub: use find_first_extent_item to for extent item search
      btrfs: scrub: move scrub_remap_extent() call into scrub_extent()
      btrfs: add "0x" prefix for unsupported optional features
      btrfs: allow defrag to convert inline extents to regular extents

Schspa Shi (1):
      btrfs: use non-bh spin_lock in zstd timer callback

Sweet Tea Dorminy (4):
      btrfs: restore inode creation before xattr setting
      btrfs: factor out allocating an array of pages
      btrfs: allocate page arrays using bulk page allocator
      btrfs: wait between incomplete batch memory allocations

Yu Zhe (1):
      btrfs: remove unnecessary type casts

 fs/btrfs/acl.c                  |   39 +-
 fs/btrfs/async-thread.c         |  122 +--
 fs/btrfs/async-thread.h         |    7 +-
 fs/btrfs/block-group.c          |  205 +++--
 fs/btrfs/block-group.h          |    7 +-
 fs/btrfs/btrfs_inode.h          |   25 -
 fs/btrfs/check-integrity.c      |  172 ++--
 fs/btrfs/check-integrity.h      |    6 +-
 fs/btrfs/compression.c          |   60 +-
 fs/btrfs/compression.h          |    4 +-
 fs/btrfs/ctree.c                |  102 ++-
 fs/btrfs/ctree.h                |  165 +++-
 fs/btrfs/delalloc-space.c       |    9 +-
 fs/btrfs/delayed-inode.c        |   84 +-
 fs/btrfs/delayed-ref.c          |    4 +-
 fs/btrfs/delayed-ref.h          |    1 -
 fs/btrfs/dev-replace.c          |   52 +-
 fs/btrfs/dir-item.c             |   31 +-
 fs/btrfs/disk-io.c              |  310 +++----
 fs/btrfs/disk-io.h              |   10 +-
 fs/btrfs/extent-tree.c          |   61 +-
 fs/btrfs/extent_io.c            |  619 +++++++------
 fs/btrfs/extent_io.h            |   47 +-
 fs/btrfs/file.c                 |  286 +++---
 fs/btrfs/free-space-cache.c     |    9 +-
 fs/btrfs/free-space-tree.c      |    2 +-
 fs/btrfs/inode.c                | 1870 +++++++++++++++++++-------------------
 fs/btrfs/ioctl.c                |  268 +++---
 fs/btrfs/props.c                |   40 +-
 fs/btrfs/props.h                |    4 -
 fs/btrfs/qgroup.c               |    7 +-
 fs/btrfs/qgroup.h               |   12 +-
 fs/btrfs/raid56.c               |  809 ++++++++++-------
 fs/btrfs/raid56.h               |    9 +-
 fs/btrfs/reflink.c              |   23 +-
 fs/btrfs/relocation.c           |   19 +-
 fs/btrfs/root-tree.c            |    3 +-
 fs/btrfs/scrub.c                | 1889 ++++++++++++++++++++-------------------
 fs/btrfs/send.c                 |  400 ++++-----
 fs/btrfs/space-info.c           |   11 +-
 fs/btrfs/space-info.h           |    8 +
 fs/btrfs/subpage.c              |   55 +-
 fs/btrfs/subpage.h              |    2 +
 fs/btrfs/super.c                |    9 +-
 fs/btrfs/sysfs.c                |   43 +-
 fs/btrfs/tests/btrfs-tests.c    |   24 +-
 fs/btrfs/transaction.c          |  116 ++-
 fs/btrfs/tree-checker.c         |   55 ++
 fs/btrfs/tree-checker.h         |    1 +
 fs/btrfs/tree-log.c             |   11 +-
 fs/btrfs/volumes.c              |  127 +--
 fs/btrfs/volumes.h              |   42 +-
 fs/btrfs/xattr.c                |   40 +-
 fs/btrfs/zoned.c                |  217 +++--
 fs/btrfs/zoned.h                |   23 +-
 fs/btrfs/zstd.c                 |   14 +-
 fs/erofs/data.c                 |    2 +-
 fs/ext4/file.c                  |    4 +-
 fs/f2fs/file.c                  |    4 +-
 fs/gfs2/file.c                  |    4 +-
 fs/iomap/direct-io.c            |   25 +-
 fs/xfs/xfs_file.c               |    6 +-
 fs/zonefs/super.c               |    4 +-
 include/linux/fs.h              |    5 +
 include/linux/iomap.h           |   16 +-
 include/trace/events/btrfs.h    |   30 +-
 include/uapi/linux/btrfs_tree.h |   13 -
 67 files changed, 4482 insertions(+), 4221 deletions(-)

^ permalink raw reply	[relevance 2%]

* [GIT PULL] Btrfs updates for 4.17
@ 2018-04-03 13:56  3% David Sterba
  0 siblings, 0 replies; 105+ results
From: David Sterba @ 2018-04-03 13:56 UTC (permalink / raw)
  To: torvalds; +Cc: David Sterba, clm, linux-btrfs, linux-kernel

Hi,

please pull the following btrfs changes. There are a several user
visible changes, the rest is mostly invisible and continues to clean up
the whole code base.

There are no merge conflicts with current master. Please pull, thanks.

User visible changes:

  - new mount option nossd_spread (pair for ssd_spread)

  - mount option subvolid will detect junk after the number and fail the mount

  - add message after cancelled device replace

  - direct module dependency on libcrc32, removed own crc wrappers

  - removed user space transaction ioctls

  - use lighter locking when reading /proc/self/mounts, RCU instead of mutex
    to avoid unnecessary contention

Enhancements:

  - skip writeback of last page when truncating file to same size

  - send: do not issue unnecessary truncate operations

  - mount option token specifiers: use %u for unsigned values, more validation

  - selftests: more tree block validations

qgroups:

  - preparatory work for splitting reservation types for data and metadata,
    this should allow for more accurate tracking and fix some issues with
    underflows or do further enhancements

  - split metadata reservations for started and joined transaction so they do
    not get mixed up and are accounted correctly at commit time

  - with the above, it's possible to revert patch that potentially deadlocks
    when trying to make more space by explicitly committing when the quota
    limit is hit

  - fix root item corruption when multiple same source snapshots are created
    with quota enabled

RAID56:

  - make sure target is identical to source when raid56 rebuild fails after
    dev-replace

  - faster rebuild during scrub, batch by stripes and not block-by-block

  - make more use of cached data when rebuilding from a missing device

Fixes:

  - null pointer deref when device replace target is missing

  - fix fsync after hole punching when using no-holes feature

  - fix lockdep splat when allocating percpu data with wrong GFP flags

Cleanups, refactoring, core changes:

  - drop redunant parameters from various functions

  - kill and opencode trivial helpers

  - __cold/__exit function annotations

  - dead code removal

  - continued audit and documentation of memory barriers

  - error handling: handle removal from uuid tree

  - error handling: remove handling of impossible condtitons

  - more debugging or error messages

  - updated tracepoints

  - 1 VLA use removal (1 still left)

----------------------------------------------------------------
The following changes since commit 3eb2ce825ea1ad89d20f7a3b5780df850e4be274:

  Linux 4.16-rc7 (2018-03-25 12:44:30 -1000)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-4.17-tag

for you to fetch changes up to 57599c7e7722daf5f8c2dba4b0e4628f5c500771:

  btrfs: lift errors from add_extent_changeset to the callers (2018-03-31 02:03:25 +0200)

----------------------------------------------------------------
Anand Jain (25):
      btrfs: open code btrfs_dev_replace_cancel()
      btrfs: rename __btrfs_dev_replace_cancel()
      btrfs: btrfs_dev_replace_cancel() can return int
      btrfs: open code btrfs_init_dev_replace_tgtdev_for_resume()
      btrfs: extent_buffer_uptodate() make it static and inline
      btrfs: manage thread_pool mount option as %u
      btrfs: manage metadata_ratio mount option as %u
      btrfs: manage check_int_print_mask mount option as %u
      btrfs: manage commit mount option as %u
      btrfs: add a comment to mark the deprecated mount option
      btrfs: fix null pointer deref when target device is missing
      btrfs: log, when replace, is canceled by the user
      btrfs: remove unused function btrfs_async_submit_limit()
      btrfs: cow_file_range() num_bytes and disk_num_bytes are same
      btrfs: use ASSERT to report logical error in cow_file_range()
      btrfs: not a disk error if the bio_add_page fails
      btrfs: keep device list sorted
      btrfs: insert newly opened device to the end of the list
      btrfs: verify subvolid mount parameter
      btrfs: remove assert in btrfs_init_dev_replace_tgtdev()
      btrfs: unify types for metadata_ratio and data_chunk_allocations
      btrfs: rename btrfs_close_extra_device to btrfs_free_extra_devids
      btrfs: add define for oldest generation
      btrfs: drop num argument from find_live_mirror()
      btrfs: drop optimal argument from find_live_mirror()

Colin Ian King (2):
      btrfs: remove redundant check on ret and goto
      Btrfs: extent map selftest: add missing void parameter to btrfs_test_extent_map

David Sterba (37):
      btrfs: add (the only possible) __exit annotation
      btrfs: add more __cold annotations
      btrfs: drop underscores from exported xattr functions
      btrfs: drop extern from function declarations
      btrfs: adjust return type of btrfs_getxattr
      btrfs: move btrfs_listxattr prototype to xattr.h
      btrfs: open code trivial helper btrfs_page_exists_in_range
      btrfs: sort and group mount option definitions
      btrfs: assume that bio_ret is always valid in submit_extent_page
      btrfs: remove redundant variable in __do_readpage
      btrfs: cleanup merging conditions in submit_extent_page
      btrfs: document more parameters of submit_extent_page
      btrfs: drop fs_info parameter from tree_mod_log_set_node_key
      btrfs: drop fs_info parameter from tree_mod_log_insert_move
      btrfs: drop fs_info parameter from tree_mod_log_insert_key
      btrfs: drop fs_info parameter from tree_mod_log_free_eb
      btrfs: drop fs_info parameter from tree_mod_log_free_eb
      btrfs: drop unused fs_info parameter from tree_mod_log_eb_move
      btrfs: embed tree_mod_move structure to tree_mod_elem
      btrfs: drop fs_info parameter from __tree_mod_log_oldest_root
      btrfs: remove trivial locking wrappers of tree mod log
      btrfs: kill trivial wrapper tree_mod_log_eb_move
      btrfs: kill tree_mod_log_set_node_key helper
      btrfs: kill tree_mod_log_set_root_pointer helper
      btrfs: separate types for submit_bio_start and submit_bio_done
      btrfs: remove unused parameters from extent_submit_bio_start_t
      btrfs: remove unused parameters from extent_submit_bio_done_t
      btrfs: rename submit callbacks and drop double underscores
      btrfs: use helper to set ulist aux from a qgroup
      btrfs: use lockdep_assert_held for spinlocks
      btrfs: use lockdep_assert_held for mutexes
      btrfs: update barrier in should_cow_block
      btrfs: use RCU in btrfs_show_devname for device list traversal
      btrfs: remove stale comments about fs_mutex
      btrfs: split dev-replace locking helpers for read and write
      btrfs: user proper type for btrfs_mask_flags flags
      btrfs: lift errors from add_extent_changeset to the callers

Filipe Manana (4):
      Btrfs: skip writeback of last page when truncating file to same size
      Btrfs: send, do not issue unnecessary truncate operations
      Btrfs: fix fsync after hole punching when using no-holes feature
      Btrfs: fix copy_items() return value when logging an inode

Gu JinXiang (1):
      btrfs: use reada direction enum instead of constant value in load_free_space_tree

Gu Jinxiang (1):
      btrfs: use reada direction enum instead of constant value in populate_free_space_tree

Howard McLauchlan (2):
      btrfs: print error if primary super block write fails
      btrfs: Add nossd_spread mount option

Jeff Mahoney (3):
      btrfs: fix lockdep splat in btrfs_alloc_subvolume_writers
      btrfs: remove dead create_space_info calls
      btrfs: defer adding raid type kobject until after chunk relocation

Liu Bo (11):
      Btrfs: enhance leak debug checker for extent state and extent buffer
      Btrfs: do not check inode's runtime flags under root->orphan_lock
      Btrfs: add tracepoint for em's EEXIST case
      Btrfs: fix unexpected cow in run_delalloc_nocow
      Btrfs: dev-replace: skip prealloc extents when copy nocow pages
      Btrfs: send: fix typo in TLV_PUT
      Btrfs: raid56: remove redundant async_missing_raid56
      Btrfs: dev-replace: make sure target is identical to source when raid56 rebuild fails
      Btrfs: scrub: batch rebuild for raid56
      Btrfs: replace: cache rbio when rebuild data on missing device
      Btrfs: print error messages when failing to read trees

Matthew Wilcox (1):
      btrfs: Use filemap_range_has_page()

Misono, Tomohiro (1):
      btrfs: ctree.h: Fix wrong comment position about csum size

Nikolay Borisov (50):
      btrfs: Remove unused btrfs_start_transaction_lflush function
      btrfs: Don't hardcode the csum size in btrfs_ordered_sum_size
      btrfs: Make btrfs_trans_release_metadata private to transaction.c
      btrfs: Open code btrfs_write_and_wait_marked_extents
      btrfs: Remove fs_info argument from btrfs_trans_release_metadata
      btrfs: Remove fs_info argument from btrfs_create_pending_block_groups
      btrfs: Don't pass fs_info arg to btrfs_start_dirty_block_groups
      btrfs: Don't pass fs_info to __btrfs_run_delayed_items
      btrfs: Don't pass fs_info to btrfs_run_delayed_items/_nr
      btrfs: Don't pass fs_info to commit_fs_roots
      btrfs: Don't pass fs_info to commit_cowonly_roots
      btrfs: Remove root argument of cleanup_transaction
      btrfs: Remove fs_info argument from switch_commit_roots
      btrfs: Remove fs_info argument from create_pending_snapshots/create_pending_snapshot
      btrfs: Remove fs_info argument from btrfs_update_commit_device_bytes_used
      btrfs: Remove fs_info argument of btrfs_write_and_wait_transaction
      btrfs: Remove invalid null checks from btrfs_cleanup_dirty_bgs
      btrfs: Document consistency of transaction->io_bgs list
      btrfs: Add enospc_debug printing in metadata_reserve_bytes
      btrfs: Move error handling of btrfs_start_dirty_block_groups closer to call site
      btrfs: Use schedule_timeout_interruptible
      btrfs: Streamline btrfs_delalloc_reserve_metadata initial operations
      btrfs: Remove btrfs_inode::delayed_iput_count
      btrfs: Move qgroup rescan on quota enable to btrfs_quota_enable
      libcrc32c: Add crc32c_impl function
      btrfs: Remove custom crc32c init code
      btrfs: Remove redundant memory barriers around dio_private error status
      btrfs: Remove redundant comment from btrfs_search_forward
      btrfs: Remove root arg from btrfs_log_inode_parent
      btrfs: Remove root argument from btrfs_log_dentry_safe
      btrfs: Remove root argument from cow_file_range_inline
      btrfs: Relax memory barrier in btrfs_tree_unlock
      btrfs: Remove userspace transaction ioctls
      btrfs: Remove btrfs_file_private::trans
      btrfs: Remove code referencing unused TRANS_USERSPACE
      btrfs: Remove btrfs_fs_info::open_ioctl_trans
      btrfs: Use sizeof directly instead of a constant variable
      btrfs: Handle error from btrfs_uuid_tree_rem call in _btrfs_ioctl_set_received_subvol
      btrfs: Document parameters of btrfs_reserve_extent
      btrfs: Remove unused op_key var from add_delayed_refs
      btrfs: Remove unused length var from scrub_handle_errored_block
      btrfs: Remove unused tot_len var from lzo_decompress
      btrfs: Remove unused root var from relink_file_extents
      btrfs: remove max_active var from open_ctree
      btrfs: Remove unused extent_root var from caching_thread
      btrfs: Remove unused flush var in shrink_delalloc
      btrfs: drop fs_info parameter from btrfs_run_delayed_refs
      btrfs: Drop fs_info parameter from btrfs_qgroup_account_extents
      btrfs: Drop fs_info parameter from btrfs_finish_extent_commit
      btrfs: Drop fs_info parameter from __btrfs_run_delayed_refs

Omar Sandoval (1):
      Btrfs: delete dead code in btrfs_orphan_add()

Qu Wenruo (23):
      btrfs: Refactor parameter of BTRFS_MAX_DEVS() from root to fs_info
      btrfs: Add chunk allocation ENOSPC debug message for enospc_debug mount option
      btrfs: volumes: Cleanup stripe size calculation
      btrfs: tree-checker: Replace root parameter with fs_info
      btrfs: Refactor __get_raid_index() to btrfs_bg_flags_to_raid_index()
      btrfs: qgroup: Fix root item corruption when multiple same source snapshots are created with quota enabled
      btrfs: volumes: Remove the meaningless condition of minimal nr_devs when allocating a chunk
      btrfs: qgroup: Skeleton to support separate qgroup reservation type
      btrfs: qgroup: Introduce helpers to update and access new qgroup rsv
      btrfs: qgroup: Make qgroup_reserve and its callers to use separate reservation type
      btrfs: qgroup: Fix wrong qgroup reservation update for relationship modification
      btrfs: qgroup: Update trace events to use new separate rsv types
      btrfs: qgroup: Cleanup the remaining old reservation counters
      btrfs: qgroup: Split meta rsv type into meta_prealloc and meta_pertrans
      btrfs: qgroup: Don't use root->qgroup_meta_rsv for qgroup
      btrfs: qgroup: Introduce function to convert META_PREALLOC into META_PERTRANS
      btrfs: qgroup: Use separate meta reservation type for delalloc
      btrfs: delayed-inode: Use new qgroup meta rsv for delayed inode and item
      btrfs: qgroup: Use root::qgroup_meta_rsv_* to record qgroup meta reserved space
      btrfs: qgroup: Update trace events for metadata reservation
      Revert "btrfs: qgroups: Retry after commit on getting EDQUOT"
      btrfs: tests/qgroup: Fix wrong tree backref level
      btrfs: Validate child tree block's level and first key

Su Yue (1):
      btrfs: adjust return values of btrfs_inode_by_name

Yang Shi (1):
      btrfs: remove unused hardirq.h

 fs/btrfs/Kconfig                  |   3 +-
 fs/btrfs/Makefile                 |   2 +-
 fs/btrfs/acl.c                    |  14 +-
 fs/btrfs/backref.c                |  13 +-
 fs/btrfs/backref.h                |   2 +-
 fs/btrfs/btrfs_inode.h            |   3 -
 fs/btrfs/check-integrity.c        |   4 +-
 fs/btrfs/compression.c            |   2 +-
 fs/btrfs/compression.h            |   2 +-
 fs/btrfs/ctree.c                  | 263 +++++++++++-------------
 fs/btrfs/ctree.h                  |  86 ++++----
 fs/btrfs/delayed-inode.c          |  62 +++---
 fs/btrfs/delayed-inode.h          |   8 +-
 fs/btrfs/delayed-ref.c            |   8 +-
 fs/btrfs/delayed-ref.h            |   2 +-
 fs/btrfs/dev-replace.c            | 130 ++++++------
 fs/btrfs/dev-replace.h            |   9 +-
 fs/btrfs/dir-item.c               |   1 -
 fs/btrfs/disk-io.c                | 226 ++++++++++++++-------
 fs/btrfs/disk-io.h                |  15 +-
 fs/btrfs/extent-tree.c            | 317 +++++++++++++++--------------
 fs/btrfs/extent_io.c              |  82 ++++----
 fs/btrfs/extent_io.h              |  19 +-
 fs/btrfs/extent_map.c             |   6 +-
 fs/btrfs/extent_map.h             |   2 +-
 fs/btrfs/file.c                   |  30 ++-
 fs/btrfs/free-space-cache.c       |   2 +-
 fs/btrfs/free-space-tree.c        |   4 +-
 fs/btrfs/hash.c                   |  54 -----
 fs/btrfs/hash.h                   |  43 ----
 fs/btrfs/inode-item.c             |   1 -
 fs/btrfs/inode-map.c              |   4 +-
 fs/btrfs/inode.c                  | 335 ++++++++++++-------------------
 fs/btrfs/ioctl.c                  | 127 ++----------
 fs/btrfs/locking.c                |   2 +-
 fs/btrfs/lzo.c                    |   2 -
 fs/btrfs/ordered-data.c           |   4 +-
 fs/btrfs/ordered-data.h           |   6 +-
 fs/btrfs/print-tree.c             |  10 +-
 fs/btrfs/props.c                  |   8 +-
 fs/btrfs/qgroup.c                 | 406 ++++++++++++++++++++++++++------------
 fs/btrfs/qgroup.h                 | 106 +++++++++-
 fs/btrfs/raid56.c                 |  28 +--
 fs/btrfs/reada.c                  |  10 +-
 fs/btrfs/ref-verify.c             |   7 +-
 fs/btrfs/relocation.c             |  34 +++-
 fs/btrfs/scrub.c                  | 126 ++++++++----
 fs/btrfs/send.c                   |  35 +++-
 fs/btrfs/super.c                  | 259 ++++++++++++------------
 fs/btrfs/sysfs.c                  |   4 +-
 fs/btrfs/tests/btrfs-tests.c      |   3 +-
 fs/btrfs/tests/extent-map-tests.c |   2 +-
 fs/btrfs/tests/qgroup-tests.c     |   2 +-
 fs/btrfs/transaction.c            | 231 +++++++++++-----------
 fs/btrfs/transaction.h            |  25 ++-
 fs/btrfs/tree-checker.c           | 151 +++++++-------
 fs/btrfs/tree-checker.h           |   7 +-
 fs/btrfs/tree-defrag.c            |   5 +-
 fs/btrfs/tree-log.c               |  88 ++++++---
 fs/btrfs/tree-log.h               |   2 +-
 fs/btrfs/uuid-tree.c              |   2 +-
 fs/btrfs/volumes.c                | 162 +++++++++------
 fs/btrfs/volumes.h                |  31 ++-
 fs/btrfs/xattr.c                  |  12 +-
 fs/btrfs/xattr.h                  |   7 +-
 include/linux/crc32c.h            |   1 +
 include/trace/events/btrfs.h      | 108 +++++++++-
 lib/libcrc32c.c                   |   6 +
 68 files changed, 2075 insertions(+), 1698 deletions(-)
 delete mode 100644 fs/btrfs/hash.c
 delete mode 100644 fs/btrfs/hash.h

^ permalink raw reply	[relevance 3%]

* [GIT PULL] Btrfs updates for 5.9
@ 2020-07-31 16:42  3% David Sterba
  0 siblings, 0 replies; 105+ results
From: David Sterba @ 2020-07-31 16:42 UTC (permalink / raw)
  To: torvalds; +Cc: David Sterba, linux-btrfs, linux-kernel

Hi,

we don't have any big feature updates this time, there are lots of small
enhacements or fixes. A hilight perhaps are the parallel fsync
performance improvements, numbers below.

Regarding the dio/iomap that was reverted last time, the required API
changes are likely to land in the upcoming cycle, the btrfs part will be
updated afterwards.

Please pull, thanks.

---

User visible changes:

- new mount option rescue= to group all recovery-related mount options
  so we don't have many specific options, currently introducing only
  aliases for existing options, future extensions are in development to
  allow read-only mount with partially damaged structures
  - usebackuproot is an alias for rescue=usebackuproot
  - nologreplay is an alias for rescue=nologreplay

- start deprecation of mount option inode_cache, removal scheduled to
  5.11

- removed deprecated mount options alloc_start and subvolrootid

- device stats corruption counter gets incremented when a checksum
  mismatch is found

- qgroup information exported in sysfs /sys/fs/btrfs/<UUID>/qgroups/<id>

- add link /sys/fs/btrfs/<UUID>/bdi pointing to the associated backing
  dev info

- FS_INFO ioctl enhancements:
  - add flags to request/describe newly added items
  - new item: numeric checksum type and checksum size
  - new item: generation
  - new item: metadata_uuid

- seed device: with one new read-write device added, print the new
  device information in /proc/mounts

- balance: detect cancellation by Ctrl-C in existing cancellation points

Performance improvements:

- optimized versions of various helpers on little-endian architectures,
  where we don't have to do LE/BE conversion from on-disk format

- tree-log/fsync optimizations leading to lower max latency reported by
  dbench, reduced by about 12%

- all chunk tree leaves are prefetched at mount time, can improve mount
  time on large (terabyte-sized) filesystems

- speed up parallel fsync of files with reflinked/deduped extents, with
  jobs 16 to 1024 the throughput gets improved roughly by 50% on average
  and runtime decreased roughly by 30% on average, notable outlier is
  128 jobs with +121.2% on throughput and -54.6% runtime

- another speed up of parallel fsync, reduce number of checksum tree
  lookups and contention, the improvements start to show up with 2
  tasks with +20% throughput and -16% runtime up to 64 with +200%
  throughput and -66% runtime

Core:

- umount-time qgroup leak checker

- qgroups
  - add a way to unreserve partial range after failure, avoiding some
    EDQUOT errors
  - improved flushing logic when EDQUOT is hit

- possible EINTR interruption caused by failed reservations after
  transaction start is better handled and documented

- transaction abort errors are unified to EROFS in case it's not the
  original reason of abort or we don't have other way to determine the
  reason

Fixes:

- make truncate succeed on a NOCOW file even if data space is exhausted

- fix cancelling balance on filesystem with exhausted metadata space

- anon block device:
  - preallocate anon bdev when subvolume is created to report failure
    early
  - shorten time the anon bdev id is allocated
  - don't allocate anon bdev for internal roots

- minor memory leak in ref-verify

- refuse invalid combinations of compression and NOCOW file flags

- lockdep fixes, updating the device locks

- remove obsolete fallback logic for block group profile adjustments
  when switching from 1 to more devices, causing allocation of unwanted
  block groups

Other:

- cleanups, refactoring, simplifications
  - conversions from struct inode to struct btrfs_inode in internal
    functions
  - removal of unused struct members

----------------------------------------------------------------
The following changes since commit 92ed301919932f777713b9172e525674157e983d:

  Linux 5.8-rc7 (2020-07-26 14:14:06 -0700)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-5.9-tag

for you to fetch changes up to 5e548b32018d96c377fda4bdac2bf511a448ca67:

  btrfs: do not set the full sync flag on the inode during page release (2020-07-27 12:55:48 +0200)

----------------------------------------------------------------
Anand Jain (3):
      btrfs: let btrfs_return_cluster_to_free_space() return void
      btrfs: use helper btrfs_get_block_group
      btrfs: don't traverse into the seed devices in show_devname

David Sterba (18):
      btrfs: scrub: remove kmap/kunmap of pages
      btrfs: scrub: unify naming of page address variables
      btrfs: scrub: simplify superblock checksum calculation
      btrfs: scrub: remove temporary csum array in scrub_checksum_super
      btrfs: scrub: clean up temporary page variables in scrub_checksum_super
      btrfs: scrub: simplify data block checksum calculation
      btrfs: scrub: clean up temporary page variables in scrub_checksum_data
      btrfs: scrub: simplify tree block checksum calculation
      btrfs: scrub: clean up temporary page variables in scrub_checksum_tree_block
      btrfs: add little-endian optimized key helpers
      btrfs: don't use UAPI types for fiemap callback
      btrfs: remove unused btrfs_root::defrag_trans_start
      btrfs: start deprecation of mount option inode_cache
      btrfs: allow use of global block reserve for balance item deletion
      btrfs: remove deprecated mount option alloc_start
      btrfs: remove deprecated mount option subvolrootid
      btrfs: prefetch chunk tree leaves at mount
      btrfs: add missing check for nocow and compression inode flags

Denis Efremov (1):
      btrfs: tests: remove if duplicate in __check_free_space_extents()

Filipe Manana (13):
      btrfs: remove no longer necessary chunk mutex locking cases
      btrfs: remove the start argument from btrfs_free_reserved_data_space_noquota()
      btrfs: use btrfs_alloc_data_chunk_ondemand() when allocating space for relocation
      btrfs: remove no longer used log_list member of struct btrfs_ordered_extent
      btrfs: remove no longer used trans_list member of struct btrfs_ordered_extent
      btrfs: only commit the delayed inode when doing a full fsync
      btrfs: only commit delayed items at fsync if we are logging a directory
      btrfs: stop incremening log_batch for the log root tree when syncing log
      btrfs: remove no longer needed use of log_writers for the log root tree
      btrfs: reduce contention on log trees when logging checksums
      btrfs: fix race between page release and a fast fsync
      btrfs: release old extent maps during page release
      btrfs: do not set the full sync flag on the inode during page release

Johannes Thumshirn (7):
      btrfs: get mapping tree directly from fsinfo in find_first_block_group
      btrfs: factor out reading of bg from find_frist_block_group
      btrfs: use free_root_extent_buffer to free root
      btrfs: pass checksum type via BTRFS_IOC_FS_INFO ioctl
      btrfs: add filesystem generation to FS_INFO ioctl
      btrfs: add metadata_uuid to FS_INFO ioctl
      btrfs: open-code remount flag setting in btrfs_remount

Josef Bacik (10):
      btrfs: convert block group refcount to refcount_t
      btrfs: don't WARN if we abort a transaction with EROFS
      btrfs: document special case error codes for fs errors
      btrfs: return EROFS for BTRFS_FS_STATE_ERROR cases
      btrfs: sysfs: use NOFS for device creation
      btrfs: open device without device_list_mutex
      btrfs: move the chunk_mutex in btrfs_read_chunk_tree
      btrfs: fix lockdep splat from btrfs_dump_space_info
      btrfs: don't adjust bg flags and use default allocation profiles
      btrfs: if we're restriping, use the target restripe profile

Liao Pingfang (1):
      btrfs: check-integrity: remove unnecessary failure messages during memory allocation

Marcos Paulo de Souza (1):
      btrfs: add multi-statement protection to btrfs_set/clear_and_info macros

Nikolay Borisov (74):
      btrfs: don't balance btree inode pages from buffered write path
      btrfs: read stripe len directly in btrfs_rmap_block
      btrfs: simplify checks when adding excluded ranges
      btrfs: make __btrfs_add_ordered_extent take struct btrfs_inode
      btrfs: make get_extent_allocation_hint take btrfs_inode
      btrfs: make btrfs_lookup_ordered_extent take btrfs_inode
      btrfs: make btrfs_reloc_clone_csums take btrfs_inode
      btrfs: make create_io_em take btrfs_inode
      btrfs: make extent_clear_unlock_delalloc take btrfs_inode
      btrfs: make btrfs_csum_one_bio takae btrfs_inode
      btrfs: make __btrfs_drop_extents take btrfs_inode
      btrfs: remove hole check in prealloc_file_extent_cluster
      btrfs: perform data management operations outside of inode lock
      btrfs: use for loop in prealloc_file_extent_cluster
      btrfs: tracepoints: fix btrfs_trigger_flush symbolic string for flags
      btrfs: tracepoints: fix extent type symbolic name print
      btrfs: tracepoints: move FLUSH_ACTIONS define
      btrfs: tracepoints: fix qgroup reservation type printing
      btrfs: tracepoints: switch extent_io_tree_owner to using EM macro
      btrfs: tracepoints: convert flush states to using EM macros
      btrfs: make qgroup_free_reserved_data take btrfs_inode
      btrfs: make __btrfs_qgroup_release_data take btrfs_inode
      btrfs: make btrfs_qgroup_free_data take btrfs_inode
      btrfs: make cow_file_range_inline take btrfs_inode
      btrfs: make btrfs_add_ordered_extent take btrfs_inode
      btrfs: make cow_file_range take btrfs_inode
      btrfs: make btrfs_add_ordered_extent_compress take btrfs_inode
      btrfs: make btrfs_submit_compressed_write take btrfs_inode
      btrfs: make submit_compressed_extents take btrfs_inode
      btrfs: make btrfs_qgroup_release_data take btrfs_inode
      btrfs: make insert_reserved_file_extent take btrfs_inode
      btrfs: make fallback_to_cow take btrfs_inode
      btrfs: make run_delalloc_nocow take btrfs_inode
      btrfs: make cow_file_range_async take btrfs_inode
      btrfs: make btrfs_dec_test_first_ordered_pending take btrfs_inode
      btrfs: make __endio_write_update_ordered take btrfs_inode
      btrfs: make btrfs_cleanup_ordered_extents take btrfs_inode
      btrfs: make inode_can_compress take btrfs_inode
      btrfs: make inode_need_compress take btrfs_inode
      btrfs: make need_force_cow take btrfs_inode
      btrfs: make btrfs_run_delalloc_range take btrfs_inode
      btrfs: make btrfs_add_ordered_extent_dio take btrfs_inode
      btrfs: make btrfs_create_dio_extent take btrfs_inode
      btrfs: make btrfs_new_extent_direct take btrfs_inode
      btrfs: make __extent_writepage_io take btrfs_inode
      btrfs: make writepage_delalloc take btrfs_inode
      btrfs: make btrfs_set_extent_delalloc take btrfs_inode
      btrfs: make btrfs_dirty_pages take btrfs_inode
      btrfs: make btrfs_qgroup_reserve_data take btrfs_inode
      btrfs: make btrfs_free_reserved_data_space_noquota take btrfs_fs_info
      btrfs: make btrfs_free_reserved_data_space take btrfs_inode
      btrfs: make btrfs_delalloc_release_space take btrfs_inode
      btrfs: make btrfs_check_data_free_space take btrfs_inode
      btrfs: make btrfs_delalloc_reserve_space take btrfs_inode
      btrfs: remove BTRFS_I calls in btrfs_writepage_fixup_worker
      btrfs: make prealloc_file_extent_cluster take btrfs_inode
      btrfs: make btrfs_set_inode_last_trans take btrfs_inode
      btrfs: make btrfs_qgroup_check_reserved_leak take btrfs_inode
      btrfs: make get_state_failrec return failrec directly
      btrfs: streamline btrfs_get_io_failure_record logic
      btrfs: record btrfs_device directly in btrfs_io_bio
      btrfs: don't check for btrfs_device::bdev in btrfs_end_bio
      btrfs: increment device corruption error in case of checksum error
      btrfs: remove needless ASSERT check of orig_bio in end_compressed_bio_read
      btrfs: increment corrupt device counter during compressed read
      btrfs: sysfs: add bdi link to the fsid directory
      btrfs: always initialize btrfs_bio::tgtdev_map/raid_map pointers
      btrfs: raid56: remove redundant device check in rbio_add_io_page
      btrfs: raid56: assign bio in while() when using bio_list_pop
      btrfs: raid56: use in_range where applicable
      btrfs: raid56: don't opencode swap() in __raid_recover_end_io
      btrfs: remove fail label in check_compressed_csum
      btrfs: raid56: remove out label in __raid56_parity_recover
      btrfs: remove done label in writepage_delalloc

Qu Wenruo (22):
      btrfs: introduce "rescue=" mount option
      btrfs: inode: refactor the parameters of insert_reserved_file_extent()
      btrfs: inode: move qgroup reserved space release to the callers of insert_reserved_file_extent()
      btrfs: file: reserve qgroup space after the hole punch range is locked
      btrfs: change timing for qgroup reserved space for ordered extents to fix reserved space leak
      btrfs: qgroup: catch reserved space leaks at unmount time
      btrfs: allow btrfs_truncate_block() to fallback to nocow for data space reservation
      btrfs: add comments for btrfs_check_can_nocow() and can_nocow_extent()
      btrfs: refactor btrfs_check_can_nocow() into two variants
      btrfs: use __u16 for the return value of btrfs_qgroup_level()
      btrfs: qgroup: export qgroups in sysfs
      btrfs: don't allocate anonymous block device for user invisible roots
      btrfs: free anon block device right after subvolume deletion
      btrfs: preallocate anon block device at first phase of snapshot creation
      btrfs: qgroup: allow to unreserve range without releasing other ranges
      btrfs: qgroup: try to flush qgroup space when we get -EDQUOT
      btrfs: qgroup: remove ASYNC_COMMIT mechanism in favor of reserve retry-after-EDQUOT
      btrfs: qgroup: free per-trans reserved space when a subvolume gets dropped
      btrfs: relocation: allow signal to cancel balance
      btrfs: avoid possible signal interruption of btrfs_drop_snapshot() on relocation tree
      btrfs: relocation: review the call sites which can be interrupted by signal
      btrfs: add comments for btrfs_reserve_flush_enum

Tom Rix (1):
      btrfs: ref-verify: fix memory leak in add_block_entry

 fs/btrfs/block-group.c                 | 211 +++++--------
 fs/btrfs/block-group.h                 |   3 +-
 fs/btrfs/btrfs_inode.h                 |  11 +
 fs/btrfs/check-integrity.c             |  27 +-
 fs/btrfs/compression.c                 |  30 +-
 fs/btrfs/compression.h                 |   4 +-
 fs/btrfs/ctree.c                       |  17 ++
 fs/btrfs/ctree.h                       | 127 ++++++--
 fs/btrfs/delalloc-space.c              |  36 +--
 fs/btrfs/delalloc-space.h              |  10 +-
 fs/btrfs/disk-io.c                     |  92 +++++-
 fs/btrfs/disk-io.h                     |   2 +
 fs/btrfs/extent-io-tree.h              |   5 +-
 fs/btrfs/extent-tree.c                 |  17 +-
 fs/btrfs/extent_io.c                   | 241 ++++++++-------
 fs/btrfs/extent_io.h                   |   4 +-
 fs/btrfs/file-item.c                   |   4 +-
 fs/btrfs/file.c                        | 143 +++++----
 fs/btrfs/free-space-cache.c            |  23 +-
 fs/btrfs/free-space-cache.h            |   2 +-
 fs/btrfs/inode-map.c                   |   3 +-
 fs/btrfs/inode.c                       | 530 ++++++++++++++++++---------------
 fs/btrfs/ioctl.c                       |  86 +++++-
 fs/btrfs/ordered-data.c                |  63 ++--
 fs/btrfs/ordered-data.h                |  19 +-
 fs/btrfs/qgroup.c                      | 359 ++++++++++++++++------
 fs/btrfs/qgroup.h                      |  24 +-
 fs/btrfs/raid56.c                      |  65 ++--
 fs/btrfs/ref-verify.c                  |   2 +
 fs/btrfs/reflink.c                     |  26 +-
 fs/btrfs/relocation.c                  |  71 ++---
 fs/btrfs/scrub.c                       | 153 +++-------
 fs/btrfs/space-info.c                  |   2 +-
 fs/btrfs/super.c                       | 144 ++++++---
 fs/btrfs/sysfs.c                       | 163 +++++++++-
 fs/btrfs/sysfs.h                       |   7 +
 fs/btrfs/tests/free-space-tree-tests.c |   2 -
 fs/btrfs/tests/inode-tests.c           |  14 +-
 fs/btrfs/transaction.c                 |   8 +-
 fs/btrfs/transaction.h                 |  28 +-
 fs/btrfs/tree-defrag.c                 |   5 +-
 fs/btrfs/tree-log.c                    |  50 ++--
 fs/btrfs/volumes.c                     | 133 ++++++---
 fs/btrfs/volumes.h                     |   2 +-
 include/trace/events/btrfs.h           | 137 +++++----
 include/uapi/linux/btrfs.h             |  21 +-
 include/uapi/linux/btrfs_tree.h        |   4 +-
 47 files changed, 1909 insertions(+), 1221 deletions(-)

^ permalink raw reply	[relevance 3%]

* [GIT PULL] Btrfs updates for 4.18
@ 2018-06-04 15:43  3% David Sterba
  0 siblings, 0 replies; 105+ results
From: David Sterba @ 2018-06-04 15:43 UTC (permalink / raw)
  To: torvalds; +Cc: David Sterba, clm, linux-btrfs, linux-kernel

Hi,

there are some new features and a usual load of cleanups, more details below.

Specifically, there's a set of new non-privileged ioctls to allow
subvolume listing.  It works but still needs a security review as it's a
new interface and we might need to do some tweaks to the data
structures. The fixes could be considred regressions but may touch the
interfaces too.

Currently there are no merge conflicts but linux-next has reported a few
in the past, originating from other *FS trees.

Please pull, thanks.

---

User visible features:

- added support for the ioctl FS_IOC_FSGETXATTR, per-inode flags, successor
  of GET/SETFLAGS; now supports only existing flags: append, immutable,
  noatime, nodump, sync

- 3 new unprivileged ioctls to allow users to enumerate subvolumes

- dedupe syscall implementation does not restrict the range to 16MiB, though it
  still splits the whole range to 16MiB chunks

- on user demand, rmdir() is able to delete an empty subvolume, export the
  capability in sysfs

- fix inode number types in tracepoints, other cleanups

- send: improved speed when dealing with a large removed directory,
  measurements show decrease from 2000 minutes to 2 minutes on a directory with
  2 million entries

- pre-commit check of superblock to detect a mysterious in-memory corruption

- log message updates


Other changes:

- orphan inode cleanup improved, does no keep long-standing reservations that
  could lead up to early ENOSPC in some cases

- slight improvement of handling snapshotted NOCOW files by avoiding some
  unnecessary tree searches

- avoid OOM when dealing with many unmergeable small extents at flush time

- speedup conversion of free space tree representations from/to bitmap/tree

- code refactoring, deletion, cleanups
  - delayed refs
  - delayed iput
  - redundant argument removals
  - memory barrier cleanups
  - remove a redundant mutex supposedly excluding several ioctls to run in
    parallel

- new tracepoints for blockgroup manipulation

- more sanity checks of compressed headers

----------------------------------------------------------------
The following changes since commit b04e217704b7f879c6b91222b066983a44a7a09f:

  Linux 4.17-rc7 (2018-05-27 13:01:47 -0700)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-4.18-tag

for you to fetch changes up to 23d0b79dfaed2305b500b0215b0421701ada6b1a:

  btrfs: Add unprivileged version of ino_lookup ioctl (2018-05-31 11:35:24 +0200)

----------------------------------------------------------------
Al Viro (1):
      btrfs: take the last remnants of ->d_fsdata use out

Anand Jain (19):
      btrfs: add comment about BTRFS_FS_EXCL_OP
      btrfs: rename struct btrfs_fs_devices::list
      btrfs: cleanup __btrfs_open_devices() drop head pointer
      btrfs: rename __btrfs_close_devices to close_fs_devices
      btrfs: rename __btrfs_open_devices to open_fs_devices
      btrfs: cleanup find_device() drop list_head pointer
      btrfs: cleanup btrfs_rm_device() promote fs_devices pointer
      btrfs: move btrfs_raid_type_names values to btrfs_raid_attr table
      btrfs: move btrfs_raid_group values to btrfs_raid_attr table
      btrfs: move btrfs_raid_mindev_errorvalues to btrfs_raid_attr table
      btrfs: reduce uuid_mutex critical section while scanning devices
      btrfs: use existing cur_devices, cleanup btrfs_rm_device
      btrfs: document uuid_mutex uasge in read_chunk_tree
      btrfs: replace uuid_mutex by device_list_mutex in btrfs_open_devices
      btrfs: drop uuid_mutex in btrfs_dev_replace_finishing
      btrfs: drop uuid_mutex in btrfs_destroy_dev_replace_tgtdev
      btrfs: use common variable for fs_devices in btrfs_destroy_dev_replace_tgtdev
      btrfs: add prefix "balance:" for log messages
      btrfs: fix describe_relocation when printing unknown flags

Chengguang Xu (1):
      btrfs: return original error code when failing from option parsing

Colin Ian King (1):
      btrfs: send: fix spelling mistake: "send_in_progres" -> "send_in_progress"

David Sterba (38):
      btrfs: tracepoints, use correct type for inode number
      btrfs: tracepoints, use %llu instead of %Lu
      btrfs: tracepoints, drop unnecessary ULL casts
      btrfs: tracepoints, fix whitespace in strings
      btrfs: tracepoints, use extended format with UUID where possible
      btrfs: tests: pass fs_info to extent_map tests
      btrfs: use fs_info for btrfs_handle_em_exist tracepoint
      btrfs: squeeze btrfs_dev_replace_continue_on_mount to its caller
      btrfs: make success path out of btrfs_init_dev_replace_tgtdev more clear
      btrfs: export and rename free_device
      btrfs: move btrfs_init_dev_replace_tgtdev to dev-replace.c and make static
      btrfs: move volume_mutex to callers of btrfs_rm_device
      btrfs: move clearing of EXCL_OP out of __cancel_balance
      btrfs: add proper safety check before resuming dev-replace
      btrfs: add sanity check when resuming balance after mount
      btrfs: cleanup helpers that reset balance state
      btrfs: remove wrong use of volume_mutex from btrfs_dev_replace_start
      btrfs: kill btrfs_fs_info::volume_mutex
      btrfs: track running balance in a simpler way
      btrfs: move and comment read-only check in btrfs_cancel_balance
      btrfs: drop lock parameter from update_ioctl_balance_args and rename
      btrfs: use mutex in btrfs_resume_balance_async
      btrfs: open code set_balance_control
      btrfs: remove redundant btrfs_balance_control::fs_info
      btrfs: introduce conditional wakeup helpers
      btrfs: add barriers to btrfs_sync_log before log_commit_wait wakeups
      btrfs: replace waitqueue_actvie with cond_wake_up
      btrfs: rename btrfs_update_iflags to reflect which flags it touches
      btrfs: rename btrfs_mask_flags to reflect which flags it touches
      btrfs: rename check_flags to reflect which flags it touches
      btrfs: rename btrfs_flags_to_ioctl to reflect which flags it touches
      btrfs: add helpers for FS_XFLAG_* conversion
      btrfs: add FS_IOC_FSGETXATTR ioctl
      btrfs: add FS_IOC_FSSETXATTR ioctl
      btrfs: unify naming of flags variables for SETFLAGS and XFLAGS
      btrfs: use kvzalloc for EXTENT_SAME temporary data
      btrfs: tests: add helper for error messages and update them
      btrfs: tests: drop newline from test_msg strings

Ethan Lien (2):
      btrfs: lift some btrfs_cross_ref_exist checks in nocow path
      btrfs: balance dirty metadata pages in btrfs_finish_ordered_io

Gu JinXiang (2):
      btrfs: drop unused parameter qgroup_reserved
      btrfs: drop useless member qgroup_reserved of btrfs_pending_snapshot

Gu Jinxiang (3):
      btrfs: remove unused fs_info parameter
      btrfs: do reverse path readahead in btrfs_shrink_device
      btrfs: propagate failures of __exclude_logged_extent to upper caller

Howard McLauchlan (3):
      btrfs: clean up le_bitmap_{set, clear}()
      btrfs: optimize free space tree bitmap conversion
      btrfs: remove unused le_test_bit()

Kees Cook (1):
      btrfs: raid56: Remove VLA usage

Liu Bo (7):
      Btrfs: add parent_transid parameter to veirfy_level_key
      Btrfs: remove superfluous free_extent_buffer in read_block_for_search
      Btrfs: use more straightforward extent_buffer_uptodate check
      Btrfs: move get root out of btrfs_search_slot to a helper
      Btrfs: grab write lock directly if write_lock_level is the max level
      Btrfs: remove always true check in unlock_up
      Btrfs: remove unused check of skip_locking

Lu Fengqi (3):
      btrfs: drop unused space_info parameter from create_space_info
      btrfs: Remove fs_info argument from btrfs_uuid_tree_add
      btrfs: Remove fs_info argument from btrfs_uuid_tree_rem

Misono Tomohiro (5):
      btrfs: Move may_destroy_subvol() from ioctl.c to inode.c
      btrfs: Factor out the main deletion process from btrfs_ioctl_snap_destroy()
      btrfs: Allow rmdir(2) to delete an empty subvolume
      btrfs: sysfs: Add entry which shows if rmdir can work on subvolumes
      btrfs: use error code returned by btrfs_read_fs_root_no_name in search ioctl

Nikolay Borisov (54):
      btrfs: Replace owner argument in add_pinned_bytes with a boolean
      btrfs: Drop delayed_refs argument from btrfs_check_delayed_seq
      btrfs: Use while loop instead of labels in __endio_write_update_ordered
      btrfs: Fix lock release order
      btrfs: Consolidate error checking for btrfs_alloc_chunk
      btrfs: Sink extent_tree arguments in try_release_extent_mapping
      btrfs: Remove map argument from try_release_extent_state
      btrfs: Remove redundant tree argument from extent_readpages
      btrfs: Use list_empty instead of list_empty_careful
      btrfs: Remove tree argument from extent_writepages
      btrfs: Remove btrfs_wait_and_free_delalloc_work
      btrfs: Drop add_delayed_ref_head fs_info parameter
      btrfs: Drop fs_info parameter from add_delayed_data_ref
      btrfs: Drop fs_info parameter from btrfs_merge_delayed_refs
      btrfs: Remove delayed_iput parameter of btrfs_start_delalloc_roots
      btrfs: Remove delayed_iput parameter from btrfs_start_delalloc_inodes
      btrfs: Remove delay_iput parameter from __start_delalloc_inodes
      btrfs: Remove delayed_iput member from btrfs_delalloc_work
      btrfs: Unexport btrfs_alloc_delalloc_work
      btrfs: Remove devid parameter from btrfs_rmap_block
      btrfs: Factor out common delayed refs init code
      btrfs: Use init_delayed_ref_common in add_delayed_tree_ref
      btrfs: Use init_delayed_ref_common in add_delayed_data_ref
      btrfs: Open-code add_delayed_tree_ref
      btrfs: Open-code add_delayed_data_ref
      btrfs: Introduce init_delayed_ref_head
      btrfs: Use init_delayed_ref_head in add_delayed_ref_head
      btrfs: split delayed ref head initialization and addition
      btrfs: Add assert in __btrfs_del_delalloc_inode
      btrfs: Make btrfs_init_dummy_trans initialize trans' fs_info field
      btrfs: Remove fs_info argument from add_block_group_free_space
      btrfs: Remove fs_info argument from __add_block_group_free_space
      btrfs: Remove fs_info argument from __add_to_free_space_tree
      btrfs: Remove fs_info parameter from add_new_free_space_info
      btrfs: Remove fs_info argument from add_new_free_space
      btrfs: Remove fs_info parameter from remove_block_group_free_space
      btrfs: Remove fs_info argument from convert_free_space_to_bitmaps
      btrfs: Remove fs_info parameter from convert_free_space_to_extents
      btrfs: Remove fs_info argument from update_free_space_extent_count
      btrfs: Remove fs_info argument from modify_free_space_bitmap
      btrfs: Remove fs_info argument from add_free_space_extent
      btrfs: Remove fs_info argument from remove_free_space_extent
      btrfs: Remove fs_info argument from __remove_from_free_space_tree
      btrfs: Remove fs_info argument from remove_from_free_space_tree
      btrfs: Remove fs_info argument from add_to_free_space_tree
      btrfs: Remove fs_info argument from populate_free_space_tree
      btrfs: Unexport and rename btrfs_invalidate_inodes
      btrfs: Remove stale comment about select_delayed_ref
      btrfs: Remove fs_info argument from alloc_reserved_tree_block
      btrfs: Simplify alloc_reserved_tree_block interface
      btrfs: Pass btrfs_delayed_extent_op to alloc_reserved_tree_block
      btrfs: Streamline shared ref check in alloc_reserved_tree_block
      btrfs: Factor out read portion of btrfs_get_blocks_direct
      btrfs: Factor out write portion of btrfs_get_blocks_direct

Omar Sandoval (16):
      Btrfs: update stale comments referencing vmtruncate()
      Btrfs: fix error handling in btrfs_truncate_inode_items()
      Btrfs: don't BUG_ON() in btrfs_truncate_inode_items()
      Btrfs: stop creating orphan items for truncate
      Btrfs: get rid of BTRFS_INODE_HAS_ORPHAN_ITEM
      Btrfs: delete dead code in btrfs_orphan_commit_root()
      Btrfs: don't return ino to ino cache if inode item removal fails
      Btrfs: refactor btrfs_evict_inode() reserve refill dance
      Btrfs: fix ENOSPC caused by orphan items reservations
      Btrfs: get rid of unused orphan infrastructure
      Btrfs: renumber BTRFS_INODE_ runtime flags and switch to enums
      Btrfs: reserve space for O_TMPFILE orphan item deletion
      Btrfs: allow empty subvol= again
      Btrfs: fix clone vs chattr NODATASUM race
      Btrfs: fix memory and mount leak in btrfs_ioctl_rm_dev_v2()
      Btrfs: clean up error handling in btrfs_truncate()

Qu Wenruo (15):
      btrfs: print-tree: Add eb locking status output for debug build
      btrfs: trace: Remove unnecessary fs_info parameter for btrfs__reserve_extent event class
      btrfs: trace: Add trace points for unused block groups
      btrfs: trace: Allow trace_qgroup_update_counters() to record old rfer/excl value
      btrfs: qgroup: Allow trace_btrfs_qgroup_account_extent() to record its transid
      btrfs: Move btrfs_check_super_valid() to avoid forward declaration
      btrfs: Refactor btrfs_check_super_valid
      btrfs: Do super block verification before writing it to disk
      btrfs: qgroup: Search commit root for rescan to avoid missing extent
      btrfs: qgroup: Finish rescan when hit the last leaf of extent tree
      btrfs: compression: Add linux/sizes.h for compression.h
      btrfs: lzo: document the compressed data format
      btrfs: lzo: Add header length check to avoid potential out-of-bounds access
      btrfs: lzo: Harden inline lzo compressed extent decompression
      btrfs: qgroup: show more meaningful qgroup_rescan_init error message

Robbie Ko (2):
      btrfs: incremental send, move allocation until it's needed in orphan_dir_info
      btrfs: incremental send, improve rmdir performance for large directory

Su Yue (3):
      btrfs: rename btrfs_get_block_group_info and make it static
      btrfs: return error value if create_io_em failed in cow_file_range
      btrfs: return ENOMEM if path allocation fails in btrfs_cross_ref_exist

Timofey Titovets (3):
      Btrfs: split btrfs_extent_same
      Btrfs: dedupe_file_range ioctl: remove 16MiB restriction
      Btrfs: reuse cmp workspace in EXTENT_SAME ioctl

Tomohiro Misono (4):
      btrfs: sysfs: Use enum/define value for feature array definitions
      btrfs: Add unprivileged ioctl which returns subvolume information
      btrfs: Add unprivileged ioctl which returns subvolume's ROOT_REF
      btrfs: Add unprivileged version of ino_lookup ioctl

 fs/btrfs/btrfs_inode.h                 |   22 +-
 fs/btrfs/compression.c                 |    7 +-
 fs/btrfs/compression.h                 |    2 +
 fs/btrfs/ctree.c                       |  123 +--
 fs/btrfs/ctree.h                       |   76 +-
 fs/btrfs/delayed-inode.c               |    9 +-
 fs/btrfs/delayed-ref.c                 |  275 +++----
 fs/btrfs/delayed-ref.h                 |    5 +-
 fs/btrfs/dev-replace.c                 |  150 +++-
 fs/btrfs/disk-io.c                     |  391 +++++----
 fs/btrfs/extent-tree.c                 |  253 +++---
 fs/btrfs/extent_io.c                   |   62 +-
 fs/btrfs/extent_io.h                   |   20 +-
 fs/btrfs/extent_map.c                  |    6 +-
 fs/btrfs/extent_map.h                  |    3 +-
 fs/btrfs/free-space-cache.c            |    6 +-
 fs/btrfs/free-space-tree.c             |  192 +++--
 fs/btrfs/free-space-tree.h             |    8 -
 fs/btrfs/inode.c                       | 1371 ++++++++++++++++----------------
 fs/btrfs/ioctl.c                       | 1210 ++++++++++++++++++----------
 fs/btrfs/locking.c                     |   34 +-
 fs/btrfs/lzo.c                         |   76 +-
 fs/btrfs/ordered-data.c                |   14 +-
 fs/btrfs/print-tree.c                  |   21 +
 fs/btrfs/qgroup.c                      |   69 +-
 fs/btrfs/raid56.c                      |   38 +-
 fs/btrfs/relocation.c                  |    8 +-
 fs/btrfs/scrub.c                       |    1 +
 fs/btrfs/send.c                        |   46 +-
 fs/btrfs/super.c                       |    7 +-
 fs/btrfs/sysfs.c                       |   52 +-
 fs/btrfs/sysfs.h                       |    4 +-
 fs/btrfs/tests/btrfs-tests.c           |    4 +-
 fs/btrfs/tests/btrfs-tests.h           |    6 +-
 fs/btrfs/tests/extent-buffer-tests.c   |   56 +-
 fs/btrfs/tests/extent-io-tests.c       |   75 +-
 fs/btrfs/tests/extent-map-tests.c      |   90 ++-
 fs/btrfs/tests/free-space-tests.c      |  177 +++--
 fs/btrfs/tests/free-space-tree-tests.c |  129 +--
 fs/btrfs/tests/inode-tests.c           |  312 ++++----
 fs/btrfs/tests/qgroup-tests.c          |  100 +--
 fs/btrfs/transaction.c                 |   15 +-
 fs/btrfs/transaction.h                 |    1 -
 fs/btrfs/tree-log.c                    |   28 +-
 fs/btrfs/uuid-tree.c                   |   10 +-
 fs/btrfs/volumes.c                     |  506 ++++++------
 fs/btrfs/volumes.h                     |   24 +-
 include/trace/events/btrfs.h           |  323 ++++----
 include/uapi/linux/btrfs.h             |   97 +++
 49 files changed, 3579 insertions(+), 2935 deletions(-)

^ permalink raw reply	[relevance 3%]

* [GIT PULL] Btrfs updates for 5.12
@ 2021-02-16 12:56  3% David Sterba
  0 siblings, 0 replies; 105+ results
From: David Sterba @ 2021-02-16 12:56 UTC (permalink / raw)
  To: torvalds; +Cc: David Sterba, linux-btrfs, linux-kernel

Hi,

this update brings updates of space handling, performance improvements
or bug fixes. The subpage block size and zoned mode features have
reached state where they're usable but with limitations.

The branch merges cleanly on top of current master, there are some minor
conflicts reported by linux-next in iov_iter or kmap conversion.

Please pull, thanks.

- Performance or related

  - do not block on deleted block group mutex in the cleaner, avoids
    some long stalls

  - improved flushing: make it work better with ticket space
    reservations and avoid excessive transaction commits in some
    scenarios, slightly improves throughput for random write load

  - preemptive background flushing: separate the logic from ticket
    reservations, improve the accounting and decisions when to flush in
    low space conditions

  - less lock contention related to running delayed refs, let just one
    thread do the flushing when there are many inside transaction commit

  - dbench workload improvements: avoid unnecessary work when logging
    inodes, fewer fallbacks to transaction commit and thus less waiting
    for it (+7% throughput, -20% latency)

- Core

  - subpage block size
    - currently read-only support
    - refactor and generalize code where sectorsize is assumed to be
      page size, add the subpage handling everywhere
    - the read-write support is on the way, page sizes are still limited
      to 4K or 64K

  - zoned mode, first working version but with limitations
    - SMR/ZBC/ZNS friendly allocation mode, utilizing the "no fixed
      location for structures" and chunked allocation
    - superblock as the only fixed data structure needs special
      handling, uses 2 consecutive zones as a ring buffer
    - tree-log support with a dedicated block group to avoid unordered
      writes
    - emulated zones on non-zoned devices
    - not yet working
      - all non-single block group profiles, requires more
	zone write pointer synchronization between the multiple block
	groups
      - fitrim due to dependency on space cache, can be implemented

- Fixes

  - ref-verify: proper tree owner and node level tracking
  - fix pinned byte accounting, causing some early ENOSPC now more
    likely due to other changes in delayed refs

- Other

  - error handling fixes and improvements
  - more error injection points
  - more function documentation
  - more and updated tracepoints
  - subset of W=1 checked by default
  - update comments to allow more automatic kdoc parameter checks

----------------------------------------------------------------
The following changes since commit e0756cfc7d7cd08c98a53b6009c091a3f6a50be6:

  Merge tag 'trace-v5.11-rc7' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace (2021-02-08 11:32:39 -0800)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-5.12-tag

for you to fetch changes up to 9d294a685fbcb256ce8c5f7fd88a7596d0f52a8a:

  btrfs: zoned: enable to mount ZONED incompat flag (2021-02-09 02:52:24 +0100)

----------------------------------------------------------------
Abaci Team (1):
      btrfs: simplify condition in __btrfs_run_delayed_items

Filipe Manana (10):
      btrfs: send: remove stale code when checking for shared extents
      btrfs: remove wrong comment for can_nocow_extent()
      btrfs: remove unnecessary directory inode item update when deleting dir entry
      btrfs: stop setting nbytes when filling inode item for logging
      btrfs: avoid logging new ancestor inodes when logging new inode
      btrfs: skip logging directories already logged when logging all parents
      btrfs: skip logging inodes already logged when logging new entries
      btrfs: remove unnecessary check_parent_dirs_for_sync()
      btrfs: make concurrent fsyncs wait less when waiting for a transaction commit
      btrfs: fix extent buffer leak on failure to copy root

Johannes Thumshirn (7):
      block: add bio_add_zone_append_page
      btrfs: release path before calling to btrfs_load_block_group_zone_info
      btrfs: zoned: do not load fs_info::zoned from incompat flag
      btrfs: zoned: allow zoned filesystems on non-zoned block devices
      btrfs: zoned: check if bio spans across an ordered extent
      btrfs: zoned: cache if block group is on a sequential zone
      btrfs: save irq flags when looking up an ordered extent

Josef Bacik (34):
      btrfs: fix error handling in commit_fs_roots
      btrfs: allow error injection for btrfs_search_slot and btrfs_cow_block
      btrfs: noinline btrfs_should_cancel_balance
      btrfs: ref-verify: pass down tree block level when building refs
      btrfs: ref-verify: make sure owner is set for all refs
      btrfs: keep track of the root owner for relocation reads
      btrfs: do not cleanup upper nodes in btrfs_backref_cleanup_node
      btrfs: handle space_info::total_bytes_pinned inside the delayed ref itself
      btrfs: account for new extents being deleted in total_bytes_pinned
      btrfs: fix reloc root leak with 0 ref reloc roots on recovery
      btrfs: splice remaining dirty_bg's onto the transaction dirty bg list
      btrfs: do not warn if we can't find the reloc root when looking up backref
      btrfs: add asserts for deleting backref cache nodes
      btrfs: abort the transaction if we fail to inc ref in btrfs_copy_root
      btrfs: do not block on deleted bgs mutex in the cleaner
      btrfs: only let one thread pre-flush delayed refs in commit
      btrfs: delayed refs pre-flushing should only run the heads we have
      btrfs: only run delayed refs once before committing
      btrfs: move delayed ref flushing for qgroup into qgroup helper
      btrfs: remove bogus BUG_ON in alloc_reserved_tree_block
      btrfs: stop running all delayed refs during snapshot
      btrfs: run delayed refs less often in commit_cowonly_roots
      btrfs: make flush_space take a enum btrfs_flush_state instead of int
      btrfs: add a trace point for reserve tickets
      btrfs: track ordered bytes instead of just dio ordered bytes
      btrfs: introduce a FORCE_COMMIT_TRANS flush operation
      btrfs: improve preemptive background space flushing
      btrfs: rename need_do_async_reclaim
      btrfs: check reclaim_size in need_preemptive_reclaim
      btrfs: rework btrfs_calc_reclaim_metadata_size
      btrfs: simplify the logic in need_preemptive_flushing
      btrfs: implement space clamping for preemptive flushing
      btrfs: adjust the flush trace point to include the source
      btrfs: add a trace class for dumping the current ENOSPC state

Michal Rostecki (1):
      btrfs: let callers of btrfs_get_io_geometry pass the em

Naohiro Aota (36):
      iomap: support REQ_OP_ZONE_APPEND
      btrfs: zoned: defer loading zone info after opening trees
      btrfs: zoned: use regular super block location on zone emulation
      btrfs: zoned: disallow fitrim on zoned filesystems
      btrfs: zoned: implement zoned chunk allocator
      btrfs: zoned: verify device extent is aligned to zone
      btrfs: zoned: load zone's allocation offset
      btrfs: zoned: calculate allocation offset for conventional zones
      btrfs: zoned: track unusable bytes for zones
      btrfs: zoned: implement sequential extent allocation
      btrfs: zoned: redirty released extent buffers
      btrfs: zoned: advance allocation pointer after tree log node
      btrfs: zoned: reset zones of unused block groups
      btrfs: factor out helper adding a page to bio
      btrfs: zoned: use bio_add_zone_append_page
      btrfs: zoned: handle REQ_OP_ZONE_APPEND as writing
      btrfs: zoned: split ordered extent when bio is sent
      btrfs: extend btrfs_rmap_block for specifying a device
      btrfs: zoned: use ZONE_APPEND write for zoned mode
      btrfs: zoned: enable zone append writing for direct IO
      btrfs: zoned: introduce dedicated data write path for zoned filesystems
      btrfs: zoned: serialize metadata IO
      btrfs: zoned: wait for existing extents before truncating
      btrfs: zoned: do not use async metadata checksum on zoned filesystems
      btrfs: zoned: mark block groups to copy for device-replace
      btrfs: zoned: implement cloning for zoned device-replace
      btrfs: zoned: implement copying for zoned device-replace
      btrfs: zoned: support dev-replace in zoned filesystems
      btrfs: zoned: enable relocation on a zoned filesystem
      btrfs: zoned: relocate block group to repair IO failure in zoned filesystems
      btrfs: split alloc_log_tree()
      btrfs: zoned: extend zoned allocator to use dedicated tree-log block group
      btrfs: zoned: serialize log transaction on zoned filesystems
      btrfs: zoned: reorder log node allocation on zoned filesystem
      btrfs: zoned: deal with holes writing out tree-log pages
      btrfs: zoned: enable to mount ZONED incompat flag

Nigel Christian (1):
      btrfs: remove repeated word in struct member comment

Nikolay Borisov (24):
      btrfs: cleanup local variables in btrfs_file_write_iter
      btrfs: rename btrfs_find_highest_objectid to btrfs_init_root_free_objectid
      btrfs: rename btrfs_find_free_objectid to btrfs_get_free_objectid
      btrfs: rename btrfs_root::highest_objectid to free_objectid
      btrfs: make btrfs_root::free_objectid hold the next available objectid
      btrfs: remove new_dirid argument from btrfs_create_subvol_root
      btrfs: consolidate btrfs_previous_item ret val handling in btrfs_shrink_device
      btrfs: make btrfs_start_delalloc_root's nr argument a long
      btrfs: remove always true condition in btrfs_start_delalloc_roots
      btrfs: document modified parameter of add_extent_mapping
      btrfs: fix parameter description of btrfs_add_extent_mapping
      btrfs: fix function description formats in file-item.c
      btrfs: fix parameter description in delayed-ref.c functions
      btrfs: improve parameter description for __btrfs_write_out_cache
      btrfs: document now parameter of peek_discard_list
      btrfs: document fs_info in btrfs_rmap_block
      btrfs: fix description format of fs_info of btrfs_wait_on_delayed_iputs
      btrfs: document btrfs_check_shared parameters
      btrfs: fix parameter description of btrfs_inode_rsv_release/btrfs_delalloc_release_space
      btrfs: fix parameter description in space-info.c
      btrfs: fix parameter description for functions in extent_io.c
      btrfs: zoned: remove unused variable in btrfs_sb_log_location_bdev
      lib/zstd: convert constants to defines
      btrfs: enable W=1 checks for btrfs

Qu Wenruo (27):
      btrfs: make btrfs_dio_private::bytes u32
      btrfs: refactor btrfs_dec_test_* functions for ordered extents
      btrfs: rename parameter offset to disk_bytenr in submit_extent_page
      btrfs: refactor __extent_writepage_io() to improve readability
      btrfs: update comment for btrfs_dirty_pages
      btrfs: introduce helper to grab an existing extent buffer from a page
      btrfs: rework the order of btrfs_ordered_extent::flags
      btrfs: fix double accounting of ordered extent for subpage case in btrfs_invalidapge
      btrfs: merge PAGE_CLEAR_DIRTY and PAGE_SET_WRITEBACK to PAGE_START_WRITEBACK
      btrfs: set UNMAPPED bit early in btrfs_clone_extent_buffer() for subpage support
      btrfs: introduce the skeleton of btrfs_subpage structure
      btrfs: make attach_extent_buffer_page() handle subpage case
      btrfs: make grab_extent_buffer_from_page() handle subpage case
      btrfs: support subpage for extent buffer page release
      btrfs: attach private to dummy extent buffer pages
      btrfs: introduce helpers for subpage uptodate status
      btrfs: introduce helpers for subpage error status
      btrfs: support subpage in set/clear_extent_buffer_uptodate()
      btrfs: support subpage in btrfs_clone_extent_buffer
      btrfs: support subpage in try_release_extent_buffer()
      btrfs: introduce read_extent_buffer_subpage()
      btrfs: support subpage in endio_readpage_update_page_status()
      btrfs: introduce subpage metadata validation check
      btrfs: introduce btrfs_subpage for data inodes
      btrfs: integrate page status update for data read path into begin/end_page_read
      btrfs: allow read-only mount of 4K sector size fs on 64K page system
      btrfs: explain page locking and readahead in read_extent_buffer_pages()

Roman Anasal (1):
      btrfs: send: use struct send_ctx *sctx for btrfs_compare_trees and changed_cb

Yang Li (1):
      btrfs: remove redundant NULL check before kvfree

Zhihao Cheng (1):
      btrfs: clarify error returns values in __load_free_space_cache

 block/bio.c                       |  33 ++
 fs/btrfs/Makefile                 |  19 +-
 fs/btrfs/backref.c                |  17 +-
 fs/btrfs/backref.h                |   9 +-
 fs/btrfs/block-group.c            | 178 +++++---
 fs/btrfs/block-group.h            |  21 +-
 fs/btrfs/btrfs_inode.h            |   3 +-
 fs/btrfs/compression.c            |  10 +-
 fs/btrfs/ctree.c                  |   9 +-
 fs/btrfs/ctree.h                  |  19 +-
 fs/btrfs/delalloc-space.c         |  29 +-
 fs/btrfs/delayed-inode.c          |   2 +-
 fs/btrfs/delayed-ref.c            |  79 ++--
 fs/btrfs/delayed-ref.h            |  28 +-
 fs/btrfs/dev-replace.c            | 186 +++++++-
 fs/btrfs/dev-replace.h            |   3 +
 fs/btrfs/discard.c                |   6 +-
 fs/btrfs/disk-io.c                | 183 ++++++--
 fs/btrfs/disk-io.h                |   6 +-
 fs/btrfs/extent-tree.c            | 361 ++++++++++------
 fs/btrfs/extent_io.c              | 791 +++++++++++++++++++++++++++-------
 fs/btrfs/extent_io.h              |  17 +-
 fs/btrfs/extent_map.c             |  18 +-
 fs/btrfs/file-item.c              |  22 +-
 fs/btrfs/file.c                   |  58 ++-
 fs/btrfs/free-space-cache.c       | 123 +++++-
 fs/btrfs/free-space-cache.h       |   2 +
 fs/btrfs/inode.c                  | 336 ++++++++++++---
 fs/btrfs/ioctl.c                  |  29 +-
 fs/btrfs/ordered-data.c           | 224 +++++++---
 fs/btrfs/ordered-data.h           |  57 ++-
 fs/btrfs/raid56.c                 |   3 +-
 fs/btrfs/ref-verify.c             |  43 +-
 fs/btrfs/reflink.c                |   5 +-
 fs/btrfs/relocation.c             |  99 ++++-
 fs/btrfs/scrub.c                  | 143 +++++++
 fs/btrfs/send.c                   |  31 +-
 fs/btrfs/space-info.c             | 365 ++++++++++++----
 fs/btrfs/space-info.h             |  25 +-
 fs/btrfs/subpage.c                | 278 ++++++++++++
 fs/btrfs/subpage.h                |  91 ++++
 fs/btrfs/super.c                  |   8 +-
 fs/btrfs/sysfs.c                  |   2 +
 fs/btrfs/tests/extent-map-tests.c |   2 +-
 fs/btrfs/transaction.c            | 152 ++++---
 fs/btrfs/transaction.h            |   5 +
 fs/btrfs/tree-log.c               | 288 ++++++-------
 fs/btrfs/volumes.c                | 364 +++++++++++++---
 fs/btrfs/volumes.h                |   8 +-
 fs/btrfs/zoned.c                  | 873 +++++++++++++++++++++++++++++++++++++-
 fs/btrfs/zoned.h                  | 157 ++++++-
 fs/iomap/direct-io.c              |  43 +-
 include/linux/bio.h               |   2 +
 include/linux/iomap.h             |   1 +
 include/linux/zstd.h              |   8 +-
 include/trace/events/btrfs.h      | 111 ++++-
 56 files changed, 4874 insertions(+), 1111 deletions(-)
 create mode 100644 fs/btrfs/subpage.c
 create mode 100644 fs/btrfs/subpage.h

^ permalink raw reply	[relevance 3%]

* [GIT PULL] Btrfs updates for 4.19
@ 2018-08-13 12:54  3% David Sterba
  0 siblings, 0 replies; 105+ results
From: David Sterba @ 2018-08-13 12:54 UTC (permalink / raw)
  To: torvalds; +Cc: David Sterba, clm, linux-btrfs, linux-kernel

Hi,

there are mostly fixes and cleanups, nothing big, though the notable
thing is the inserted/deleted lines delta -1124.

There are no known pending merge conflicts with other trees. Please
pull, thanks.


User visible changes:

* allow defrag on opened read-only files that have rw permissions; similar
  to what dedupe will allow on such files


Core changes:

* tree checker improvements, reported by fuzzing:
  * more checks for: block group items, essential trees
  * chunk type validation
  * mount time cross-checks that physical and logical chunks match
  * switch more error codes to EUCLEAN aka. EFSCORRUPTED


Fixes:

* fsync corner case fixes

* fix send failure when root has deleted files still open

* send, fix incorrect file layout after hole punching beyond eof

* fix races between mount and deice scan ioctl, found by fuzzing

* fix deadlock when delayed iput is called from writeback on the same
  inode; rare but has been observed in practice, also removes code

* fix pinned byte accounting, using the right percpu helpers; this should
  avoid some write IO inefficiency during low space conditions

* don't remove block group that still has pinned bytes

* reset on-disk device stats value after replace, otherwise this would
  report stale values for the new device


Cleanups:

* time64_t/timespec64 cleanups

* remove remaining dead code in scrub handling NOCOW extents after
  disabling it in previous cycle

* simplify fsync regarding ordered extents logic and remove all the
  related code

* remove redundant arguments in order to reduce stack space consumption

* remove support for V0 type of extents, not in use since 2.6.30

* remove several unused structure members

* fewer indirect function calls by inlining some callbacks

* qgroup rescan timing fixes

* vfs: iget cleanups

----------------------------------------------------------------
The following changes since commit 1ffaddd029c867d134a1dde39f540dcc8c52e274:

  Linux 4.18-rc8 (2018-08-05 12:37:41 -0700)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-4.19-tag

for you to fetch changes up to 39379faaad79e3cf403a6904a08676b7850043ae:

  btrfs: revert fs_devices state on error of btrfs_init_new_device (2018-08-06 13:13:04 +0200)

----------------------------------------------------------------
Adam Borowski (1):
      btrfs: allow defrag on a file opened read-only that has rw permissions

Al Viro (4):
      btrfs: btrfs_iget never returns an is_bad_inode inode
      btrfs: simplify IS_ERR/PTR_ERR checks
      btrfs: lift make_bad_inode into btrfs_iget
      btrfs: simplify btrfs_iget

Allen Pais (1):
      btrfs: replace get_seconds with new 64bit time API

Anand Jain (9):
      btrfs: use a temporary variable for fs_devices in btrfs_init_new_device
      btrfs: drop unnecessary variable in btrfs_init_new_device
      btrfs: fix in-memory value of total_devices after seed device deletion
      btrfs: do btrfs_free_stale_devices outside of device_list_add
      btrfs: extend locked section when adding a new device in device_list_add
      btrfs: rename local devices for fs_devices in btrfs_free_stale_devices(
      btrfs: use device_list_mutex when removing stale devices
      btrfs: rename btrfs_parse_early_options
      btrfs: use the assigned fs_devices instead of the dereference

Arnd Bergmann (2):
      btrfs: use monotonic time for transaction handling
      btrfs: use timespec64 for i_otime

Bart Van Assche (3):
      btrfs: Fix misleading indentation reported by smatch
      btrfs: Annotate fall-through when parsing mount option
      btrfs: Fix a C compliance issue

Chengguang Xu (5):
      btrfs: return error instead of crash when detecting unexpected type in btrfs_get_acl
      btrfs: replace empty string with NULL when getting attribute length in btrfs_get_acl
      btrfs: remove unnecessary -ERANGE check in btrfs_get_acl
      btrfs: avoid error code override in btrfs_get_acl
      btrfs: remove unnecessary curly braces in btrfs_get_acl

David Sterba (34):
      btrfs: remove remaing full_sync logic from btrfs_sync_file
      btrfs: annotate unlikely branches after V0 extent type removal
      btrfs: simplify some assignments of inode numbers
      btrfs: simplify pointer chasing of local fs_info variables
      btrfs: use copy_page for copying pages instead of memcpy
      btrfs: prune unused includes
      btrfs: pass only eb to num_extent_pages
      btrfs: use round_up wrapper in num_extent_pages
      btrfs: switch types to int when counting eb pages
      btrfs: open-code bio_set_op_attrs
      btrfs: raid56: add new helper for starting async work
      btrfs: raid56: use new helper for async_rmw_stripe
      btrfs: raid56: use new helper for async_read_rebuild
      btrfs: raid56: use new helper for async_scrub_parity
      btrfs: raid56: merge rbio_is_full helpers
      btrfs: raid56: catch errors from full_stripe_write
      btrfs: lift uuid_mutex to callers of btrfs_scan_one_device
      btrfs: lift uuid_mutex to callers of btrfs_open_devices
      btrfs: lift uuid_mutex to callers of btrfs_parse_early_options
      btrfs: reorder initialization before the mount locks uuid_mutex
      btrfs: fix mount and ioctl device scan ioctl race
      btrfs: refactor block group replication factor calculation to a helper
      btrfs: rename btrfs_release_extent_buffer_page
      btrfs: remove unused member async_submit_bio::fs_info
      btrfs: remove unused member async_submit_bio::bio_flags
      btrfs: unify end_io callbacks of async_submit_bio
      btrfs: drop extent_io_ops::tree_fs_info callback
      btrfs: drop extent_io_ops::merge_bio_hook callback
      btrfs: drop extent_io_ops::set_range_writeback callback
      btrfs: remove unused member btrfs_root::name
      btrfs: dev-replace: remove unused members of btrfs_dev_replace
      btrfs: constify strings passed to assertion helper
      btrfs: merge free_fs_root helpers
      btrfs: extent-tree: remove unused member walk_control::for_reloc

Ethan Lien (2):
      btrfs: use correct compare function of dirty_metadata_bytes
      btrfs: use customized batch size for total_bytes_pinned

Filipe Manana (4):
      Btrfs: remove unused key assignment when doing a full send
      Btrfs: fix mount failure after fsync due to hard link recreation
      Btrfs: fix send failure when root has deleted files still open
      Btrfs: send, fix incorrect file layout after hole punching beyond eof

Geert Uytterhoeven (1):
      btrfs: Refactor count handling in btrfs_unpin_free_ino

Goldwyn Rodrigues (1):
      btrfs: Use iocb to derive pos instead of passing a separate parameter

Gu Jinxiang (4):
      btrfs: remove unused parameter from btrfs_parse_subvol_options
      btrfs: make fs_devices a local variable in btrfs_parse_early_options
      btrfs: return device pointer from btrfs_scan_one_device
      btrfs: validate type when reading a chunk

Josef Bacik (6):
      btrfs: always wait on ordered extents at fsync time
      btrfs: remove the wait ordered logic in the log_one_extent path
      btrfs: clean up the left over logged_list usage
      btrfs: remove the logged extents infrastructure
      Btrfs: fix btrfs_write_inode vs delayed iput deadlock
      btrfs: don't leak ret from do_chunk_alloc

Lu Fengqi (27):
      btrfs: qgroup: cleanup the unused srcroot from btrfs_qgroup_inherit
      btrfs: qgroup: Drop quota_root parameter from add_qgroup_relation_item
      btrfs: qgroup: Drop quota_root parameter from del_qgroup_relation_item
      btrfs: qgroup: Drop quota_root parameter from del_qgroup_item
      btrfs: qgroup: Drop root parameter from update_qgroup_limit_item
      btrfs: qgroup: Drop root parameter from update_qgroup_info_item
      btrfs: qgroup: Drop quota_root and fs_info parameters from update_qgroup_status_item
      btrfs: qgroup: Drop fs_info parameter from btrfs_add_qgroup_relation
      btrfs: qgroup: Drop fs_info parameter from __del_qgroup_relation
      btrfs: qgroup: Drop fs_info parameter from btrfs_del_qgroup_relation
      btrfs: qgroup: Drop fs_info parameter from btrfs_create_qgroup
      btrfs: qgroup: Drop fs_info parameter from btrfs_remove_qgroup
      btrfs: qgroup: Drop fs_info parameter from btrfs_limit_qgroup
      btrfs: qgroup: Drop fs_info parameter from btrfs_qgroup_trace_extent
      btrfs: qgroup: Drop fs_info parameter from btrfs_qgroup_trace_leaf_items
      btrfs: qgroup: Drop root parameter from btrfs_qgroup_trace_subtree
      btrfs: qgroup: Drop fs_info parameter from btrfs_qgroup_account_extent
      btrfs: qgroup: Drop fs_info parameter from btrfs_run_qgroups
      btrfs: qgroup: Drop fs_info parameter from btrfs_qgroup_inherit
      btrfs: qgroup: Drop fs_info parameter from qgroup_rescan_leaf
      btrfs: Remove fs_info from btrfs_insert_delayed_dir_index
      btrfs: Remove fs_info from btrfs_delete_delayed_dir_index
      btrfs: Remove fs_info from btrfs_del_root
      btrfs: Remove fs_info from btrfs_del_root_ref
      btrfs: Remove fs_info from btrfs_add_root_ref
      btrfs: Remove root parameter from btrfs_unlink_subvol
      btrfs: Remove redundant btrfs_release_path from btrfs_unlink_subvol

Misono Tomohiro (4):
      btrfs: backref: Use ERR_CAST to return error code
      btrfs: extent-tree: Remove unused __btrfs_free_block_rsv
      btrfs: replace: Reset on-disk dev stats value after replace
      btrfs: Use wrapper macro for rcu string to remove duplicate code

Naohiro Aota (1):
      btrfs: revert fs_devices state on error of btrfs_init_new_device

Nikolay Borisov (55):
      btrfs: Document __btrfs_inc_extent_ref
      btrfs: Fix comment in lookup_inline_extent_backref
      btrfs: Streamline log_extent_csums a bit
      btrfs: Remove fs_info from insert_tree_block_ref
      btrfs: Remove fs_info from insert_extent_data_ref
      btrfs: Remove fs_info argument from insert_extent_backref
      btrfs: Remove fs_info from remove_extent_data_ref
      btrfs: Remove fs_info from fixup_low_keys
      btrfs: Remove fs_info from lookup_inline_extent_backref
      btrfs: Remove fs_info argument from update_inline_extent_backref
      btrfs: Remove fs_info argument from lookup_tree_block_ref
      btrfs: Remove fs_info argument from lookup_extent_data_ref
      btrfs: Remove fs_info from lookup_extent_backref
      btrfs: Remove fs_info from btrfs_add_delayed_tree_ref
      btrfs: Remove fs_info from btrfs_add_delayed_data_ref
      btrfs: Remove fs_info from btrfs_make_block_group
      btrfs: Remove fs_info from btrfs_remove_block_group
      btrfs: Remove fs_info from __btrfs_free_extent
      btrfs: Remove fs_info from alloc_reserved_file_extent
      btrfs: Remove fs_info argument from __btrfs_inc_extent_ref
      btrfs: Remove fs_info from run_delayed_data_ref
      btrfs: Remove fs_info from run_delayed_extent_op
      btrfs: Remove unused fs_info from cleanup_extent_op
      btrfs: Remove fs_info from cleanup_ref_head
      btrfs: Remove fs_info from run_delayed_tree_ref
      btrfs: Remove fs_info from do_chunk_alloc
      btrfs: Remove fs_info from btrfs_alloc_chunk
      btrfs: Remove fs_info from check_system_chunk
      btrfs: Remove fs_info from free_excluded_extents
      btrfs: Remove fs_info from exclude_super_stripes
      btrfs: Remove fs_info from insert_inline_extent_backref
      btrfs: Remove fs_info from run_one_delayed_ref
      btrfs: Remove fs_info from remove_extent_backref
      btrfs: Remove fs_info from btrfs_alloc_logged_file_extent
      btrfs: Remove fs_info from btrfs_inc_block_group_ro
      btrfs: Remove fs_info from btrfs_force_chunk_alloc
      btrfs: Deduplicate extent_buffer init code
      btrfs: Streamline memory allocation failure handling in btrfs_add_delayed_tree_ref
      btrfs: Remove V0 extent support
      btrfs: Add graceful handling of V0 extents
      btrfs: qgroups: Move transaction management inside btrfs_quota_enable/disable
      btrfs: close devices without offloading to a temporary list
      btrfs: Rewrite retry logic in do_chunk_alloc
      btrfs: Simplify page unlocking in alloc_extent_buffer
      btrfs: Reword dodgy comments in alloc_extent_buffer
      btrfs: Refactor loop in btrfs_release_extent_buffer_page
      btrfs: Document locking requirement via lockdep_assert_held
      btrfs: Rename EXTENT_BUFFER_DUMMY to EXTENT_BUFFER_UNMAPPED
      btrfs: Remove fs_info argument from btrfs_add_dev_item
      btrfs: Remove fs_info from btrfs_rm_dev_replace_remove_srcdev
      btrfs: remove fs_info argument from update_dev_stat_item
      btrfs: Remove fs_info from btrfs_assign_next_active_device
      btrfs: Remove fs_info from btrfs_destroy_dev_replace_tgtdev
      btrfs: Remove fs_info form btrfs_free_chunk
      btrfs: Remove fs_info from btrfs_finish_chunk_alloc

Qu Wenruo (15):
      btrfs: scrub: Remove unused copy_nocow_pages and its callchain
      btrfs: check-integrity: Fix NULL pointer dereference for degraded mount
      btrfs: Get rid of the confusing btrfs_file_extent_inline_len
      btrfs: Don't remove block group that still has pinned down bytes
      btrfs: tree-checker: Verify block_group_item
      btrfs: tree-checker: Detect invalid and empty essential trees
      btrfs: relocation: Only remove reloc rb_trees if reloc control has been initialized
      btrfs: Remove unused function btrfs_account_dev_extents_size
      btrfs: Use btrfs_mark_bg_unused to replace open code
      btrfs: scrub: cleanup the remaining nodatasum fixup code
      btrfs: extent-tree: Remove dead alignment check
      btrfs: Check that each block group has corresponding chunk at mount time
      btrfs: Verify that every chunk has corresponding block group at mount time
      btrfs: Introduce mount time chunk <-> dev extent mapping check
      btrfs: Exit gracefully when chunk map cannot be inserted to the tree

Su Yue (2):
      btrfs: print more details when checking tree block finds a problem
      btrfs: return EUCLEAN if extent_inline_ref type is invalid

Zhihui Zhang (1):
      Btrfs: free space cache: make sure there is always room for generation number

 fs/btrfs/acl.c                |  13 +-
 fs/btrfs/backref.c            |   6 +-
 fs/btrfs/btrfs_inode.h        |   2 +-
 fs/btrfs/check-integrity.c    |   9 +-
 fs/btrfs/compression.c        |  18 +-
 fs/btrfs/ctree.c              |  53 +--
 fs/btrfs/ctree.h              |  89 ++---
 fs/btrfs/delayed-inode.c      |  14 +-
 fs/btrfs/delayed-inode.h      |   2 -
 fs/btrfs/delayed-ref.c        |  43 +-
 fs/btrfs/delayed-ref.h        |   6 +-
 fs/btrfs/dev-replace.c        |  29 +-
 fs/btrfs/dir-item.c           |   4 +-
 fs/btrfs/disk-io.c            | 113 ++----
 fs/btrfs/disk-io.h            |   5 +-
 fs/btrfs/extent-tree.c        | 883 +++++++++++++++++++-----------------------
 fs/btrfs/extent_io.c          | 156 ++++----
 fs/btrfs/extent_io.h          |  16 +-
 fs/btrfs/file-item.c          |   4 +-
 fs/btrfs/file.c               | 128 +-----
 fs/btrfs/free-space-cache.c   |  19 +-
 fs/btrfs/free-space-tree.c    |   2 +-
 fs/btrfs/inode-map.c          |  12 +-
 fs/btrfs/inode.c              | 161 +++-----
 fs/btrfs/ioctl.c              |  69 ++--
 fs/btrfs/ordered-data.c       | 138 -------
 fs/btrfs/ordered-data.h       |  23 +-
 fs/btrfs/print-tree.c         |  39 +-
 fs/btrfs/qgroup.c             | 270 +++++++------
 fs/btrfs/qgroup.h             |  46 +--
 fs/btrfs/raid56.c             | 109 ++----
 fs/btrfs/reada.c              |   3 +-
 fs/btrfs/relocation.c         | 216 ++---------
 fs/btrfs/root-tree.c          |  22 +-
 fs/btrfs/scrub.c              | 679 +-------------------------------
 fs/btrfs/send.c               | 172 ++++++--
 fs/btrfs/struct-funcs.c       |   1 -
 fs/btrfs/super.c              | 115 +++---
 fs/btrfs/sysfs.c              |   2 -
 fs/btrfs/tests/qgroup-tests.c |  24 +-
 fs/btrfs/transaction.c        |  11 +-
 fs/btrfs/transaction.h        |   2 +-
 fs/btrfs/tree-checker.c       | 115 +++++-
 fs/btrfs/tree-log.c           | 270 +++++--------
 fs/btrfs/volumes.c            | 611 ++++++++++++++++++-----------
 fs/btrfs/volumes.h            |  31 +-
 include/trace/events/btrfs.h  |   3 +-
 47 files changed, 1817 insertions(+), 2941 deletions(-)

^ permalink raw reply	[relevance 3%]

* [GIT PULL] Btrfs updates for 6.4
@ 2023-04-25 14:51  3% David Sterba
  0 siblings, 0 replies; 105+ results
From: David Sterba @ 2023-04-25 14:51 UTC (permalink / raw)
  To: torvalds; +Cc: David Sterba, linux-btrfs, linux-kernel

Hi,

there are mostly core changes and cleanups, some notable fixes and two
performance improvements in directory logging. The IO path cleanups are
removing or refactoring old code, scrub main loop has been completely
rewritten also refactoring old code.

There are some changes to non-btrfs code, mostly trivial, the cgroup
punt bio logic is only moved from generic code.

Please pull, thanks.

Performance improvements:

- improve logging changes in a directory during one transaction, avoid
  iterating over items and reduce lock contention (fsync time 4x lower)

- when logging directory entries during one transaction, reduce locking
  of subvolume trees by checking tree-log instead (improvement in
  throughput and latency for concurrent access to a subvolume)

Notable fixes:

- dev-replace
  - properly honor read mode when requested to avoid reading from source
    device
  - target device won't be used for eventual read repair, this is
    unreliable for NODATASUM files
  - when there are unpaired (and unrepairable) metadata during replace,
    exit early with error and don't try to finish whole operation

- scrub ioctl properly rejects unknown flags

- fix global block reserve calculations

- fix partial direct io write when there's a page fault in the middle,
  iomap will try to continue with partial request but the btrfs part did
  not match that, this can lead to zeros written instead of data

Core changes:

- io path
  - continued cleanups and refactoring around bio handling
  - extent io submit path simplifications and cleanups
  - flush write path simplifications and cleanups
  - rework logic of passing sync mode of bio, with further cleanups

- rewrite scrub code flow, restructure how the stripes are enumerated
  and verified in a more unified way

- allow to set lower threshold for block group reclaim in debug mode to
  aid zoned mode testing

- remove obsolete time-based delayed ref throttling logic when
  truncating items

- DREW locks are not using percpu variables anymore

- more warning fixes (-Wmaybe-uninitialized)

- u64 division simplifications

- error handling improvements

Non-btrfs code changes:

- push cgroup punt bio logic to btrfs code (there was no other user of
  that), the functionality can be now selected separately by
  BLK_CGROUP_PUNT_BIO

- crc32c_impl removed after removing last uses in btrfs code

- add btrfs_assertfail() to objtool table

----------------------------------------------------------------
The following changes since commit 6a8f57ae2eb07ab39a6f0ccad60c760743051026:

  Linux 6.3-rc7 (2023-04-16 15:23:53 -0700)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-6.4-tag

for you to fetch changes up to f372463124df5f980de6ee0cd6000a3e43df0e01:

  btrfs: mark btrfs_assertfail() __noreturn (2023-04-17 19:52:19 +0200)

----------------------------------------------------------------
Anand Jain (11):
      btrfs: avoid reusing return variable in nested block in btrfs_lookup_bio_sums
      btrfs: switch search_file_offset_in_bio to return bool
      btrfs: open code btrfs_bin_search()
      btrfs: avoid repetitive define BTRFS_FEATURE_INCOMPAT_SUPP
      btrfs: remove redundant clearing of NODISCARD
      btrfs: move last_flush_error to write_dev_flush and wait_dev_flush
      btrfs: open code check_barrier_error()
      btrfs: change wait_dev_flush() return type to bool
      btrfs: use test_and_clear_bit() in wait_dev_flush()
      btrfs: warn for any missed cleanup at btrfs_close_one_device
      btrfs: remove redundant release of btrfs_device::alloc_state

Boris Burkov (7):
      btrfs: add function to create and return an ordered extent
      btrfs: pass flags as unsigned long to btrfs_add_ordered_extent
      btrfs: stash ordered extent in dio_data during iomap dio
      btrfs: don't split NOCOW extent_maps in btrfs_extract_ordered_extent
      btrfs: split partial dio bios before submit
      btrfs: set default discard iops_limit to 1000
      btrfs: reinterpret async discard iops_limit=0 as no delay

Christoph Hellwig (52):
      btrfs: raid56: no need for irqsafe locking
      btrfs: move all btree inode initialization into btrfs_init_btree_inode
      btrfs: embed a btrfs_bio into struct compressed_bio
      btrfs: remove redundant free_extent_map in btrfs_submit_compressed_read
      btrfs: use the bbio file offset in btrfs_submit_compressed_read
      btrfs: use the bbio file offset in add_ra_bio_pages
      btrfs: factor out a btrfs_add_compressed_bio_pages helper
      btrfs: factor out a btrfs_free_compressed_pages helper
      btrfs: don't clear page->mapping in btrfs_free_compressed_pages
      btrfs: fold finish_compressed_bio_write into btrfs_finish_compressed_write_work
      btrfs: don't set force_bio_submit in read_extent_buffer_subpage
      btrfs: remove the force_bio_submit to submit_extent_page
      btrfs: store the bio opf in struct btrfs_bio_ctrl
      btrfs: remove the sync_io flag in struct btrfs_bio_ctrl
      btrfs: add a wbc pointer to struct btrfs_bio_ctrl
      btrfs: move the compress_type check out of btrfs_bio_add_page
      btrfs: rename the this_bio_flag variable in btrfs_do_readpage
      btrfs: remove the compress_type argument to submit_extent_page
      btrfs: remove the submit_extent_page return value
      btrfs: simplify the error handling in __extent_writepage_io
      btrfs: check for contiguity in submit_extent_page
      btrfs: simplify main loop in submit_extent_page
      btrfs: remove search_file_offset_in_bio
      btrfs: cleanup the main loop in btrfs_lookup_bio_sums
      btrfs: remove unused members from struct btrfs_encoded_read_private
      btrfs: cleanup main loop in btrfs_encoded_read_regular_fill_pages
      btrfs: move zero filling of compressed read bios into common code
      btrfs: pass a btrfs_bio to btrfs_submit_bio
      btrfs: pass a btrfs_bio to btrfs_submit_compressed_read
      btrfs: store a pointer to the original btrfs_bio in struct compressed_bio
      btrfs: simplify finding the inode in submit_one_bio
      btrfs: store a pointer to a btrfs_bio in struct btrfs_bio_ctrl
      btrfs: return a btrfs_bio from btrfs_bio_alloc
      btrfs: make btrfs_split_bio work on struct btrfs_bio
      btrfs: move the bi_sector assignment out of btrfs_add_compressed_bio_pages
      btrfs: simplify adding pages in btrfs_add_compressed_bio_pages
      btrfs: move ordered_extent internal sanity checks into btrfs_split_ordered_extent
      btrfs: simplify splitting logic in btrfs_extract_ordered_extent
      btrfs: sink parameter len to btrfs_split_ordered_extent
      btrfs: fold btrfs_clone_ordered_extent into btrfs_split_ordered_extent
      btrfs: simplify extent map splitting and rename split_zoned_em
      btrfs: pass an ordered_extent to btrfs_extract_ordered_extent
      btrfs: move kthread_associate_blkcg out of btrfs_submit_compressed_write
      btrfs: don't free the async_extent in submit_uncompressed_range
      btrfs: also use kthread_associate_blkcg for uncompressible ranges
      btrfs, mm: remove the punt_to_cgroup field in struct writeback_control
      btrfs, block: move REQ_CGROUP_PUNT to btrfs
      block: async_bio_lock does not need to be bh-safe
      block: make blkcg_punt_bio_submit optional
      btrfs: tree-log: factor out a clean_log_buffer helper
      btrfs: don't print the crc32c implementation at module load time
      libcrc32c: remove crc32c_impl

David Sterba (1):
      btrfs: locking: use atomic for DREW lock writers

Filipe Manana (30):
      btrfs: remove btrfs_lru_cache_is_full() inline function
      btrfs: pass a bool to btrfs_block_rsv_migrate() at evict_refill_and_join()
      btrfs: pass a bool size update argument to btrfs_block_rsv_add_bytes()
      btrfs: remove check for NULL block reserve at btrfs_block_rsv_check()
      btrfs: update documentation for BTRFS_RESERVE_FLUSH_EVICT flush method
      btrfs: update flush method assertion when reserving space
      btrfs: initialize ret to -ENOSPC at __reserve_bytes()
      btrfs: simplify btrfs_should_throttle_delayed_refs()
      btrfs: collapse should_end_transaction() into btrfs_should_end_transaction()
      btrfs: remove bytes_used argument from btrfs_make_block_group()
      btrfs: count extents before taking inode's spinlock when reserving metadata
      btrfs: remove redundant counter check at btrfs_truncate_inode_items()
      btrfs: simplify variables in btrfs_block_rsv_refill()
      btrfs: remove obsolete delayed ref throttling logic when truncating items
      btrfs: don't throttle on delayed items when evicting deleted inode
      btrfs: calculate the right space for a single delayed ref when refilling
      btrfs: accurately calculate number of delayed refs when flushing
      btrfs: constify fs_info argument of the metadata size calculation helpers
      btrfs: constify fs_info argument for the reclaim items calculation helpers
      btrfs: add helper to calculate space for delayed references
      btrfs: calculate correct amount of space for delayed reference when evicting
      btrfs: fix calculation of the global block reserve's size
      btrfs: use a constant for the number of metadata units needed for an unlink
      btrfs: calculate the right space for delayed refs when updating global reserve
      btrfs: simplify exit paths of btrfs_evict_inode()
      btrfs: make btrfs_block_rsv_full() check more boolean when starting transaction
      btrfs: correctly calculate delayed ref bytes when starting transaction
      btrfs: remove pointless loop at btrfs_get_next_valid_item()
      btrfs: avoid iterating over all indexes when logging directory
      btrfs: use log root when iterating over index keys when logging directory

Genjian Zhang (1):
      btrfs: fix uninitialized variable warnings

Johannes Thumshirn (4):
      btrfs: open code btrfs_csum_ptr
      btrfs: sink calc_bio_boundaries into its only caller
      btrfs: use __bio_add_page for adding a single page in repair_one_sector
      btrfs: use __bio_add_page to add single a page in rbio_add_io_sector

Josef Bacik (7):
      btrfs: use btrfs_handle_fs_error in btrfs_fill_super
      btrfs: replace BUG_ON with ASSERT in btrfs_read_node_slot
      btrfs: handle errors from btrfs_read_node_slot in split
      btrfs: add missing iputs on orphan cleanup failure
      btrfs: drop root refs properly when orphan cleanup fails
      btrfs: handle errors in walk_down_tree properly
      btrfs: abort the transaction if we get an error during snapshot drop

Josh Poimboeuf (1):
      btrfs: mark btrfs_assertfail() __noreturn

Naohiro Aota (1):
      btrfs: sysfs: relax bg_reclaim_threshold for debugging purposes

Qu Wenruo (32):
      btrfs: replace map_lookup->stripe_len by BTRFS_STRIPE_LEN
      btrfs: reduce div64 calls by limiting the number of stripes of a chunk to u32
      btrfs: simplify the bioc argument for handle_ops_on_dev_replace()
      btrfs: reduce type width of btrfs_io_contexts
      btrfs: use an efficient way to represent source of duplicated stripes
      btrfs: replace btrfs_io_context::raid_map with a fixed u64 value
      btrfs: dev-replace: properly follow its read mode
      btrfs: open_ctree() error handling cleanup
      btrfs: do not use replace target device as an extra mirror
      btrfs: scrub: remove unused path inside scrub_stripe()
      btrfs: scrub: remove root and csum_root arguments from scrub_simple_mirror()
      btrfs: scrub: use dedicated super block verification function to scrub one super block
      btrfs: introduce btrfs_bio::fs_info member
      btrfs: introduce a new helper to submit write bio for repair
      btrfs: scrub: introduce structure for new BTRFS_STRIPE_LEN based interface
      btrfs: scrub: introduce helper to find and fill sector info for a scrub_stripe
      btrfs: scrub: introduce a helper to verify one metadata block
      btrfs: scrub: introduce a helper to verify one scrub_stripe
      btrfs: scrub: introduce the main read repair worker for scrub_stripe
      btrfs: scrub: introduce a writeback helper for scrub_stripe
      btrfs: scrub: introduce error reporting functionality for scrub_stripe
      btrfs: scrub: introduce helper to queue a stripe for scrub
      btrfs: scrub: switch scrub_simple_mirror() to scrub_stripe infrastructure
      btrfs: scrub: use scrub_stripe to implement RAID56 P/Q scrub
      btrfs: scrub: remove scrub_parity structure
      btrfs: scrub: remove the old writeback infrastructure
      btrfs: scrub: remove the old scrub recheck code
      btrfs: scrub: remove scrub_block and scrub_sector structures
      btrfs: scrub: remove scrub_bio structure
      btrfs: remove unused raid56 functions which were dedicated for scrub
      btrfs: scrub: reject unsupported scrub flags
      btrfs: dev-replace: error out if we have unrepaired metadata error during

 block/Kconfig                     |    3 +
 block/blk-cgroup.c                |   78 +-
 block/blk-cgroup.h                |   15 +-
 block/blk-core.c                  |    3 -
 fs/btrfs/Kconfig                  |    1 +
 fs/btrfs/bio.c                    |  211 +-
 fs/btrfs/bio.h                    |   22 +-
 fs/btrfs/block-group.c            |   40 +-
 fs/btrfs/block-group.h            |   13 +-
 fs/btrfs/block-rsv.c              |   21 +-
 fs/btrfs/block-rsv.h              |    2 +-
 fs/btrfs/btrfs_inode.h            |   35 +-
 fs/btrfs/compression.c            |  299 +--
 fs/btrfs/compression.h            |   20 +-
 fs/btrfs/ctree.c                  |   91 +-
 fs/btrfs/ctree.h                  |   17 +-
 fs/btrfs/delalloc-space.c         |    2 +-
 fs/btrfs/delayed-ref.c            |   49 +-
 fs/btrfs/delayed-ref.h            |   22 +-
 fs/btrfs/discard.c                |   21 +-
 fs/btrfs/disk-io.c                |  147 +-
 fs/btrfs/extent-tree.c            |   37 +-
 fs/btrfs/extent_io.c              |  550 ++---
 fs/btrfs/file-item.c              |   93 +-
 fs/btrfs/file-item.h              |    3 +-
 fs/btrfs/fs.h                     |   53 +-
 fs/btrfs/inode-item.c             |   15 +-
 fs/btrfs/inode.c                  |  375 ++--
 fs/btrfs/ioctl.c                  |    5 +
 fs/btrfs/locking.c                |   25 +-
 fs/btrfs/locking.h                |    5 +-
 fs/btrfs/lru_cache.h              |    5 -
 fs/btrfs/lzo.c                    |   17 +-
 fs/btrfs/messages.c               |    2 +-
 fs/btrfs/messages.h               |    2 +-
 fs/btrfs/ordered-data.c           |  120 +-
 fs/btrfs/ordered-data.h           |   10 +-
 fs/btrfs/raid56.c                 |  162 +-
 fs/btrfs/raid56.h                 |   12 +-
 fs/btrfs/relocation.c             |    6 +-
 fs/btrfs/scrub.c                  | 4142 ++++++++++++-------------------------
 fs/btrfs/send.c                   |    2 +-
 fs/btrfs/space-info.c             |   32 +-
 fs/btrfs/space-info.h             |    1 +
 fs/btrfs/super.c                  |    3 +-
 fs/btrfs/sysfs.c                  |    5 +
 fs/btrfs/tests/extent-map-tests.c |    1 -
 fs/btrfs/transaction.c            |   28 +-
 fs/btrfs/tree-checker.c           |   14 +
 fs/btrfs/tree-log.c               |  171 +-
 fs/btrfs/volumes.c                |  593 +++---
 fs/btrfs/volumes.h                |   85 +-
 fs/btrfs/zlib.c                   |    2 -
 fs/btrfs/zoned.c                  |    4 +-
 fs/btrfs/zstd.c                   |    1 -
 include/linux/bio.h               |    5 +
 include/linux/blk_types.h         |   18 +-
 include/linux/crc32c.h            |    1 -
 include/linux/writeback.h         |    5 -
 include/trace/events/btrfs.h      |    2 +-
 include/uapi/linux/btrfs.h        |    1 +
 lib/libcrc32c.c                   |    6 -
 tools/objtool/check.c             |    1 +
 63 files changed, 2880 insertions(+), 4852 deletions(-)

^ permalink raw reply	[relevance 3%]

* [GIT PULL] Btrfs updates for 4.21
@ 2018-12-19 15:11  3% David Sterba
  0 siblings, 0 replies; 105+ results
From: David Sterba @ 2018-12-19 15:11 UTC (permalink / raw)
  To: torvalds; +Cc: David Sterba, clm, linux-btrfs, linux-kernel

Hi,

I've planned to merge a few more patches to the 1st pull branch that belong to
a core change mentioned below as 'delayed refs reserve'. There are review
comments that I think should be addressed, so the patches are postponed.

Technically they're fixes and I presume it's ok to take them in the -rc. I
didn't want to touch the pull request branch a few days before sending it,
though the patches have been in linux-next for some time. The bugs fixed are
not critical for testing so this should not block anybody.

No merge conflicts, please pull. Thanks.

--

New features:

* swapfile support - after a long time it's here, with some limitations where
  COW design does not work well with the swap implementation (nodatacow file,
  no compression, cannot be snapshotted, not possible on multiple devices,
  ...), as this is the most restricted but working setup, we'll try to improve
  that in the future

* metadata uuid - an optional incompat feature to assign a new filesystem UUID
  without overwriting all metadata blocks, stored only in superblock

* more balance messages are printed to system log, initial is in the format of
  the command line that would be used to start it


Fixes:

* tag pages of a snapshot to better separate pages that are involved in the
  snapshot (and need to get synced) from newly dirtied pages that could slow
  down or even livelock the snapshot operation

* improved check of filesystem id associated with a device during scan to
  detect duplicate devices that could be mixed up during mount

* fix device replace state transitions, eg. when it ends up interrupted and
  reboot tries to restart balance too, or when start/cancel ioctls race

* fix a crash due to a race when quotas are enabled during snapshot creation

* GFP_NOFS/memalloc_nofs_* fixes due to GFP_KERNEL allocations in transaction
  context

* fix fsync of files with multiple hard links in new directories

* fix race of send with transaction commits that create snapshots


Core changes:

* cleanups
  * further removals of now-dead fsync code
  * core function for finding free extent has been split and provides a base
    for further cleanups to make the logic more understandable
  * removed lot of indirect callbacks for data and metadata inodes
  * simplified refcounting and locking for cloned extent buffers
  * removed redundant function arguments
  * defines converted to enums where appropriate

* separate reserve for delayed refs from global reserve, update logic to do
  less trickery and ad-hoc heuristics, move out some related expensive
  operations from transaction commit or file truncate

* dev-replace switched from custom locking scheme to semaphore

* remove first phase of balance that tried to make some space for the
  relocation by calling shrink and grow, this did not work as expected and only
  introduced more error states due to potential resize failures, slightly
  improves the runtime as the chunks on all devices are not needlessly
  enumerated

* clone and deduplication now use generic helper that adds a few more checks
  that were missing from the original btrfs implementation of the ioctls

----------------------------------------------------------------
The following changes since commit 7566ec393f4161572ba6f11ad5171fd5d59b0fbd:

  Linux 4.20-rc7 (2018-12-16 15:46:55 -0800)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-4.21-tag

for you to fetch changes up to 52042d8e82ff50d40e76a275ac0b97aa663328b0:

  btrfs: Fix typos in comments and strings (2018-12-17 14:51:50 +0100)

----------------------------------------------------------------
Anand Jain (14):
      btrfs: remove redundant replace_state init
      btrfs: harden agaist duplicate fsid on scanned devices
      btrfs: mark btrfs_dev_replace_start as static
      btrfs: dev-replace: go back to suspended state if target device is missing
      btrfs: dev-replace: go back to suspend state if another EXCL_OP is running
      btrfs: fix use-after-free due to race between replace start and cancel
      btrfs: dev-replace: set result code of cancel by status of scrub
      btrfs: dev-replace: replace's scrub must not be running in suspended state
      btrfs: dev-replace: add explicit check for replace result "no error"
      btrfs: silence warning if replace is canceled
      btrfs: don't report user-requested cancel as an error
      btrfs: add helper to describe block group flags
      btrfs: balance: print args during start and resume
      btrfs: balance: print to system log when balance ends or is paused

Andrea Gelmini (1):
      btrfs: Fix typos in comments and strings

David Sterba (18):
      btrfs: merge btrfs_submit_bio_done to its caller
      btrfs: replace async_cow::root with fs_info
      btrfs: remove redundant csum buffer in btrfs_io_bio
      btrfs: replace btrfs_io_bio::end_io with a simple helper
      btrfs: switch BTRFS_FS_STATE_* to enums
      btrfs: switch BTRFS_BLOCK_RSV_* to enums
      btrfs: switch BTRFS_FS_* to enums
      btrfs: switch BTRFS_ROOT_* to enums
      btrfs: switch EXTENT_BUFFER_* to enums
      btrfs: switch EXTENT_FLAG_* to enums
      btrfs: switch BTRFS_ORDERED_* to enums
      btrfs: drop extra enum initialization where using defaults
      btrfs: reada: reorder dev-replace locks before radix tree preload
      btrfs: dev-replace: swich locking to rw semaphore
      btrfs: dev-replace: remove custom read/write blocking scheme
      btrfs: dev-replace: open code trivial locking helpers
      btrfs: scrub: pass fs_info to scrub_setup_ctx
      btrfs: scrub: move scrub_setup_ctx allocation out of device_list_mutex

Ethan Lien (1):
      btrfs: use tagged writepage to mitigate livelock of snapshot

Filipe Manana (13):
      Btrfs: remove no longer used logged range variables when logging extents
      Btrfs: remove no longer used stuff for tracking pending ordered extents
      Btrfs: simpler and more efficient cleanup of a log tree's extent io tree
      Btrfs: remove no longer used io_err from btrfs_log_ctx
      Btrfs: allow clear_extent_dirty() to receive a cached extent state record
      Btrfs: fix access to available allocation bits when starting balance
      Btrfs: fix deadlock when enabling quotas due to concurrent snapshot creation
      Btrfs: fix deadlock with memory reclaim during scrub
      Btrfs: fix fsync of files with multiple hard links in new directories
      Btrfs: scrub, move setup of nofs contexts higher in the stack
      Btrfs: use nofs context when initializing security xattrs to avoid deadlock
      Btrfs: send, fix race with transaction commits that create snapshots
      Btrfs: use generic_remap_file_range_prep() for cloning and deduplication

Hans van Kranenburg (5):
      btrfs: alloc_chunk: do not refurbish num_bytes
      btrfs: alloc_chunk: improve chunk size variable name
      btrfs: alloc_chunk: fix more DUP stripe size handling
      btrfs: fix ncopies raid_attr for RAID56
      btrfs: introduce nparity raid_attr

Johannes Thumshirn (9):
      btrfs: remove unused drop_on_err in btrfs_mkdir
      btrfs: introduce EXPORT_FOR_TESTS macro
      btrfs: use EXPORT_FOR_TESTS for conditionally exported functions
      btrfs: remove btrfs_bio_end_io_t
      btrfs: don't initialize 'offset' in map_private_extent_buffer()
      btrfs: document extent mapping assumptions in checksum
      btrfs: use offset_in_page instead of open-coding it
      btrfs: use PAGE_ALIGNED instead of open-coding it
      btrfs: improve error handling of btrfs_add_link

Josef Bacik (12):
      btrfs: add btrfs_delete_ref_head helper
      btrfs: add cleanup_ref_head_accounting helper
      btrfs: cleanup extent_op handling
      btrfs: only track ref_heads in delayed_ref_updates
      btrfs: introduce delayed_refs_rsv
      btrfs: update may_commit_transaction to use the delayed refs rsv
      btrfs: add new flushing states for the delayed refs rsv
      btrfs: rework btrfs_check_space_for_delayed_refs
      btrfs: don't run delayed refs in the end transaction logic
      btrfs: fix truncate throttling
      btrfs: catch cow on deleting snapshots
      btrfs: run delayed items before dropping the snapshot

Lu Fengqi (4):
      btrfs: extent-tree: Detect bytes_pinned underflow earlier
      btrfs: cleanup the useless DEFINE_WAIT in cleanup_transaction
      btrfs: skip file_extent generation check for free_space_inode in run_delalloc_nocow
      btrfs: remove always true if branch in find_delalloc_range

Nikolay Borisov (36):
      btrfs: Add function to distinguish between data and btree inode
      btrfs: Remove extent_io_ops::fill_delalloc
      btrfs: Remove extent_io_ops::writepage_start_hook
      btrfs: Remove extent_io_ops::writepage_end_io_hook
      btrfs: Remove extent_io_ops::check_extent_io_range callback
      btrfs: Remove extent_io_ops::set_bit_hook extent_io callback
      btrfs: Remove extent_io_ops::clear_bit_hook callback
      btrfs: Remove extent_io_ops::merge_extent_hook callback
      btrfs: Remove extent_io_ops::split_extent_hook callback
      btrfs: Remove needless tree locking in iterate_inode_refs
      btrfs: Remove needless tree locking in iterate_inode_extrefs
      btrfs: Remove redundant extent_buffer_get in get_old_root
      btrfs: Remove extraneous extent_buffer_get from tree_mod_log_rewind
      btrfs: Remove extra reference count bumps in btrfs_compare_trees
      btrfs: Remove unnecessary tree locking code in qgroup_rescan_leaf
      btrfs: Remove special handling of EXTENT_BUFFER_UNMAPPED while freeing
      btrfs: Adjust loop in free_extent_buffer
      btrfs: Check for missing device before bio submission in btrfs_map_bio
      btrfs: Move epd::extent_locked check to writepage_delalloc's caller
      btrfs: Remove extent_page_data argument from writepage_delalloc
      btrfs: Remove unused extent_state argument from btrfs_writepage_endio_finish_ordered
      btrfs: Remove superfluous check form btrfs_remove_chunk
      btrfs: Sink find_lock_delalloc_range's 'max_bytes' argument
      btrfs: Replace BUG_ON with ASSERT in find_lock_delalloc_range
      btrfs: Introduce support for FSID change without metadata rewrite
      btrfs: Add sysfs support for metadata_uuid feature
      btrfs: Remove fsid/metadata_fsid fields from btrfs_info
      btrfs: Add handling for disk split-brain scenario during fsid change
      btrfs: add members to fs_devices to track fsid changes
      btrfs: Handle one more split-brain scenario during fsid change
      btrfs: Handle final split-brain possibility during fsid change
      btrfs: Remove extent_io_ops::readpage_io_failed_hook
      btrfs: Refactor btrfs_merge_bio_hook
      btrfs: Fix error handling in btrfs_cleanup_ordered_extents
      btrfs: Remove 1st shrink/grow phase from balance
      btrfs: Refactor main loop in extent_readpages

Omar Sandoval (3):
      Btrfs: prevent ioctls from interfering with a swap file
      Btrfs: rename and export get_chunk_map
      Btrfs: support swap files

Qu Wenruo (9):
      btrfs: extent-tree: Detect bytes_may_use underflow earlier
      btrfs: Introduce find_free_extent_ctl structure for later rework
      btrfs: Refactor clustered extent allocation into find_free_extent_clustered
      btrfs: Refactor unclustered extent allocation into find_free_extent_unclustered()
      btrfs: Refactor find_free_extent loops update into find_free_extent_update_loop
      btrfs: volumes: Make sure there is no overlap of dev extents at mount time
      btrfs: volumes: Make sure no dev extent is beyond device boundary
      btrfs: tests: Use BTRFS_MAX_EXTENT_SIZE to replace the intermediate number
      btrfs: extent-tree: cleanup one-shot usage of @blocksize in do_walk_down

 fs/btrfs/backref.c               |   13 +-
 fs/btrfs/btrfs_inode.h           |   14 +-
 fs/btrfs/check-integrity.c       |   24 +-
 fs/btrfs/compression.c           |   26 +-
 fs/btrfs/ctree.c                 |   46 +-
 fs/btrfs/ctree.h                 |  263 +++++---
 fs/btrfs/delayed-ref.c           |   61 +-
 fs/btrfs/delayed-ref.h           |    3 +-
 fs/btrfs/dev-replace.c           |  191 +++---
 fs/btrfs/dev-replace.h           |    8 -
 fs/btrfs/disk-io.c               |  117 ++--
 fs/btrfs/disk-io.h               |   10 +-
 fs/btrfs/extent-tree.c           | 1254 ++++++++++++++++++++++++--------------
 fs/btrfs/extent_io.c             |  414 ++++++-------
 fs/btrfs/extent_io.h             |   66 +-
 fs/btrfs/extent_map.c            |    3 +-
 fs/btrfs/extent_map.h            |   21 +-
 fs/btrfs/file-item.c             |   13 +-
 fs/btrfs/file.c                  |   29 +-
 fs/btrfs/free-space-tree.c       |   15 +-
 fs/btrfs/inode.c                 |  665 ++++++++++++++------
 fs/btrfs/ioctl.c                 |  643 +++++--------------
 fs/btrfs/lzo.c                   |    2 +-
 fs/btrfs/ordered-data.c          |   30 -
 fs/btrfs/ordered-data.h          |   47 +-
 fs/btrfs/qgroup.c                |   35 +-
 fs/btrfs/qgroup.h                |    6 +-
 fs/btrfs/raid56.c                |    2 +-
 fs/btrfs/reada.c                 |   16 +-
 fs/btrfs/ref-verify.c            |    6 +-
 fs/btrfs/relocation.c            |   50 +-
 fs/btrfs/scrub.c                 |   85 ++-
 fs/btrfs/send.c                  |    6 +-
 fs/btrfs/super.c                 |   10 +-
 fs/btrfs/sysfs.c                 |   14 +
 fs/btrfs/sysfs.h                 |    2 +-
 fs/btrfs/tests/btrfs-tests.c     |    4 +-
 fs/btrfs/tests/extent-io-tests.c |   29 +-
 fs/btrfs/tests/inode-tests.c     |    6 -
 fs/btrfs/transaction.c           |   93 ++-
 fs/btrfs/transaction.h           |   16 +-
 fs/btrfs/tree-checker.c          |    6 +-
 fs/btrfs/tree-log.c              |   44 +-
 fs/btrfs/tree-log.h              |    2 -
 fs/btrfs/volumes.c               |  779 +++++++++++++++++------
 fs/btrfs/volumes.h               |   25 +-
 fs/btrfs/xattr.c                 |    8 +
 include/trace/events/btrfs.h     |    4 +-
 include/uapi/linux/btrfs.h       |    1 +
 include/uapi/linux/btrfs_tree.h  |    1 +
 50 files changed, 3030 insertions(+), 2198 deletions(-)

^ permalink raw reply	[relevance 3%]

* [GIT PULL] Btrfs updates for 5.16
@ 2021-11-01 16:45  3% David Sterba
  0 siblings, 0 replies; 105+ results
From: David Sterba @ 2021-11-01 16:45 UTC (permalink / raw)
  To: torvalds; +Cc: David Sterba, linux-btrfs, linux-kernel

Hi,

the updates this time are more under the hood and enhancing existing
features (subpage with compression and zoned namespaces).

There's a merge conflict due to the last minute 5.15 changes (kmap
reverts) and the conflict is not trivial. I've prepared another branch
that makes the changes as a separate commit possibly easier to merge,
same as the manual merge diff should look like.

The branch is for-5.16-resolve (with a signed tag for-5.16-resolve-tag).
A git merge resolving conflicts by leaving the new code results in zero
merge diff.

If there's anything else I can do regarding the merge, let me know.
Otherwise, please pull, thanks.


Performance related:

* misc small inode logging improvements (+3% throughput, -11% latency on
  sample dbench workload)

* more efficient directory logging: bulk item insertion, less tree
  searches and locking

* speed up bulk insertion of items into a b-tree, which is used when
  logging directories, when running delayed items for directories (fsync
  and transaction commits) and when running the slow path (full sync) of
  an fsync (bulk creation run time -4%, deletion -12%)

Core:

* continued subpage support
  * make defragmentation work
  * make compression write work

* zoned mode
  * support ZNS (zoned namespaces), zone capacity is number of usable
    blocks in each zone
  * add dedicated block group (zoned) for relocation, to prevent out of
    order writes in some cases
  * greedy block group reclaim, pick the ones with least usable space
    first

* preparatory work for send protocol updates

* error handling improvements

* cleanups and refactoring

Fixes:

* lockdep warnings
  * in show_devname callback, on seeding device
  * device delete on loop device due to conversions to workqueues

* fix deadlock between chunk allocation and chunk btree modifications

* fix tracking of missing device count and status

----------------------------------------------------------------
The following changes since commit 3906fe9bb7f1a2c8667ae54e967dc8690824f4ea:

  Linux 5.15-rc7 (2021-10-25 11:30:31 -0700)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-5.16-tag

for you to fetch changes up to d1ed82f3559e151804743df0594f45d7ff6e55fa:

  btrfs: remove root argument from check_item_in_log() (2021-10-29 12:39:13 +0200)

----------------------------------------------------------------
Anand Jain (12):
      btrfs: drop unnecessary ret in ioctl_quota_rescan_status
      btrfs: rename and switch to bool btrfs_chunk_readonly
      btrfs: convert latest_bdev type to btrfs_device and rename
      btrfs: use latest_dev in btrfs_show_devname
      btrfs: update latest_dev when we create a sprout device
      btrfs: remove stale comment about the btrfs_show_devname
      btrfs: reduce btrfs_update_block_group alloc argument to bool
      btrfs: use num_device to check for the last surviving seed device
      btrfs: add comments for device counts in struct btrfs_fs_devices
      btrfs: sysfs: convert scnprintf and snprintf to sysfs_emit
      btrfs: fix comment about sector sizes supported in 64K systems
      btrfs: call btrfs_check_rw_degradable only if there is a missing device

Christoph Hellwig (2):
      btrfs: use bvec_kmap_local in btrfs_csum_one_bio
      btrfs: check-integrity: stop storing the block device name in btrfsic_dev_state

David Sterba (1):
      btrfs: send: prepare for v2 protocol

Filipe Manana (26):
      btrfs: check if a log tree exists at inode_logged()
      btrfs: remove no longer needed checks for NULL log context
      btrfs: do not log new dentries when logging that a new name exists
      btrfs: always update the logged transaction when logging new names
      btrfs: avoid expensive search when dropping inode items from log
      btrfs: add helper to truncate inode items when logging inode
      btrfs: avoid expensive search when truncating inode items from the log
      btrfs: avoid search for logged i_size when logging inode if possible
      btrfs: avoid attempt to drop extents when logging inode for the first time
      btrfs: do not commit delayed inode when logging a file in full sync mode
      btrfs: remove root argument from btrfs_log_inode() and its callees
      btrfs: remove redundant log root assignment from log_dir_items()
      btrfs: factor out the copying loop of dir items from log_dir_items()
      btrfs: insert items in batches when logging a directory when possible
      btrfs: keep track of the last logged keys when logging a directory
      btrfs: assert that extent buffers are write locked instead of only locked
      btrfs: loop only once over data sizes array when inserting an item batch
      btrfs: unexport setup_items_for_insert()
      btrfs: use single bulk copy operations when logging directories
      btrfs: fix lost error handling when replaying directory deletes
      btrfs: fix deadlock between chunk allocation and chunk btree modifications
      btrfs: update comments for chunk allocation -ENOSPC cases
      btrfs: remove root argument from drop_one_dir_item()
      btrfs: remove root argument from btrfs_unlink_inode()
      btrfs: remove root argument from add_link()
      btrfs: remove root argument from check_item_in_log()

Johannes Thumshirn (9):
      btrfs: introduce btrfs_is_data_reloc_root
      btrfs: zoned: add a dedicated data relocation block group
      btrfs: zoned: only allow one process to add pages to a relocation inode
      btrfs: zoned: use regular writes for relocation
      btrfs: check for relocation inodes on zoned btrfs in should_nocow
      btrfs: zoned: allow preallocation for relocation inodes
      btrfs: rename setup_extent_mapping in relocation code
      btrfs: zoned: let the for_treelog test in the allocator stand out
      btrfs: zoned: use greedy gc for auto reclaim

Josef Bacik (11):
      btrfs: do not take the uuid_mutex in btrfs_rm_device
      btrfs: change handle_fs_error in recover_log_trees to aborts
      btrfs: change error handling for btrfs_delete_*_in_log
      btrfs: add a BTRFS_FS_ERROR helper
      btrfs: do not infinite loop in data reclaim if we aborted
      btrfs: do not call close_fs_devices in btrfs_rm_device
      btrfs: handle device lookup with btrfs_dev_lookup_args
      btrfs: add a btrfs_get_dev_args_from_path helper
      btrfs: use btrfs_get_dev_args_from_path in dev removal ioctls
      fs: export an inode_update_time helper
      btrfs: update device path inode time instead of bd_inode

Kai Song (1):
      btrfs: zoned: use kmemdup() to replace kmalloc + memcpy

Li Zhang (1):
      btrfs: clear MISSING device status bit in btrfs_close_one_device

Marcos Paulo de Souza (1):
      btrfs: send: simplify send_create_inode_if_needed

Naohiro Aota (17):
      btrfs: zoned: load zone capacity information from devices
      btrfs: zoned: move btrfs_free_excluded_extents out of btrfs_calc_zone_unusable
      btrfs: zoned: calculate free space from zone capacity
      btrfs: zoned: tweak reclaim threshold for zone capacity
      btrfs: zoned: consider zone as full when no more SB can be written
      btrfs: zoned: locate superblock position using zone capacity
      btrfs: zoned: finish superblock zone once no space left for new SB
      btrfs: zoned: load active zone information from devices
      btrfs: zoned: introduce physical_map to btrfs_block_group
      btrfs: zoned: implement active zone tracking
      btrfs: zoned: load active zone info for block group
      btrfs: zoned: activate block group on allocation
      btrfs: zoned: activate new block group
      btrfs: move ffe_ctl one level up
      btrfs: zoned: avoid chunk allocation if active block group has enough space
      btrfs: zoned: finish fully written block group
      btrfs: zoned: finish relocating block group

Nikolay Borisov (6):
      btrfs: rename btrfs_alloc_chunk to btrfs_create_chunk
      btrfs: rename root fields in delayed refs structs
      btrfs: rely on owning_root field in btrfs_add_delayed_tree_ref to detect CHUNK_ROOT
      btrfs: add additional parameters to btrfs_init_tree_ref/btrfs_init_data_ref
      btrfs: pull up qgroup checks from delayed-ref core to init time
      btrfs: make btrfs_ref::real_root optional

Omar Sandoval (1):
      btrfs: fix deadlock when defragging transparent huge pages

Qu Wenruo (50):
      btrfs: subpage: only call btrfs_alloc_subpage() when sectorsize is smaller than PAGE_SIZE
      btrfs: subpage: make btrfs_alloc_subpage() return btrfs_subpage directly
      btrfs: subpage: introduce btrfs_subpage_bitmap_info
      btrfs: subpage: pack all subpage bitmaps into a larger bitmap
      btrfs: defrag: pass file_ra_state instead of file to btrfs_defrag_file()
      btrfs: defrag: also check PagePrivate for subpage cases in cluster_pages_for_defrag()
      btrfs: defrag: replace hard coded PAGE_SIZE with sectorsize
      btrfs: defrag: factor out page preparation into a helper
      btrfs: defrag: introduce helper to collect target file extents
      btrfs: defrag: introduce helper to defrag a contiguous prepared range
      btrfs: defrag: introduce helper to defrag a range
      btrfs: defrag: introduce helper to defrag one cluster
      btrfs: defrag: use defrag_one_cluster() to implement btrfs_defrag_file()
      btrfs: defrag: remove the old infrastructure
      btrfs: defrag: enable defrag for subpage case
      btrfs: unexport repair_io_failure()
      btrfs: rename btrfs_bio to btrfs_io_context
      btrfs: remove btrfs_bio_alloc() helper
      btrfs: rename struct btrfs_io_bio to btrfs_bio
      btrfs: make sure btrfs_io_context::fs_info is always initialized
      btrfs: remove btrfs_raid_bio::fs_info member
      btrfs: remove unused parameter nr_pages in add_ra_bio_pages()
      btrfs: remove unnecessary parameter delalloc_start for writepage_delalloc()
      btrfs: use async_chunk::async_cow to replace the confusing pending pointer
      btrfs: don't pass compressed pages to btrfs_writepage_endio_finish_ordered()
      btrfs: subpage: make add_ra_bio_pages() compatible
      btrfs: introduce compressed_bio::pending_sectors to trace compressed bio
      btrfs: subpage: add bitmap for PageChecked flag
      btrfs: handle errors properly inside btrfs_submit_compressed_read()
      btrfs: handle errors properly inside btrfs_submit_compressed_write()
      btrfs: introduce submit_compressed_bio() for compression
      btrfs: introduce alloc_compressed_bio() for compression
      btrfs: determine stripe boundary at bio allocation time in btrfs_submit_compressed_read
      btrfs: determine stripe boundary at bio allocation time in btrfs_submit_compressed_write
      btrfs: remove unused function btrfs_bio_fits_in_stripe()
      btrfs: refactor submit_compressed_extents()
      btrfs: cleanup for extent_write_locked_range()
      btrfs: subpage: make compress_file_range() compatible
      btrfs: subpage: make btrfs_submit_compressed_write() compatible
      btrfs: subpage: make end_compressed_bio_writeback() compatible
      btrfs: subpage: make extent_write_locked_range() compatible
      btrfs: factor uncompressed async extent submission code into a new helper
      btrfs: subpage: make lzo_compress_pages() compatible
      btrfs: rework page locking in __extent_writepage()
      btrfs: handle page locking in btrfs_page_end_writer_lock with no writers
      btrfs: subpage: avoid potential deadlock with compression and delalloc
      btrfs: subpage: only allow compression if the range is fully page aligned
      btrfs: rename btrfs_dio_private::logical_offset to file_offset
      btrfs: remove btrfs_bio::logical member
      btrfs: make btrfs_super_block size match BTRFS_SUPER_INFO_SIZE

Sidong Yang (1):
      btrfs: reflink: initialize return value to 0 in btrfs_extent_same()

Su Yue (1):
      btrfs: update comment for fs_devices::seed_list in btrfs_rm_device

 fs/btrfs/block-group.c               |  242 +++++---
 fs/btrfs/block-group.h               |    8 +-
 fs/btrfs/btrfs_inode.h               |   46 +-
 fs/btrfs/check-integrity.c           |  205 +++----
 fs/btrfs/compression.c               |  681 +++++++++++++----------
 fs/btrfs/compression.h               |    4 +-
 fs/btrfs/ctree.c                     |  156 +++---
 fs/btrfs/ctree.h                     |   84 ++-
 fs/btrfs/delayed-inode.c             |   41 +-
 fs/btrfs/delayed-ref.c               |   17 +-
 fs/btrfs/delayed-ref.h               |   51 +-
 fs/btrfs/dev-replace.c               |   16 +-
 fs/btrfs/disk-io.c                   |   51 +-
 fs/btrfs/disk-io.h                   |    5 +-
 fs/btrfs/extent-tree.c               |  326 +++++++----
 fs/btrfs/extent_io.c                 |  334 ++++++-----
 fs/btrfs/extent_io.h                 |   10 +-
 fs/btrfs/extent_map.c                |    4 +-
 fs/btrfs/file-item.c                 |   21 +-
 fs/btrfs/file.c                      |   35 +-
 fs/btrfs/free-space-cache.c          |   24 +-
 fs/btrfs/inode.c                     |  611 +++++++++++----------
 fs/btrfs/ioctl.c                     | 1004 ++++++++++++++++------------------
 fs/btrfs/locking.h                   |    7 +-
 fs/btrfs/lzo.c                       |  270 +++++----
 fs/btrfs/raid56.c                    |  175 +++---
 fs/btrfs/raid56.h                    |   22 +-
 fs/btrfs/reada.c                     |   26 +-
 fs/btrfs/ref-verify.c                |    4 +-
 fs/btrfs/reflink.c                   |    4 +-
 fs/btrfs/relocation.c                |   81 +--
 fs/btrfs/scrub.c                     |  139 ++---
 fs/btrfs/send.c                      |   38 +-
 fs/btrfs/send.h                      |    7 +
 fs/btrfs/space-info.c                |   28 +-
 fs/btrfs/subpage.c                   |  290 +++++++---
 fs/btrfs/subpage.h                   |   56 +-
 fs/btrfs/super.c                     |   28 +-
 fs/btrfs/sysfs.c                     |   93 ++--
 fs/btrfs/tests/extent-buffer-tests.c |    2 +-
 fs/btrfs/tests/extent-io-tests.c     |   12 +-
 fs/btrfs/tests/inode-tests.c         |    4 +-
 fs/btrfs/transaction.c               |   11 +-
 fs/btrfs/tree-log.c                  |  745 ++++++++++++++++---------
 fs/btrfs/tree-log.h                  |   18 +-
 fs/btrfs/volumes.c                   |  592 +++++++++++---------
 fs/btrfs/volumes.h                   |  119 ++--
 fs/btrfs/xattr.c                     |    2 +-
 fs/btrfs/zoned.c                     |  531 ++++++++++++++++--
 fs/btrfs/zoned.h                     |   39 +-
 fs/inode.c                           |    7 +-
 include/linux/fs.h                   |    2 +
 include/uapi/linux/btrfs.h           |   11 +-
 53 files changed, 4439 insertions(+), 2900 deletions(-)

^ permalink raw reply	[relevance 3%]

* [GIT PULL] Btrfs updates for 5.4
@ 2019-09-16 11:55  3% David Sterba
  0 siblings, 0 replies; 105+ results
From: David Sterba @ 2019-09-16 11:55 UTC (permalink / raw)
  To: torvalds; +Cc: David Sterba, linux-btrfs, linux-kernel

Hi,

this update continues with work on code refactoring, sanity checks and
space handling. There are some less user visible changes, nothing that
would particularly stand out.

Please pull, thanks.


User visible changes:

- tree checker, more sanity checks of:
  - ROOT_ITEM (key, size, generation, level, alignment, flags)
  - EXTENT_ITEM and METADATA_ITEM checks (key, size, offset, alignment,
    refs)
  - tree block reference items
  - EXTENT_DATA_REF (key, hash, offset)

- deprecate flag BTRFS_SUBVOL_CREATE_ASYNC for subvolume creation ioctl,
  scheduled removal in 5.7

- delete stale and unused UAPI definitions BTRFS_DEV_REPLACE_ITEM_STATE_*

- improved export of debugging information available via existing sysfs
  directory structure

- try harder to delete relations between qgroups and allow to delete
  orphan entries

- remove unreliable space checks before relocation starts


Core:

- space handling:
  - improved ticket reservations and other high level logic in order to
    remove special cases
  - factor flushing infrastructure and use it for different contexts,
    allows to remove some special case handling
  - reduce metadata reservation when only updating inodes
  - reduce global block reserve minimum size (affects small filesystems)
  - improved overcommit logic wrt global block reserve

- tests:
  - fix memory leaks in extent IO tree
  - catch all TRIM range


Fixes:

- fix ENOSPC errors, leading to transaction aborts, when cloning extents

- several fixes for inode number cache (mount option inode_cache)

- fix potential soft lockups during send when traversing large trees

- fix unaligned access to space cache pages with SLUB debug on (PowerPC)


Other:

- refactoring public/private functions, moving to new or more appropriate
  files

- defines converted to enums

- error handling improvements

- more assertions and comments

- old code deletion

----------------------------------------------------------------
The following changes since commit f74c2bb98776e2de508f4d607cd519873065118e:

  Linux 5.3-rc8 (2019-09-08 13:33:15 -0700)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-5.4

for you to fetch changes up to 6af112b11a4bc1b560f60a618ac9c1dcefe9836e:

  btrfs: Relinquish CPUs in btrfs_compare_trees (2019-09-09 14:59:20 +0200)

----------------------------------------------------------------
Anand Jain (7):
      btrfs: reset device stat using btrfs_dev_stat_set
      btrfs: opencode reset of all device stats
      btrfs: replace: BTRFS_DEV_REPLACE_ITEM_STATE_x defines should go
      btrfs: dev stats item key conversion per cpu type is not needed
      btrfs: dev stat drop useless goto
      btrfs: proper error handling when invalid device is found in find_next_devid
      btrfs: use proper error values on allocation failure in clone_fs_devices

Arnd Bergmann (1):
      btrfs: reduce stack usage for btrfsic_process_written_block

Christophe Leroy (1):
      btrfs: fix allocation of free space cache v1 bitmap pages

Dan Carpenter (1):
      btrfs: fix error pointer check in __btrfs_map_block()

David Sterba (33):
      btrfs: assert extent map tree lock in add_extent_mapping
      btrfs: assert tree mod log lock in __tree_mod_log_insert
      btrfs: remove unused btrfs_device::flush_bio_sent
      btrfs: remove unused key type set/get helpers
      btrfs: tree-log: convert defines to enums
      btrfs: async-thread: convert defines to enums
      btrfs: tree-log: use symbolic name for first replay stage
      btrfs: sysfs: add debugging exports
      btrfs: delete debugfs code
      btrfs: move sysfs declarations out of ctree.h
      btrfs: factor sysfs code out of link_block_group
      btrfs: sysfs: unexport btrfs_raid_ktype
      btrfs: factor out sysfs code for creating space infos
      btrfs: sysfs: unexport space_info_ktype
      btrfs: sysfs: replace direct access to feature set names with a helper
      btrfs: factor out sysfs code for sending device uevent
      btrfs: factor out sysfs code for deleting block group and space infos
      btrfs: factor out sysfs code for updating sprout fsid
      btrfs: cleanup kobject.h includes
      btrfs: sysfs: move type conversion helpers to sysfs.c
      btrfs: sysfs: move helper macros to sysfs.c
      btrfs: define compression levels statically
      btrfs: compression: replace set_level callbacks by a common helper
      btrfs: move cond_wake_up functions out of ctree
      btrfs: move math functions to misc.h
      btrfs: move private raid56 definitions from ctree.h
      btrfs: rename and export read_node_slot
      btrfs: move functions for tree compare to send.c
      btrfs: move struct io_ctl to free-space-cache.h
      btrfs: move dev_stats helpers to volumes.c
      btrfs: define separate btrfs_set/get_XX helpers
      btrfs: assume valid token for btrfs_set/get_token helpers
      btrfs: tie extent buffer and it's token together

Eric Sandeen (1):
      btrfs: use common vfs LABEL ioctl definitions

Filipe Manana (11):
      Btrfs: factor out extent dropping code from hole punch handler
      Btrfs: fix ENOSPC errors, leading to transaction aborts, when cloning extents
      Btrfs: fix hang when loading existing inode cache off disk
      Btrfs: fix inode cache block reserve leak on failure to allocate data space
      Btrfs: fix inode cache waiters hanging on failure to start caching thread
      Btrfs: fix inode cache waiters hanging on path allocation failure
      Btrfs: wake up inode cache waiters sooner to reduce waiting time
      Btrfs: remove unnecessary condition in btrfs_clone() to avoid too much nesting
      Btrfs: fix memory leaks in the test test_find_first_clear_extent_bit
      Btrfs: make test_find_first_clear_extent_bit fail on incorrect results
      Btrfs: fix use-after-free when using the tree modification log

Hans van Kranenburg (1):
      btrfs: clarify btrfs_ioctl_get_dev_stats padding

Jia-Ju Bai (1):
      btrfs: Add an assertion to warn incorrect case in insert_inline_extent()

Johannes Thumshirn (2):
      btrfs: turn checksum type define into an enum
      btrfs: create structure to encode checksum type and length

Josef Bacik (44):
      btrfs: move btrfs_add_free_space out of a header file
      btrfs: move basic block_group definitions to their own header
      btrfs: migrate the block group lookup code
      btrfs: migrate the block group ref counting stuff
      btrfs: migrate nocow and reservation helpers
      btrfs: export the block group caching helpers
      btrfs: export the excluded extents helpers
      btrfs: export the caching control helpers
      btrfs: temporarily export fragment_free_space
      btrfs: make caching_thread use btrfs_find_next_key
      btrfs: migrate the block group caching code
      btrfs: temporarily export inc_block_group_ro
      btrfs: migrate the block group removal code
      btrfs: migrate the block group read/creation code
      btrfs: temporarily export btrfs_get_restripe_target
      btrfs: migrate inc/dec_block_group_ro code
      btrfs: migrate the dirty bg writeout code
      btrfs: export block group accounting helpers
      btrfs: migrate the block group space accounting helpers
      btrfs: migrate the chunk allocation code
      btrfs: migrate the alloc_profile helpers
      btrfs: migrate the block group cleanup code
      btrfs: unexport the temporary exported functions
      btrfs: add a flush step for delayed iputs
      btrfs: unify error handling for ticket flushing
      btrfs: factor out the ticket flush handling
      btrfs: refactor priority_reclaim_metadata_space
      btrfs: introduce an evict flushing state
      btrfs: rename the btrfs_calc_*_metadata_size helpers
      btrfs: only reserve metadata_size for inodes
      btrfs: do not allow reservations if we have pending tickets
      btrfs: roll tracepoint into btrfs_space_info_update helper
      btrfs: add space reservation tracepoint for reserved bytes
      btrfs: stop partially refilling tickets when releasing space
      btrfs: refactor the ticket wakeup code
      btrfs: rework wake_all_tickets
      btrfs: fix may_commit_transaction to deal with no partial filling
      btrfs: remove orig_bytes from reserve_ticket
      btrfs: rename btrfs_space_info_add_old_bytes
      btrfs: change the minimum global reserve size
      btrfs: always reserve our entire size for the global reserve
      btrfs: use btrfs_try_granting_tickets in update_global_rsv
      btrfs: do not account global reserve in can_overcommit
      btrfs: add enospc debug messages for ticket failure

Nikolay Borisov (19):
      btrfs: Remove unused locking functions
      btrfs: Return number of compressed extents directly in compress_file_range
      btrfs: Move free_pages_out label in inline extent handling branch in compress_file_range
      btrfs: Remove delalloc_end argument from extent_clear_unlock_delalloc
      btrfs: Remove leftover of in-band dedupe
      btrfs: Remove unnecessary check from join_running_log_trans
      btrfs: Refactor btrfs_calc_avail_data_space
      btrfs: Make reada_tree_block_flagged private
      btrfs: refactor variable scope in run_delalloc_nocow
      btrfs: improve comments around nocow path
      btrfs: simplify extent type checks in run_delalloc_nocow
      btrfs: streamline code in run_delalloc_nocow in case of inline extents
      btrfs: comment and minor simplifications in run_delalloc_nocow
      btrfs: improve error handling in run_delalloc_nocow
      btrfs: Deprecate BTRFS_SUBVOL_CREATE_ASYNC flag
      btrfs: Make btrfs_find_name_in_backref return btrfs_inode_ref struct
      btrfs: Make btrfs_find_name_in_ext_backref return struct btrfs_inode_extref
      btrfs: Don't assign retval of btrfs_try_tree_write_lock/btrfs_tree_read_lock_atomic
      btrfs: Relinquish CPUs in btrfs_compare_trees

Omar Sandoval (3):
      btrfs: use correct count in btrfs_file_write_iter()
      btrfs: treat RWF_{,D}SYNC writes as sync for CRCs
      btrfs: stop clearing EXTENT_DIRTY in inode I/O tree

Qu Wenruo (12):
      btrfs: volumes: Unexport find_free_dev_extent_start()
      btrfs: volumes: Add comment for find_free_dev_extent_start()
      btrfs: extent-tree: Add comment for inc_block_group_ro()
      btrfs: volumes: Remove ENOSPC-prone btrfs_can_relocate()
      btrfs: delayed-inode: Kill the BUG_ON() in btrfs_delete_delayed_dir_index()
      btrfs: extent-tree: Make sure we only allocate extents from block groups with the same type
      btrfs: tree-checker: Add ROOT_ITEM check
      btrfs: qgroup: Try our best to delete qgroup relations
      btrfs: tree-checker: Add EXTENT_ITEM and METADATA_ITEM check
      btrfs: tree-checker: Add simple keyed refs check
      btrfs: tree-checker: Add EXTENT_DATA_REF check
      btrfs: Detect unbalanced tree with empty leaf before crashing btree operations

YueHaibing (1):
      btrfs: remove set but not used variable 'offset'

 fs/btrfs/Makefile                      |     2 +-
 fs/btrfs/async-thread.c                |     8 +-
 fs/btrfs/block-group.c                 |  3173 ++++++++
 fs/btrfs/block-group.h                 |   250 +
 fs/btrfs/block-rsv.c                   |    48 +-
 fs/btrfs/check-integrity.c             |     7 +-
 fs/btrfs/compression.c                 |    21 +-
 fs/btrfs/compression.h                 |    11 +-
 fs/btrfs/ctree.c                       |   452 +-
 fs/btrfs/ctree.h                       |   417 +-
 fs/btrfs/dedupe.h                      |    12 -
 fs/btrfs/delalloc-space.c              |    34 +-
 fs/btrfs/delayed-inode.c               |    18 +-
 fs/btrfs/delayed-ref.c                 |    10 +-
 fs/btrfs/dev-replace.c                 |     3 +-
 fs/btrfs/disk-io.c                     |    40 +-
 fs/btrfs/disk-io.h                     |     2 -
 fs/btrfs/extent-tree.c                 | 12422 +++++++++++--------------------
 fs/btrfs/extent_io.c                   |    12 +-
 fs/btrfs/extent_io.h                   |     6 +-
 fs/btrfs/extent_map.c                  |     2 +
 fs/btrfs/file.c                        |   435 +-
 fs/btrfs/free-space-cache.c            |    42 +-
 fs/btrfs/free-space-cache.h            |    24 +-
 fs/btrfs/free-space-tree.c             |     1 +
 fs/btrfs/free-space-tree.h             |     2 +
 fs/btrfs/inode-item.c                  |    62 +-
 fs/btrfs/inode-map.c                   |    32 +-
 fs/btrfs/inode.c                       |   397 +-
 fs/btrfs/ioctl.c                       |   430 +-
 fs/btrfs/locking.c                     |    37 +-
 fs/btrfs/locking.h                     |     2 -
 fs/btrfs/lzo.c                         |     8 +-
 fs/btrfs/math.h                        |    28 -
 fs/btrfs/misc.h                        |    50 +
 fs/btrfs/ordered-data.c                |     1 +
 fs/btrfs/props.c                       |     2 +-
 fs/btrfs/qgroup.c                      |    48 +-
 fs/btrfs/raid56.c                      |    16 +
 fs/btrfs/reada.c                       |    30 +
 fs/btrfs/relocation.c                  |     3 +-
 fs/btrfs/root-tree.c                   |     2 +-
 fs/btrfs/scrub.c                       |     1 +
 fs/btrfs/send.c                        |   375 +
 fs/btrfs/space-info.c                  |   372 +-
 fs/btrfs/space-info.h                  |    30 +-
 fs/btrfs/struct-funcs.c                |    73 +-
 fs/btrfs/super.c                       |    32 +-
 fs/btrfs/sysfs.c                       |   270 +-
 fs/btrfs/sysfs.h                       |    82 +-
 fs/btrfs/tests/btrfs-tests.c           |     1 +
 fs/btrfs/tests/extent-io-tests.c       |    31 +-
 fs/btrfs/tests/free-space-tests.c      |     1 +
 fs/btrfs/tests/free-space-tree-tests.c |     1 +
 fs/btrfs/tests/inode-tests.c           |    24 +-
 fs/btrfs/transaction.c                 |     6 +-
 fs/btrfs/tree-checker.c                |   432 ++
 fs/btrfs/tree-log.c                    |    55 +-
 fs/btrfs/volumes.c                     |   102 +-
 fs/btrfs/volumes.h                     |     9 -
 fs/btrfs/zlib.c                        |    11 +-
 fs/btrfs/zstd.c                        |    12 +-
 include/trace/events/btrfs.h           |     3 +-
 include/uapi/linux/btrfs.h             |    13 +-
 include/uapi/linux/btrfs_tree.h        |     9 +-
 65 files changed, 10557 insertions(+), 9990 deletions(-)
 create mode 100644 fs/btrfs/block-group.c
 create mode 100644 fs/btrfs/block-group.h
 delete mode 100644 fs/btrfs/dedupe.h
 delete mode 100644 fs/btrfs/math.h
 create mode 100644 fs/btrfs/misc.h

^ permalink raw reply	[relevance 3%]

* [GIT PULL] Btrfs updates for 5.5
@ 2019-11-22 16:23  3% David Sterba
  0 siblings, 0 replies; 105+ results
From: David Sterba @ 2019-11-22 16:23 UTC (permalink / raw)
  To: torvalds; +Cc: David Sterba, linux-btrfs, linux-kernel

Hi,

there are some new features, followed by cleanups. Please pull, thanks.

User visible changes:

- new block group profiles: RAID1 with 3- and 4- copies
  - RAID1 in btrfs has always 2 copies, now add support for 3 and 4
  - this is an incompat feature (named RAID1C34)
  - recommended use of RAID1C3 is replacement of RAID6 profile on metadata,
    this brings a more reliable resiliency against 2 device loss/damage

- support for new checksums
  - per-filesystem, set at mkfs time
  - fast hash (crc32c successor): xxhash, 64bit digest
  - strong hashes (both 256bit): sha256 (slower, FIPS), blake2b (faster)
  - the blake2b module goes via the crypto tree, btrfs.ko has a soft
    dependency

- speed up lseek, don't take inode locks unnecessarily, this can speed up
  parallel SEEK_CUR/SEEK_SET/SEEK_END by 80%

- send:
  - allow clone operations within the same file
  - limit maximum number of sent clone references to avoid slow backref walking

- error message improvements: device scan prints process name and PID

Core changes:

- cleanups
  - remove unique workqueue helpers, used to provide a way to avoid deadlocks
    in the workqueue code, now done in a simpler way
  - remove lots of indirect function calls in compression code
  - extent IO tree code moved out of extent_io.c
  - cleanup backup superblock handling at mount time
  - transaction life cycle documentation and cleanups
  - locking code cleanups, annotations and documentation
  - add more cold, const, pure function attributes
  - removal of unused or redundant struct members or variables

- new tree-checker sanity tests
  - try to detect missing INODE_ITEM, cross-reference checks of DIR_ITEM,
    DIR_INDEX, INODE_REF, and XATTR_* items

- remove own bio scheduling code (used to avoid checksum submissions being
  stuck behind other IO), replaced by cgroup controller-based code to allow
  better control and avoid priority inversions in cases where the custom and
  cgroup scheduling disagreed

Fixes:

- avoid getting stuck during cyclic writebacks

- fix trimming of ranges crossing block group boundaries

- fix rename exchange on subvolumes, all involved subvolumes need to be
  recorded in the transaction

----------------------------------------------------------------
The following changes since commit af42d3466bdc8f39806b26f593604fdc54140bcb:

  Linux 5.4-rc8 (2019-11-17 14:47:30 -0800)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-5.5-tag

for you to fetch changes up to fa17ed069c61286b26382e23b57a62930657b9c1:

  btrfs: drop bdev argument from submit_extent_page (2019-11-18 23:43:58 +0100)

----------------------------------------------------------------
Anand Jain (3):
      btrfs: balance: use term redundancy instead of integrity in message
      btrfs: print process name and pid that calls device scanning
      btrfs: use bool argument in free_root_pointers()

Chengguang Xu (3):
      btrfs: props: remove unnecessary hash_init()
      btrfs: use enum for extent type defines
      btrfs: use better definition of number of compression type

Chris Mason (5):
      Btrfs: stop using btrfs_schedule_bio()
      Btrfs: delete the entire async bio submission framework
      Btrfs: only associate the locked page with one async_chunk struct
      Btrfs: use REQ_CGROUP_PUNT for worker thread submitted bios
      Btrfs: extent_write_locked_range() should attach inode->i_wb

Dan Carpenter (1):
      btrfs: clean up locking name in scrub_enumerate_chunks()

David Sterba (54):
      btrfs: make locking assertion helpers static inline
      btrfs: make btrfs_assert_tree_locked static inline
      btrfs: move btrfs_set_path_blocking to other locking functions
      btrfs: move btrfs_unlock_up_safe to other locking functions
      btrfs: add 64bit safe helper for power of two checks
      btrfs: use has_single_bit_set for clarity
      btrfs: drop unused parameter is_new from btrfs_iget
      btrfs: add __cold attribute to more functions
      btrfs: add const function attribute
      btrfs: add __pure attribute to functions
      btrfs: opencode extent_buffer_get
      btrfs: export compression and decompression callbacks
      btrfs: switch compression callbacks to direct calls
      btrfs: compression: attach workspace manager to the ops
      btrfs: compression: let workspace manager init take only the type
      btrfs: compression: inline init_workspace_manager
      btrfs: compression: let workspace manager cleanup take only the type
      btrfs: compression: inline cleanup_workspace_manager
      btrfs: compression: export alloc/free/get/put callbacks of all algos
      btrfs: compression: inline get_workspace
      btrfs: compression: inline put_workspace
      btrfs: compression: pass type to btrfs_get_workspace
      btrfs: compression: inline alloc_workspace
      btrfs: compression: pass type to btrfs_put_workspace
      btrfs: compression: inline free_workspace
      btrfs: compression: remove ops pointer from workspace_manager
      btrfs: tracepoints: drop typecasts from printk
      btrfs: tracepoints: constify all pointers
      btrfs: assert extent_map bdevs and lookup_map and split
      btrfs: get bdev from latest_dev for dio bh_result
      btrfs: sysfs: export supported checksums
      btrfs: add member for a specific checksum driver
      btrfs: add blake2b to checksumming algorithms
      btrfs: move block_group_item::used to block group
      btrfs: move block_group_item::flags to block group
      btrfs: remove embedded block_group_cache::item
      btrfs: rename block_group_item on-stack accessors to follow naming
      btrfs: rename extent buffer block group item accessors
      btrfs: add dedicated members for start and length of a block group
      btrfs: sink write_flags to __extent_writepage_io
      btrfs: sink write flags to cow_file_range_async
      btrfs: add support for 3-copy replication (raid1c3)
      btrfs: add support for 4-copy replication (raid1c4)
      btrfs: add incompat for raid1 with 3, 4 copies
      btrfs: drop incompat bit for raid1c34 after last block group is gone
      btrfs: merge blocking_writers branches in btrfs_tree_read_lock
      btrfs: set blocking_writers directly, no increment or decrement
      btrfs: access eb::blocking_writers according to ACCESS_ONCE policies
      btrfs: document extent buffer locking
      btrfs: rename btrfs_block_group_cache
      btrfs: get bdev directly from fs_devices in submit_extent_page
      btrfs: drop bio_set_dev where not needed
      btrfs: remove extent_map::bdev
      btrfs: drop bdev argument from submit_extent_page

Filipe Manana (8):
      Btrfs: make btrfs_wait_extents() static
      Btrfs: fix negative subv_writers counter and data space leak after buffered write
      Btrfs: fix metadata space leak on fixup worker failure to set range as delalloc
      Btrfs: remove wait queue from space_info structure
      Btrfs: remove unnecessary delalloc mutex for inodes
      Btrfs: send, allow clone operations within the same file
      Btrfs: send, skip backreference walking for extents with many references
      Btrfs: fix block group remaining RO forever after error during device replace

Goldwyn Rodrigues (1):
      btrfs: simplify inode locking for RWF_NOWAIT

Johannes Thumshirn (10):
      btrfs: raid56: reduce indentation in lock_stripe_add
      btrfs: remove pointless local variable in lock_stripe_add()
      btrfs: reduce indentation in btrfs_may_alloc_data_chunk
      btrfs: remove pointless indentation in btrfs_read_sys_array()
      btrfs: add xxhash64 to checksumming algorithms
      btrfs: add sha256 to checksumming algorithm
      btrfs: sysfs: show used checksum driver per filesystem
      btrfs: remove cached space_info in btrfs_statfs()
      btrfs: change btrfs_fs_devices::seeding to bool
      btrfs: change btrfs_fs_devices::rotating to bool

Josef Bacik (9):
      btrfs: separate out the extent leak code
      btrfs: separate out the extent io init function
      btrfs: move extent_io_tree defs to their own header
      btrfs: export find_delalloc_range
      btrfs: move the failrec tree stuff into extent-io-tree.h
      btrfs: use refcount_inc_not_zero in kill_all_nodes
      btrfs: check page->mapping when loading free space cache
      btrfs: use btrfs_block_group_cache_done in update_block_group
      btrfs: record all roots for rename exchange on a subvol

Marcos Paulo de Souza (2):
      btrfs: block-group: Rework documentation of check_system_chunk function
      btrfs: ioctl: Try to use btrfs_fs_info instead of *file

Nikolay Borisov (17):
      btrfs: Add assert to catch nested transaction commit
      btrfs: Don't opencode btrfs_find_name_in_backref in backref_in_log
      btrfs: Properly handle backref_in_log retval
      btrfs: Open-code name_in_log_ref in replay_one_name
      btrfs: User assert to document transaction requirement
      btrfs: Rename btrfs_join_transaction_nolock
      btrfs: Speed up btrfs_file_llseek
      btrfs: Simplify btrfs_file_llseek
      btrfs: Return offset from find_desired_extent
      btrfs: Cleanup and simplify find_newest_super_backup
      btrfs: Remove newest_gen argument from find_oldest_super_backup
      btrfs: Add read_backup_root
      btrfs: Factor out tree roots initialization during mount
      btrfs: Don't use objectid_mutex during mount
      btrfs: Remove unused next_root_backup function
      btrfs: Rename find_oldest_super_backup to init_backup_root_slot
      btrfs: Streamline btrfs_fs_info::backup_root_index semantics

Omar Sandoval (7):
      btrfs: get rid of unnecessary memset() of work item
      btrfs: don't prematurely free work in run_ordered_work()
      btrfs: don't prematurely free work in end_workqueue_fn()
      btrfs: don't prematurely free work in reada_start_machine_worker()
      btrfs: don't prematurely free work in scrub_missing_raid56_worker()
      btrfs: get rid of unique workqueue helper functions
      btrfs: get rid of pointless wtag variable in async-thread.c

Qu Wenruo (16):
      btrfs: tree-checker: Try to detect missing INODE_ITEM
      btrfs: tree-checker: Add check for INODE_REF
      btrfs: ctree: Reduce one indent level for btrfs_search_slot()
      btrfs: ctree: Reduce one indent level for btrfs_search_old_slot()
      btrfs: ctree: Remove stray comment of setting up path lock
      btrfs: transaction: describe transaction states and transitions
      btrfs: transaction: Cleanup unused TRANS_STATE_BLOCKED
      btrfs: tree-checker: Refactor prev_key check for ino into a function
      btrfs: Enhance error output for write time tree checker
      btrfs: Remove btrfs_bio::flags member
      btrfs: tree-checker: Check item size before reading file extent type
      btrfs: volumes: Use more straightforward way to calculate map length
      btrfs: Ensure we trim ranges across block group boundary
      btrfs: block-group: Refactor btrfs_read_block_groups()
      btrfs: block-group: Reuse the item key from caller of read_one_block_group()
      btrfs: scrub: Don't check free space before marking a block group RO

Tejun Heo (1):
      btrfs: Avoid getting stuck during cyclic writebacks

 fs/btrfs/Kconfig                       |   2 +
 fs/btrfs/async-thread.c                | 113 +++----
 fs/btrfs/async-thread.h                |  37 +--
 fs/btrfs/block-group.c                 | 589 +++++++++++++++++----------------
 fs/btrfs/block-group.h                 |  51 +--
 fs/btrfs/btrfs_inode.h                 |   3 -
 fs/btrfs/compression.c                 | 269 +++++++++++----
 fs/btrfs/compression.h                 |  46 +--
 fs/btrfs/ctree.c                       | 287 +++++++---------
 fs/btrfs/ctree.h                       |  51 +--
 fs/btrfs/delalloc-space.c              |  21 +-
 fs/btrfs/delayed-inode.c               |  18 +-
 fs/btrfs/dev-replace.c                 |   2 +-
 fs/btrfs/dev-replace.h                 |   2 +-
 fs/btrfs/disk-io.c                     | 365 ++++++++++----------
 fs/btrfs/disk-io.h                     |   4 +-
 fs/btrfs/export.c                      |   4 +-
 fs/btrfs/extent-io-tree.h              | 248 ++++++++++++++
 fs/btrfs/extent-tree.c                 | 146 ++++----
 fs/btrfs/extent_io.c                   | 120 ++++---
 fs/btrfs/extent_io.h                   | 231 +------------
 fs/btrfs/extent_map.c                  |   6 +-
 fs/btrfs/extent_map.h                  |  11 +-
 fs/btrfs/file-item.c                   |   1 -
 fs/btrfs/file.c                        |  74 ++---
 fs/btrfs/free-space-cache.c            | 118 +++----
 fs/btrfs/free-space-cache.h            |  39 +--
 fs/btrfs/free-space-tree.c             | 133 ++++----
 fs/btrfs/free-space-tree.h             |  18 +-
 fs/btrfs/inode.c                       | 170 ++++++----
 fs/btrfs/ioctl.c                       |  49 ++-
 fs/btrfs/locking.c                     | 309 ++++++++++++++---
 fs/btrfs/locking.h                     |  13 +-
 fs/btrfs/lzo.c                         |  53 +--
 fs/btrfs/misc.h                        |  11 +
 fs/btrfs/ordered-data.c                |   7 +-
 fs/btrfs/ordered-data.h                |   2 +-
 fs/btrfs/print-tree.c                  |   6 +-
 fs/btrfs/props.c                       |   6 +-
 fs/btrfs/qgroup.c                      |  11 +-
 fs/btrfs/qgroup.h                      |   2 +-
 fs/btrfs/raid56.c                      | 101 +++---
 fs/btrfs/reada.c                       |  19 +-
 fs/btrfs/relocation.c                  |  43 ++-
 fs/btrfs/scrub.c                       | 100 +++---
 fs/btrfs/send.c                        |  45 ++-
 fs/btrfs/space-info.c                  |   8 +-
 fs/btrfs/space-info.h                  |   3 +-
 fs/btrfs/super.c                       |  26 +-
 fs/btrfs/sysfs.c                       |  47 ++-
 fs/btrfs/sysfs.h                       |   2 +-
 fs/btrfs/tests/btrfs-tests.c           |  11 +-
 fs/btrfs/tests/btrfs-tests.h           |   4 +-
 fs/btrfs/tests/free-space-tests.c      |  15 +-
 fs/btrfs/tests/free-space-tree-tests.c | 101 +++---
 fs/btrfs/transaction.c                 |  98 +++++-
 fs/btrfs/transaction.h                 |   5 +-
 fs/btrfs/tree-checker.c                | 211 +++++++++---
 fs/btrfs/tree-log.c                    | 136 ++++----
 fs/btrfs/volumes.c                     | 494 ++++++++-------------------
 fs/btrfs/volumes.h                     |  24 +-
 fs/btrfs/zlib.c                        |  52 +--
 fs/btrfs/zstd.c                        |  47 +--
 include/trace/events/btrfs.h           | 131 ++++----
 include/uapi/linux/btrfs.h             |   5 +-
 include/uapi/linux/btrfs_tree.h        |  23 +-
 66 files changed, 2780 insertions(+), 2619 deletions(-)
 create mode 100644 fs/btrfs/extent-io-tree.h

^ permalink raw reply	[relevance 3%]

* [GIT PULL] Btrfs updates for 5.8
@ 2020-06-01 12:37  3% David Sterba
  0 siblings, 0 replies; 105+ results
From: David Sterba @ 2020-06-01 12:37 UTC (permalink / raw)
  To: torvalds; +Cc: David Sterba, linux-btrfs, linux-kernel

Hi,

please pull the following updates to btrfs. Thanks.

Highlights:

- speedup dead root detection during orphan cleanup, eg. when there are
  many deleted subvolumes waiting to be cleaned, the trees are now looked
  up in radix tree instead of a O(N^2) search

- snapshot creation with inherited qgroup will mark the qgroup
  inconsistent, requires a rescan

- send will emit file capabilities after chown, this produces a stream
  that does not need postprocessing to set the capabilities again

- direct io ported to iomap infrastructure, cleaned up and simplified
  code, notably removing last use of struct buffer_head in btrfs code

Core changes:

- factor out backreference iteration, to be used by ordinary
  backreferences and relocation code

- improved global block reserve utilization
  * better logic to serialize requests
  * increased maximum available for unlink
  * improved handling on large pages (64K)

- direct io cleanups and fixes
  * simplify layering, where cloned bios were unnecessarily created for
    some cases
  * error handling fixes (submit, endio)
  * remove repair worker thread, used to avoid deadlocks during
    repair

- refactored block group reading code, preparatory work for new type of
  block group storage that should improve mount time on large filesystems

Cleanups:

- cleaned up (and slightly sped up) set/get helpers for metadata data
  structure members

- root bit REF_COWS got renamed to SHAREABLE to reflect the that the
  blocks of the tree get shared either among subvolumes or with the
  relocation trees

Fixes:

- when subvolume deletion fails due to ENOSPC, the filesystem is not
  turned read-only

- device scan deals with devices from other filesystems that changed
  ownership due to overwrite (mkfs)

- fix a race between scrub and block group removal/allocation

- fix long standing bug of a runaway balance operation, printing the same
  line to the syslog, caused by a stale status bit on a reloc tree that
  prevented progress

- fix corrupt log due to concurrent fsync of inodes with shared extents

- fix space underflow for NODATACOW and buffered writes when it for some
  reason needs to fallback to COW mode

----------------------------------------------------------------
The following changes since commit 9cb1fd0efd195590b828b9b865421ad345a4a145:

  Linux 5.7-rc7 (2020-05-24 15:32:54 -0700)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-5.8-tag

for you to fetch changes up to 2166e5edce9ac1edf3b113d6091ef72fcac2d6c4:

  btrfs: fix space_info bytes_may_use underflow during space cache writeout (2020-05-28 14:01:53 +0200)

----------------------------------------------------------------
Anand Jain (5):
      btrfs: drop useless goto in open_fs_devices
      btrfs: include non-missing as a qualifier for the latest_bdev
      btrfs: free alien device after device add
      btrfs: drop stale reference to volume_mutex
      btrfs: unexport btrfs_compress_set_level()

Christoph Hellwig (1):
      btrfs: split btrfs_direct_IO to read and write part

David Sterba (26):
      btrfs: don't force read-only after error in drop snapshot
      btrfs: sort error decoder entries
      btrfs: add more codes to decoder table
      btrfs: remove more obsolete v0 extent ref declarations
      btrfs: use the token::eb for all set/get helpers
      btrfs: drop eb parameter from set/get token helpers
      btrfs: don't use set/get token for single assignment in overwrite_item
      btrfs: don't use set/get token in leaf_space_used
      btrfs: preset set/get token with first page and drop condition
      btrfs: add separate bounds checker for set/get helpers
      btrfs: speed up btrfs_get_##bits helpers
      btrfs: speed up btrfs_get_token_##bits helpers
      btrfs: speed up btrfs_set_##bits helpers
      btrfs: speed up btrfs_set_token_##bits helpers
      btrfs: speed up and simplify generic_bin_search
      btrfs: remove unused map_private_extent_buffer
      btrfs: constify extent_buffer in the API functions
      btrfs: drop unnecessary offset_in_page in extent buffer helpers
      btrfs: optimize split page read in btrfs_get_##bits
      btrfs: optimize split page read in btrfs_get_token_##bits
      btrfs: optimize split page write in btrfs_set_##bits
      btrfs: optimize split page write in btrfs_set_token_##bits
      btrfs: update documentation of set/get helpers
      btrfs: simplify root lookup by id
      btrfs: open code read_fs_root
      btrfs: simplify iget helpers

Eric Biggers (1):
      btrfs: use crypto_shash_digest() instead of open coding

Filipe Manana (16):
      btrfs: remove pointless assertion on reclaim_size counter
      btrfs: simplify error handling of clean_pinned_extents()
      btrfs: remove useless check for copy_items() return value
      btrfs: fix a race between scrub and block group removal/allocation
      btrfs: rename member 'trimming' of block group to a more generic name
      btrfs: move the block group freeze/unfreeze helpers into block-group.c
      btrfs: scrub, only lookup for csums if we are dealing with a data extent
      btrfs: fix corrupt log due to concurrent fsync of inodes with shared extents
      btrfs: make checksum item extension more efficient
      btrfs: do not ignore error from btrfs_next_leaf() when inserting checksums
      btrfs: remove useless 'fail_unlock' label from btrfs_csum_file_blocks()
      btrfs: include error on messages about failure to write space/inode caches
      btrfs: turn space cache writeout failure messages into debug messages
      btrfs: fix wrong file range cleanup after an error filling dealloc range
      btrfs: fix space_info bytes_may_use underflow after nocow buffered write
      btrfs: fix space_info bytes_may_use underflow during space cache writeout

Goldwyn Rodrigues (6):
      fs: export generic_file_buffered_read()
      iomap: add a filesystem hook for direct I/O bio submission
      iomap: remove lockdep_assert_held()
      btrfs: switch to iomap_dio_rw() for dio
      fs: remove dio_end_io()
      btrfs: remove BTRFS_INODE_READDIO_NEED_LOCK

Josef Bacik (6):
      btrfs: improve global reserve stealing logic
      btrfs: allow to use up to 90% of the global block rsv for unlink
      btrfs: account for trans_block_rsv in may_commit_transaction
      btrfs: only check priority tickets for priority flushing
      btrfs: run btrfs_try_granting_tickets if a priority ticket fails
      btrfs: force chunk allocation if our global rsv is larger than metadata

Jules Irenge (2):
      btrfs: add missing annotation for btrfs_lock_cluster()
      btrfs: add missing annotation for btrfs_tree_lock()

Marcos Paulo de Souza (1):
      btrfs: send: emit file capabilities after chown

Nikolay Borisov (4):
      btrfs: use list_for_each_entry_safe in free_reloc_roots
      btrfs: make btrfs_read_disk_super return struct btrfs_disk_super
      btrfs: open code key_search
      btrfs: remove redundant local variable in read_block_for_search

Omar Sandoval (15):
      block: add bio_for_each_bvec_all()
      btrfs: fix error handling when submitting direct I/O bio
      btrfs: fix double __endio_write_update_ordered in direct I/O
      btrfs: look at full bi_io_vec for repair decision
      btrfs: don't do repair validation for checksum errors
      btrfs: clarify btrfs_lookup_bio_sums documentation
      btrfs: rename __readpage_endio_check to check_data_csum
      btrfs: make btrfs_check_repairable() static
      btrfs: remove unused btrfs_dio_private::private
      btrfs: convert btrfs_dio_private->pending_bios to refcount_t
      btrfs: put direct I/O checksums in btrfs_dio_private instead of bio
      btrfs: get rid of one layer of bios in direct I/O
      btrfs: simplify direct I/O read repair
      btrfs: get rid of endio_repair_workers
      btrfs: unify buffered and direct I/O read repair

Qu Wenruo (44):
      btrfs: backref: introduce the skeleton of btrfs_backref_iter
      btrfs: backref: implement btrfs_backref_iter_next()
      btrfs: reloc: use btrfs_backref_iter infrastructure
      btrfs: reloc: rename mark_block_processed and __mark_block_processed
      btrfs: reloc: add backref_cache::pending_edge and backref_cache::useless_node
      btrfs: reloc: add backref_cache::fs_info member
      btrfs: reloc: make reloc root search-specific for relocation backref cache
      btrfs: reloc: refactor direct tree backref processing into its own function
      btrfs: reloc: refactor indirect tree backref processing into its own function
      btrfs: reloc: use wrapper to replace open-coded edge linking
      btrfs: reloc: pass essential members for alloc_backref_node()
      btrfs: reloc: remove the open-coded goto loop for breadth-first search
      btrfs: reloc: refactor finishing part of upper linkage into finish_upper_links()
      btrfs: reloc: refactor useless nodes handling into its own function
      btrfs: reloc: add btrfs_ prefix for backref_node/edge/cache
      btrfs: backref: move btrfs_backref_(node|edge|cache) structures to backref.h
      btrfs: rename tree_entry to rb_simple_node and export it
      btrfs: backref: rename and move backref_cache_init()
      btrfs: backref: rename and move alloc_backref_node()
      btrfs: backref: rename and move alloc_backref_edge()
      btrfs: backref: rename and move link_backref_edge()
      btrfs: backref: rename and move free_backref_(node|edge)
      btrfs: backref: rename and move drop_backref_node()
      btrfs: backref: rename and move remove_backref_node()
      btrfs: backref: rename and move backref_cache_cleanup()
      btrfs: backref: rename and move backref_tree_panic()
      btrfs: backref: rename and move should_ignore_root()
      btrfs: reloc: open code read_fs_root() for handle_indirect_tree_backref()
      btrfs: backref: rename and move handle_one_tree_block()
      btrfs: backref: rename and move finish_upper_links()
      btrfs: reloc: move error handling of build_backref_tree() to backref.c
      btrfs: backref: distinguish reloc and non-reloc use of indirect resolution
      btrfs: remove the redundant parameter level in btrfs_bin_search()
      btrfs: qgroup: mark qgroup inconsistent if we're inherting snapshot to a new qgroup
      btrfs: block-group: don't set the wrong READA flag for btrfs_read_block_groups()
      btrfs: block-group: refactor how we read one block group item
      btrfs: block-group: refactor how we delete one block group item
      btrfs: block-group: refactor how we insert a block group item
      btrfs: block-group: rename write_one_cache_group()
      btrfs: rename BTRFS_ROOT_REF_COWS to BTRFS_ROOT_SHAREABLE
      btrfs: inode: cleanup the log-tree exceptions in btrfs_truncate_inode_items()
      btrfs: don't set SHAREABLE flag for data reloc tree
      btrfs: reloc: fix reloc root leak and NULL pointer dereference
      btrfs: reloc: clear DEAD_RELOC_TREE bit for orphan roots to prevent runaway balance

Robbie Ko (2):
      btrfs: speedup dead root detection during orphan cleanup
      btrfs: reduce lock contention when creating snapshot

Tiezhu Yang (1):
      btrfs: remove duplicated include in block-group.c

YueHaibing (2):
      btrfs: remove unused function heads_to_leaves
      btrfs: remove unused function btrfs_dev_extent_chunk_tree_uuid

Zheng Wei (1):
      btrfs: tree-checker: remove duplicate definition of 'inode_item_err'

 .clang-format                   |    1 +
 Documentation/block/biovecs.rst |    2 +
 fs/btrfs/Kconfig                |    1 +
 fs/btrfs/backref.c              |  837 ++++++++++++++++++++++++-
 fs/btrfs/backref.h              |  297 +++++++++
 fs/btrfs/block-group.c          |  233 ++++---
 fs/btrfs/block-group.h          |   14 +-
 fs/btrfs/block-rsv.c            |    5 +-
 fs/btrfs/btrfs_inode.h          |   44 +-
 fs/btrfs/compression.c          |   36 +-
 fs/btrfs/compression.h          |    2 -
 fs/btrfs/ctree.c                |  180 +++---
 fs/btrfs/ctree.h                |  121 ++--
 fs/btrfs/disk-io.c              |   93 +--
 fs/btrfs/disk-io.h              |    4 +-
 fs/btrfs/export.c               |   17 +-
 fs/btrfs/extent-io-tree.h       |    1 +
 fs/btrfs/extent-tree.c          |   23 +-
 fs/btrfs/extent_io.c            |  288 ++++-----
 fs/btrfs/extent_io.h            |   67 +-
 fs/btrfs/file-item.c            |   62 +-
 fs/btrfs/file.c                 |  111 +++-
 fs/btrfs/free-space-cache.c     |   81 +--
 fs/btrfs/inode.c                | 1319 ++++++++++++++-------------------------
 fs/btrfs/ioctl.c                |  102 ++-
 fs/btrfs/locking.c              |    1 +
 fs/btrfs/misc.h                 |   54 ++
 fs/btrfs/props.c                |    9 +-
 fs/btrfs/qgroup.c               |   14 +
 fs/btrfs/relocation.c           | 1319 +++++++++------------------------------
 fs/btrfs/root-tree.c            |   12 +-
 fs/btrfs/scrub.c                |   59 +-
 fs/btrfs/send.c                 |   89 ++-
 fs/btrfs/space-info.c           |   81 ++-
 fs/btrfs/space-info.h           |    1 +
 fs/btrfs/struct-funcs.c         |  223 +++----
 fs/btrfs/super.c                |   38 +-
 fs/btrfs/transaction.c          |   78 +--
 fs/btrfs/transaction.h          |    3 +-
 fs/btrfs/tree-checker.c         |    4 -
 fs/btrfs/tree-defrag.c          |    2 +-
 fs/btrfs/tree-log.c             |  192 +++---
 fs/btrfs/uuid-tree.c            |    6 +-
 fs/btrfs/volumes.c              |   80 +--
 fs/direct-io.c                  |   19 -
 fs/iomap/direct-io.c            |   17 +-
 include/linux/bio.h             |    8 +
 include/linux/fs.h              |    4 +-
 include/linux/iomap.h           |    2 +
 include/trace/events/btrfs.h    |    1 +
 include/uapi/linux/btrfs_tree.h |    9 -
 mm/filemap.c                    |    3 +-
 52 files changed, 3224 insertions(+), 3045 deletions(-)

^ permalink raw reply	[relevance 3%]

* [GIT PULL] Btrfs updates for 5.17
@ 2022-01-10 19:11  3% David Sterba
  0 siblings, 0 replies; 105+ results
From: David Sterba @ 2022-01-10 19:11 UTC (permalink / raw)
  To: torvalds; +Cc: David Sterba, linux-btrfs, linux-kernel

Hi,

the end of the year pull request branch is intentionally not that
exciting. Most of the changes are under the hood, but there are some
minor user visible improvements and several performance improvements
too.

Please pull, thanks.

Features:

- make send work with concurrent block group relocation, not allowed to
  prevent send failing or silently producing some bad stream but with
  more fine grained locking and checks it's possible, the send vs
  deduplication exclusion could reuse the same logic in the future

- new exclusive operation 'balance paused' to allow adding a device to
  filesystem with paused balance

- new sysfs file for fsid stored in the per-device directory to help
  distinguish devices when seeding is enabled, the fsid may differ from
  the one reported by the filesystem

Performance improvements:

- less metadata needed for directory logging, directory deletion is
  20-40% faster

- in zoned mode, cache zone information during mount to speed up
  repeated queries (about 50% speedup)

- free space tree entries get indexed and searched by size (latency
  -30%, search run time -30%)

- less contention in tree node locking when inserting a key and no
  splits are needed (files/sec in fsmark improves by 1-20%)

Fixes:

- fix ENOSPC failure when attempting direct IO write into NOCOW range

- fix deadlock between quota enable and other quota operations

- global reserve minimum calculations fixed to account for free space
  tree

- in zoned mode, fix condition for chunk allocation that may not find
  the right zone for reuse and could lead to early ENOSPC

Core:

- global reserve stealing got simplified and cleaned up in evict

- remove async transaction commit based on manual transaction refs,
  reuse existing kthread and mechanisms to let it commit transaction
  before timeout

- preparatory work for extent tree v2, add wrappers for global tree
  roots, truncation path cleanups

- remove readahead framework, it's a bit overengineered and used only
  for scrub, and yet it does not cover all its needs, there is another
  readahead built in the b-tree search that is now used, performance
  drop on HDD is about 5% which is acceptable and scrub is often
  throttled anyway, on SSDs there's no reported drop but slight
  improvement

- self tests report extent tree state when error occurs

- replace assert with debugging information when an uncommitted
  transaction is found at unmount time

Other:

- error handling improvements

- other cleanups and refactoring

----------------------------------------------------------------
The following changes since commit c9e6606c7fe92b50a02ce51dda82586ebdf99b48:

  Linux 5.16-rc8 (2022-01-02 14:23:25 -0800)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-5.17-tag

for you to fetch changes up to 36c86a9e1be3b29f9f075a946df55dfe1d818019:

  btrfs: output more debug messages for uncommitted transaction (2022-01-07 14:18:27 +0100)

----------------------------------------------------------------
Anand Jain (3):
      btrfs: switch seeding_dev in init_new_device to bool
      btrfs: consolidate device_list_mutex in prepare_sprout to its parent
      btrfs: sysfs: add devinfo/fsid to retrieve actual fsid from the device

Filipe Manana (14):
      btrfs: fix ENOSPC failure when attempting direct IO write into NOCOW range
      btrfs: fix deadlock between quota enable and other quota operations
      btrfs: only copy dir index keys when logging a directory
      btrfs: remove no longer needed logic for replaying directory deletes
      btrfs: reduce the scope of the tree log mutex during transaction commit
      btrfs: make send work with concurrent block group relocation
      btrfs: allow generic_bin_search() to take low boundary as an argument
      btrfs: try to unlock parent nodes earlier when inserting a key
      btrfs: remove useless condition check before splitting leaf
      btrfs: move leaf search logic out of btrfs_search_slot()
      btrfs: remove BUG_ON() after splitting leaf
      btrfs: remove stale comment about locking at btrfs_search_slot()
      btrfs: skip transaction commit after failure to create subvolume
      btrfs: respect the max size in the header when activating swap file

Johannes Thumshirn (4):
      btrfs: zoned: encapsulate inode locking for zoned relocation
      btrfs: zoned: simplify btrfs_check_meta_write_pointer
      btrfs: zoned: sink zone check into btrfs_repair_one_zone
      btrfs: zoned: drop redundant check for REQ_OP_ZONE_APPEND and btrfs_is_zoned

Josef Bacik (63):
      btrfs: use btrfs_item_size_nr/btrfs_item_offset_nr everywhere
      btrfs: add btrfs_set_item_*_nr() helpers
      btrfs: make btrfs_file_extent_inline_item_len take a slot
      btrfs: introduce item_nr token variant helpers
      btrfs: drop the _nr from the item helpers
      btrfs: remove the btrfs_item_end() helper
      btrfs: rename btrfs_item_end_nr to btrfs_item_data_end
      btrfs: handle priority ticket failures in their respective helpers
      btrfs: check for priority ticket granting before flushing
      btrfs: check ticket->steal in steal_from_global_block_rsv
      btrfs: make BTRFS_RESERVE_FLUSH_EVICT use the global rsv stealing code
      btrfs: remove global rsv stealing logic for orphan cleanup
      btrfs: get rid of root->orphan_cleanup_state
      btrfs: change root to fs_info for btrfs_reserve_metadata_bytes
      btrfs: only use ->max_extent_size if it is set in the bitmap
      btrfs: index free space entries on size
      btrfs: add self test for bytes_index free space cache
      btrfs: remove unused BTRFS_FS_BARRIER flag
      btrfs: rework async transaction committing
      btrfs: pass fs_info to trace_btrfs_transaction_commit
      btrfs: remove trans_handle->root
      btrfs: pass the root to add_keyed_refs
      btrfs: move comment in find_parent_nodes()
      btrfs: remove SANITY_TESTS check form find_parent_nodes
      btrfs: remove BUG_ON() in find_parent_nodes()
      btrfs: remove BUG_ON(!eie) in find_parent_nodes
      btrfs: add a btrfs_block_group_root() helper
      btrfs: make remove_extent_backref pass the root
      btrfs: use chunk_root in find_free_extent_update_loop
      btrfs: do not special case the extent root for switch commit roots
      btrfs: remove unnecessary extent root check in btrfs_defrag_leaves
      btrfs: don't use the extent root in btrfs_chunk_alloc_add_chunk_item
      btrfs: don't use extent_root in iterate_extent_inodes
      btrfs: don't use the extent_root in flush_space
      btrfs: init root block_rsv at init root time
      btrfs: stop accessing ->extent_root directly
      btrfs: fix csum assert to check objectid of the root
      btrfs: set BTRFS_FS_STATE_NO_CSUMS if we fail to load the csum root
      btrfs: stop accessing ->csum_root directly
      btrfs: stop accessing ->free_space_root directly
      btrfs: remove useless WARN_ON in record_root_in_trans
      btrfs: track the csum, extent, and free space trees in a rb tree
      btrfs: check the root node for uptodate before returning it
      btrfs: add an inode-item.h
      btrfs: move btrfs_truncate_inode_items to inode-item.c
      btrfs: move extent locking outside of btrfs_truncate_inode_items
      btrfs: remove free space cache inode check in btrfs_truncate_inode_items
      btrfs: move btrfs_kill_delayed_inode_items into evict
      btrfs: remove found_extent from btrfs_truncate_inode_items
      btrfs: add truncate control struct
      btrfs: only update i_size in truncate paths that care
      btrfs: only call inode_sub_bytes in truncate paths that care
      btrfs: control extent reference updates with a control flag for truncate
      btrfs: use a flag to control when to clear the file extent range
      btrfs: pass the ino via truncate control
      btrfs: add inode to truncate control
      btrfs: convert BUG_ON() in btrfs_truncate_inode_items to ASSERT
      btrfs: convert BUG() for pending_del_nr into an ASSERT
      btrfs: combine extra if statements in btrfs_truncate_inode_items
      btrfs: make should_throttle loop local in btrfs_truncate_inode_items
      btrfs: do not check -EAGAIN when truncating inodes in the log root
      btrfs: include the free space tree in the global rsv minimum calculation
      btrfs: reserve extra space for the free space tree

Naohiro Aota (4):
      btrfs: zoned: cache reported zone during mount
      btrfs: zoned: unset dedicated block group on allocation failure
      btrfs: add extent allocator hook to decide to allocate chunk or not
      btrfs: zoned: fix chunk allocation condition for zoned allocator

Nikolay Borisov (11):
      btrfs: remove spurious unlock/lock of unused_bgs_lock
      btrfs: get next entry in tree_search_offset before doing checks
      btrfs: eliminate if in main loop in tree_search_offset
      btrfs: consolidate bitmap_clear_bits/__bitmap_clear_bits
      btrfs: consolidate unlink_free_space/__unlink_free_space functions
      btrfs: make __btrfs_add_free_space take just block group reference
      btrfs: change name and type of private member of btrfs_free_space_ctl
      btrfs: introduce exclusive operation BALANCE_PAUSED state
      btrfs: make device add compatible with paused balance in btrfs_exclop_start_try_lock
      btrfs: allow device add if balance is paused
      btrfs: refactor unlock_up

Omar Sandoval (2):
      btrfs: send: remove unused found_type parameter to lookup_dir_item_inode()
      btrfs: send: remove unused type parameter to iterate_inode_ref_t

Qu Wenruo (11):
      btrfs: remove unnecessary @nr_written parameters
      btrfs: don't check stripe length if the profile is not stripe based
      btrfs: update SCRUB_MAX_PAGES_PER_BLOCK
      btrfs: scrub: merge SCRUB_PAGES_PER_RD_BIO and SCRUB_PAGES_PER_WR_BIO
      btrfs: scrub: remove the unnecessary path parameter for scrub_raid56_parity()
      btrfs: scrub: use btrfs_path::reada for extent tree readahead
      btrfs: remove reada infrastructure
      btrfs: scrub: cleanup the argument list of scrub_chunk()
      btrfs: scrub: cleanup the argument list of scrub_stripe()
      btrfs: selftests: dump extent io tree if extent-io-tree test failed
      btrfs: output more debug messages for uncommitted transaction

Su Yue (2):
      btrfs: remove unused parameter fs_devices from btrfs_init_workqueues
      btrfs: remove unnecessary parameter type from compression_decompress_bio

Yang Li (1):
      btrfs: fix argument list that the kdoc format and script verified

 fs/btrfs/Makefile                      |    2 +-
 fs/btrfs/backref.c                     |   77 ++-
 fs/btrfs/block-group.c                 |   35 +-
 fs/btrfs/block-rsv.c                   |   84 ++-
 fs/btrfs/block-rsv.h                   |    5 +-
 fs/btrfs/btrfs_inode.h                 |   18 +-
 fs/btrfs/compression.c                 |   11 +-
 fs/btrfs/ctree.c                       |  548 ++++++++++------
 fs/btrfs/ctree.h                       |  156 ++---
 fs/btrfs/delalloc-space.c              |    2 +-
 fs/btrfs/delayed-inode.c               |    3 +-
 fs/btrfs/delayed-ref.c                 |   25 +-
 fs/btrfs/dev-replace.c                 |   11 +-
 fs/btrfs/dir-item.c                    |   12 +-
 fs/btrfs/disk-io.c                     |  382 ++++++++---
 fs/btrfs/disk-io.h                     |   11 +
 fs/btrfs/extent-tree.c                 |  144 +++--
 fs/btrfs/extent_io.c                   |   52 +-
 fs/btrfs/file-item.c                   |   33 +-
 fs/btrfs/free-space-cache.c            |  322 ++++++----
 fs/btrfs/free-space-cache.h            |   10 +-
 fs/btrfs/free-space-tree.c             |   50 +-
 fs/btrfs/inode-item.c                  |  344 +++++++++-
 fs/btrfs/inode-item.h                  |   96 +++
 fs/btrfs/inode.c                       |  643 +++++--------------
 fs/btrfs/ioctl.c                       |   71 ++-
 fs/btrfs/print-tree.c                  |    8 +-
 fs/btrfs/props.c                       |    7 +-
 fs/btrfs/qgroup.c                      |   24 +-
 fs/btrfs/reada.c                       | 1086 --------------------------------
 fs/btrfs/ref-verify.c                  |    8 +-
 fs/btrfs/reflink.c                     |    2 +-
 fs/btrfs/relocation.c                  |   41 +-
 fs/btrfs/root-tree.c                   |    6 +-
 fs/btrfs/scrub.c                       |  230 +++----
 fs/btrfs/send.c                        |  417 +++++++++---
 fs/btrfs/space-info.c                  |   93 +--
 fs/btrfs/space-info.h                  |    2 +-
 fs/btrfs/super.c                       |    1 -
 fs/btrfs/sysfs.c                       |   11 +
 fs/btrfs/tests/btrfs-tests.c           |    1 +
 fs/btrfs/tests/extent-buffer-tests.c   |   17 +-
 fs/btrfs/tests/extent-io-tests.c       |   52 ++
 fs/btrfs/tests/free-space-tests.c      |  186 +++++-
 fs/btrfs/tests/free-space-tree-tests.c |    5 +-
 fs/btrfs/tests/qgroup-tests.c          |    5 +-
 fs/btrfs/transaction.c                 |  162 ++---
 fs/btrfs/transaction.h                 |    3 +-
 fs/btrfs/tree-checker.c                |   56 +-
 fs/btrfs/tree-defrag.c                 |    8 -
 fs/btrfs/tree-log.c                    |  619 +++++++++---------
 fs/btrfs/uuid-tree.c                   |   10 +-
 fs/btrfs/verity.c                      |    2 +-
 fs/btrfs/volumes.c                     |  121 ++--
 fs/btrfs/volumes.h                     |    9 +-
 fs/btrfs/xattr.c                       |    8 +-
 fs/btrfs/zoned.c                       |  120 +++-
 fs/btrfs/zoned.h                       |   30 +-
 include/trace/events/btrfs.h           |   10 +-
 include/uapi/linux/btrfs_tree.h        |    4 +-
 60 files changed, 3278 insertions(+), 3233 deletions(-)
 create mode 100644 fs/btrfs/inode-item.h
 delete mode 100644 fs/btrfs/reada.c

^ permalink raw reply	[relevance 3%]

* [GIT PULL] Btrfs updates
@ 2012-12-17 21:44  3% Chris Mason
  0 siblings, 0 replies; 105+ results
From: Chris Mason @ 2012-12-17 21:44 UTC (permalink / raw)
  To: Linus Torvalds, LKML, Btrfs

[ sorry, resend.  My lbdb autocompleted with an extra r in kernel.org ]

Hi everyone,

My for-linus branch has a big set of fixes and features:

git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git for-linus

This was against 3.7, and it has two easy conflicts against Linus'
current head.  My -next branch has the resolutions, but Linus wills
surely fix these himself.

In terms of line count, most of the code comes from Stefan, who added
the ability to replace a single drive in place.  This is different from
how btrfs normally replaces drives, and is much much much faster.

Josef is plowing through our synchronous write performance.  This pull
request does not include the DIO_OWN_WAITING patch that was discussed on
the list, but it has a number of other improvements to cut down our
latencies and CPU time during fsync/O_DIRECT writes.

Miao Xie has a big series of fixes and is spreading out ordered
operations over more CPUs.  This improves performance and reduces
contention.

I've put in fixes for error handling around hash collisions.  These are
going back to individual stable kernels as I test against them.

Otherwise we have a lot of fixes and cleanups, thanks everyone!  raid5/6
is being rebased against the device replacement code.  I'll have it
posted this Friday along with a nice series of benchmarks.

Stefan Behrens (33) commits (+3446/-831):
    Btrfs: change core code of btrfs to support the device replace operations (+111/-14)
    Btrfs: allow repair code to include target disk when searching mirrors (+154/-5)
    Btrfs: changes to live filesystem are also written to replacement disk (+49/-1)
    Btrfs: introduce GET_READ_MIRRORS functionality for btrfs_map_block() (+11/-7)
    Btrfs: remove the block device pointer from the scrub context struct (+73/-60)
    Btrfs: disallow some operations on the device replace target device (+54/-18)
    Btrfs: disallow mutually exclusive admin operations from user mode (+40/-17)
    Btrfs: Pass fs_info to btrfs_num_copies() instead of mapping_tree (+15/-15)
    Btrfs: fix BUG() in scrub when first superblock reading gives EIO (+11/-0)
    Btrfs: pass fs_info to btrfs_map_block() instead of mapping_tree (+32/-37)
    Btrfs: Don't trust the superblock label and simply printk("%s") it (+5/-2)
    Btrfs: don't allow degraded mount if too many devices are missing (+16/-0)
    Btrfs: optionally avoid reads from device replace source drive (+35/-11)
    Btrfs: fix race in check-integrity caused by usage of bitfield (+1/-1)
    Btrfs: in scrub repair code, optimize the reading of mirrors (+12/-23)
    Btrfs: add code to scrub to copy read data to another disk (+851/-73)
    Btrfs: in scrub repair code, simplify alloc error handling (+26/-35)
    Btrfs: enhance btrfs structures for device replace support (+44/-0)
    Btrfs: make the scrub page array dynamically allocated (+121/-74)
    Btrfs: increase BTRFS_MAX_MIRRORS by one for dev replace (+1/-1)
    Btrfs: handle errors from btrfs_map_bio() everywhere (+65/-33)
    Btrfs: avoid risk of a deadlock in btrfs_handle_error (+10/-1)
    Btrfs: fix a scrub regression in case of write errors (+2/-1)
    Btrfs: add new sources for device replace code (+1069/-1)
    Btrfs: move some common code into a subfunction (+50/-43)
    Btrfs: introduce a btrfs_dev_replace_item type (+69/-0)
    Btrfs: add btrfs_scratch_superblock() function (+19/-0)
    Btrfs: cleanup scrub bio and worker wait code (+71/-35)
    Btrfs: fix a build warning for an unused label (+0/-1)
    Btrfs: add support for device replace ioctls (+52/-3)
    Btrfs: rename the scrub context structure (+253/-253)
    Btrfs: add two more find_device() methods (+64/-0)
    Btrfs: pass fs_info instead of root (+60/-66)

Miao Xie (32) commits (+840/-471):
    Btrfs: fix missing reserved space release in error path of delalloc reservation (+7/-0)
    Btrfs: fix off-by-one error of the same page check in btrfs_punch_hole() (+2/-2)
    Btrfs: fix unprotected extent map operation when logging file extents (+2/-0)
    Btrfs: fix unnecessary while loop when search the free space, cache (+10/-20)
    Btrfs: fix off-by-one error of the reserved size of btrfs_allocate() (+2/-2)
    Btrfs: fix joining the same transaction handler more than 2 times (+48/-30)
    Btrfs: fix missing log when BTRFS_INODE_NEEDS_FULL_SYNC is set (+4/-1)
    Btrfs: pass root object into btrfs_ioctl_{start, wait}_sync() (+6/-6)
    Btrfs: get write access when setting the default subvolume (+28/-12)
    Btrfs: make ordered operations be handled by multi-task (+45/-21)
    Btrfs: fix wrong return value of btrfs_wait_for_commit() (+8/-7)
    Btrfs: don't start a new transaction when starting sync (+18/-9)
    Btrfs: fix missing flush when committing a transaction (+47/-35)
    Btrfs: fix wrong return value of btrfs_truncate_page() (+1/-2)
    Btrfs: make delalloc inodes be flushed by multi-task (+103/-8)
    Btrfs: use existing align macros in btrfs_allocate() (+4/-4)
    Btrfs: make ordered extent be flushed by multi-task (+37/-9)
    Btrfs: don't auto defrag a file when doing directIO (+0/-3)
    Btrfs: fix unprotected defragable inode insertion (+55/-15)
    Btrfs: restructure btrfs_run_defrag_inodes() (+109/-91)
    Btrfs: get write access for qgroup operations (+48/-25)
    Btrfs: get write access when removing a device (+8/-4)
    Btrfs: cleanup duplicated division functions (+46/-40)
    Btrfs: punch hole past the end of the file (+12/-10)
    Btrfs: use slabs for auto defrag allocation (+34/-5)
    Btrfs: get write access when doing resize fs (+8/-2)
    Btrfs: fix wrong comment in can_overcommit() (+3/-3)
    Btrfs: improve the noflush reservation (+97/-86)
    Btrfs: fix the page that is beyond EOF (+9/-7)
    Btrfs: fix wrong file extent length (+23/-9)
    Btrfs: get write access for scrub (+13/-3)
    Btrfs: fix freeze vs auto defrag (+3/-0)

Josef Bacik (18) commits (+805/-361):
    Btrfs: don't take inode delalloc mutex if we're a free space inode (+19/-6)
    Btrfs: only clear dirty on the buffer if it is marked as dirty (+4/-4)
    Btrfs: recheck bio against block device when we map the bio (+131/-28)
    Btrfs: do not mark ems as prealloc if we are writing to them (+5/-4)
    Btrfs: don't bother copying if we're only logging the inode (+34/-6)
    Btrfs: log changed inodes based on the extent map tree (+372/-210)
    Btrfs: only log the inode item if we can get away with it (+11/-2)
    Btrfs: keep track of the extents original block length (+24/-4)
    Btrfs: fill the global reserve when unpinning space (+24/-5)
    Btrfs: do not call file_update_time in aio_write (+48/-29)
    Btrfs: use tokens where we can in the tree log (+73/-54)
    Btrfs: move checks in set_page_dirty under DEBUG (+2/-0)
    Btrfs: only unlock and relock if we have to (+4/-1)
    Btrfs: fix autodefrag and umount lockup (+17/-2)
    Btrfs: inline csums if we're fsyncing (+21/-1)
    Btrfs: add path->really_keep_locks (+6/-2)
    Btrfs: optimize leaf_space_used (+9/-2)
    Btrfs: don't memset new tokens (+1/-1)

Liu Bo (17) commits (+124/-151):
    Btrfs: MOD_LOG_KEY_REMOVE_WHILE_MOVING never change node's nritems (+2/-2)
    Btrfs: fix a double free on pending snapshots in error handling (+5/-1)
    Btrfs: reorder tree mod log operations in deleting a pointer (+6/-4)
    Btrfs: fix a deadlock in aborting transaction due to ENOSPC (+7/-0)
    Btrfs: skip adding an acl attribute if we don't have to (+2/-0)
    Btrfs: get right arguments for btrfs_wait_ordered_range (+1/-1)
    Btrfs: parse parent 0 into correct value in tracepoint (+2/-1)
    Btrfs: do not log extents when we only log new names (+2/-1)
    Btrfs: put raid properties into global table (+29/-33)
    Btrfs: cleanup for btrfs_btree_balance_dirty (+34/-81)
    Btrfs: kill unnecessary arguments in del_ptr (+7/-9)
    Btrfs: don't add a NULL extended attribute (+10/-0)
    Btrfs: protect devices list with its mutex (+5/-4)
    Btrfs: cleanup for btrfs_wait_order_range (+0/-3)
    Btrfs: fix an while-loop of listxattr (+1/-1)
    Btrfs: fix a bug of per-file nocow (+5/-3)
    Btrfs: cleanup unused arguments (+6/-7)

Filipe Brandenburger (3) commits (+21/-12):
    Btrfs: refactor error handling to drop inode in btrfs_create() (+11/-12)
    Btrfs: fix permissions of empty files not affected by umask (+4/-0)
    Btrfs: fix permissions of empty files not affected by umask (+6/-0)

Julia Lawall (2) commits (+26/-48):
    fs/btrfs: drop if around WARN_ON (+5/-10)
    fs/btrfs: use WARN (+21/-38)

Wang Sheng-Hui (2) commits (+9/-12):
    Btrfs: use ctl->unit for free space calculation instead of block_group->sectorsize (+9/-11)
    Btrfs: do not warn_on io_ctl->cur in io_ctl_map_page (+0/-1)

Tsutomu Itoh (2) commits (+11/-0):
    Btrfs: set hole punching time properly (+3/-0)
    Btrfs: add fiemap's flag check (+8/-0)

Lukas Czerner (1) commits (+16/-0):
    btrfs: Notify udev when removing device

Anand Jain (1) commits (+16/-16):
    Btrfs: rename root_times_lock to root_item_lock

Alexander Block (1) commits (+11/-2):
    Btrfs: merge inode_list in __merge_refs

Chris Mason (1) commits (+95/-2):
    Btrfs: fix hash overflow handling

Masanari Iida (1) commits (+2/-2):
    Btrfs: Fix typo in fs/btrfs

jeff.liu (1) commits (+1/-4):
    Btrfs: Remove the invalid shrink size check up from btrfs_shrink_dev()

Total: (115) commits (+5423/-1912)

 fs/btrfs/Makefile            |    2 +-
 fs/btrfs/acl.c               |    2 +
 fs/btrfs/backref.c           |   16 +-
 fs/btrfs/btrfs_inode.h       |    4 +
 fs/btrfs/check-integrity.c   |   31 +-
 fs/btrfs/compression.c       |    6 +-
 fs/btrfs/ctree.c             |  241 ++++--
 fs/btrfs/ctree.h             |  184 ++++-
 fs/btrfs/delayed-inode.c     |   11 +-
 fs/btrfs/dev-replace.c       |  856 ++++++++++++++++++++
 fs/btrfs/dev-replace.h       |   44 +
 fs/btrfs/dir-item.c          |   59 ++
 fs/btrfs/disk-io.c           |  142 ++--
 fs/btrfs/disk-io.h           |    4 +-
 fs/btrfs/extent-tree.c       |  227 +++---
 fs/btrfs/extent_io.c         |   37 +-
 fs/btrfs/extent_io.h         |    4 +-
 fs/btrfs/extent_map.c        |   24 +-
 fs/btrfs/extent_map.h        |    2 +
 fs/btrfs/file-item.c         |   21 +-
 fs/btrfs/file.c              |  406 ++++++----
 fs/btrfs/free-space-cache.c  |   51 +-
 fs/btrfs/inode-map.c         |    5 +-
 fs/btrfs/inode.c             |  484 ++++++-----
 fs/btrfs/ioctl.c             |  317 ++++++--
 fs/btrfs/ioctl.h             |   48 +-
 fs/btrfs/math.h              |   44 +
 fs/btrfs/ordered-data.c      |   90 ++-
 fs/btrfs/ordered-data.h      |    7 +-
 fs/btrfs/print-tree.c        |    3 +
 fs/btrfs/reada.c             |   31 +-
 fs/btrfs/relocation.c        |   40 +-
 fs/btrfs/root-tree.c         |    4 +-
 fs/btrfs/scrub.c             | 1836 ++++++++++++++++++++++++++++++------------
 fs/btrfs/send.c              |    8 +-
 fs/btrfs/super.c             |   48 +-
 fs/btrfs/transaction.c       |  170 ++--
 fs/btrfs/transaction.h       |    2 +-
 fs/btrfs/tree-log.c          |  477 ++++++-----
 fs/btrfs/volumes.c           |  966 +++++++++++++++++-----
 fs/btrfs/volumes.h           |   35 +-
 fs/btrfs/xattr.c             |   13 +-
 include/trace/events/btrfs.h |    3 +-
 43 files changed, 5258 insertions(+), 1747 deletions(-)
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[relevance 3%]

* [GIT PULL] Btrfs updates for 5.15
@ 2021-08-30 13:18  3% David Sterba
  0 siblings, 0 replies; 105+ results
From: David Sterba @ 2021-08-30 13:18 UTC (permalink / raw)
  To: torvalds; +Cc: David Sterba, linux-btrfs, linux-kernel

Hi,

the highlights of this round are integrations with fs-verity and
idmapped mounts, the rest is usual mix of minor improvements, speedups
and cleanups.

Please note there are some patches outside of btrfs, namely updating
some VFS interfaces, all straightforward and acked.

Please pull, thanks.

---
Features:

- fs-verity support, using standard ioctls, backward compatible with
  read-only limitation on inodes with previously enabled fs-verity

- idmapped mount support

- make mount with rescue=ibadroots more tolerant to partially damaged
  trees

- allow raid0 on a single device and raid10 on two devices, degenerate
  cases but might be useful as an intermediate step during conversion to
  other profiles

- zoned mode block group auto reclaim can be disabled via sysfs knob

Performance improvements:

- continue readahead of node siblings even if target node is in memory,
  could speed up full send (on sample test +11%)

- batching of delayed items can speed up creating many files

- fsync/tree-log speedups
  - avoid unnecessary work (gains +2% throughput, -2% run time on
    sample load)
  - reduced lock contention on renames (on dbench +4% throughput, up to
    -30% latency)

Fixes:

- various zoned mode fixes

- preemptive flushing threshold tuning, avoid excessive work on almost
  full filesystems

Core:

- continued subpage support, preparation for implementing remaining
  features like compression and defragmentation; with some limitations,
  write is now enabled on 64K page systems with 4K sectors, still
  considered experimental
  - no readahead on compressed reads
  - inline extents disabled
  - disabled raid56 profile conversion and mount

- improved flushing logic, fixing early ENOSPC on some workloads

- inode flags have been internally split to read-only and read-write
  incompat bit parts, used by fs-verity

- new tree items for fs-verity
  - descriptor item
  - Merkle tree item

- inode operations extended to be namespace-aware

- cleanups and refactoring

Generic code changes:

- fs: new export filemap_fdatawrite_wbc

- fs: removed sync_inode

- block: bio_trim argument type fixups

- vfs: add namespace-aware lookup

----------------------------------------------------------------
The following changes since commit e22ce8eb631bdc47a4a4ea7ecf4e4ba499db4f93:

  Linux 5.14-rc7 (2021-08-22 14:24:56 -0700)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-5.15-tag

for you to fetch changes up to 0d977e0eba234e01a60bdde27314dc21374201b3:

  btrfs: reset replace target device to allocation state on close (2021-08-23 13:57:18 +0200)

----------------------------------------------------------------
Anand Jain (4):
      btrfs: check-integrity: drop unnecessary function prototypes
      btrfs: cleanup fs_devices pointer usage in btrfs_trim_fs
      btrfs: simplify return values in btrfs_check_raid_min_devices
      btrfs: sysfs: document structures and their associated files

Boris Burkov (3):
      btrfs: add ro compat flags to inodes
      btrfs: initial fsverity support
      btrfs: verity metadata orphan items

Chaitanya Kulkarni (2):
      block: fix argument type of bio_trim()
      btrfs: fix argument type of btrfs_bio_clone_partial()

Christian Brauner (20):
      namei: add mapping aware lookup helper
      btrfs: handle idmaps in btrfs_new_inode()
      btrfs: allow idmapped rename inode op
      btrfs: allow idmapped getattr inode op
      btrfs: allow idmapped mknod inode op
      btrfs: allow idmapped create inode op
      btrfs: allow idmapped mkdir inode op
      btrfs: allow idmapped symlink inode op
      btrfs: allow idmapped tmpfile inode op
      btrfs: allow idmapped setattr inode op
      btrfs: allow idmapped permission inode op
      btrfs: check whether fsgid/fsuid are mapped during subvolume creation
      btrfs: allow idmapped SNAP_CREATE/SUBVOL_CREATE ioctls
      btrfs: allow idmapped SNAP_DESTROY ioctls
      btrfs: relax restrictions for SNAP_DESTROY_V2 with subvolids
      btrfs: allow idmapped SET_RECEIVED_SUBVOL ioctls
      btrfs: allow idmapped SUBVOL_SETFLAGS ioctl
      btrfs: allow idmapped INO_LOOKUP_USER ioctl
      btrfs: handle ACLs on idmapped mounts
      btrfs: allow idmapped mount

David Sterba (18):
      btrfs: add special case to setget helpers for 64k pages
      btrfs: drop from __GFP_HIGHMEM all allocations
      btrfs: compression: drop kmap/kunmap from lzo
      btrfs: compression: drop kmap/kunmap from zlib
      btrfs: compression: drop kmap/kunmap from zstd
      btrfs: compression: drop kmap/kunmap from generic helpers
      btrfs: check-integrity: drop kmap/kunmap for block pages
      btrfs: switch uptodate to bool in btrfs_writepage_endio_finish_ordered
      btrfs: remove uptodate parameter from btrfs_dec_test_first_ordered_pending
      btrfs: make btrfs_next_leaf static inline
      btrfs: tree-checker: use table values for stripe checks
      btrfs: tree-checker: add missing stripe checks for raid1c3/4 profiles
      btrfs: uninline btrfs_bg_flags_to_raid_index
      btrfs: merge alloc_device helpers
      btrfs: simplify data stripe calculation helpers
      btrfs: constify and cleanup variables in comparators
      btrfs: allow degenerate raid0/raid10
      btrfs: print if fsverity support is built in when loading module

Desmond Cheong Zhi Xi (1):
      btrfs: reset replace target device to allocation state on close

Filipe Manana (14):
      btrfs: continue readahead of siblings even if target node is in memory
      btrfs: improve the batch insertion of delayed items
      btrfs: stop doing GFP_KERNEL memory allocations in the ref verify tool
      btrfs: remove racy and unnecessary inode transaction update when using no-holes
      btrfs: avoid unnecessary log mutex contention when syncing log
      btrfs: remove unnecessary list head initialization when syncing log
      btrfs: avoid unnecessary lock and leaf splits when updating inode in the log
      btrfs: remove ignore_offset argument from btrfs_find_all_roots()
      btrfs: eliminate some false positives when checking if inode was logged
      btrfs: do not pin logs too early during renames
      btrfs: remove unnecessary NULL check for the new inode during rename exchange
      btrfs: remove no longer needed full sync flag check at inode_logged()
      btrfs: update comment at log_conflicting_inodes()
      btrfs: avoid unnecessarily logging directories that had no changes

Goldwyn Rodrigues (4):
      btrfs: allocate file_ra_state on stack in readahead_cache
      btrfs: allocate btrfs_ioctl_quota_rescan_args on stack
      btrfs: allocate btrfs_ioctl_defrag_range_args on stack
      btrfs: allocate backref_ctx on stack in find_extent_clone

Johannes Thumshirn (2):
      btrfs: zoned: remove max_zone_append_size logic
      btrfs: zoned: allow disabling of zone auto reclaim

Josef Bacik (11):
      btrfs: wake up async_delalloc_pages waiters after submit
      btrfs: include delalloc related info in dump space info tracepoint
      btrfs: enable a tracepoint when we fail tickets
      btrfs: use delalloc_bytes to determine flush amount for shrink_delalloc
      btrfs: wait on async extents when flushing delalloc
      fs: add a filemap_fdatawrite_wbc helper
      btrfs: use the filemap_fdatawrite_wbc helper for delalloc shrinking
      9p: migrate from sync_inode to filemap_fdatawrite_wbc
      fs: kill sync_inode
      btrfs: reduce the preemptive flushing threshold to 90%
      btrfs: do not do preemptive flushing if the majority is global rsv

Marcos Paulo de Souza (7):
      btrfs: remove max argument from generic_bin_search
      btrfs: pass NULL as trans to btrfs_search_slot if we only want to search
      btrfs: use btrfs_next_leaf instead of btrfs_next_item when slots > nritems
      btrfs: remove unneeded return variable in btrfs_lookup_file_extent
      btrfs: introduce btrfs_lookup_match_dir
      btrfs: introduce btrfs_search_backwards function
      btrfs: tree-log: check btrfs_lookup_data_extent return value

Naohiro Aota (5):
      btrfs: drop unnecessary ASSERT from btrfs_submit_direct()
      btrfs: zoned: suppress reclaim error message on EAGAIN
      btrfs: zoned: fix block group alloc_offset calculation
      btrfs: zoned: add asserts on splitting extent_map
      btrfs: zoned: fix ordered extent boundary calculation

Nikolay Borisov (1):
      btrfs: make btrfs_finish_chunk_alloc private to block-group.c

Qu Wenruo (22):
      btrfs: rescue: allow ibadroots to skip bad extent tree when reading block group items
      btrfs: remove unused start and end parameters from btrfs_run_delalloc_range()
      btrfs: reset this_bio_flag to avoid inheriting old flags
      btrfs: subpage: check if there are compressed extents inside one page
      btrfs: disable compressed readahead for subpage
      btrfs: grab correct extent map for subpage compressed extent read
      btrfs: rework btrfs_decompress_buf2page()
      btrfs: rework lzo_decompress_bio() to make it subpage compatible
      btrfs: reloc: factor out relocation page read and dirty part
      btrfs: make relocate_one_page() handle subpage case
      btrfs: subpage: fix writeback which does not have ordered extent
      btrfs: subpage: disable inline extent creation
      btrfs: subpage: allow submit_extent_page() to do bio split
      btrfs: subpage: reject raid56 filesystem and profile conversion
      btrfs: subpage: fix race between prepare_pages() and btrfs_releasepage()
      btrfs: subpage: fix a potential use-after-free in writeback helper
      btrfs: subpage: fix false alert when relocating partial preallocated data extents
      btrfs: subpage: fix relocation potentially overwriting last page data
      btrfs: allow read-write for 4K sectorsize on 64K page size systems
      btrfs: unify regular and subpage error paths in __extent_writepage()
      btrfs: remove the dead comment in writepage_delalloc()
      btrfs: fix NULL pointer dereference when deleting device by invalid id

 block/bio.c                     |  12 +-
 fs/9p/vfs_file.c                |   7 +-
 fs/btrfs/Makefile               |   1 +
 fs/btrfs/acl.c                  |  11 +-
 fs/btrfs/backref.c              |   6 +-
 fs/btrfs/backref.h              |   2 +-
 fs/btrfs/block-group.c          | 114 +++++-
 fs/btrfs/btrfs_inode.h          |  27 +-
 fs/btrfs/check-integrity.c      |  60 +--
 fs/btrfs/compression.c          | 169 ++++-----
 fs/btrfs/compression.h          |   5 +-
 fs/btrfs/ctree.c                |  62 +--
 fs/btrfs/ctree.h                |  94 +++--
 fs/btrfs/delayed-inode.c        | 227 ++++-------
 fs/btrfs/dir-item.c             |  76 ++--
 fs/btrfs/disk-io.c              |  13 +-
 fs/btrfs/extent-tree.c          |  12 +-
 fs/btrfs/extent_io.c            | 318 +++++++++++-----
 fs/btrfs/extent_io.h            |   2 +-
 fs/btrfs/file-item.c            |   5 +-
 fs/btrfs/file.c                 |  23 +-
 fs/btrfs/free-space-cache.c     |  26 +-
 fs/btrfs/inode.c                | 295 +++++++++++----
 fs/btrfs/ioctl.c                | 188 +++++-----
 fs/btrfs/lzo.c                  | 236 +++++-------
 fs/btrfs/ordered-data.c         |   5 +-
 fs/btrfs/ordered-data.h         |   2 +-
 fs/btrfs/qgroup.c               |   8 +-
 fs/btrfs/raid56.c               |  18 +-
 fs/btrfs/ref-verify.c           |  10 +-
 fs/btrfs/relocation.c           | 306 +++++++++------
 fs/btrfs/send.c                 |  35 +-
 fs/btrfs/space-info.c           |  98 ++++-
 fs/btrfs/struct-funcs.c         |   8 +-
 fs/btrfs/subpage.c              |  24 +-
 fs/btrfs/subpage.h              |   3 +
 fs/btrfs/super.c                |  56 ++-
 fs/btrfs/sysfs.c                | 108 +++++-
 fs/btrfs/tests/qgroup-tests.c   |  30 +-
 fs/btrfs/tree-checker.c         |  38 +-
 fs/btrfs/tree-log.c             | 102 +++--
 fs/btrfs/verity.c               | 811 ++++++++++++++++++++++++++++++++++++++++
 fs/btrfs/volumes.c              | 234 ++++--------
 fs/btrfs/volumes.h              |  29 +-
 fs/btrfs/zlib.c                 |  54 +--
 fs/btrfs/zoned.c                |  22 +-
 fs/btrfs/zoned.h                |   1 -
 fs/btrfs/zstd.c                 |  39 +-
 fs/fs-writeback.c               |  19 +-
 fs/namei.c                      |  43 ++-
 include/linux/bio.h             |   2 +-
 include/linux/blk_types.h       |   1 +
 include/linux/fs.h              |   3 +-
 include/linux/namei.h           |   1 +
 include/trace/events/btrfs.h    |  21 +-
 include/uapi/linux/btrfs.h      |   1 +
 include/uapi/linux/btrfs_tree.h |  35 ++
 mm/filemap.c                    |  36 +-
 58 files changed, 2769 insertions(+), 1425 deletions(-)
 create mode 100644 fs/btrfs/verity.c

^ permalink raw reply	[relevance 3%]

* [GIT PULL] Btrfs updates
@ 2012-12-17 21:28  3% Chris Mason
  0 siblings, 0 replies; 105+ results
From: Chris Mason @ 2012-12-17 21:28 UTC (permalink / raw)
  To: Linus Torvalds, LKML, Btrfs

Hi everyone,

My for-linus branch has a big set of fixes and features:

git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git for-linus

This was against 3.7, and it has two easy conflicts against Linus'
current head.  My -next branch has the resolutions, but Linus wills
surely fix these himself.

In terms of line count, most of the code comes from Stefan, who added
the ability to replace a single drive in place.  This is different from
how btrfs normally replaces drives, and is much much much faster.

Josef is plowing through our synchronous write performance.  This pull
request does not include the DIO_OWN_WAITING patch that was discussed on
the list, but it has a number of other improvements to cut down our
latencies and CPU time during fsync/O_DIRECT writes.

Miao Xie has a big series of fixes and is spreading out ordered
operations over more CPUs.  This improves performance and reduces
contention.

I've put in fixes for error handling around hash collisions.  These are
going back to individual stable kernels as I test against them.

Otherwise we have a lot of fixes and cleanups, thanks everyone!  raid5/6
is being rebased against the device replacement code.  I'll have it
posted this Friday along with a nice series of benchmarks.

Stefan Behrens (33) commits (+3446/-831):
    Btrfs: change core code of btrfs to support the device replace operations (+111/-14)
    Btrfs: allow repair code to include target disk when searching mirrors (+154/-5)
    Btrfs: changes to live filesystem are also written to replacement disk (+49/-1)
    Btrfs: introduce GET_READ_MIRRORS functionality for btrfs_map_block() (+11/-7)
    Btrfs: remove the block device pointer from the scrub context struct (+73/-60)
    Btrfs: disallow some operations on the device replace target device (+54/-18)
    Btrfs: disallow mutually exclusive admin operations from user mode (+40/-17)
    Btrfs: Pass fs_info to btrfs_num_copies() instead of mapping_tree (+15/-15)
    Btrfs: fix BUG() in scrub when first superblock reading gives EIO (+11/-0)
    Btrfs: pass fs_info to btrfs_map_block() instead of mapping_tree (+32/-37)
    Btrfs: Don't trust the superblock label and simply printk("%s") it (+5/-2)
    Btrfs: don't allow degraded mount if too many devices are missing (+16/-0)
    Btrfs: optionally avoid reads from device replace source drive (+35/-11)
    Btrfs: fix race in check-integrity caused by usage of bitfield (+1/-1)
    Btrfs: in scrub repair code, optimize the reading of mirrors (+12/-23)
    Btrfs: add code to scrub to copy read data to another disk (+851/-73)
    Btrfs: in scrub repair code, simplify alloc error handling (+26/-35)
    Btrfs: enhance btrfs structures for device replace support (+44/-0)
    Btrfs: make the scrub page array dynamically allocated (+121/-74)
    Btrfs: increase BTRFS_MAX_MIRRORS by one for dev replace (+1/-1)
    Btrfs: handle errors from btrfs_map_bio() everywhere (+65/-33)
    Btrfs: avoid risk of a deadlock in btrfs_handle_error (+10/-1)
    Btrfs: fix a scrub regression in case of write errors (+2/-1)
    Btrfs: add new sources for device replace code (+1069/-1)
    Btrfs: move some common code into a subfunction (+50/-43)
    Btrfs: introduce a btrfs_dev_replace_item type (+69/-0)
    Btrfs: add btrfs_scratch_superblock() function (+19/-0)
    Btrfs: cleanup scrub bio and worker wait code (+71/-35)
    Btrfs: fix a build warning for an unused label (+0/-1)
    Btrfs: add support for device replace ioctls (+52/-3)
    Btrfs: rename the scrub context structure (+253/-253)
    Btrfs: add two more find_device() methods (+64/-0)
    Btrfs: pass fs_info instead of root (+60/-66)

Miao Xie (32) commits (+840/-471):
    Btrfs: fix missing reserved space release in error path of delalloc reservation (+7/-0)
    Btrfs: fix off-by-one error of the same page check in btrfs_punch_hole() (+2/-2)
    Btrfs: fix unprotected extent map operation when logging file extents (+2/-0)
    Btrfs: fix unnecessary while loop when search the free space, cache (+10/-20)
    Btrfs: fix off-by-one error of the reserved size of btrfs_allocate() (+2/-2)
    Btrfs: fix joining the same transaction handler more than 2 times (+48/-30)
    Btrfs: fix missing log when BTRFS_INODE_NEEDS_FULL_SYNC is set (+4/-1)
    Btrfs: pass root object into btrfs_ioctl_{start, wait}_sync() (+6/-6)
    Btrfs: get write access when setting the default subvolume (+28/-12)
    Btrfs: make ordered operations be handled by multi-task (+45/-21)
    Btrfs: fix wrong return value of btrfs_wait_for_commit() (+8/-7)
    Btrfs: don't start a new transaction when starting sync (+18/-9)
    Btrfs: fix missing flush when committing a transaction (+47/-35)
    Btrfs: fix wrong return value of btrfs_truncate_page() (+1/-2)
    Btrfs: make delalloc inodes be flushed by multi-task (+103/-8)
    Btrfs: use existing align macros in btrfs_allocate() (+4/-4)
    Btrfs: make ordered extent be flushed by multi-task (+37/-9)
    Btrfs: don't auto defrag a file when doing directIO (+0/-3)
    Btrfs: fix unprotected defragable inode insertion (+55/-15)
    Btrfs: restructure btrfs_run_defrag_inodes() (+109/-91)
    Btrfs: get write access for qgroup operations (+48/-25)
    Btrfs: get write access when removing a device (+8/-4)
    Btrfs: cleanup duplicated division functions (+46/-40)
    Btrfs: punch hole past the end of the file (+12/-10)
    Btrfs: use slabs for auto defrag allocation (+34/-5)
    Btrfs: get write access when doing resize fs (+8/-2)
    Btrfs: fix wrong comment in can_overcommit() (+3/-3)
    Btrfs: improve the noflush reservation (+97/-86)
    Btrfs: fix the page that is beyond EOF (+9/-7)
    Btrfs: fix wrong file extent length (+23/-9)
    Btrfs: get write access for scrub (+13/-3)
    Btrfs: fix freeze vs auto defrag (+3/-0)

Josef Bacik (18) commits (+805/-361):
    Btrfs: don't take inode delalloc mutex if we're a free space inode (+19/-6)
    Btrfs: only clear dirty on the buffer if it is marked as dirty (+4/-4)
    Btrfs: recheck bio against block device when we map the bio (+131/-28)
    Btrfs: do not mark ems as prealloc if we are writing to them (+5/-4)
    Btrfs: don't bother copying if we're only logging the inode (+34/-6)
    Btrfs: log changed inodes based on the extent map tree (+372/-210)
    Btrfs: only log the inode item if we can get away with it (+11/-2)
    Btrfs: keep track of the extents original block length (+24/-4)
    Btrfs: fill the global reserve when unpinning space (+24/-5)
    Btrfs: do not call file_update_time in aio_write (+48/-29)
    Btrfs: use tokens where we can in the tree log (+73/-54)
    Btrfs: move checks in set_page_dirty under DEBUG (+2/-0)
    Btrfs: only unlock and relock if we have to (+4/-1)
    Btrfs: fix autodefrag and umount lockup (+17/-2)
    Btrfs: inline csums if we're fsyncing (+21/-1)
    Btrfs: add path->really_keep_locks (+6/-2)
    Btrfs: optimize leaf_space_used (+9/-2)
    Btrfs: don't memset new tokens (+1/-1)

Liu Bo (17) commits (+124/-151):
    Btrfs: MOD_LOG_KEY_REMOVE_WHILE_MOVING never change node's nritems (+2/-2)
    Btrfs: fix a double free on pending snapshots in error handling (+5/-1)
    Btrfs: reorder tree mod log operations in deleting a pointer (+6/-4)
    Btrfs: fix a deadlock in aborting transaction due to ENOSPC (+7/-0)
    Btrfs: skip adding an acl attribute if we don't have to (+2/-0)
    Btrfs: get right arguments for btrfs_wait_ordered_range (+1/-1)
    Btrfs: parse parent 0 into correct value in tracepoint (+2/-1)
    Btrfs: do not log extents when we only log new names (+2/-1)
    Btrfs: put raid properties into global table (+29/-33)
    Btrfs: cleanup for btrfs_btree_balance_dirty (+34/-81)
    Btrfs: kill unnecessary arguments in del_ptr (+7/-9)
    Btrfs: don't add a NULL extended attribute (+10/-0)
    Btrfs: protect devices list with its mutex (+5/-4)
    Btrfs: cleanup for btrfs_wait_order_range (+0/-3)
    Btrfs: fix an while-loop of listxattr (+1/-1)
    Btrfs: fix a bug of per-file nocow (+5/-3)
    Btrfs: cleanup unused arguments (+6/-7)

Filipe Brandenburger (3) commits (+21/-12):
    Btrfs: refactor error handling to drop inode in btrfs_create() (+11/-12)
    Btrfs: fix permissions of empty files not affected by umask (+4/-0)
    Btrfs: fix permissions of empty files not affected by umask (+6/-0)

Julia Lawall (2) commits (+26/-48):
    fs/btrfs: drop if around WARN_ON (+5/-10)
    fs/btrfs: use WARN (+21/-38)

Wang Sheng-Hui (2) commits (+9/-12):
    Btrfs: use ctl->unit for free space calculation instead of block_group->sectorsize (+9/-11)
    Btrfs: do not warn_on io_ctl->cur in io_ctl_map_page (+0/-1)

Tsutomu Itoh (2) commits (+11/-0):
    Btrfs: set hole punching time properly (+3/-0)
    Btrfs: add fiemap's flag check (+8/-0)

Lukas Czerner (1) commits (+16/-0):
    btrfs: Notify udev when removing device

Anand Jain (1) commits (+16/-16):
    Btrfs: rename root_times_lock to root_item_lock

Alexander Block (1) commits (+11/-2):
    Btrfs: merge inode_list in __merge_refs

Chris Mason (1) commits (+95/-2):
    Btrfs: fix hash overflow handling

Masanari Iida (1) commits (+2/-2):
    Btrfs: Fix typo in fs/btrfs

jeff.liu (1) commits (+1/-4):
    Btrfs: Remove the invalid shrink size check up from btrfs_shrink_dev()

Total: (115) commits (+5423/-1912)

 fs/btrfs/Makefile            |    2 +-
 fs/btrfs/acl.c               |    2 +
 fs/btrfs/backref.c           |   16 +-
 fs/btrfs/btrfs_inode.h       |    4 +
 fs/btrfs/check-integrity.c   |   31 +-
 fs/btrfs/compression.c       |    6 +-
 fs/btrfs/ctree.c             |  241 ++++--
 fs/btrfs/ctree.h             |  184 ++++-
 fs/btrfs/delayed-inode.c     |   11 +-
 fs/btrfs/dev-replace.c       |  856 ++++++++++++++++++++
 fs/btrfs/dev-replace.h       |   44 +
 fs/btrfs/dir-item.c          |   59 ++
 fs/btrfs/disk-io.c           |  142 ++--
 fs/btrfs/disk-io.h           |    4 +-
 fs/btrfs/extent-tree.c       |  227 +++---
 fs/btrfs/extent_io.c         |   37 +-
 fs/btrfs/extent_io.h         |    4 +-
 fs/btrfs/extent_map.c        |   24 +-
 fs/btrfs/extent_map.h        |    2 +
 fs/btrfs/file-item.c         |   21 +-
 fs/btrfs/file.c              |  406 ++++++----
 fs/btrfs/free-space-cache.c  |   51 +-
 fs/btrfs/inode-map.c         |    5 +-
 fs/btrfs/inode.c             |  484 ++++++-----
 fs/btrfs/ioctl.c             |  317 ++++++--
 fs/btrfs/ioctl.h             |   48 +-
 fs/btrfs/math.h              |   44 +
 fs/btrfs/ordered-data.c      |   90 ++-
 fs/btrfs/ordered-data.h      |    7 +-
 fs/btrfs/print-tree.c        |    3 +
 fs/btrfs/reada.c             |   31 +-
 fs/btrfs/relocation.c        |   40 +-
 fs/btrfs/root-tree.c         |    4 +-
 fs/btrfs/scrub.c             | 1836 ++++++++++++++++++++++++++++++------------
 fs/btrfs/send.c              |    8 +-
 fs/btrfs/super.c             |   48 +-
 fs/btrfs/transaction.c       |  170 ++--
 fs/btrfs/transaction.h       |    2 +-
 fs/btrfs/tree-log.c          |  477 ++++++-----
 fs/btrfs/volumes.c           |  966 +++++++++++++++++-----
 fs/btrfs/volumes.h           |   35 +-
 fs/btrfs/xattr.c             |   13 +-
 include/trace/events/btrfs.h |    3 +-
 43 files changed, 5258 insertions(+), 1747 deletions(-)

^ permalink raw reply	[relevance 3%]

* [GIT PULL] Btrfs updates for 5.14
@ 2021-06-28 18:16  3% David Sterba
  0 siblings, 0 replies; 105+ results
From: David Sterba @ 2021-06-28 18:16 UTC (permalink / raw)
  To: torvalds; +Cc: David Sterba, linux-btrfs, linux-kernel

Hi,

here's a normal mix of improvements, core changes and features that user
have been missing or complaining about.

Please pull, thanks.

User visible changes:

- new sysfs exports
  - add sysfs knob to limit scrub IO bandwidth per device
  - device stats are also available in
    /sys/fs/btrfs/FSID/devinfo/DEVID/error_stats

- support cancellable resize and device delete ioctls

- change how the empty value is interpreted when setting a property,
  so far we have only 'btrfs.compression' and we need to distinguish a
  reset to defaults and setting "do not compress", in general the empty
  value will always mean 'reset to defaults' for any other property, for
  compression it's either 'no' or 'none' to forbid compression

Performance improvements:

- no need for full sync when truncation does not touch extents, reported
  run time change is -12%

- avoid unnecessary logging of xattrs during fast fsyncs (+17%
  throughput, -17% runtime on xattr stress workload)

Core:

- preemptive flushing improvements and fixes
  - adjust clamping logic on multi-threaded workloads to avoid flushing
    too soon
  - take into account global block reserve, may help on almost full
    filesystems
  - continue flushing when there are enough pending delalloc and ordered
    bytes

- simplify logic around conditional transaction commit, a workaround
  used in the past for throttling that's been superseded by ticket
  reservations that manage the throttling in a better way

- subpage blocksize preparation:
  - submit read time repair only for each corrupted sector
  - scrub repair now works with sectors and not pages
  - free space cache (v1) works with sectors and not pages
  - more fine grained bio tracking for extents
  - subpage support in page callbacks, extent callbacks, end io
    callbacks

- simplify transaction abort logic and always abort and don't check
  various potentially unreliable stats tracked by the transaction

- exclusive operations can do more checks when started and allow eg.
  cancellation of the same running operation

- ensure relocation never runs while we have send operations running,
  e.g. when zoned background auto reclaim starts

Fixes:

- zoned: more sanity checks of write pointer

- improve error handling in delayed inodes

- send:
  - fix invalid path for unlink operations after parent orphanization
  - fix crash when memory allocations trigger reclaim

- skip compression of we have only one page (can't make things better)

- empty value of a property newly means reset to default

Other:

- lots of cleanups, comment updates, yearly typo fixing
- disable build on platforms having page size 256K

----------------------------------------------------------------
The following changes since commit 13311e74253fe64329390df80bed3f07314ddd61:

  Linux 5.13-rc7 (2021-06-20 15:03:15 -0700)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-5.14-tag

for you to fetch changes up to 629e33a16809ae0274e1f5fc3d22b92b9bd0fdf1:

  btrfs: remove unused btrfs_fs_info::total_pinned (2021-06-22 19:58:26 +0200)

----------------------------------------------------------------
Anand Jain (4):
      btrfs: reduce the variable size to fit nr_pages
      btrfs: optimize variables size in btrfs_submit_compressed_read
      btrfs: optimize variables size in btrfs_submit_compressed_write
      btrfs: fix comment about max_out in btrfs_compress_pages

Baokun Li (1):
      btrfs: send: use list_move_tail instead of list_del/list_add_tail

Christophe Leroy (1):
      btrfs: disable build on platforms having page size 256K

David Sterba (24):
      btrfs: scrub: per-device bandwidth control
      btrfs: sysfs: fix format string for some discard stats
      btrfs: clear defrag status of a root if starting transaction fails
      btrfs: clear log tree recovering status if starting transaction fails
      btrfs: scrub: factor out common scrub_stripe constraints
      btrfs: document byte swap optimization of root_item::flags accessors
      btrfs: reduce compressed_bio members' types
      btrfs: remove extra sb::s_id from message in btrfs_validate_metadata_buffer
      btrfs: simplify eb checksum verification in btrfs_validate_metadata_buffer
      btrfs: clean up header members offsets in write helpers
      btrfs: protect exclusive_operation by super_lock
      btrfs: add cancellable chunk relocation support
      btrfs: introduce try-lock semantics for exclusive op start
      btrfs: add wrapper for conditional start of exclusive operation
      btrfs: add cancellation to resize
      btrfs: add device delete cancel
      btrfs: sink wait_for_unblock parameter to async commit
      btrfs: inline wait_current_trans_commit_start in its caller
      btrfs: fix typos in comments
      btrfs: sysfs: export dev stats in devinfo directory
      btrfs: compression: don't try to compress if we don't have enough pages
      btrfs: props: change how empty value is interpreted
      btrfs: switch mount option bits to enums and use wider type
      btrfs: shorten integrity checker extent data mount option

Filipe Manana (6):
      btrfs: fix misleading and incomplete comment of btrfs_truncate()
      btrfs: don't set the full sync flag when truncation does not touch extents
      btrfs: avoid unnecessary logging of xattrs during fast fsyncs
      btrfs: send: fix invalid path for unlink operations after parent orphanization
      btrfs: ensure relocation never runs while we have send operations running
      btrfs: send: fix crash when memory allocations trigger reclaim

Goldwyn Rodrigues (1):
      btrfs: correct try_lock_extent() usage in read_extent_buffer_subpage()

Johannes Thumshirn (3):
      btrfs: zoned: bail out if we can't read a reliable write pointer
      btrfs: rename check_async_write and let it return bool
      btrfs: zoned: factor out zoned device lookup

Josef Bacik (15):
      btrfs: check worker before need_preemptive_reclaim
      btrfs: only clamp the first time we have to start flushing
      btrfs: take into account global rsv in need_preemptive_reclaim
      btrfs: use the global rsv size in the preemptive thresh calculation
      btrfs: don't include the global rsv size in the preemptive used amount
      btrfs: only ignore delalloc if delalloc is much smaller than ordered
      btrfs: handle preemptive delalloc flushing slightly differently
      btrfs: make btrfs_release_delayed_iref handle the !iref case
      btrfs: fix error handling in __btrfs_update_delayed_inode
      btrfs: abort transaction if we fail to update the delayed inode
      btrfs: always abort the transaction if we abort a trans handle
      btrfs: rip out may_commit_transaction
      btrfs: remove FLUSH_DELAYED_REFS from data ENOSPC flushing
      btrfs: rip the first_ticket_bytes logic from fail_all_tickets
      btrfs: rip out btrfs_space_info::total_bytes_pinned

Naohiro Aota (2):
      btrfs: zoned: print message when zone sanity check type fails
      btrfs: fix unbalanced unlock in qgroup_account_snapshot()

Nathan Chancellor (1):
      btrfs: remove total_data_size variable in btrfs_batch_insert_items()

Nikolay Borisov (3):
      btrfs: use list_last_entry in add_falloc_range
      btrfs: eliminate insert label in add_falloc_range
      btrfs: remove unused btrfs_fs_info::total_pinned

Qu Wenruo (38):
      btrfs: make btrfs_verify_data_csum() to return a bitmap
      btrfs: submit read time repair only for each corrupted sector
      btrfs: remove io_failure_record::in_validation
      btrfs: scrub: fix subpage repair error caused by hard coded PAGE_SIZE
      btrfs: make free space cache size consistent across different PAGE_SIZE
      btrfs: remove the unused parameter @len for btrfs_bio_fits_in_stripe()
      btrfs: allow btrfs_bio_fits_in_stripe() to accept bio without any page
      btrfs: refactor submit_extent_page() to make bio and its flag tracing easier
      btrfs: make subpage metadata write path call its own endio functions
      btrfs: pass btrfs_inode to btrfs_writepage_endio_finish_ordered()
      btrfs: make Private2 lifespan more consistent
      btrfs: refactor how we finish ordered extent io for endio functions
      btrfs: update comments in btrfs_invalidatepage()
      btrfs: introduce btrfs_lookup_first_ordered_range()
      btrfs: refactor btrfs_invalidatepage() for subpage support
      btrfs: rename PagePrivate2 to PageOrdered inside btrfs
      btrfs: fix hang when run_delalloc_range() failed
      btrfs: pass bytenr directly to __process_pages_contig()
      btrfs: refactor page status update into process_one_page()
      btrfs: provide btrfs_page_clamp_*() helpers
      btrfs: only require sector size alignment for end_bio_extent_writepage()
      btrfs: make btrfs_dirty_pages() to be subpage compatible
      btrfs: make __process_pages_contig() to handle subpage dirty/error/writeback status
      btrfs: make end_bio_extent_writepage() to be subpage compatible
      btrfs: make process_one_page() to handle subpage locking
      btrfs: introduce helpers for subpage ordered status
      btrfs: make page Ordered bit to be subpage compatible
      btrfs: update locked page dirty/writeback/error bits in __process_pages_contig
      btrfs: prevent extent_clear_unlock_delalloc() to unlock page not locked by __process_pages_contig()
      btrfs: make btrfs_set_range_writeback() subpage compatible
      btrfs: make __extent_writepage_io() only submit dirty range for subpage
      btrfs: make btrfs_truncate_block() to be subpage compatible
      btrfs: make btrfs_page_mkwrite() to be subpage compatible
      btrfs: reflink: make copy_inline_to_page() to be subpage compatible
      btrfs: fix the filemap_range_has_page() call in btrfs_punch_hole_lock_range()
      btrfs: don't clear page extent mapped if we're not invalidating the full page
      btrfs: subpage: fix a rare race between metadata endio and eb freeing
      btrfs: remove a stale comment for btrfs_decompress_bio()

Su Yue (1):
      btrfs: remove stale comment for argument seed of btrfs_find_device

Tian Tao (1):
      btrfs: return EAGAIN if defrag is canceled

 fs/btrfs/Kconfig                  |   2 +
 fs/btrfs/backref.c                |   2 +-
 fs/btrfs/block-group.c            |  31 +-
 fs/btrfs/compression.c            |  57 +--
 fs/btrfs/compression.h            |  26 +-
 fs/btrfs/ctree.c                  |   5 +-
 fs/btrfs/ctree.h                  | 120 +++--
 fs/btrfs/delalloc-space.c         |   2 +-
 fs/btrfs/delayed-inode.c          |  41 +-
 fs/btrfs/delayed-ref.c            |  26 -
 fs/btrfs/dev-replace.c            |   2 +-
 fs/btrfs/discard.c                |   2 +-
 fs/btrfs/disk-io.c                |  55 +--
 fs/btrfs/extent-tree.c            |  18 +-
 fs/btrfs/extent_io.c              | 973 ++++++++++++++++++++++----------------
 fs/btrfs/extent_io.h              |  29 +-
 fs/btrfs/file-item.c              |   2 +-
 fs/btrfs/file.c                   |  44 +-
 fs/btrfs/free-space-cache.c       |   2 +-
 fs/btrfs/inode.c                  | 517 +++++++++++---------
 fs/btrfs/ioctl.c                  | 184 +++++--
 fs/btrfs/locking.c                |   4 +-
 fs/btrfs/ordered-data.c           | 253 +++++++---
 fs/btrfs/ordered-data.h           |  10 +-
 fs/btrfs/props.c                  |  16 +-
 fs/btrfs/qgroup.c                 |  10 +-
 fs/btrfs/reflink.c                |  14 +-
 fs/btrfs/relocation.c             |  75 ++-
 fs/btrfs/scrub.c                  | 159 +++++--
 fs/btrfs/send.c                   |  47 +-
 fs/btrfs/space-info.c             | 233 ++-------
 fs/btrfs/space-info.h             |  30 --
 fs/btrfs/subpage.c                | 155 +++++-
 fs/btrfs/subpage.h                |  33 +-
 fs/btrfs/super.c                  |  16 +-
 fs/btrfs/sysfs.c                  |  74 ++-
 fs/btrfs/tests/extent-map-tests.c |   2 +-
 fs/btrfs/transaction.c            |  61 +--
 fs/btrfs/transaction.h            |   6 +-
 fs/btrfs/tree-log.c               |  22 +-
 fs/btrfs/volumes.c                |  24 +-
 fs/btrfs/volumes.h                |   5 +-
 fs/btrfs/zoned.c                  |  43 +-
 fs/btrfs/zoned.h                  |   9 +
 include/trace/events/btrfs.h      |  23 +-
 include/uapi/linux/btrfs.h        |   4 +-
 include/uapi/linux/btrfs_tree.h   |   4 +-
 47 files changed, 2041 insertions(+), 1431 deletions(-)

^ permalink raw reply	[relevance 3%]

* [GIT PULL] Btrfs updates for 6.3
@ 2023-02-20 19:20  3% David Sterba
  0 siblings, 0 replies; 105+ results
From: David Sterba @ 2023-02-20 19:20 UTC (permalink / raw)
  To: torvalds; +Cc: David Sterba, linux-btrfs, linux-kernel

Hi,

there's a usual mix of performance improvements and new features. The
core change is reworking how checksums are processed, with followup
cleanups and simplifications. There are two minor changes in block layer
and iomap code.

Please pull, thanks.

Features:

- block group allocation class heuristics
  - pack files by size (up to 128k, up to 8M, more) to avoid
    fragmentation in block groups, assuming that file size and life time
    is correlated, in particular this may help during balance
  - with tracepoints and extensible in the future

Performance:

- send: cache directory utimes and only emit the command when necessary
  - speedup up to 10x
  - smaller final stream produced (no redundant utimes commands issued),
  - compatibility not affected

- fiemap: skip backref checks for shared leaves
  - speedup 3x on sample filesystem with all leaves shared (e.g. on
    snapshots)

- micro optimized b-tree key lookup, speedup in metadata operations
  (sample benchmark: fs_mark +10% of files/sec)

Core changes:

- change where checksumming is done in the io path
  - checksum and read repair does verification at lower layer
  - cascaded cleanups and simplifications

- raid56 refactoring and cleanups

Fixes:

- sysfs: make sure that a run-time change of a feature is correctly
  tracked by the feature files

- scrub: better reporting of tree block errors

Other:

- locally enable -Wmaybe-uninitialized after fixing all warnings

- misc cleanups, spelling fixes

Other code:

- block: export bio_split_rw

- iomap: remove IOMAP_F_ZONE_APPEND

----------------------------------------------------------------
The following changes since commit ceaa837f96adb69c0df0397937cd74991d5d821a:

  Linux 6.2-rc8 (2023-02-12 14:10:17 -0800)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-6.3-tag

for you to fetch changes up to 964a54e5e1a0d70cd80bd5a0885a1938463625b1:

  btrfs: make kobj_type structures constant (2023-02-15 19:38:55 +0100)

----------------------------------------------------------------
Boris Burkov (6):
      btrfs: pass find_free_extent_ctl to allocator tracepoints
      btrfs: add more find_free_extent tracepoints
      btrfs: introduce size class to block group allocator
      btrfs: load block group size class when caching
      btrfs: don't use size classes for zoned file systems
      btrfs: hold block group refcount during async discard

Christoph Hellwig (48):
      btrfs: remove the wait argument to btrfs_start_ordered_extent
      block: export bio_split_rw
      btrfs: better document struct btrfs_bio
      btrfs: add a btrfs_inode pointer to struct btrfs_bio
      btrfs: remove the direct I/O read checksum lookup optimization
      btrfs: simplify parameters of btrfs_lookup_bio_sums
      btrfs: refactor error handling in btrfs_submit_bio
      btrfs: save the bio iter for checksum validation in common code
      btrfs: pre-load data checksum for reads in btrfs_submit_bio
      btrfs: add a btrfs_data_csum_ok helper
      btrfs: handle checksum validation and repair at the storage layer
      btrfs: open code btrfs_bio_free_csum
      btrfs: remove btrfs_bio_for_each_sector
      btrfs: remove now unused checksumming helpers
      btrfs: remove struct btrfs_bio::device field
      btrfs: remove the io_failure_record infrastructure
      btrfs: rename btrfs_bio::iter field
      btrfs: remove struct btrfs_bio::is_metadata flag
      btrfs: open code the submit_bio_start helpers
      btrfs: simplify the btrfs_csum_one_bio calling convention
      btrfs: handle checksum generation in the storage layer
      btrfs: handle recording of zoned writes in the storage layer
      btrfs: support cloned bios in btree_csum_one_bio
      btrfs: allow btrfs_submit_bio to split bios
      btrfs: pass the iomap bio to btrfs_submit_bio
      btrfs: remove struct btrfs_io_geometry
      btrfs: open code submit_encoded_read_bio
      btrfs: remove the fs_info argument to btrfs_submit_bio
      btrfs: remove now spurious bio submission helpers
      btrfs: calculate file system wide queue limit for zoned mode
      btrfs: split zone append bios in btrfs_submit_bio
      iomap: remove IOMAP_F_ZONE_APPEND
      btrfs: raid56: simplify error handling and code flow in raid56_parity_write
      btrfs: raid56: simplify code flow in rmw_rbio
      btrfs: raid56: wait for I/O completion in submit_read_bios
      btrfs: raid56: add a bio_list_put helper
      btrfs: raid56: fold recover_assemble_read_bios into recover_rbio
      btrfs: raid56: fold rmw_read_wait_recover into rmw_read_bios
      btrfs: raid56: submit the read bios from scrub_assemble_read_bios
      btrfs: raid56: handle endio in rmw_rbio
      btrfs: raid56: handle endio in recover_rbio
      btrfs: raid56: handle endio in scrub_rbio
      btrfs: use file_offset to limit bios size in calc_bio_boundaries
      btrfs: set bbio->file_offset in alloc_new_bio
      btrfs: pass a btrfs_bio to btrfs_use_append
      btrfs: never return true for reads in btrfs_use_zone_append
      btrfs: don't rely on unchanging ->bi_bdev for zone append remaps
      btrfs: remove the bdev argument to btrfs_rmap_block

Colin Ian King (1):
      btrfs: fix spelling mistakes found using codespell

Filipe Manana (24):
      btrfs: use a negative value for BTRFS_LOG_FORCE_COMMIT
      btrfs: use a single variable to track return value for log_dir_items()
      btrfs: send: directly return from did_overwrite_ref() and simplify it
      btrfs: send: avoid unnecessary generation search at did_overwrite_ref()
      btrfs: send: directly return from will_overwrite_ref() and simplify it
      btrfs: send: avoid extra b+tree searches when checking reference overrides
      btrfs: send: remove send_progress argument from can_rmdir()
      btrfs: send: avoid duplicated orphan dir allocation and initialization
      btrfs: send: avoid unnecessary orphan dir rbtree search at can_rmdir()
      btrfs: send: reduce searches on parent root when checking if dir can be removed
      btrfs: send: iterate waiting dir move rbtree only once when processing refs
      btrfs: send: initialize all the red black trees earlier
      btrfs: send: genericize the backref cache to allow it to be reused
      btrfs: adapt lru cache to allow for 64 bits keys on 32 bits systems
      btrfs: send: cache information about created directories
      btrfs: allow a generation number to be associated with lru cache entries
      btrfs: add an api to delete a specific entry from the lru cache
      btrfs: send: use the lru cache to implement the name cache
      btrfs: send: update size of roots array for backref cache entries
      btrfs: send: cache utimes operations for directories if possible
      btrfs: assert commit root semaphore is held when accessing backref cache
      btrfs: skip backref walking during fiemap if we know the leaf is shared
      btrfs: eliminate extra call when doing binary search on extent buffer
      btrfs: do unsigned integer division in the extent buffer binary search loop

Johannes Thumshirn (4):
      btrfs: drop unused trans parameter of drop_delayed_ref
      btrfs: remove trans parameter of merge_ref
      btrfs: drop trans parameter of insert_delayed_ref
      btrfs: directly pass in fs_info to btrfs_merge_delayed_refs

Josef Bacik (15):
      btrfs: move btrfs_abort_transaction to transaction.c
      btrfs: fix uninitialized variable warning in btrfs_cleanup_ordered_extents
      btrfs: fix uninitialized variable warning in get_inode_gen
      btrfs: fix uninitialized variable warning in btrfs_update_block_group
      btrfs: fix uninitialized variable warnings in __set_extent_bit and convert_extent_bit
      btrfs: fix uninitialized variable warning in btrfs_sb_log_location
      btrfs: fix uninitialized variable warning in run_one_async_start
      btrfs: turn on -Wmaybe-uninitialized
      btrfs: always lock the block before calling btrfs_clean_tree_block
      btrfs: add trans argument to btrfs_clean_tree_block
      btrfs: replace clearing extent buffer dirty bit with btrfs_clean_block
      btrfs: do not increment dirty_metadata_bytes in set_btree_ioerr
      btrfs: rename btrfs_clean_tree_block to btrfs_clear_buffer_dirty
      btrfs: combine btrfs_clear_buffer_dirty and clear_extent_buffer_dirty
      btrfs: replace btrfs_wait_tree_block_writeback by wait_on_extent_buffer_writeback

Naohiro Aota (1):
      btrfs: zoned: fix uninitialized variable warning in btrfs_get_dev_zones

Peng Hao (1):
      btrfs: go to matching label when cleaning em in btrfs_submit_direct

Qu Wenruo (6):
      btrfs: scrub: improve tree block error reporting
      btrfs: sysfs: update fs features directory asynchronously
      btrfs: raid56: reduce overhead to calculate the bio length
      btrfs: remove stripe boundary calculation for buffered I/O
      btrfs: remove stripe boundary calculation for compressed I/O
      btrfs: remove stripe boundary calculation for encoded I/O

Thomas Weißschuh (1):
      btrfs: make kobj_type structures constant

Yushan Zhou (1):
      btrfs: use PAGE_{ALIGN, ALIGNED, ALIGN_DOWN} macro

ye xingchen (1):
      btrfs: remove duplicate include header in extent-tree.c

 block/blk-merge.c                 |   3 +-
 fs/btrfs/Makefile                 |   6 +-
 fs/btrfs/backref.c                |  33 +-
 fs/btrfs/bio.c                    | 557 +++++++++++++++++++++++++++----
 fs/btrfs/bio.h                    |  67 +---
 fs/btrfs/block-group.c            | 273 +++++++++++++--
 fs/btrfs/block-group.h            |  24 +-
 fs/btrfs/btrfs_inode.h            |  22 +-
 fs/btrfs/compression.c            | 276 +++------------
 fs/btrfs/compression.h            |   3 -
 fs/btrfs/ctree.c                  |  62 ++--
 fs/btrfs/ctree.h                  |  15 +
 fs/btrfs/defrag.c                 |   4 +-
 fs/btrfs/delayed-ref.c            |  24 +-
 fs/btrfs/delayed-ref.h            |   2 +-
 fs/btrfs/discard.c                |  41 ++-
 fs/btrfs/disk-io.c                | 225 ++-----------
 fs/btrfs/disk-io.h                |  14 +-
 fs/btrfs/extent-io-tree.c         |  10 +-
 fs/btrfs/extent-io-tree.h         |   1 -
 fs/btrfs/extent-tree.c            | 181 +++-------
 fs/btrfs/extent-tree.h            |  81 +++++
 fs/btrfs/extent_io.c              | 582 ++++----------------------------
 fs/btrfs/extent_io.h              |  36 +-
 fs/btrfs/file-item.c              |  72 ++--
 fs/btrfs/file-item.h              |   8 +-
 fs/btrfs/file.c                   |   2 +-
 fs/btrfs/free-space-tree.c        |   2 +-
 fs/btrfs/fs.c                     |   4 +
 fs/btrfs/fs.h                     |  11 +-
 fs/btrfs/inode.c                  | 641 +++++------------------------------
 fs/btrfs/ioctl.c                  |   2 +-
 fs/btrfs/lru_cache.c              | 166 +++++++++
 fs/btrfs/lru_cache.h              |  80 +++++
 fs/btrfs/lzo.c                    |   2 +-
 fs/btrfs/messages.c               |  30 --
 fs/btrfs/messages.h               |  34 --
 fs/btrfs/ordered-data.c           |  25 +-
 fs/btrfs/ordered-data.h           |   3 +-
 fs/btrfs/qgroup.c                 |   2 +-
 fs/btrfs/raid56.c                 | 334 +++++++------------
 fs/btrfs/raid56.h                 |   4 +-
 fs/btrfs/relocation.c             |   2 +-
 fs/btrfs/scrub.c                  |  51 ++-
 fs/btrfs/send.c                   | 684 ++++++++++++++++++++------------------
 fs/btrfs/super.c                  |   3 +-
 fs/btrfs/sysfs.c                  |  41 +--
 fs/btrfs/sysfs.h                  |   3 +-
 fs/btrfs/tests/extent-map-tests.c |   2 +-
 fs/btrfs/transaction.c            |  34 ++
 fs/btrfs/transaction.h            |  31 ++
 fs/btrfs/tree-log.c               |  87 ++---
 fs/btrfs/tree-log.h               |   9 +-
 fs/btrfs/volumes.c                | 116 ++-----
 fs/btrfs/volumes.h                |  18 -
 fs/btrfs/zoned.c                  | 146 ++++----
 fs/btrfs/zoned.h                  |  20 +-
 fs/iomap/direct-io.c              |  10 +-
 include/linux/bio.h               |   4 +
 include/linux/iomap.h             |   3 +-
 include/trace/events/btrfs.h      | 127 +++++--
 61 files changed, 2457 insertions(+), 2898 deletions(-)
 create mode 100644 fs/btrfs/lru_cache.c
 create mode 100644 fs/btrfs/lru_cache.h

^ permalink raw reply	[relevance 3%]

* [GIT PULL] Btrfs updates for 5.13
@ 2021-04-26 19:59  3% David Sterba
  0 siblings, 0 replies; 105+ results
From: David Sterba @ 2021-04-26 19:59 UTC (permalink / raw)
  To: torvalds; +Cc: David Sterba, linux-btrfs, linux-kernel

From: David Sterba <dsterba@suse.cz>

Hi,

the updates this time are mostly stabilization, preparation and minor
improvements.

Please pull, thanks.

User visible improvements:

- readahead for send, improving run time of full send by 10% and for
  incremental by 25%

- make reflinks respect O_SYNC, O_DSYNC and S_SYNC flags

- export supported sectorsize values in sysfs (currently only page size,
  more once full subpage support lands)

- more graceful errors and warnings on 32bit systems when logical
  addresses for metadata reach the limit posed by unsigned long in
  page::index
  - error: fail mount if there's a metadata block beyond the limit
  - error: new metadata block would be at unreachable address
  - warn when 5/8th of the limit is reached, for 4K page systems it's
    10T, for 64K page it's 160T

- zoned mode
  - relocated zones get reset at the end instead of discard
  - automatic background reclaim of zones that have 75%+ of unusable
    space, the threshold is tunable in sysfs

Fixes:

- fsync and tree mod log fixes

- fix inefficient preemptive reclaim calculations

- fix exhaustion of the system chunk array due to concurrent allocations

- fix fallback to no compression when racing with remount

- preemptive fix for dm-crypt on zoned device that does not properly
  advertise zoned support

Core changes:

- add inode lock to synchronize mmap and other block updates (eg.
  deduplication, fallocate, fsync)

- kmap conversions to new kmap_local API

- subpage support (continued)
  - new helpers for page state/extent buffer tracking
  - metadata changes now support read and write

- error handling through out relocation call paths

- many other cleanups and code simplifications

----------------------------------------------------------------
The following changes since commit bf05bf16c76bb44ab5156223e1e58e26dfe30a88:

  Linux 5.12-rc8 (2021-04-18 14:45:32 -0700)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-5.13-tag

for you to fetch changes up to 18bb8bbf13c1839b43c9e09e76d397b753989af2:

  btrfs: zoned: automatically reclaim zones (2021-04-20 20:46:31 +0200)

----------------------------------------------------------------
Anand Jain (3):
      btrfs: unexport btrfs_extent_readonly() and make it static
      btrfs: change return type to bool in btrfs_extent_readonly
      btrfs: scrub: drop a few function declarations

Arnd Bergmann (1):
      btrfs: zoned: bail out in btrfs_alloc_chunk for bad input

BingJing Chang (1):
      btrfs: fix a potential hole punching failure

Filipe Manana (21):
      btrfs: add btree read ahead for full send operations
      btrfs: add btree read ahead for incremental send operations
      btrfs: fix race between memory mapped writes and fsync
      btrfs: fix race between marking inode needs to be logged and log syncing
      btrfs: remove stale comment and logic from btrfs_inode_in_log()
      btrfs: move the tree mod log code into its own file
      btrfs: use booleans where appropriate for the tree mod log functions
      btrfs: use a bit to track the existence of tree mod log users
      btrfs: use the new bit BTRFS_FS_TREE_MOD_LOG_USERS at btrfs_free_tree_block()
      btrfs: remove unnecessary leaf check at btrfs_tree_mod_log_free_eb()
      btrfs: add and use helper to get lowest sequence number for the tree mod log
      btrfs: update debug message when checking seq number of a delayed ref
      btrfs: update outdated comment at btrfs_orphan_cleanup()
      btrfs: update outdated comment at btrfs_replace_file_extents()
      btrfs: make reflinks respect O_SYNC O_DSYNC and S_SYNC flags
      btrfs: fix exhaustion of the system chunk array due to concurrent allocations
      btrfs: improve btree readahead for full send operations
      btrfs: fix race between transaction aborts and fsyncs leading to use-after-free
      btrfs: fix metadata extent leak after failure to create subvolume
      btrfs: fix race when picking most recent mod log operation for an old root
      btrfs: zoned: fix unpaired block group unfreeze during device replace

Goldwyn Rodrigues (2):
      btrfs: remove force argument from run_delalloc_nocow()
      btrfs: remove mirror argument from btrfs_csum_verify_data()

Ira Weiny (4):
      btrfs: convert kmap to kmap_local_page, simple cases
      btrfs: raid56: convert kmaps to kmap_local_page
      btrfs: integrity-checker: use kmap_local_page in __btrfsic_submit_bio
      btrfs: integrity-checker: convert block context kmap's to kmap_local_page

Jiapeng Chong (1):
      btrfs: assign proper values to a bool variable in dev_extent_hole_check_zoned

Johannes Thumshirn (5):
      btrfs: remove duplicated in_range() macro
      btrfs: zoned: fail mount if the device does not support zone append
      btrfs: zoned: reset zones of relocated block groups
      btrfs: rename delete_unused_bgs_mutex to reclaim_bgs_lock
      btrfs: zoned: automatically reclaim zones

Josef Bacik (44):
      btrfs: add a i_mmap_lock to our inode
      btrfs: use btrfs_inode_lock/btrfs_inode_unlock inode lock helpers
      btrfs: exclude mmaps while doing remap
      btrfs: exclude mmap from happening during all fallocate operations
      btrfs: use percpu_read_positive instead of sum_positive for need_preempt
      btrfs: convert some BUG_ON()'s to ASSERT()'s in do_relocation
      btrfs: convert BUG_ON()'s in relocate_tree_block
      btrfs: handle errors from select_reloc_root()
      btrfs: convert BUG_ON()'s in select_reloc_root() to proper errors
      btrfs: check record_root_in_trans related failures in select_reloc_root
      btrfs: do proper error handling in record_reloc_root_in_trans
      btrfs: handle btrfs_record_root_in_trans failure in btrfs_rename_exchange
      btrfs: handle btrfs_record_root_in_trans failure in btrfs_rename
      btrfs: handle btrfs_record_root_in_trans failure in btrfs_delete_subvolume
      btrfs: handle btrfs_record_root_in_trans failure in btrfs_recover_log_trees
      btrfs: handle btrfs_record_root_in_trans failure in create_subvol
      btrfs: handle btrfs_record_root_in_trans failure in relocate_tree_block
      btrfs: handle btrfs_record_root_in_trans failure in start_transaction
      btrfs: handle record_root_in_trans failure in qgroup_account_snapshot
      btrfs: handle record_root_in_trans failure in btrfs_record_root_in_trans
      btrfs: handle record_root_in_trans failure in create_pending_snapshot
      btrfs: return an error from btrfs_record_root_in_trans
      btrfs: have proper error handling in btrfs_init_reloc_root
      btrfs: do proper error handling in create_reloc_root
      btrfs: validate root::reloc_root after recording root in trans
      btrfs: handle btrfs_update_reloc_root failure in commit_fs_roots
      btrfs: change insert_dirty_subvol to return errors
      btrfs: handle btrfs_update_reloc_root failure in insert_dirty_subvol
      btrfs: handle btrfs_update_reloc_root failure in prepare_to_merge
      btrfs: do proper error handling in btrfs_update_reloc_root
      btrfs: convert logic BUG_ON()'s in replace_path to ASSERT()'s
      btrfs: handle btrfs_cow_block errors in replace_path
      btrfs: handle btrfs_search_slot failure in replace_path
      btrfs: handle errors in reference count manipulation in replace_path
      btrfs: handle extent reference errors in do_relocation
      btrfs: tree-checker: check for BTRFS_BLOCK_FLAG_FULL_BACKREF being set improperly
      btrfs: remove the extent item sanity checks in relocate_block_group
      btrfs: do proper error handling in create_reloc_inode
      btrfs: handle __add_reloc_root failures in btrfs_recover_relocation
      btrfs: do not panic in __add_reloc_root
      btrfs: cleanup error handling in prepare_to_merge
      btrfs: handle extent corruption with select_one_root properly
      btrfs: do proper error handling in merge_reloc_roots
      btrfs: check return value of btrfs_commit_transaction in relocation

Matthew Wilcox (Oracle) (1):
      btrfs: add and use readahead_batch_length

Naohiro Aota (1):
      btrfs: zoned: move log tree node allocation out of log_root_tree->log_mutex

Nikolay Borisov (8):
      btrfs: make btrfs_replace_file_extents take btrfs_inode
      btrfs: make find_desired_extent take btrfs_inode
      btrfs: replace offset_in_entry with in_range
      btrfs: replace open coded while loop with proper construct
      btrfs: simplify commit logic in try_flush_qgroup
      btrfs: remove btrfs_inode parameter from btrfs_delayed_inode_reserve_metadata
      btrfs: simplify code flow in btrfs_delayed_inode_reserve_metadata
      btrfs: don't opencode extent_changeset_free

Qu Wenruo (19):
      btrfs: fix comment for btrfs ordered extent flag bits
      btrfs: add sysfs interface for supported sectorsize
      btrfs: use min() to replace open-code in btrfs_invalidatepage()
      btrfs: remove unnecessary variable shadowing in btrfs_invalidatepage()
      btrfs: subpage: introduce helpers for dirty status
      btrfs: subpage: introduce helpers for writeback status
      btrfs: subpage: do more sanity checks on metadata page dirtying
      btrfs: subpage: support metadata checksum calculation at write time
      btrfs: make alloc_extent_buffer() check subpage dirty bitmap
      btrfs: support page uptodate assertions in subpage mode
      btrfs: make set/clear_extent_buffer_dirty() subpage compatible
      btrfs: make set_btree_ioerr accept extent buffer and be subpage compatible
      btrfs: subpage: add overview comments
      btrfs: introduce end_bio_subpage_eb_writepage() function
      btrfs: introduce write_one_subpage_eb() function
      btrfs: make lock_extent_buffer_for_io() to be subpage compatible
      btrfs: introduce submit_eb_subpage() to submit a subpage metadata page
      btrfs: handle remount to no compress during compression
      btrfs: more graceful errors/warnings on 32bit systems when reaching limits

Wan Jiabing (1):
      btrfs: move forward declarations to the beginning of extent_io.h

 fs/btrfs/Makefile            |   2 +-
 fs/btrfs/backref.c           |  33 +-
 fs/btrfs/block-group.c       | 207 ++++++++-
 fs/btrfs/block-group.h       |   3 +
 fs/btrfs/btrfs_inode.h       |  33 +-
 fs/btrfs/check-integrity.c   |  14 +-
 fs/btrfs/compression.c       |  15 +-
 fs/btrfs/ctree.c             | 984 +++----------------------------------------
 fs/btrfs/ctree.h             |  80 ++--
 fs/btrfs/delayed-inode.c     |  35 +-
 fs/btrfs/delayed-ref.c       |  31 +-
 fs/btrfs/disk-io.c           | 162 +++++--
 fs/btrfs/extent-tree.c       |  21 +-
 fs/btrfs/extent_io.c         | 439 ++++++++++++++++---
 fs/btrfs/extent_io.h         |   4 +-
 fs/btrfs/file-item.c         |   1 +
 fs/btrfs/file.c              | 118 +++---
 fs/btrfs/free-space-cache.c  |   9 +-
 fs/btrfs/inode.c             | 125 +++---
 fs/btrfs/ioctl.c             |  51 ++-
 fs/btrfs/lzo.c               |   9 +-
 fs/btrfs/ordered-data.c      |  19 +-
 fs/btrfs/ordered-data.h      |   4 +-
 fs/btrfs/qgroup.c            |  47 +--
 fs/btrfs/raid56.c            |  70 +--
 fs/btrfs/reflink.c           |  65 ++-
 fs/btrfs/relocation.c        | 448 +++++++++++++++-----
 fs/btrfs/scrub.c             |  13 +-
 fs/btrfs/send.c              |  43 +-
 fs/btrfs/space-info.c        |   4 +-
 fs/btrfs/subpage.c           | 140 ++++++
 fs/btrfs/subpage.h           |   7 +
 fs/btrfs/super.c             |  26 ++
 fs/btrfs/sysfs.c             |  50 +++
 fs/btrfs/transaction.c       |  59 ++-
 fs/btrfs/transaction.h       |   9 +-
 fs/btrfs/tree-checker.c      |   5 +
 fs/btrfs/tree-log.c          |  21 +-
 fs/btrfs/tree-mod-log.c      | 929 ++++++++++++++++++++++++++++++++++++++++
 fs/btrfs/tree-mod-log.h      |  53 +++
 fs/btrfs/volumes.c           | 123 ++++--
 fs/btrfs/volumes.h           |   1 +
 fs/btrfs/zoned.c             |   7 +
 fs/btrfs/zoned.h             |   6 +
 include/linux/pagemap.h      |   9 +
 include/trace/events/btrfs.h |  12 +
 46 files changed, 2964 insertions(+), 1582 deletions(-)
 create mode 100644 fs/btrfs/tree-mod-log.c
 create mode 100644 fs/btrfs/tree-mod-log.h

^ permalink raw reply	[relevance 3%]

* [GIT PULL] Btrfs updates for 5.18
@ 2022-03-21 21:33  3% David Sterba
  0 siblings, 0 replies; 105+ results
From: David Sterba @ 2022-03-21 21:33 UTC (permalink / raw)
  To: torvalds; +Cc: David Sterba, linux-btrfs, linux-kernel

Hi,

this update contains feature updates, performance improvements,
preparatory and core work and some related VFS updates.  Please pull,
thanks.

Features:

- encoded read/write ioctls, allows user space to read or write raw data
  directly to extents (now compressed, encrypted in the future), will be
  used by send/receive v2 where it saves processing time

- zoned mode now works with metadata DUP (the mkfs.btrfs default)

- error message header updates:
  - print error state: transaction abort, other error, log tree errors
  - print transient filesystem state: remount, device replace, ignored
    checksum verifications

- tree-checker: verify the transaction id of the to-be-written dirty
  extent buffer

Performance improvements:

- fsync speedups
  - directory logging speedups (up to -90% run time)
  - avoid logging all directory changes during renames (up to -60% run
    time)
  - avoid inode logging during rename and link when possible (up to -60%
    run time)
  - prepare extents to be logged before locking a log tree path
    (throughput +7%)
  - stop copying old file extents when doing a full fsync ()
  - improved logging of old extents after truncate

Core, fixes:

- improved stale device identification by dev_t and not just path (for
  devices that are behind other layers like device mapper)

- continued extent tree v2 preparatory work
  - disable features that won't work yet
  - add wrappers and abstractions for new tree roots

- improved error handling

- add super block write annotations around background block group
  reclaim

- fix device scanning messages potentially accessing stale pointer

- cleanups and refactoring

VFS:

- allow reflinks/deduplication from two different mounts of the same
  filesystem

- export and add helpers for read/write range verification, for the
  encoded ioctls

----------------------------------------------------------------
The following changes since commit 09688c0166e76ce2fb85e86b9d99be8b0084cdf9:

  Linux 5.17-rc8 (2022-03-13 13:23:37 -0700)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-5.18-tag

for you to fetch changes up to d3e29967079c522ce1c5cab0e9fab2c280b977eb:

  btrfs: zoned: put block group after final usage (2022-03-14 13:13:54 +0100)

----------------------------------------------------------------
Anand Jain (6):
      btrfs: simplify fs_devices member access in btrfs_init_dev_replace_tgtdev
      btrfs: harden identification of a stale device
      btrfs: match stale devices by dev_t
      btrfs: add device major-minor info in the struct btrfs_device
      btrfs: use dev_t to match device in device_matched
      btrfs: cleanup temporary variables when finding rotational device status

David Sterba (1):
      btrfs: replace BUILD_BUG_ON by static_assert

Dongliang Mu (1):
      btrfs: don't access possibly stale fs_info data in device_list_add

Dāvis Mosāns (1):
      btrfs: add lzo workspace buffer length constants

Filipe Manana (28):
      btrfs: remove write and wait of struct walk_control
      btrfs: don't log unnecessary boundary keys when logging directory
      btrfs: put initial index value of a directory in a constant
      btrfs: stop copying old dir items when logging a directory
      btrfs: stop trying to log subdirectories created in past transactions
      btrfs: add helper to delete a dir entry from a log tree
      btrfs: pass the dentry to btrfs_log_new_name() instead of the inode
      btrfs: avoid logging all directory changes during renames
      btrfs: stop doing unnecessary log updates during a rename
      btrfs: avoid inode logging during rename and link when possible
      btrfs: use single variable to track return value at btrfs_log_inode()
      btrfs: remove unnecessary leaf free space checks when pushing items
      btrfs: avoid unnecessary COW of leaves when deleting items from a leaf
      btrfs: avoid unnecessary computation when deleting items from a leaf
      btrfs: remove constraint on number of visited leaves when replacing extents
      btrfs: remove useless path release in the fast fsync path
      btrfs: prepare extents to be logged before locking a log tree path
      btrfs: stop checking for NULL return from btrfs_get_extent()
      btrfs: fix lost error return value when reading a data page
      btrfs: remove no longer used counter when reading data page
      btrfs: assert we have a write lock when removing and replacing extent maps
      btrfs: stop copying old file extents when doing a full fsync
      btrfs: hold on to less memory when logging checksums during full fsync
      btrfs: voluntarily relinquish cpu when doing a full fsync
      btrfs: reset last_reflink_trans after fsyncing inode
      btrfs: fix unexpected error path when reflinking an inline extent
      btrfs: deal with unexpected extent type during reflinking
      btrfs: add and use helper for unlinking inode during log replay

Jiapeng Chong (2):
      btrfs: zoned: remove redundant initialization of to_add
      btrfs: scrub: remove redundant initialization of increment

Johannes Thumshirn (5):
      btrfs: zoned: make zone activation multi stripe capable
      btrfs: zoned: make zone finishing multi stripe capable
      btrfs: zoned: prepare for allowing DUP on zoned
      btrfs: zoned: allow DUP on meta-data block groups
      btrfs: stop checking for NULL return from btrfs_get_extent_fiemap()

Josef Bacik (27):
      btrfs: add definition for EXTENT_TREE_V2
      btrfs: disable balance for extent tree v2 for now
      btrfs: disable device manipulation ioctl's EXTENT_TREE_V2
      btrfs: disable qgroups in extent tree v2
      btrfs: disable scrub for extent-tree-v2
      btrfs: disable snapshot creation/deletion for extent tree v2
      btrfs: disable space cache related mount options for extent tree v2
      btrfs: tree-checker: don't fail on empty extent roots for extent tree v2
      btrfs: abstract out loading the tree root
      btrfs: add code to support the block group root
      btrfs: add support for multiple global roots
      btrfs: make search_csum_tree return 0 if we get -EFBIG
      btrfs: handle csum lookup errors properly on reads
      btrfs: check correct bio in finish_compressed_bio_read
      btrfs: remove the bio argument from finish_compressed_bio_read
      btrfs: track compressed bio errors as blk_status_t
      btrfs: do not double complete bio on errors during compressed reads
      btrfs: do not try to repair bio that has no mirror set
      btrfs: do not clean up repair bio if submit fails
      btrfs: pass btrfs_fs_info for deleting snapshots and cleaner
      btrfs: pass btrfs_fs_info to btrfs_recover_relocation
      btrfs: remove the cross file system checks from remap
      fs: allow cross-vfsmount reflink/dedupe
      btrfs: remove BUG_ON(ret) in alloc_reserved_tree_block
      btrfs: add a alloc_reserved_extent helper
      btrfs: remove last_ref from the extent freeing code
      btrfs: factor out do_free_extent_accounting helper

Minghao Chi (1):
      btrfs: send: remove redundant ret variable in fs_path_copy

Naohiro Aota (1):
      btrfs: zoned: mark relocation as writing

Niels Dossche (2):
      btrfs: extend locking to all space_info members accesses
      btrfs: add lockdep_assert_held to need_preemptive_reclaim

Nikolay Borisov (3):
      btrfs: move missing device handling in a dedicate function
      btrfs: move QUOTA_ENABLED check to rescan_should_stop from btrfs_qgroup_rescan_worker
      btrfs: zoned: put block group after final usage

Omar Sandoval (10):
      fs: export rw_verify_area()
      fs: export variant of generic_write_checks without iov_iter
      btrfs: don't advance offset for compressed bios in btrfs_csum_one_bio()
      btrfs: add ram_bytes and offset to btrfs_ordered_extent
      btrfs: support different disk extent size for delalloc
      btrfs: clean up cow_file_range_inline()
      btrfs: optionally extend i_size in cow_file_range_inline()
      btrfs: add definitions and documentation for encoded I/O ioctls
      btrfs: add BTRFS_IOC_ENCODED_READ ioctl
      btrfs: add BTRFS_IOC_ENCODED_WRITE

Pankaj Raghav (1):
      btrfs: zoned: remove redundant assignment in btrfs_check_zoned_mode

Qu Wenruo (4):
      btrfs: populate extent_map::generation when reading from disk
      btrfs: unify the error handling pattern for read_tree_block()
      btrfs: unify the error handling of btrfs_read_buffer()
      btrfs: verify the tranisd of the to-be-written dirty extent buffer

Sahil Kang (2):
      btrfs: reuse existing pointers from btrfs_ioctl
      btrfs: reuse existing inode from btrfs_ioctl

Sidong Yang (2):
      btrfs: qgroup: remove duplicated check in adding qgroup relations
      btrfs: qgroup: remove outdated TODO comments

Sweet Tea Dorminy (1):
      btrfs: add filesystems state details to error messages

 fs/btrfs/backref.c                |    7 +-
 fs/btrfs/block-group.c            |   36 +-
 fs/btrfs/block-group.h            |    1 +
 fs/btrfs/btrfs_inode.h            |   42 +-
 fs/btrfs/compression.c            |   63 +-
 fs/btrfs/compression.h            |   10 +-
 fs/btrfs/ctree.c                  |  108 ++--
 fs/btrfs/ctree.h                  |   83 ++-
 fs/btrfs/delalloc-space.c         |   18 +-
 fs/btrfs/dev-replace.c            |   18 +-
 fs/btrfs/disk-io.c                |  219 +++++--
 fs/btrfs/disk-io.h                |    2 +
 fs/btrfs/extent-tree.c            |  148 +++--
 fs/btrfs/extent_io.c              |   45 +-
 fs/btrfs/extent_map.c             |    4 +
 fs/btrfs/file-item.c              |   76 +--
 fs/btrfs/file.c                   |   79 ++-
 fs/btrfs/free-space-tree.c        |    2 +
 fs/btrfs/inode.c                  | 1183 +++++++++++++++++++++++++++++--------
 fs/btrfs/ioctl.c                  |  309 ++++++++--
 fs/btrfs/lzo.c                    |   11 +-
 fs/btrfs/ordered-data.c           |  132 ++---
 fs/btrfs/ordered-data.h           |   25 +-
 fs/btrfs/print-tree.c             |    5 +-
 fs/btrfs/qgroup.c                 |   72 ++-
 fs/btrfs/reflink.c                |   43 +-
 fs/btrfs/relocation.c             |   11 +-
 fs/btrfs/scrub.c                  |    2 +-
 fs/btrfs/send.c                   |   11 +-
 fs/btrfs/send.h                   |    2 +-
 fs/btrfs/space-info.c             |    5 +-
 fs/btrfs/super.c                  |   96 ++-
 fs/btrfs/sysfs.c                  |   15 +-
 fs/btrfs/tests/extent-map-tests.c |    2 +
 fs/btrfs/transaction.c            |   19 +-
 fs/btrfs/transaction.h            |    2 +-
 fs/btrfs/tree-checker.c           |   35 +-
 fs/btrfs/tree-log.c               |  982 ++++++++++++++++++------------
 fs/btrfs/tree-log.h               |    7 +-
 fs/btrfs/volumes.c                |  147 ++---
 fs/btrfs/volumes.h                |    7 +-
 fs/btrfs/zoned.c                  |  167 ++++--
 fs/internal.h                     |    5 -
 fs/ioctl.c                        |    4 -
 fs/read_write.c                   |   34 +-
 fs/remap_range.c                  |    7 +-
 include/linux/fs.h                |    2 +
 include/trace/events/btrfs.h      |    1 +
 include/uapi/linux/btrfs.h        |  133 +++++
 include/uapi/linux/btrfs_tree.h   |    3 +
 50 files changed, 3109 insertions(+), 1331 deletions(-)

^ permalink raw reply	[relevance 3%]

* [GIT PULL] Btrfs updates for 5.3
@ 2019-07-15  8:57  3% David Sterba
  0 siblings, 0 replies; 105+ results
From: David Sterba @ 2019-07-15  8:57 UTC (permalink / raw)
  To: torvalds; +Cc: David Sterba, clm, linux-btrfs, linux-kernel

Hi,

there's majority of cleanups and refactoring, no big new features made
it to the final branch, the rest are fixes.

No merge conflicts. Please pull, thanks.

Hilights:

- chunks that have been trimmed and unchanged since last mount are
  tracked and skipped on repeated trims

- use hw assissed crc32c on more arches, speedups if native instructions
  or optimized implementation is available

- the RAID56 incompat bit is automatically removed when the last block
  group of that type is removed

Fixes:

- fsync fix for reflink on NODATACOW files that could lead to ENOSPC

- fix data loss after inode eviction, renaming it, and fsync it

- fix fsync not persisting dentry deletions due to inode evictions

- update ctime/mtime/iversion after hole punching

- fix compression type validation (reported by KASAN)

- send won't be allowed to start when relocation is in progress, this
  can cause spurious errors or produce incorrect send stream

Core:

- new tracepoints for space update

- tree-checker: better check for end of extents for some tree items

- preparatory work for more checksum algorithms

- run delayed iput at unlink time and don't push the work to cleaner
  thread where it's not properly throttled

- wrap block mapping to structures and helpers, base for further
  refactoring

- split large files, part 1:
  - space info handling
  - block group reservations
  - delayed refs
  - delayed allocation

- other cleanups and refactoring

----------------------------------------------------------------
The following changes since commit 6fbc7275c7a9ba97877050335f290341a1fd8dbf:

  Linux 5.2-rc7 (2019-06-30 11:25:36 +0800)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-5.3-tag

for you to fetch changes up to e02d48eaaed77f6c36916a7aa65c451e1f9d9aab:

  btrfs: fix memory leak of path on error return path (2019-07-05 18:47:57 +0200)

----------------------------------------------------------------
Arnd Bergmann (1):
      btrfs: shut up bogus -Wmaybe-uninitialized warning

Colin Ian King (1):
      btrfs: fix memory leak of path on error return path

David Sterba (32):
      btrfs: detect fast implementation of crc32c on all architectures
      btrfs: fiemap: preallocate ulists for btrfs_check_shared
      btrfs: fix minimum number of chunk errors for DUP
      btrfs: raid56: allow the exact minimum number of devices for balance convert
      btrfs: remove mapping tree structures indirection
      btrfs: use raid_attr table in get_profile_num_devs
      btrfs: use raid_attr in btrfs_chunk_max_errors
      btrfs: use raid_attr to get allowed profiles for balance conversion
      btrfs: use raid_attr table to find profiles for integrity lowering
      btrfs: use raid_attr table for btrfs_bg_type_to_factor
      btrfs: factor out helper for counting data stripes
      btrfs: use u8 for raid_array members
      btrfs: factor out devs_max setting in __btrfs_alloc_chunk
      btrfs: refactor helper for bg flags to name conversion
      btrfs: constify map parameter for nr_parity_stripes and nr_data_stripes
      btrfs: read number of data stripes from map only once
      btrfs: use file:line format for assertion report
      btrfs: tests: add locks around add_extent_mapping
      btrfs: assert delayed ref lock in btrfs_find_delayed_ref_head
      btrfs: switch extent_buffer blocking_writers from atomic to int
      btrfs: switch extent_buffer spinning_writers from atomic to int
      btrfs: switch extent_buffer write_locks from atomic to int
      btrfs: raid56: clear incompat block group flags after removing the last one
      btrfs: add mask for all RAID1 types
      btrfs: use mask for RAID56 profiles
      btrfs: document BTRFS_MAX_MIRRORS
      btrfs: improve messages when updating feature flags
      btrfs: use common helpers for extent IO state insertion messages
      btrfs: drop default value assignments in enums
      btrfs: use raid_attr to adjust minimal stripe size in btrfs_calc_avail_data_space
      btrfs: use raid_attr for minimum stripe count in btrfs_calc_avail_data_space
      btrfs: lift bio_set_dev from bio allocation helpers

Filipe Manana (4):
      Btrfs: fix data loss after inode eviction, renaming it, and fsync it
      Btrfs: prevent send failures and crashes due to concurrent relocation
      Btrfs: fix fsync not persisting dentry deletions due to inode evictions
      Btrfs: add missing inode version, ctime and mtime updates when punching hole

Goldwyn Rodrigues (3):
      btrfs: Remove unused variable mode in btrfs_mount
      btrfs: Simplify update of space_info in __reserve_metadata_bytes()
      btrfs: Evaluate io_tree in find_lock_delalloc_range()

Johannes Thumshirn (13):
      btrfs: use btrfs_csum_data() instead of directly calling crc32c
      btrfs: resurrect btrfs_crc32c()
      btrfs: use btrfs_crc32c{,_final}() in for free space cache
      btrfs: don't assume ordered sums to be 4 bytes
      btrfs: don't assume compressed_bio sums to be 4 bytes
      btrfs: format checksums according to type for printing
      btrfs: add common checksum type validation
      btrfs: check for supported superblock checksum type before checksum validation
      btrfs: Simplify btrfs_check_super_csum() and get rid of size assumptions
      btrfs: add boilerplate code for directly including the crypto framework
      btrfs: directly call into crypto framework for checksumming
      btrfs: remove assumption about csum type form btrfs_print_data_csum_error()
      btrfs: correctly validate compression type

Josef Bacik (23):
      btrfs: run delayed iput at unlink time
      btrfs: move space_info to space-info.h
      btrfs: rename do_chunk_alloc to btrfs_chunk_alloc
      btrfs: export space_info_add_*_bytes
      btrfs: move the space_info handling code to space-info.c
      btrfs: move and export can_overcommit
      btrfs: move the space info update macro to space-info.h
      btrfs: move btrfs_space_info_add_*_bytes to space-info.c
      btrfs: export block_rsv_use_bytes
      btrfs: move dump_space_info to space-info.c
      btrfs: move reserve_metadata_bytes and supporting code to space-info.c
      btrfs: unexport can_overcommit
      btrfs: move btrfs_block_rsv definitions into it's own header
      btrfs: export btrfs_block_rsv_add_bytes
      btrfs: export __btrfs_block_rsv_release
      btrfs: cleanup the target logic in __btrfs_block_rsv_release
      btrfs: stop using block_rsv_release_bytes everywhere
      btrfs: migrate the block-rsv code to block-rsv.c
      btrfs: migrate the global_block_rsv helpers to block-rsv.c
      btrfs: migrate the delayed refs rsv code
      btrfs: migrate btrfs_trans_release_chunk_metadata
      btrfs: migrate the delalloc space stuff to it's own home
      btrfs: move the subvolume reservation stuff out of extent-tree.c

Liu Bo (1):
      Btrfs: remove unused variables in __btrfs_unlink_inode

Nikolay Borisov (17):
      btrfs: Don't opencode sync_blockdev in btrfs_init_dev_replace_tgtdev
      btrfs: Reduce critical section in btrfs_init_dev_replace_tgtdev
      btrfs: dev-replace: Remove impossible WARN_ON
      btrfs: Ensure btrfs_init_dev_replace_tgtdev sees up to date values
      btrfs: Streamline replace sem unlock in btrfs_dev_replace_start
      btrfs: Explicitly reserve space for devreplace item
      btrfs: Remove redundant assignment of tgt_device->commit_total_bytes
      btrfs: add new helper btrfs_lock_and_flush_ordered_range
      btrfs: Use newly introduced btrfs_lock_and_flush_ordered_range
      btrfs: Always use a cached extent_state in btrfs_lock_and_flush_ordered_range
      btrfs: Add comments on locking of several device-related fields
      btrfs: Return EAGAIN if we can't start no snpashot write in check_can_nocow
      btrfs: trim: make reserved device area adjustments more explicit
      btrfs: Don't trim returned range based on input value in find_first_clear_extent_bit
      btrfs: Document __etree_search
      btrfs: Introduce btrfs_io_geometry infrastructure
      btrfs: Use btrfs_get_io_geometry appropriately

Qu Wenruo (7):
      btrfs: extent-tree: Refactor add_pinned_bytes() to add|sub_pinned_bytes()
      btrfs: tree-checker: Check if the file extent end overflows
      btrfs: extent-tree: Add lockdep assert when updating space info
      btrfs: extent-tree: Add trace events for space info numbers update
      btrfs: remove the incorrect comment on RO fs when btrfs_run_delalloc_range() fails
      btrfs: Flush before reflinking any extent to prevent NOCOW write falling back to COW without data reservation
      btrfs: qgroup: Don't hold qgroup_ioctl_lock in btrfs_qgroup_inherit()

Su Yue (1):
      btrfs: switch order of unlocks of space_info and bg in do_trimming()

 fs/btrfs/Kconfig                  |    3 +-
 fs/btrfs/Makefile                 |    3 +-
 fs/btrfs/backref.c                |   17 +-
 fs/btrfs/backref.h                |    3 +-
 fs/btrfs/block-rsv.c              |  425 ++++++
 fs/btrfs/block-rsv.h              |  101 ++
 fs/btrfs/btrfs_inode.h            |   22 +-
 fs/btrfs/check-integrity.c        |   11 +-
 fs/btrfs/compression.c            |   65 +-
 fs/btrfs/compression.h            |    3 +-
 fs/btrfs/ctree.h                  |  282 ++--
 fs/btrfs/delalloc-space.c         |  494 +++++++
 fs/btrfs/delalloc-space.h         |   23 +
 fs/btrfs/delayed-ref.c            |  181 ++-
 fs/btrfs/delayed-ref.h            |   10 +
 fs/btrfs/dev-replace.c            |   31 +-
 fs/btrfs/disk-io.c                |  166 ++-
 fs/btrfs/disk-io.h                |    2 -
 fs/btrfs/extent-tree.c            | 2755 ++++---------------------------------
 fs/btrfs/extent_io.c              |  149 +-
 fs/btrfs/extent_io.h              |   10 +-
 fs/btrfs/file-item.c              |   43 +-
 fs/btrfs/file.c                   |   28 +-
 fs/btrfs/free-space-cache.c       |   16 +-
 fs/btrfs/inode-map.c              |    1 +
 fs/btrfs/inode.c                  |  109 +-
 fs/btrfs/ioctl.c                  |   23 +
 fs/btrfs/locking.c                |   62 +-
 fs/btrfs/ordered-data.c           |   56 +-
 fs/btrfs/ordered-data.h           |    8 +-
 fs/btrfs/print-tree.c             |    6 +-
 fs/btrfs/props.c                  |    8 +-
 fs/btrfs/qgroup.c                 |   24 +-
 fs/btrfs/raid56.h                 |    4 +-
 fs/btrfs/relocation.c             |    1 +
 fs/btrfs/root-tree.c              |   56 +
 fs/btrfs/scrub.c                  |   50 +-
 fs/btrfs/send.c                   |   16 +-
 fs/btrfs/space-info.c             | 1094 +++++++++++++++
 fs/btrfs/space-info.h             |  133 ++
 fs/btrfs/super.c                  |   30 +-
 fs/btrfs/sysfs.c                  |    1 +
 fs/btrfs/tests/extent-io-tests.c  |  117 +-
 fs/btrfs/tests/extent-map-tests.c |   22 +
 fs/btrfs/transaction.c            |   18 +
 fs/btrfs/transaction.h            |    1 +
 fs/btrfs/tree-checker.c           |   11 +
 fs/btrfs/tree-log.c               |   40 +-
 fs/btrfs/volumes.c                |  376 ++---
 fs/btrfs/volumes.h                |   52 +-
 include/trace/events/btrfs.h      |   40 +
 include/uapi/linux/btrfs_tree.h   |    2 +
 52 files changed, 3954 insertions(+), 3250 deletions(-)
 create mode 100644 fs/btrfs/block-rsv.c
 create mode 100644 fs/btrfs/block-rsv.h
 create mode 100644 fs/btrfs/delalloc-space.c
 create mode 100644 fs/btrfs/delalloc-space.h
 create mode 100644 fs/btrfs/space-info.c
 create mode 100644 fs/btrfs/space-info.h

^ permalink raw reply	[relevance 3%]

* [GIT PULL] Btrfs updates for 4.20, part 1
@ 2018-10-22 17:22  3% David Sterba
  0 siblings, 0 replies; 105+ results
From: David Sterba @ 2018-10-22 17:22 UTC (permalink / raw)
  To: torvalds; +Cc: David Sterba, clm, linux-btrfs, linux-kernel

Hi,

this is the first batch with fixes and some nice performance improvements.

Preliminary results show eg. more files/sec in fsmark, better perf on
multi-threaded workloads (filebench, dbench), fewer context switches and
overall better memory allocation characteristics (multiple benchmarks).

Apart from general performance, there's an improvement for qgroups +
balance workload that's been troubling our users.

Note for stable: there are 20+ patches tagged for stable, out of 90. Not
all of them apply cleanly on all stable versions but the conflicts are
mostly due to simple cleanups and resolving should be obvious. The fixes
are otherwise independent.

No merge conflicts expected. Please pull, thanks.


Performance improvements:

* blocking mode of path is gone, means that only the spinning mode is used;
  the blocking resulted in more unnecessary wakeups and updates to the path
  locks, the effects are measurable and improve latency and scaleability

* qgroups: first batch of changes that should speedup balancing with qgroups
  on, skip quota accounting on unchanged subtrees, overall gain is about 30+%
  in runtime

* use rb-tree with cached first node for several structures, small improvement
  to avoid pointer chasing

Fixes:

* trim
  * fix: some blockgroups could have been missed if their logical address was
    past the total filesystem size (ie. after a lot of balancing)
  * better error reporting, after processing blockgroups and whole device
  * fix: continue trimming block groups after an error is encountered
  * check for trim support of the device earlier and avoid some unnecessary work
  * less interaction with transaction commit that improves latency on slower
    storage (eg. image files over NFS)

* fsync
  * fix warning when replaying log after fsync of a O_TMPFILE
  * fix wrong dentries after fsync of file that got its parent replaced

* qgroups: fix rescan that might misc some dirty groups

* don't clean dirty pages during buffered writes, this could lead to lost
  updates in some corner cases

* some block groups could have been delayed in creation, if the allocation
  triggered another one

* error handling improvements

Cleanups:

  * removed unused struct members and variables
  * function return type cleanups
  * delayed refs code refactoring

* protect against deadlock that could be caused by crafted image that tries to
  allocate from a tree that's locked already

----------------------------------------------------------------
The following changes since commit 35a7f35ad1b150ddf59a41dcac7b2fa32982be0e:

  Linux 4.19-rc8 (2018-10-15 07:20:24 +0200)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-4.20-part1-tag

for you to fetch changes up to d9352794dad9f28535439d85a815978878c141ab:

  btrfs: switch return_bigger to bool in find_ref_head (2018-10-15 17:23:41 +0200)

----------------------------------------------------------------
Anand Jain (2):
      btrfs: add assertions where number of devices could go below 0
      btrfs: add helper to obtain number of devices with ongoing dev-replace

Chris Mason (1):
      Btrfs: don't clean dirty pages during buffered writes

Colin Ian King (2):
      btrfs: remove unused pointer inode in relink_file_extents
      btrfs: remove unused pointer 'tree' in btrfs_submit_compressed_read

David Sterba (12):
      btrfs: tests: add separate stub for find_lock_delalloc_range
      btrfs: tests: move testing members of struct btrfs_root to the end
      btrfs: tests: group declarations of self-test helpers
      btrfs: tests: polish ifdefs around testing helper
      btrfs: use common helper instead of open coding a bit test
      btrfs: remove btrfs_dev_replace::read_locks
      btrfs: open code btrfs_dev_replace_clear_lock_blocking
      btrfs: open code btrfs_dev_replace_stats_inc
      btrfs: open code btrfs_after_dev_replace_commit
      btrfs: dev-replace: avoid useless lock on error handling path
      btrfs: dev-replace: move replace members out of fs_info
      btrfs: dev-replace: remove pointless assert in write unlock

Filipe Manana (2):
      Btrfs: fix warning when replaying log after fsync of a tmpfile
      Btrfs: fix wrong dentries after fsync of file that got its parent replaced

Jeff Mahoney (5):
      btrfs: fix error handling in free_log_tree
      btrfs: fix error handling in btrfs_dev_replace_start
      btrfs: iterate all devices during trim, instead of fs_devices::alloc_list
      btrfs: don't attempt to trim devices that don't support it
      btrfs: keep trim from interfering with transaction commits

Josef Bacik (7):
      btrfs: wait on caching when putting the bg cache
      btrfs: release metadata before running delayed refs
      btrfs: protect space cache inode alloc with GFP_NOFS
      btrfs: reset max_extent_size on clear in a bitmap
      btrfs: make sure we create all new block groups
      btrfs: assert on non-empty delayed iputs
      btrfs: drop min_size from evict_refill_and_join

Liu Bo (19):
      Btrfs: do not unnecessarily pass write_lock_level when processing leaf
      Btrfs: remove always true if branch in btrfs_get_extent
      Btrfs: use next_state in find_first_extent_bit
      btrfs: free path at an earlier point in btrfs_get_extent
      Btrfs: remove confusing tracepoint in btrfs_add_reserved_bytes
      Btrfs: fix alignment in declaration and prototype of btrfs_get_extent
      Btrfs: set leave_spinning in btrfs_get_extent
      Btrfs: use args in the correct order for kcalloc in btrfsic_read_block
      Btrfs: unify error handling of btrfs_lookup_dir_item
      Btrfs: remove unnecessary level check in balance_level
      Btrfs: assert page dirty bit on extent buffer pages
      Btrfs: skip set_page_dirty if eb pages are already dirty
      Btrfs: remove wait_ordered_range in btrfs_evict_inode
      Btrfs: delayed-refs: use rb_first_cached for href_root
      Btrfs: delayed-refs: use rb_first_cached for ref_tree
      Btrfs: delayed-inode: use rb_first_cached for ins_root and del_root
      Btrfs: extent_map: use rb_first_cached
      Btrfs: preftree: use rb_first_cached
      Btrfs: kill btrfs_clear_path_blocking

Lu Fengqi (10):
      btrfs: simplify the send_in_progress check in btrfs_delete_subvolume
      btrfs: switch update_size to bool in btrfs_block_rsv_migrate and btrfs_rsv_add_bytes
      btrfs: Remove root parameter from btrfs_insert_dir_item
      btrfs: remove a useless return statement in btrfs_block_rsv_add
      btrfs: qgroup: move the qgroup->members check out from (!qgroup)'s else branch
      btrfs: delayed-ref: pass delayed_refs directly to btrfs_select_ref_head
      btrfs: delayed-ref: pass delayed_refs directly to btrfs_delayed_ref_lock
      btrfs: remove fs_info from btrfs_check_space_for_delayed_refs
      btrfs: remove fs_info from btrfs_should_throttle_delayed_refs
      btrfs: switch return_bigger to bool in find_ref_head

Misono Tomohiro (2):
      btrfs: Remove 'objectid' member from struct btrfs_root
      btrfs: remove redundant variable from btrfs_cross_ref_exist

Nikolay Borisov (8):
      btrfs: Make btrfs_find_device_by_path return struct btrfs_device
      btrfs: Make btrfs_find_device_missing_or_by_path return directly a device
      btrfs: Make btrfs_find_device_by_devspec return btrfs_device directly
      btrfs: Remove logically dead code from btrfs_orphan_cleanup
      btrfs: handle error of get_old_root
      btrfs: Factor out ref head locking code in __btrfs_run_delayed_refs
      btrfs: Factor out loop processing all refs of a head
      btrfs: refactor __btrfs_run_delayed_refs loop

Omar Sandoval (2):
      Btrfs: clean up scrub is_dev_replace parameter
      Btrfs: get rid of btrfs_symlink_aops

Qu Wenruo (16):
      btrfs: qgroup: Dirty all qgroups before rescan
      btrfs: Handle owner mismatch gracefully when walking up tree
      btrfs: locking: Add extra check in btrfs_init_new_buffer() to avoid deadlock
      btrfs: Enhance btrfs_trim_fs function to handle error better
      btrfs: Ensure btrfs_trim_fs can trim the whole filesystem
      btrfs: relocation: Add basic extent backref related comments for build_backref_tree
      btrfs: qgroup: Introduce trace event to analyse the number of dirty extents accounted
      btrfs: qgroup: Introduce function to trace two swaped extents
      btrfs: qgroup: Introduce function to find all new tree blocks of reloc tree
      btrfs: qgroup: Use generation-aware subtree swap to mark dirty extents
      btrfs: qgroup: Don't trace subtree if we're dropping reloc tree
      btrfs: qgroup: Only trace data extents in leaves if we're relocating data block group
      btrfs: tree-checker: Check level for leaves and nodes
      btrfs: qgroup: Avoid calling qgroup functions if qgroup is not enabled
      btrfs: relocation: Cleanup while loop using rbtree_postorder_for_each_entry_safe
      btrfs: relocation: Remove redundant tree level check

Su Yue (1):
      btrfs: defrag: use btrfs_mod_outstanding_extents in cluster_pages_for_defrag

zhong jiang (4):
      btrfs: remove unneeded NULL checks before kfree
      btrfs: change btrfs_free_reserved_bytes to return void
      btrfs: change btrfs_pin_log_trans to return void
      btrfs: change remove_extent_mapping to return void

 fs/btrfs/backref.c                |  39 ++--
 fs/btrfs/btrfs_inode.h            |   8 +-
 fs/btrfs/check-integrity.c        |   6 +-
 fs/btrfs/compression.c            |   2 -
 fs/btrfs/ctree.c                  |  68 +-----
 fs/btrfs/ctree.h                  |  56 ++---
 fs/btrfs/delayed-inode.c          |  41 ++--
 fs/btrfs/delayed-inode.h          |   4 +-
 fs/btrfs/delayed-ref.c            |  69 +++---
 fs/btrfs/delayed-ref.h            |  10 +-
 fs/btrfs/dev-replace.c            |  64 ++----
 fs/btrfs/dev-replace.h            |   8 -
 fs/btrfs/dir-item.c               |   8 +-
 fs/btrfs/disk-io.c                |  24 +-
 fs/btrfs/export.c                 |   4 +-
 fs/btrfs/extent-tree.c            | 424 +++++++++++++++++++++--------------
 fs/btrfs/extent_io.c              |  33 ++-
 fs/btrfs/extent_io.h              |   4 +-
 fs/btrfs/extent_map.c             |  32 +--
 fs/btrfs/extent_map.h             |   4 +-
 fs/btrfs/file.c                   |  33 ++-
 fs/btrfs/free-space-cache.c       |  16 +-
 fs/btrfs/inode.c                  | 120 ++++------
 fs/btrfs/ioctl.c                  |  18 +-
 fs/btrfs/qgroup.c                 | 455 ++++++++++++++++++++++++++++++++++++--
 fs/btrfs/qgroup.h                 |   8 +
 fs/btrfs/ref-verify.c             |   8 +-
 fs/btrfs/relocation.c             |  74 +++----
 fs/btrfs/scrub.c                  |  34 ++-
 fs/btrfs/send.c                   |  24 +-
 fs/btrfs/super.c                  |   6 +-
 fs/btrfs/tests/extent-io-tests.c  |  10 +-
 fs/btrfs/tests/extent-map-tests.c |   4 +-
 fs/btrfs/transaction.c            |  31 +--
 fs/btrfs/tree-checker.c           |  14 ++
 fs/btrfs/tree-log.c               |  86 +++++--
 fs/btrfs/tree-log.h               |   2 +-
 fs/btrfs/volumes.c                | 117 +++++-----
 fs/btrfs/volumes.h                |   9 +-
 include/trace/events/btrfs.h      |  36 ++-
 40 files changed, 1268 insertions(+), 745 deletions(-)

^ permalink raw reply	[relevance 3%]

* [GIT PULL] Btrfs updates for 5.6
@ 2020-01-27 16:30  3% David Sterba
  0 siblings, 0 replies; 105+ results
From: David Sterba @ 2020-01-27 16:30 UTC (permalink / raw)
  To: torvalds; +Cc: David Sterba, linux-btrfs, linux-kernel

Hi,

please pull the following updates for btrfs, thanks.

Features, highlights:

* async discard
  * "mount -o discard=async" to enable it
  * freed extents are not discarded immediatelly, but grouped together and
    trimmed later, with IO rate limiting
  * the "sync" mode submits short extents that could have been ignored
    completely by the device, for SATA prior to 3.1 the requests are
    unqueued and have a big impact on performance
  * the actual discard IO requests have been moved out of transaction
    commit to a worker thread, improving commit latency
  * IO rate and request size can be tuned by sysfs files, for now enabled
    only with CONFIG_BTRFS_DEBUG as we might need to add/delete the files
    and don't have a stable-ish ABI for general use, defaults are
    conservative

* export device state info in sysfs, eg. missing, writeable

* no discard of extents known to be untouched on disk (eg. after
  reservation)

* device stats reset is logged with process name and PID that called the
  ioctl

Fixes:

* fix missing hole after hole punching and fsync when using NO_HOLES

* writeback: range cyclic mode could miss some dirty pages and lead to OOM

* two more corner cases for metadata_uuid change after power loss during
  the change

* fix infinite loop during fsync after mix of rename operations

Core changes:

* qgroup assign returns ENOTCONN when quotas not enabled, used to return
  EINVAL that was confusing

* device closing does not need to allocate memory anymore

* snapshot aware code got removed, disabled for years due to performance
  problems, reimplmentation will allow to select wheter defrag breaks or
  does not break COW on shared extents

* tree-checker:
  * check leaf chunk item size, cross check against number of stripes
  * verify location keys for DIR_ITEM, DIR_INDEX and XATTR items

* new self test for physical -> logical mapping code, used for super block
  range exclusion

* assertion helpers/macros updated to avoid objtool "unreachable code"
  reports on older compilers or config option combinations

----------------------------------------------------------------
The following changes since commit def9d2780727cec3313ed3522d0123158d87224d:

  Linux 5.5-rc7 (2020-01-19 16:02:49 -0800)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-5.6-tag

for you to fetch changes up to 4e19443da1941050b346f8fc4c368aa68413bc88:

  btrfs: free block groups after free'ing fs trees (2020-01-23 17:24:39 +0100)

----------------------------------------------------------------
Anand Jain (6):
      btrfs: sysfs, rename devices kobject holder to devices_kobj
      btrfs: sysfs, btrfs_sysfs_add_fsid() drop unused argument parent
      btrfs: sysfs, rename btrfs_sysfs_add_device()
      btrfs: sysfs, merge btrfs_sysfs_add devices_kobj and fsid
      btrfs: device stats, log when stats are zeroed
      btrfs: sysfs, add devid/dev_state kobject and device attributes

David Sterba (5):
      btrfs: use raid_attr table in calc_stripe_length for nparity
      btrfs: fill ncopies for all raid table entries
      btrfs: remove unused member btrfs_device::work
      btrfs: safely advance counter when looking up bio csums
      btrfs: separate definition of assertion failure handlers

Dennis Zhou (24):
      bitmap: genericize percpu bitmap region iterators
      btrfs: rename DISCARD mount option to to DISCARD_SYNC
      btrfs: keep track of which extents have been discarded
      btrfs: keep track of free space bitmap trim status cleanliness
      btrfs: add the beginning of async discard, discard workqueue
      btrfs: handle empty block_group removal for async discard
      btrfs: discard one region at a time in async discard
      btrfs: sysfs: add removal calls for debug/
      btrfs: sysfs: make UUID/debug have its own kobject
      btrfs: sysfs: add UUID/debug/discard directory
      btrfs: track discardable extents for async discard
      btrfs: keep track of discardable_bytes for async discard
      btrfs: calculate discard delay based on number of extents
      btrfs: add kbps discard rate limit for async discard
      btrfs: limit max discard size for async discard
      btrfs: make max async discard size tunable
      btrfs: have multiple discard lists
      btrfs: only keep track of data extents for async discard
      btrfs: keep track of discard reuse stats
      btrfs: add async discard implementation overview
      btrfs: increase the metadata allowance for the free_space_cache
      btrfs: make smaller extents more likely to go into bitmaps
      btrfs: ensure removal of discardable_* in free_bitmap()
      btrfs: add correction to handle -1 edge case in async discard

Filipe Manana (2):
      Btrfs: fix missing hole after hole punching and fsync when using NO_HOLES
      Btrfs: fix infinite loop during fsync after rename operations

Johannes Thumshirn (6):
      btrfs: fix possible NULL-pointer dereference in integrity checks
      btrfs: remove superfluous BUG_ON() in integrity checks
      btrfs: remove impossible WARN_ON in btrfs_destroy_dev_replace_tgtdev()
      btrfs: decrement number of open devices after closing the device not before
      btrfs: reset device back to allocation state when removing
      btrfs: remove unnecessary wrapper get_alloc_profile

Josef Bacik (6):
      btrfs: don't pass system_chunk into can_overcommit
      btrfs: kill min_allocable_bytes in inc_block_group_ro
      btrfs: fix improper setting of scanned for range cyclic write cache pages
      btrfs: drop log root for dropped roots
      btrfs: set trans->drity in btrfs_commit_transaction
      btrfs: free block groups after free'ing fs trees

Marcos Paulo de Souza (2):
      btrfs: qgroup: remove one-time use variables for quota_root checks
      btrfs: qgroup: return ENOTCONN instead of EINVAL when quotas are not enabled

Nikolay Borisov (12):
      btrfs: Don't discard unwritten extents
      btrfs: Open code __btrfs_free_reserved_extent in btrfs_free_reserved_extent
      btrfs: Rename __btrfs_free_reserved_extent to btrfs_pin_reserved_extent
      btrfs: Remove WARN_ON in walk_log_tree
      btrfs: Remove redundant WARN_ON in walk_down_log_tree
      btrfs: Opencode ordered_data_tree_panic
      btrfs: Move and unexport btrfs_rmap_block
      btrfs: selftests: Add support for dummy devices
      btrfs: Add self-tests for btrfs_rmap_block
      btrfs: Refactor btrfs_rmap_block to improve readability
      btrfs: Handle another split brain scenario with metadata uuid feature
      btrfs: Fix split-brain handling when changing FSID to metadata uuid

Omar Sandoval (11):
      btrfs: use simple_dir_inode_operations for placeholder subvolume directory
      btrfs: get rid of trivial __btrfs_lookup_bio_sums() wrappers
      btrfs: get rid of at_offset parameter to btrfs_lookup_bio_sums()
      btrfs: remove dead snapshot-aware defrag code
      btrfs: make btrfs_ordered_extent naming consistent with btrfs_file_extent_item
      btrfs: remove unnecessary pg_offset assignments in __extent_writepage()
      btrfs: remove trivial goto label in __extent_writepage()
      btrfs: remove redundant i_size check in __extent_writepage_io()
      btrfs: drop create parameter to btrfs_get_extent()
      btrfs: simplify compressed/inline check in __extent_writepage_io()
      btrfs: remove struct find_free_extent.ram_bytes

Qu Wenruo (6):
      btrfs: relocation: Output current relocation stage at btrfs_relocate_block_group()
      btrfs: tree-checker: Check leaf chunk item size
      btrfs: tree-checker: Clean up fs_info parameter from error message wrapper
      btrfs: tree-checker: Refactor inode key check into seperate function
      btrfs: tree-checker: Refactor root key check into separate function
      btrfs: tree-checker: Verify location key for DIR_ITEM/DIR_INDEX

Su Yue (2):
      btrfs: Call find_fsid from find_fsid_inprogress
      btrfs: Factor out metadata_uuid code from find_fsid.

Yunfeng Ye (1):
      btrfs: remove unused condition check in btrfs_page_mkwrite()

zhengbin (1):
      btrfs: Remove unneeded semicolon

 fs/btrfs/Makefile                 |   2 +-
 fs/btrfs/block-group.c            | 212 ++++++++--
 fs/btrfs/block-group.h            |  40 ++
 fs/btrfs/check-integrity.c        |   4 +-
 fs/btrfs/compression.c            |   4 +-
 fs/btrfs/ctree.h                  |  81 +++-
 fs/btrfs/dev-replace.c            |   1 +
 fs/btrfs/discard.c                | 702 ++++++++++++++++++++++++++++++++
 fs/btrfs/discard.h                |  41 ++
 fs/btrfs/disk-io.c                |  37 +-
 fs/btrfs/disk-io.h                |   4 +-
 fs/btrfs/extent-tree.c            |  50 +--
 fs/btrfs/extent_io.c              |  54 +--
 fs/btrfs/extent_io.h              |   6 +-
 fs/btrfs/file-item.c              |  41 +-
 fs/btrfs/file.c                   |  23 +-
 fs/btrfs/free-space-cache.c       | 619 ++++++++++++++++++++++++----
 fs/btrfs/free-space-cache.h       |  41 +-
 fs/btrfs/inode-map.c              |  13 +-
 fs/btrfs/inode.c                  | 834 ++++----------------------------------
 fs/btrfs/ioctl.c                  |   2 +-
 fs/btrfs/ordered-data.c           |  81 ++--
 fs/btrfs/ordered-data.h           |  26 +-
 fs/btrfs/print-tree.c             |   2 +-
 fs/btrfs/qgroup.c                 |  44 +-
 fs/btrfs/relocation.c             |  20 +-
 fs/btrfs/scrub.c                  |   7 +-
 fs/btrfs/space-info.c             |  42 +-
 fs/btrfs/super.c                  |  39 +-
 fs/btrfs/sysfs.c                  | 394 ++++++++++++++++--
 fs/btrfs/sysfs.h                  |   5 +-
 fs/btrfs/tests/btrfs-tests.c      |  29 ++
 fs/btrfs/tests/btrfs-tests.h      |   1 +
 fs/btrfs/tests/extent-map-tests.c | 154 ++++++-
 fs/btrfs/tests/inode-tests.c      |  44 +-
 fs/btrfs/transaction.c            |  30 +-
 fs/btrfs/tree-checker.c           | 225 +++++++---
 fs/btrfs/tree-log.c               | 455 +++++++--------------
 fs/btrfs/volumes.c                | 284 ++++++-------
 fs/btrfs/volumes.h                |  10 +-
 include/linux/bitmap.h            |  35 ++
 include/trace/events/btrfs.h      |   6 +-
 mm/percpu.c                       |  61 +--
 43 files changed, 3042 insertions(+), 1763 deletions(-)
 create mode 100644 fs/btrfs/discard.c
 create mode 100644 fs/btrfs/discard.h

^ permalink raw reply	[relevance 3%]

* [GIT PULL] Btrfs updates for 5.1, part 1
@ 2019-03-04 19:20  3% David Sterba
  0 siblings, 0 replies; 105+ results
From: David Sterba @ 2019-03-04 19:20 UTC (permalink / raw)
  To: torvalds; +Cc: David Sterba, clm, linux-btrfs, linux-kernel

Hi,

the branch contains usual mix of new features, core changes and fixes;
full list below. I'm planning 2nd pull request, with a few more fixes
that arrived recently but too close to merge window, will send it next
week.

Please pull, thanks.


New features:

- support zstd compression levels

- new ioctl to unregister a device from the module (ie. reverse of device
  scan)

- scrub prints a message to log when it's about to start or finish


Core changes:

- qgroups can now skip part of a tree that does not get updated during
  relocation, because this does not affect the quota accounting, estimated
  speedup in run time is about 20%

- the compression workspace management had to be enhanced due to zstd
  requirements

- various enospc fixes, when there's high fragmentation the
  over-reservation can cause ENOSPC that might not happen after a flush,
  in such cases try to wait if the situation improves


Fixes:

- various ioctls could overwrite previous return value if copy_to_user
  fails, fix this so the original error is reported

- more reclaim vs GFP_KERNEL fixes

- other cleanups and refactoring

- fix a (valid) lockdep warning in a test when device replace is
  destroying worker threads

- make qgroup async transaction commit more aggressive, this avoids some
  'quota limit reached' errors if there are not enough data to trigger
  transaction in order to flush

- fix deadlock between snapshot deletion and quotas when backref walking
  is called from context that already holds the same locks

- fsync fixes:
  - fix fsync after succession of renames of different files
  - fix fsync after succession of renames and unlink/rmdir

----------------------------------------------------------------
The following changes since commit 5908e6b738e3357af42c10e1183753c70a0117a9:

  Linux 5.0-rc8 (2019-02-24 16:46:45 -0800)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-5.1-part1-tag

for you to fetch changes up to f65e25e343cfc0e6f4db9a687c4085fad268325d:

  btrfs: Remove unnecessary casts in btrfs_read_root_item (2019-02-25 14:19:23 +0100)

----------------------------------------------------------------
Anand Jain (11):
      btrfs: merge btrfs_find_device_missing_or_by_path() into parent
      btrfs: cleanup btrfs_find_device_by_devspec()
      btrfs: refactor btrfs_find_device() take fs_devices as argument
      btrfs: refactor btrfs_free_stale_devices() to get return value
      btrfs: merge btrfs_find_device and find_device
      btrfs: scrub: print messages when started or finished
      btrfs: introduce new ioctl to unregister a btrfs device
      btrfs: fix comment its device list mutex not volume lock
      btrfs: scrub: fix circular locking dependency warning
      btrfs: scrub: add scrub_lock lockdep check in scrub_workers_get
      btrfs: scrub: convert scrub_workers_refcnt to refcount_t

Anders Roxell (1):
      btrfs: let the assertion expression compile in all configs

Dan Carpenter (1):
      btrfs: drop the lock on error in btrfs_dev_replace_cancel

Dan Robertson (1):
      btrfs: init csum_list before possible free

David Sterba (9):
      btrfs: simplify workqueue name when allocating
      btrfs: split btrfs_set_lock_blocking_rw to read and write helpers
      btrfs: split btrfs_clear_lock_blocking_rw to read and write helpers
      btrfs: replace btrfs_set_lock_blocking_rw with appropriate helpers
      btrfs: open code now trivial btrfs_set_lock_blocking
      btrfs: simplify waiting loop in btrfs_tree_lock
      btrfs: merge btrfs_set_lock_blocking_rw with it's caller
      btrfs: scrub: add assertions for worker pointers
      btrfs: scrub: remove unused nocow worker pointer

Dennis Zhou (12):
      btrfs: add helpers for compression type and level
      btrfs: rename workspaces_list to workspace_manager
      btrfs: manage heuristic workspace as index 0
      btrfs: unify compression ops with workspace_manager
      btrfs: add helper methods for workspace manager init and cleanup
      btrfs: add compression interface in (get/put)_workspace
      btrfs: move to function pointers for get/put workspaces
      btrfs: plumb level through the compression interface
      btrfs: change set_level() to bound the level passed in
      btrfs: zstd use the passed through level instead of default
      btrfs: make zstd memory requirements monotonic
      btrfs: add zstd compression level support

Filipe Manana (14):
      Btrfs: do not overwrite scrub error with fault error in scrub ioctl
      Btrfs: do not overwrite error return value in scrub progress ioctl
      Btrfs: do not overwrite error return value in the get device stats ioctl
      Btrfs: setup a nofs context for memory allocation at btrfs_create_tree()
      Btrfs: setup a nofs context for memory allocation at __btrfs_set_acl
      Btrfs: remove redundant check for swapfiles when reflinking
      Btrfs: do not overwrite error return value in the device replace ioctl
      Btrfs: do not overwrite error return value in the balance ioctl
      Btrfs: move duplicated nodatasum check into common reflink/dedupe helper
      Btrfs: fix fsync after succession of renames of different files
      Btrfs: fix fsync after succession of renames and unlink/rmdir
      Btrfs: remove no longer needed range length checks for deduplication
      Btrfs: add missing error handling after doing leaf/node binary search
      Btrfs: remove assertion when searching for a key in a node/leaf

Johannes Thumshirn (1):
      btrfs: ensure that a DUP or RAID1 block group has exactly two stripes

Josef Bacik (12):
      btrfs: make btrfs_destroy_delayed_refs use btrfs_delayed_ref_lock
      btrfs: make btrfs_destroy_delayed_refs use btrfs_delete_ref_head
      btrfs: call btrfs_create_pending_block_groups unconditionally
      btrfs: replace cleaner_delayed_iput_mutex with a waitqueue
      btrfs: check if there are free block groups for commit
      btrfs: dump block_rsv details when dumping space info
      btrfs: don't use global reserve for chunk allocation
      btrfs: don't enospc all tickets on flush failure
      btrfs: loop in inode_rsv_refill
      btrfs: be more explicit about allowed flush states
      btrfs: reserve extra space during evict
      btrfs: honor path->skip_locking in backref code

Julia Lawall (1):
      Btrfs: drop useless LIST_HEAD in merge_reloc_root

Nikolay Borisov (17):
      btrfs: Make first argument of btrfs_run_delalloc_range directly an inode
      btrfs: Remove unused arguments from btrfs_get_extent_fiemap
      btrfs: Refactor btrfs_get_extent_fiemap
      btrfs: Remove redundant assignment in btrfs_get_extent_fiemap
      btrfs: Remove inode argument from async_cow_submit
      btrfs: Remove isize local variable in compress_file_range
      btrfs: Use ihold instead of igrab in cow_file_range_async
      btrfs: Remove WARN_ON in btrfs_alloc_delalloc_work
      btrfs: Document logic regarding inode in async_cow_submit
      btrfs: Refactor shrink_delalloc
      btrfs: Remove impossible condition from mergable_maps
      btrfs: Rename found_type to extent_type in btrfs_get_extent
      btrfs: Consolidate retval checking of core btree functions
      btrfs: Remove not_found_em label from btrfs_get_extent
      btrfs: use WARN_ON in a canonical form btrfs_remove_block_group
      btrfs: Remove EXTENT_FIRST_DELALLOC bit
      btrfs: Fix grossly misleading argument names in extent io search

Qu Wenruo (10):
      btrfs: relocation: Delay reloc tree deletion after merge_reloc_roots
      btrfs: qgroup: Refactor btrfs_qgroup_trace_subtree_swap
      btrfs: qgroup: Introduce per-root swapped blocks infrastructure
      btrfs: qgroup: Use delayed subtree rescan for balance
      btrfs: qgroup: Cleanup old subtree swap code
      btrfs: qgroup: Remove duplicated trace points for qgroup_rsv_add/release
      btrfs: Output ENOSPC debug info in inc_block_group_ro
      btrfs: extent_io: Kill the forward declaration of flush_write_bio
      btrfs: qgroup: Move reserved data accounting from btrfs_delayed_ref_head to btrfs_qgroup_extent_record
      btrfs: qgroup: Make qgroup async transaction commit more aggressive

YueHaibing (2):
      btrfs: remove set but not used variable 'num_pages'
      btrfs: Remove unnecessary casts in btrfs_read_root_item

 fs/btrfs/acl.c               |   9 ++
 fs/btrfs/async-thread.c      |  10 +-
 fs/btrfs/backref.c           |  22 ++-
 fs/btrfs/compression.c       | 253 ++++++++++++++---------------
 fs/btrfs/compression.h       |  52 +++++-
 fs/btrfs/ctree.c             |  74 ++++-----
 fs/btrfs/ctree.h             |  61 +++++--
 fs/btrfs/delayed-ref.c       |  15 +-
 fs/btrfs/delayed-ref.h       |  11 --
 fs/btrfs/dev-replace.c       |   9 +-
 fs/btrfs/disk-io.c           |  39 +++--
 fs/btrfs/extent-tree.c       | 292 +++++++++++++++++++++------------
 fs/btrfs/extent_io.c         |  87 +++++-----
 fs/btrfs/extent_io.h         |  15 +-
 fs/btrfs/extent_map.c        |   5 +-
 fs/btrfs/extent_map.h        |   1 +
 fs/btrfs/file.c              |   3 +-
 fs/btrfs/inode.c             | 207 +++++++++++++++---------
 fs/btrfs/ioctl.c             |  60 ++-----
 fs/btrfs/locking.c           | 108 ++++++-------
 fs/btrfs/locking.h           |  15 +-
 fs/btrfs/lzo.c               |  31 +++-
 fs/btrfs/qgroup.c            | 372 ++++++++++++++++++++++++++++++++-----------
 fs/btrfs/qgroup.h            | 120 ++++++++++++--
 fs/btrfs/ref-verify.c        |   4 +-
 fs/btrfs/relocation.c        | 119 ++++++++++----
 fs/btrfs/root-tree.c         |   4 +-
 fs/btrfs/scrub.c             |  49 ++++--
 fs/btrfs/super.c             |  13 +-
 fs/btrfs/transaction.c       |   9 +-
 fs/btrfs/tree-defrag.c       |   2 +-
 fs/btrfs/tree-log.c          | 282 ++++++++++++++++++++++++++------
 fs/btrfs/volumes.c           | 202 ++++++++++++-----------
 fs/btrfs/volumes.h           |   5 +-
 fs/btrfs/zlib.c              |  45 +++++-
 fs/btrfs/zstd.c              | 316 ++++++++++++++++++++++++++++++++++--
 include/trace/events/btrfs.h |  30 +---
 include/uapi/linux/btrfs.h   |   2 +
 38 files changed, 1993 insertions(+), 960 deletions(-)

^ permalink raw reply	[relevance 3%]

* [GIT PULL] Btrfs updates
@ 2012-06-01 13:18  4% Chris Mason
  0 siblings, 0 replies; 105+ results
From: Chris Mason @ 2012-06-01 13:18 UTC (permalink / raw)
  To: Linus Torvalds, linux-btrfs, LKML

Hi everyone,

My for-linus branch is updated for 3.5:

git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git for-linus

This includes a fairly large change from Josef around data writeback
completion.  Before, the writeback wasn't completed until the metadata
insertions for the extent were done, and this made for fairly large
latency spikes on the last page of each ordered extent.

We already had a separate mechanism for tracking pending metadata
insertions, so Josef just needed to tweak things a little to end
writeback earlier on the page.  Overall it makes us much friendly to
memory reclaim and lowers latencies quite a lot for synchronous IO.

Jan Schmidt has finished some background work required to track btree
blocks as they go through changes in ownership.  It's the missing piece
he needed for both btrfs send/receive and subvolume quotas.  Neither of
those are ready yet, but the new tracking code is included here.  Most
of the time, the new code is off.  It is only used by scrub and other
backref walkers.

Stefan Behrens has added io failure tracking.  This includes counters
for which drives are causing the most trouble so the admin (or an
automated tool) can choose to kick them out.  We're tracking IO errors,
crc errors, and generation checks we do on each metadata block.

RAID5/6 did miss the cut this time because I'm having trouble with
corruptions.  I'll nail it down next week and post as a beta testing
before 3.6

Jan Schmidt (21) commits (+1405/-290):
    Btrfs: bugfix: ignore the wrong key for indirect tree block backrefs (+135/-50)
    Btrfs: add del_ptr and insert_ptr modifications to the tree mod log (+32/-10)
    Btrfs: add inodes before dropping the extent lock in find_all_leafs (+43/-6)
    Btrfs: fix tree mod log rewinded level and rewinding of moved keys (+4/-2)
    Btrfs: use delayed ref sequence numbers for all fs-tree updates (+13/-23)
    Btrfs: add missing spin_lock for insertion into tree mod log (+18/-5)
    Btrfs: don't set for_cow parameter for tree block functions (+20/-20)
    Btrfs: use the tree modification log for backref resolving (+29/-17)
    Btrfs: put all block modifications into the tree mod log (+36/-0)
    Btrfs: tree mod log sanity checks in join_transaction (+18/-0)
    Btrfs: look into the extent during find_all_leafs (+158/-84)
    Btrfs: fs_info variable for join_transaction (+19/-18)
    Btrfs: dummy extent buffers for tree mod log (+76/-7)
    Btrfs: add tree modification log functions (+412/-1)
    Btrfs: bugfix in btrfs_find_parent_nodes (+3/-2)
    Btrfs: move struct seq_list to ctree.h (+7/-5)
    Btrfs: add tree_mod_dont_log helper (+15/-9)
    Btrfs: add tree mod log to fs_info (+14/-0)
    Btrfs: add btrfs_search_old_slot (+317/-4)
    Btrfs: fix tree mod log del_ptr (+7/-6)
    Btrfs: ulist realloc bugfix (+29/-21)

Josef Bacik (13) commits (+330/-322):
    Btrfs: convert the inode bit field to use the actual bit operations (+44/-44)
    Btrfs: check to see if the inode is in the log before fsyncing (+16/-17)
    Btrfs: merge contigous regions when loading free space cache (+41/-0)
    Btrfs: fall back to non-inline if we don't have enough space (+4/-1)
    Btrfs: do not check delalloc when updating disk_i_size (+3/-16)
    Btrfs: do not do filemap_write_and_wait_range in fsync (+6/-5)
    Btrfs: finish ordered extents in their own thread (+164/-191)
    Btrfs: remove useless waiting and extra filemap work (+2/-15)
    Btrfs: fix how we deal with the orphan block rsv (+24/-22)
    Btrfs: use i_version instead of our own sequence (+19/-10)
    Btrfs: fix return code in drop_objectid_items (+2/-0)
    Btrfs: fix compile warnings in extent_io.c (+1/-1)
    Btrfs: cache no acl on new inodes (+4/-0)

Stefan Behrens (7) commits (+985/-174):
    Btrfs: read device stats on mount, write modified ones during commit (+232/-0)
    Btrfs: add device counters for detected IO and checksum errors (+230/-24)
    Btrfs: fix runtime warning in check-integrity check data mode (+22/-3)
    Btrfs: change integrity checker to support big blocks (+415/-146)
    Btrfs: fix false positive in check-integrity on unmount (+1/-1)
    Btrfs: add ioctl to get and reset the device stats (+77/-0)
    Btrfs: set ioprio of scrub readahead to idle (+8/-0)

Wang Sheng-Hui (5) commits (+7/-8):
    Btrfs: remove the useless assignment to *entry in function tree_insert of file extent_io.c (+0/-1)
    Btrfs: fix btrfs_release_extent_buffer_page with the right usage of num_extent_pages (+3/-1)
    btrfs/ctree.c: remove the unnecessary 'return -1;' at the end of bin_search (+2/-4)
    Btrfs: cleanup the comment for clear_state_bit in extent_io.c (+1/-1)
    Btrfs: fix the comment for find_first_extent_bit (+1/-1)

Jim Meyering (3) commits (+32/-44):
    Btrfs: NUL-terminate path buffer in DEV_INFO ioctl result (+4/-2)
    Btrfs: avoid buffer overrun in mount option handling (+26/-41)
    Btrfs: avoid buffer overrun in btrfs_printk (+2/-1)

Liu Bo (3) commits (+28/-30):
    Btrfs: use fastpath in extent state ops as much as possible (+18/-26)
    Btrfs: fix wrong error returned by adding a device (+1/-1)
    Btrfs: do not do balance in readonly mode (+9/-3)

Sergei Trofimovich (1) commits (+40/-5):
    btrfs: allow changing 'thread_pool' size at remount time

Daniel J Blueman (1) commits (+5/-6):
    Fix minor type issues

Dan Carpenter (1) commits (+1/-1):
    Btrfs: cleanup: use consistent lock naming

Asias He (1) commits (+0/-14):
    btrfs: Drop unused function btrfs_abort_devices()

Miao Xie (1) commits (+39/-10):
    Btrfs: fix the same inode id problem when doing auto defragment

Tsutomu Itoh (1) commits (+18/-4):
    Btrfs: return value of btrfs_read_buffer is checked correctly

Total: (58) commits

 fs/btrfs/acl.c              |    4 +
 fs/btrfs/backref.c          |  495 +++++++++++++++++--------
 fs/btrfs/backref.h          |    3 +-
 fs/btrfs/btrfs_inode.h      |   50 ++-
 fs/btrfs/check-integrity.c  |  584 +++++++++++++++++++++--------
 fs/btrfs/ctree.c            |  861 +++++++++++++++++++++++++++++++++++++++++--
 fs/btrfs/ctree.h            |   77 +++-
 fs/btrfs/delayed-inode.c    |    8 +-
 fs/btrfs/delayed-ref.c      |   10 +-
 fs/btrfs/delayed-ref.h      |   24 --
 fs/btrfs/disk-io.c          |   57 ++-
 fs/btrfs/disk-io.h          |    1 -
 fs/btrfs/extent-tree.c      |   23 +-
 fs/btrfs/extent_io.c        |  168 ++++++---
 fs/btrfs/extent_io.h        |    8 +-
 fs/btrfs/file.c             |   76 ++--
 fs/btrfs/free-space-cache.c |   45 ++-
 fs/btrfs/inode.c            |  264 +++++++------
 fs/btrfs/ioctl.c            |   50 ++-
 fs/btrfs/ioctl.h            |   33 ++
 fs/btrfs/ordered-data.c     |  165 ++++-----
 fs/btrfs/ordered-data.h     |   13 +-
 fs/btrfs/print-tree.c       |    3 +
 fs/btrfs/reada.c            |    5 +
 fs/btrfs/scrub.c            |   65 +++-
 fs/btrfs/super.c            |  117 +++---
 fs/btrfs/transaction.c      |   59 ++-
 fs/btrfs/tree-log.c         |   35 +-
 fs/btrfs/ulist.c            |   38 +-
 fs/btrfs/ulist.h            |   15 +-
 fs/btrfs/volumes.c          |  306 ++++++++++++++-
 fs/btrfs/volumes.h          |   52 +++
 fs/btrfs/xattr.c            |    1 +
 33 files changed, 2849 insertions(+), 866 deletions(-)

^ permalink raw reply	[relevance 4%]

* [GIT PULL] Btrfs updates
@ 2011-05-27 19:55  4% Chris Mason
  0 siblings, 0 replies; 105+ results
From: Chris Mason @ 2011-05-27 19:55 UTC (permalink / raw)
  To: Linus Torvalds, linux-btrfs, linux-kernel

Hi everyone,

I always thought that I'd be retired and with my flying car at the
beach by the time 3.0 came out, but I've setup the for-linus branch of
the btrfs-unstable tree for pulling:

git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable.git for-linus

This pull request is probably the biggest I've sent, but it isn't
a code dump into our shiny new .0 rc.  The bulk of the changes are
three separate projects that have been going on for 6-8 months:

	A new btrfs inode allocation cache (Li Zefan)
	Delayed metadata insertion into the btree (Miao Xe)
	Device scrubbing (Arne Jansen)

On top of that Dave Sterba kicked in a series of code cleanups and Josef
Bacik did some really nice tuning.  The short log lists a few other
cleanups and fixes too.

I coded up a mount -o autodefrag that will detect random writes
into existing files and kick off background defragging.  It is well
suited to bdb or sqlite databases, but not virtualization images or big
databases (yet).  Once I make sure it doesn't defrag files over and over
again, I'll move this toward the default.

David Sterba (17) commits (+310/-3253):
    btrfs: rename variables clashing with global function names (+53/-53)
    btrfs: use printk_ratelimited instead of printk_ratelimit (+10/-24)
    btrfs: drop unused parameter from btrfs_release_path (+160/-160)
    btrfs: drop unused parameter from extent_map_tree_init (+5/-7)
    btrfs: drop unused argument from extent_io_tree_init (+10/-12)
    btrfs: remove nested duplicate variable declarations (+0/-4)
    btrfs: drop gfp parameter from alloc_extent_buffer (+7/-9)
    btrfs: drop gfp parameter from find_extent_buffer (+4/-6)
    btrfs: drop gfp parameter from alloc_extent_map (+16/-17)
    btrfs: use unsigned type for single bit bitfield (+4/-4)
    btrfs: remove old unused commented out code (+1/-2071)
    btrfs: Document a mutex lock/unlock sequence (+12/-0)
    btrfs: make functions static when possible (+7/-7)
    btrfs: unify checking of IS_ERR and null (+17/-17)
    btrfs: remove unused function prototypes (+0/-43)
    btrfs: remove all unused functions (+1/-817)
    btrfs: fix dereference before check (+3/-2)

Li Zefan (8) commits (+1449/-665):
    Btrfs: Make the code for reading/writing free space cache generic (+204/-154)
    Btrfs: setup free ino caching in a more asynchronous way (+22/-6)
    Btrfs: Support reading/writing on disk free ino cache (+236/-19)
    Btrfs: Remove unused btrfs_block_group_free_space() (+0/-16)
    Btrfs: Make free space cache code generic (+271/-223)
    Btrfs: Cache free inode numbers in memory (+500/-53)
    Btrfs: Always use 64bit inode number (+208/-182)
    Btrfs: Use bitmap_set/clear() (+8/-12)

Xiao Guangrong (7) commits (+134/-59):
    Btrfs: allocate extent state and check the result properly (+26/-8)
    Btrfs: using rcu lock in the reader side of devices list (+72/-36)
    Btrfs: fix the race between reading and updating devices (+9/-0)
    Btrfs: fix the race between remove dev and alloc chunk (+6/-0)
    Btrfs: fix bh leak on __btrfs_open_devices path (+1/-0)
    Btrfs: fix unsafe usage of merge_state (+14/-8)
    Btrfs: drop unnecessary device lock (+6/-7)

Arne Jansen (6) commits (+1822/-361):
    btrfs scrub: don't coalesce pages that are logically discontiguous (+2/-1)
    btrfs: move btrfs_cmp_device_free_bytes to super.c (+26/-28)
    btrfs: quasi-round-robin for chunk allocation (+177/-305)
    btrfs: add readonly flag (+16/-12)
    btrfs: heed alloc_start (+1/-4)
    btrfs: scrub (+1600/-11)

Tsutomu Itoh (5) commits (+43/-36):
    Btrfs: BUG_ON is deleted from the caller of btrfs_truncate_item & btrfs_extend_item (+2/-17)
    Btrfs: return error code to caller when btrfs_previous_item fails (+3/-2)
    Btrfs: return error code to caller when btrfs_del_item fails (+19/-11)
    Btrfs: return error to caller if read_one_inode() fails (+18/-6)
    Btrfs: check return value of btrfs_inc_extent_ref() (+1/-0)

Chris Mason (4) commits (+689/-144):
    Btrfs: update the delayed inode code to use the btrfs_ino helper. (+7/-6)
    Btrfs: use the device_list_mutex during write_dev_supers (+2/-2)
    Btrfs: return -ENOMEM in clear_extent_bit (+2/-1)
    Btrfs: add mount -o auto_defrag (+678/-135)

Sergei Trofimovich (3) commits (+7/-3):
    btrfs: don't spin in shrink_delalloc if there is nothing to free (+4/-0)
    btrfs: fix typo 'testeing' -> 'testing' (+2/-2)
    btrfs: typo: 'btrfS' -> 'btrfs' (+1/-1)

Jan Schmidt (1) commits (+169/-2):
    btrfs: new ioctls for scrub

liubo (1) commits (+3/-0):
    Btrfs: do not flush csum items of unchanged file data during treelog

Miao Xie (1) commits (+2074/-91):
    btrfs: implement delayed inode items operation

Julia Lawall (1) commits (+4/-1):
    fs/btrfs: Add missing btrfs_free_path

Andi Kleen (1) commits (+0/-4):
    BTRFS: Remove unused node_lock

Ilya Dryomov (1) commits (+80/-207):
    btrfs scrub: make fixups sync

Jamey Sharp (1) commits (+0/-43):
    btrfs: Delete unused version.sh script.

Hugo Mills (1) commits (+1/-3):
    btrfs: Ensure the tree search ioctl returns the right number of records

Total: (58) commits

 fs/btrfs/Makefile           |    2 +-
 fs/btrfs/acl.c              |    2 +-
 fs/btrfs/btrfs_inode.h      |   15 +
 fs/btrfs/compression.c      |   47 +-
 fs/btrfs/compression.h      |    2 +-
 fs/btrfs/ctree.c            |   51 +-
 fs/btrfs/ctree.h            |  244 +++---
 fs/btrfs/delayed-inode.c    | 1695 ++++++++++++++++++++++++++++++++++++
 fs/btrfs/delayed-inode.h    |  141 +++
 fs/btrfs/delayed-ref.c      |  114 ---
 fs/btrfs/delayed-ref.h      |    6 -
 fs/btrfs/dir-item.c         |   39 +-
 fs/btrfs/disk-io.c          |  210 +++--
 fs/btrfs/disk-io.h          |   19 +-
 fs/btrfs/export.c           |   25 +-
 fs/btrfs/extent-tree.c      | 2014 ++++---------------------------------------
 fs/btrfs/extent_io.c        |  324 ++------
 fs/btrfs/extent_io.h        |   40 +-
 fs/btrfs/extent_map.c       |    8 +-
 fs/btrfs/extent_map.h       |    4 +-
 fs/btrfs/file-item.c        |   38 +-
 fs/btrfs/file.c             |  302 ++++++-
 fs/btrfs/free-space-cache.c |  993 +++++++++++++---------
 fs/btrfs/free-space-cache.h |   48 +-
 fs/btrfs/inode-item.c       |    2 -
 fs/btrfs/inode-map.c        |  444 ++++++++++-
 fs/btrfs/inode-map.h        |   13 +
 fs/btrfs/inode.c            |  700 ++++++---------
 fs/btrfs/ioctl.c            |  624 +++++++++++---
 fs/btrfs/ioctl.h            |  107 ++-
 fs/btrfs/locking.c          |   25 -
 fs/btrfs/locking.h          |    2 -
 fs/btrfs/ref-cache.c        |  164 ----
 fs/btrfs/ref-cache.h        |   24 -
 fs/btrfs/relocation.c       |   67 +-
 fs/btrfs/root-tree.c        |   61 +--
 fs/btrfs/scrub.c            | 1369 +++++++++++++++++++++++++++++
 fs/btrfs/super.c            |   51 +-
 fs/btrfs/sysfs.c            |   77 --
 fs/btrfs/transaction.c      |  196 ++---
 fs/btrfs/transaction.h      |    5 +-
 fs/btrfs/tree-defrag.c      |    2 +-
 fs/btrfs/tree-log.c         |  208 +++--
 fs/btrfs/tree-log.h         |    1 -
 fs/btrfs/version.sh         |   43 -
 fs/btrfs/volumes.c          |  657 ++++++---------
 fs/btrfs/volumes.h          |   27 +-
 fs/btrfs/xattr.c            |   12 +-
 48 files changed, 6594 insertions(+), 4670 deletions(-)

^ permalink raw reply	[relevance 4%]

* [GIT PULL] Btrfs updates for 2.6.39
@ 2011-03-28 12:08  4% Chris Mason
  0 siblings, 0 replies; 105+ results
From: Chris Mason @ 2011-03-28 12:08 UTC (permalink / raw)
  To: Linus Torvalds, linux-btrfs, linux-kernel

Hi everyone,

The kernel.org mirror is making me pay for a mistake in my push last
night.  I'm still waiting for it to update the mirrors with the correct
commits, so I've got the proper sha down below.

Linus, I've pushed out two branches for you, for-linus and
for-linus-unmerged

git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable.git for-linus

The correct top commit in for-linus: 08aca535a2150e951c6f1d882bea6ef1a1c31822

git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable.git for-linus-unmerged

The correct top commit in for-linus-unmerged: d9d04879321af570ea7285c6dad92d9c3cd108a1

The reason there are two is because there was a conflict in
fs/btrfs/volumes.c. Jens' unplugging code and the new btrfs fitrim
support were both changing the same code.  The merge isn't too bad, his
stuff was just removing the tests for an unplugging function, but I
wanted to provide a wrapped up merge commit just in case.

So, for-linus-unmerged is against 2.6.38, and for-linus is against your
git tree as of Friday.  The shortlog/diffstat below don't include the merge
commit.

This pull has per-file controls in btrfs for the compression and nocow
flags.  This goes in through the standard chattr interface, and Ted did
ack the new flags.

We also have support for the FITRIM ioctl, which will let us discard in
bulk.  It will be very interesting to compare the performance of online
discard vs bulk trim, and it is possible to run both at the same time.

There are also many error handling fixes, allocator performance fixes,
code cleanups, a switch to the new truncate handling code, and a few
other small fixes.  This might be the first pull in a long time without
the words ENOSPC in it, but I'm sure we've fixed that too.

Josef Bacik (22) commits (+790/-674):
    Btrfs: check free space in block group before searching for a cluster (+10/-0)
    Btrfs: deal with min_bytes appropriately when looking for a cluster (+4/-5)
    Btrfs: make sure to remove the orphan item from the in-memory list (+6/-0)
    Btrfs: mark the bio with an error if we have a failure in dio (+8/-0)
    Btrfs: fix how we deal with the pages array in the write path (+5/-4)
    Btrfs: add a comment explaining what btrfs_cont_expand does (+6/-0)
    Btrfs: return error if the range we want to map is bogus (+1/-0)
    Btrfs: check return value of btrfs_search_slot properly (+2/-0)
    Btrfs: use mark_inode_dirty when expanding the file (+1/-15)
    Btrfs: cleanup error handling in the truncate path (+45/-19)
    Btrfs: cleanup how we setup free space clusters (+182/-185)
    Btrfs: don't allocate dip->csums when doing writes (+5/-2)
    Btrfs: don't be as aggressive about using bitmaps (+16/-3)
    Btrfs: add checks to verify dir items are correct (+50/-0)
    Btrfs: check items for correctness as we search (+95/-124)
    Btrfs: change reserved_extents to an atomic_t (+29/-21)
    Btrfs: only add orphan items when truncating (+18/-27)
    Btrfs: handle errors in btrfs_orphan_cleanup (+50/-23)
    Btrfs: use a slab for the free space entries (+29/-16)
    Btrfs: convert to the new truncate sequence (+40/-47)
    Btrfs: simplify our write path (+180/-175)
    Btrfs: fix formatting in file.c (+8/-8)

liubo (6) commits (+779/-36):
    Btrfs: fix memory leak of empty filesystem after balance (+6/-0)
    Btrfs: fix OOPS of empty filesystem after balance (+30/-0)
    Btrfs: add initial tracepoint support for btrfs (+727/-11)
    btrfs: make inode ref log recovery faster (+11/-24)
    Btrfs: fix return value of setflags ioctl (+3/-1)
    Btrfs: add datacow flag in inode flag (+2/-0)

Li Dongyang (4) commits (+359/-51):
    Btrfs: make btrfs_map_block() return entire free extent for each device of RAID0/1/10/DUP (+129/-22)
    Btrfs: adjust btrfs_discard_extent() return errors and trimmed bytes (+31/-19)
    Btrfs: add btrfs_trim_fs() to handle FITRIM (+190/-1)
    Btrfs: make update_reserved_bytes() public (+9/-9)

Tsutomu Itoh (3) commits (+96/-37):
    Btrfs: check return value of btrfs_alloc_path() (+27/-14)
    Btrfs: check return value of read_tree_block() (+15/-0)
    Btrfs: cleanup some BUG_ON() (+54/-23)

Miao Xie (2) commits (+6/-3):
    btrfs: fix possible deadlock by clearing __GFP_FS flag (+4/-1)
    btrfs: use GFP_NOFS instead of GFP_KERNEL (+2/-2)

Chris Mason (2) commits (+28/-25):
    Btrfs: use RCU instead of a spinlock to protect the root node (+8/-19)
    Btrfs: fix __btrfs_map_block on 32 bit machines (+20/-6)

Al Viro (2) commits (+28/-11):
    btrfs: don't mess with i_nlink of unlocked inode in rename() (+25/-11)
    btrfs: check link counter overflow in link(2) (+3/-0)

Yoshinori Sano (1) commits (+12/-0):
    Btrfs: fix uncheck memory allocations

Mark Fasheh (1) commits (+1/-1):
    btrfs: return EXDEV when linking from different subvolumes

Liu Bo (1) commits (+72/-7):
    Btrfs: Per file/directory controls for COW and compression

David Sterba (1) commits (+2/-1):
    btrfs: properly access unaligned checksum buffer

Total: (45) commits (+2173/-846)

 fs/btrfs/btrfs_inode.h       |    3 +-
 fs/btrfs/compression.c       |   17 +-
 fs/btrfs/ctree.c             |  159 +---------
 fs/btrfs/ctree.h             |   19 +-
 fs/btrfs/delayed-ref.c       |    6 +
 fs/btrfs/dir-item.c          |   45 +++-
 fs/btrfs/disk-io.c           |  132 ++++++++-
 fs/btrfs/extent-tree.c       |  229 +++++++++++----
 fs/btrfs/extent_io.c         |    3 +
 fs/btrfs/extent_io.h         |    1 +
 fs/btrfs/file-item.c         |    5 +-
 fs/btrfs/file.c              |  388 +++++++++++++------------
 fs/btrfs/free-space-cache.c  |  510 ++++++++++++++++++++-------------
 fs/btrfs/free-space-cache.h  |    2 +
 fs/btrfs/inode-map.c         |    3 +-
 fs/btrfs/inode.c             |  366 +++++++++++++++--------
 fs/btrfs/ioctl.c             |  100 ++++++-
 fs/btrfs/ordered-data.c      |    8 +
 fs/btrfs/relocation.c        |    8 +-
 fs/btrfs/root-tree.c         |    6 +-
 fs/btrfs/super.c             |    5 +
 fs/btrfs/transaction.c       |   14 +-
 fs/btrfs/tree-log.c          |   57 ++--
 fs/btrfs/volumes.c           |  180 +++++++++--
 fs/btrfs/volumes.h           |   12 +
 fs/btrfs/xattr.c             |    2 +
 include/linux/fs.h           |    2 +
 include/trace/events/btrfs.h |  667 ++++++++++++++++++++++++++++++++++++++++++
 28 files changed, 2138 insertions(+), 811 deletions(-)

^ permalink raw reply	[relevance 4%]

* [GIT PULL] Btrfs updates
@ 2010-03-15 19:18  4% Chris Mason
  0 siblings, 0 replies; 105+ results
From: Chris Mason @ 2010-03-15 19:18 UTC (permalink / raw)
  To: Linus Torvalds, linux-btrfs, linux-kernel

Hello everyone,

The master branch of the btrfs unstable tree has a collection of fixes
and features:

git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable.git master

If Linus decides this pull is too big/too late, we'll maintain a bug fix
only branch for .34 and keep this branch stable for people that want to
pull in the new features.

One big feature from this code is the ability to change which subvolume
or snapshot is mounted by default.  For a while, we've had mount -o
subvol, which lets you jump into a subvolume instead of using the
default root.  Something like this:

mkfs.btrfs /dev/xxx
mount /dev/xxx /mnt
# did I mention the new 'btrfs' command in btrfs-progs-unstable?
btrfs subvolume create /mnt/new_subvol
umount /mnt
mount -o subvol=new_subvol /dev/xxx /mnt

The new ioctl allows you to set this once and have it used as the new
default for every mount (without any mount options), until you change it
again.  This is part of snapshot assisted upgrades, where you can take a
snapshot and revert back to the old tree if it didn't work out.

But (and this is why I mention it up top), the ioctl also sets an
incompat bit on the super block because we ended up doing it differently
than I had planned in the disk format.  People would end up with a big
surprise if they mounted with 2.6.33 and got one directory tree but
mounted with 2.6.32 and got another, so we flip an incompat bit when the
ioctl is run.

The incompat bit is only set if you run the set-default ioctl.

The btrfs-unstable git tree is against 2.6.32 so you can pull
it into older trees.

The file defragging ioctl had some bugs that could lead to getting stuck
in balance_dirty_pages.  I fixed these up and changed it to only defrag
extents in the file that were actually fragmented.  I added the ability
to compress a single file on demand and defrag only a range of bytes in
the file.

When snapshots are taken, we now wait for all the delayed allocation
extents to hit the disk first.  When I originally made the snapshotting
code, there were many different threads flaming pony fsyncs and I had
this funny idea that people really wanted to run the btrfs sync ioctl
before snapshotting.  At any rate, we have snapshotting ponies now.

There's a new ioctl to list all the subvolumes on the filesystem.  This
makes use of a new interface that runs tree searches from userland,
which we'll build on and use for incremental backups in later
btrfs-progs releases.

Josef changed the math for df a little to better reflect space available
for data, and factors in duplication for raid and single spindle dup.
He also added a space info ioctl which shows how much space is tied up
in metadata, and shows the raid level used for metadata/data.

The short log shows that most of these changes are in the ioctls, but we
have performance fixes in the mix as well, mostly to reduce contention
on the in-ram extent mapping and state trees for each file.

Josef Bacik (10) commits (+517/-160):
    Btrfs: make set/get functions for the super compat_ro flags use compat_ro (+1/-1)
    Btrfs: change the ordered tree to use a spinlock instead of a mutex (+19/-19)
    Btrfs: add ioctl and incompat flag to set the default mount subvol (+80/-1)
    Btrfs: cache the extent state everywhere we possibly can V2 (+148/-90)
    Btrfs: make subvolid=0 mount the original default root (+9/-3)
    Btrfs: make df be a little bit more understandable (+26/-3)
    Btrfs: cache extent state in find_delalloc_range (+8/-3)
    Btrfs: cache ordered extent when completing io (+10/-5)
    Btrfs: change how we mount subvolumes (+158/-34)
    Btrfs: add a "df" ioctl for btrfs (+58/-1)

Chris Mason (6) commits (+573/-56):
    Btrfs: run the backing dev more often in the submit_bio helper (+10/-10)
    Btrfs: finish read pages in the order they are submitted (+4/-3)
    Btrfs: don't look at bio flags after submit_bio (+3/-3)
    Btrfs: be more selective in the defrag ioctl (+140/-10)
    Btrfs: add search and inode lookup ioctls (+299/-16)
    Btrfs: add new defrag-range ioctl. (+117/-14)

TARUISI Hiroaki (2) commits (+99/-0):
    Btrfs: add a function to lookup a directory path by following backrefs (+92/-0)
    btrfs: Update existing btrfs_device for renaming device (+7/-0)

Sage Weil (1) commits (+1/-4):
    Btrfs: flush data on snapshot creation

Xiao Guangrong (1) commits (+3/-3):
    btrfs: using btrfs_stack_device_id() get devid

Akinobu Mita (1) commits (+4/-30):
    btrfs: use memparse

Miao Xie (1) commits (+1/-1):
    btrfs: fix btrfs_mkdir goto for no free objectids

Nick Piggin (1) commits (+1/-1):
    Btrfs: fix gfp flags masking in the compression code

Total: (23) commits

 fs/btrfs/btrfs_inode.h  |    5 
 fs/btrfs/compression.c  |    2 
 fs/btrfs/ctree.h        |   13 
 fs/btrfs/disk-io.c      |   15 -
 fs/btrfs/export.c       |    4 
 fs/btrfs/extent-tree.c  |   11 
 fs/btrfs/extent_io.c    |   79 +++--
 fs/btrfs/extent_io.h    |   10 
 fs/btrfs/file.c         |   23 -
 fs/btrfs/inode.c        |  139 +++++----
 fs/btrfs/ioctl.c        |  698 +++++++++++++++++++++++++++++++++++++++++++++---
 fs/btrfs/ioctl.h        |  113 +++++++
 fs/btrfs/ordered-data.c |   41 +-
 fs/btrfs/ordered-data.h |    7 
 fs/btrfs/relocation.c   |    4 
 fs/btrfs/super.c        |  244 ++++++++++++----
 fs/btrfs/transaction.c  |    5 
 fs/btrfs/tree-log.c     |    2 
 fs/btrfs/volumes.c      |   39 +-
 19 files changed, 1199 insertions(+), 255 deletions(-)

^ permalink raw reply	[relevance 4%]

* [GIT PULL] Btrfs updates for 4.17, part 2
@ 2018-04-15 12:36  4% David Sterba
  0 siblings, 0 replies; 105+ results
From: David Sterba @ 2018-04-15 12:36 UTC (permalink / raw)
  To: torvalds; +Cc: David Sterba, clm, linux-btrfs, linux-kernel

Hi,

we have queued a few more fixes (error handling, log replay, softlockup)
and the rest is SPDX update that touches almost all files so the
diffstat is long. The top patch is a fixup for excessive warning and
was not in linux-next but I've tested it locally.

Please pull, thanks.

----------------------------------------------------------------
The following changes since commit 57599c7e7722daf5f8c2dba4b0e4628f5c500771:

  btrfs: lift errors from add_extent_changeset to the callers (2018-03-31 02:03:25 +0200)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-4.17-part2-tag

for you to fetch changes up to 5d41be6f702f19f72db816c17175caf9dbdcdfa6:

  btrfs: Only check first key for committed tree blocks (2018-04-13 16:16:15 +0200)

----------------------------------------------------------------
David Sterba (3):
      btrfs: replace GPL boilerplate by SPDX -- headers
      btrfs: replace GPL boilerplate by SPDX -- sources
      btrfs: add SPDX header to Kconfig

Filipe Manana (1):
      Btrfs: fix loss of prealloc extents past i_size after fsync log replay

Liu Bo (3):
      Btrfs: fix NULL pointer dereference in log_dir_items
      Btrfs: bail out on error during replay_dir_deletes
      Btrfs: clean up resources during umount after trans is aborted

Nikolay Borisov (1):
      btrfs: Fix possible softlock on single core machines

Qu Wenruo (1):
      btrfs: Only check first key for committed tree blocks

 fs/btrfs/Kconfig                       |  2 +
 fs/btrfs/acl.c                         | 15 +-----
 fs/btrfs/async-thread.c                | 15 +-----
 fs/btrfs/async-thread.h                | 21 ++------
 fs/btrfs/backref.c                     | 15 +-----
 fs/btrfs/backref.h                     | 19 ++------
 fs/btrfs/btrfs_inode.h                 | 19 ++------
 fs/btrfs/check-integrity.c             | 15 +-----
 fs/btrfs/check-integrity.h             | 19 ++------
 fs/btrfs/compression.c                 | 15 +-----
 fs/btrfs/compression.h                 | 19 ++------
 fs/btrfs/ctree.c                       | 15 +-----
 fs/btrfs/ctree.h                       | 20 ++------
 fs/btrfs/dedupe.h                      | 20 ++------
 fs/btrfs/delayed-inode.c               | 15 +-----
 fs/btrfs/delayed-inode.h               | 19 ++------
 fs/btrfs/delayed-ref.c                 | 15 +-----
 fs/btrfs/delayed-ref.h                 | 21 ++------
 fs/btrfs/dev-replace.c                 | 16 +-----
 fs/btrfs/dev-replace.h                 | 20 ++------
 fs/btrfs/dir-item.c                    | 15 +-----
 fs/btrfs/disk-io.c                     | 26 +++++-----
 fs/btrfs/disk-io.h                     | 20 ++------
 fs/btrfs/export.c                      |  1 +
 fs/btrfs/export.h                      |  1 +
 fs/btrfs/extent-tree.c                 | 17 ++-----
 fs/btrfs/extent_io.c                   |  1 +
 fs/btrfs/extent_io.h                   |  6 ++-
 fs/btrfs/extent_map.c                  |  1 +
 fs/btrfs/extent_map.h                  |  6 ++-
 fs/btrfs/file-item.c                   | 15 +-----
 fs/btrfs/file.c                        | 15 +-----
 fs/btrfs/free-space-cache.c            | 15 +-----
 fs/btrfs/free-space-cache.h            | 19 ++------
 fs/btrfs/free-space-tree.c             | 15 +-----
 fs/btrfs/free-space-tree.h             | 19 ++------
 fs/btrfs/inode-item.c                  | 15 +-----
 fs/btrfs/inode-map.c                   | 15 +-----
 fs/btrfs/inode-map.h                   |  5 +-
 fs/btrfs/inode.c                       | 15 +-----
 fs/btrfs/ioctl.c                       | 15 +-----
 fs/btrfs/locking.c                     | 16 +-----
 fs/btrfs/locking.h                     | 19 ++------
 fs/btrfs/lzo.c                         | 15 +-----
 fs/btrfs/math.h                        | 20 ++------
 fs/btrfs/ordered-data.c                | 15 +-----
 fs/btrfs/ordered-data.h                | 20 ++------
 fs/btrfs/orphan.c                      | 15 +-----
 fs/btrfs/print-tree.c                  | 15 +-----
 fs/btrfs/print-tree.h                  | 21 ++------
 fs/btrfs/props.c                       | 15 +-----
 fs/btrfs/props.h                       | 19 ++------
 fs/btrfs/qgroup.c                      | 15 +-----
 fs/btrfs/qgroup.h                      | 22 ++-------
 fs/btrfs/raid56.c                      | 16 +-----
 fs/btrfs/raid56.h                      | 21 ++------
 fs/btrfs/rcu-string.h                  | 20 +++-----
 fs/btrfs/reada.c                       | 15 +-----
 fs/btrfs/ref-verify.c                  | 15 +-----
 fs/btrfs/ref-verify.h                  | 23 +++------
 fs/btrfs/relocation.c                  | 15 +-----
 fs/btrfs/root-tree.c                   | 15 +-----
 fs/btrfs/scrub.c                       | 15 +-----
 fs/btrfs/send.c                        | 15 +-----
 fs/btrfs/send.h                        | 20 +++-----
 fs/btrfs/struct-funcs.c                | 15 +-----
 fs/btrfs/super.c                       | 15 +-----
 fs/btrfs/sysfs.c                       | 15 +-----
 fs/btrfs/sysfs.h                       |  7 +--
 fs/btrfs/tests/btrfs-tests.c           | 15 +-----
 fs/btrfs/tests/btrfs-tests.h           | 19 ++------
 fs/btrfs/tests/extent-buffer-tests.c   | 15 +-----
 fs/btrfs/tests/extent-io-tests.c       | 15 +-----
 fs/btrfs/tests/extent-map-tests.c      | 15 +-----
 fs/btrfs/tests/free-space-tests.c      | 15 +-----
 fs/btrfs/tests/free-space-tree-tests.c | 15 +-----
 fs/btrfs/tests/inode-tests.c           | 15 +-----
 fs/btrfs/tests/qgroup-tests.c          | 15 +-----
 fs/btrfs/transaction.c                 | 15 +-----
 fs/btrfs/transaction.h                 | 20 ++------
 fs/btrfs/tree-checker.c                | 13 +----
 fs/btrfs/tree-checker.h                | 17 ++-----
 fs/btrfs/tree-defrag.c                 | 15 +-----
 fs/btrfs/tree-log.c                    | 89 +++++++++++++++++++++++++---------
 fs/btrfs/tree-log.h                    | 20 ++------
 fs/btrfs/ulist.c                       |  2 +-
 fs/btrfs/ulist.h                       |  7 ++-
 fs/btrfs/uuid-tree.c                   | 16 +-----
 fs/btrfs/volumes.c                     | 16 +-----
 fs/btrfs/volumes.h                     | 19 ++------
 fs/btrfs/xattr.c                       | 16 +-----
 fs/btrfs/xattr.h                       | 21 ++------
 fs/btrfs/zlib.c                        | 15 +-----
 fs/btrfs/zstd.c                        | 10 +---
 94 files changed, 277 insertions(+), 1234 deletions(-)

^ permalink raw reply	[relevance 4%]

* [PULL] Btrfs updates for 4.10
@ 2016-11-30 13:11  4% David Sterba
  0 siblings, 0 replies; 105+ results
From: David Sterba @ 2016-11-30 13:11 UTC (permalink / raw)
  To: clm; +Cc: linux-btrfs, David Sterba

Hi,

here's my first pull request for 4.10. Assorted patches that have been in
for-next, mostly fixes and some cleanups. I'm expecting to send one more before
the rc1, I don't see much reason to hold the current queue back for any longer.

----------------------------------------------------------------
The following changes since commit e5517c2a5a49ed5e99047008629f1cd60246ea0e:

  Linux 4.9-rc7 (2016-11-27 13:08:04 -0800)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-chris-4.10

for you to fetch changes up to 515bdc479097ec9d5f389202842345af3162f71c:

  Merge branch 'misc-4.10' into for-chris-4.10-20161130 (2016-11-30 14:02:20 +0100)

----------------------------------------------------------------
Adam Borowski (1):
      btrfs: make block group flags in balance printks human-readable

Christoph Hellwig (9):
      btrfs: don't abuse REQ_OP_* flags for btrfs_map_block
      btrfs: use bio iterators for the decompression handlers
      btrfs: don't access the bio directly in the raid5/6 code
      btrfs: don't access the bio directly in the direct I/O code
      btrfs: don't access the bio directly in btrfs_csum_one_bio
      btrfs: use bi_size
      btrfs: calculate end of bio offset properly
      btrfs: refactor __btrfs_lookup_bio_sums to use bio_for_each_segment_all
      btrfs: use bio_for_each_segment_all in __btrfsic_submit_bio

Christophe JAILLET (1):
      btrfs: remove redundant check of btrfs_iget return value

David Sterba (17):
      btrfs: remove unused headers, statfs.h
      btrfs: remove stale comment from btrfs_statfs
      btrfs: rename helper macros for qgroup and aux data casts
      btrfs: reada, cleanup remove unneeded variable in __readahead_hook
      btrfs: reada, remove unused parameter from __readahead_hook
      btrfs: reada, sink start parameter to btree_readahead_hook
      btrfs: reada, remove pointless BUG_ON in reada_find_extent
      btrfs: reada, remove pointless BUG_ON check for fs_info
      btrfs: remove trivial helper btrfs_find_tree_block
      btrfs: delete unused member from superblock
      btrfs: introduce helpers for updating eb uuids
      btrfs: use new helpers to set uuids in eb
      btrfs: use specialized page copying helpers in btrfs_clone_extent_buffer
      btrfs: remove constant parameter to memset_extent_buffer and rename it
      btrfs: add optimized version of eb to eb copy
      btrfs: store and load values of stripes_min/stripes_max in balance status item
      Merge branch 'misc-4.10' into for-chris-4.10-20161130

Domagoj Tršan (1):
      btrfs: change btrfs_csum_final result param type to u8

Jeff Mahoney (3):
      btrfs: remove old tree_root dirent processing in btrfs_real_readdir()
      btrfs: increment ctx->pos for every emitted or skipped dirent in readdir
      btrfs: Ensure proper sector alignment for btrfs_free_reserved_data_space

Josef Bacik (2):
      Btrfs: fix file extent corruption
      Btrfs: abort transaction if fill_holes() fails

Liu Bo (1):
      Btrfs: adjust len of writes if following a preallocated extent

Nick Terrell (1):
      btrfs: Call kunmap if zlib_inflateInit2 fails

Omar Sandoval (1):
      Btrfs: deal with existing encompassing extent map in btrfs_get_extent()

Qu Wenruo (4):
      btrfs: qgroup: Add comments explaining how btrfs qgroup works
      btrfs: qgroup: Rename functions to make it follow reserve,trace,account steps
      btrfs: Export and move leaf/subtree qgroup helpers to qgroup.c
      btrfs: qgroup: Fix qgroup data leaking by using subtree tracing

Shailendra Verma (1):
      btrfs: return early from failed memory allocations in ioctl handlers

Wang Xiaoguang (3):
      btrfs: cleanup: use already calculated value in btrfs_should_throttle_delayed_refs()
      btrfs: add necessary comments about tickets_id
      btrfs: improve delayed refs iterations

Xiaoguang Wang (1):
      btrfs: remove useless comments

 fs/btrfs/check-integrity.c       |  32 ++---
 fs/btrfs/compression.c           | 142 ++++++++-------------
 fs/btrfs/compression.h           |  12 +-
 fs/btrfs/ctree.c                 |  49 +++-----
 fs/btrfs/ctree.h                 |  14 ++-
 fs/btrfs/delayed-inode.c         |   3 +-
 fs/btrfs/delayed-inode.h         |   2 +-
 fs/btrfs/delayed-ref.c           |  20 ++-
 fs/btrfs/delayed-ref.h           |   8 ++
 fs/btrfs/disk-io.c               |  30 ++---
 fs/btrfs/disk-io.h               |   4 +-
 fs/btrfs/extent-tree.c           | 263 ++++-----------------------------------
 fs/btrfs/extent_io.c             |  49 ++++++--
 fs/btrfs/extent_io.h             |   9 +-
 fs/btrfs/file-item.c             |  55 ++++----
 fs/btrfs/file.c                  |  35 +++++-
 fs/btrfs/free-space-cache.c      |  10 +-
 fs/btrfs/inode.c                 | 163 ++++++++----------------
 fs/btrfs/ioctl.c                 |  32 ++---
 fs/btrfs/lzo.c                   |  17 +--
 fs/btrfs/qgroup.c                | 256 ++++++++++++++++++++++++++++++++++---
 fs/btrfs/qgroup.h                |  64 +++++++++-
 fs/btrfs/raid56.c                |  16 +--
 fs/btrfs/reada.c                 |  28 ++---
 fs/btrfs/relocation.c            | 164 ++++++++++--------------
 fs/btrfs/scrub.c                 |  17 +--
 fs/btrfs/super.c                 |   4 -
 fs/btrfs/tests/extent-io-tests.c |   2 +-
 fs/btrfs/tree-log.c              |   2 +-
 fs/btrfs/volumes.c               |  64 +++++-----
 fs/btrfs/volumes.h               |  25 +++-
 fs/btrfs/zlib.c                  |  16 +--
 include/trace/events/btrfs.h     |   2 +-
 33 files changed, 782 insertions(+), 827 deletions(-)

^ permalink raw reply	[relevance 4%]

* [GIT PULL] Btrfs updates for 2.6.31-rc
@ 2009-06-11 20:44  5% Chris Mason
  0 siblings, 0 replies; 105+ results
From: Chris Mason @ 2009-06-11 20:44 UTC (permalink / raw)
  To: linux-kernel, linux-btrfs, Linus Torvalds

Hello everyone,

This is a large pull request for btrfs, and it includes a forward
rolling format change.   This means that once this code mounts a btrfs
filesystem, the older kernels won't be able to read it.  Btrfs progs
v0.19 is required to read the new format.

Existing filesystems will be upgraded to the new format on the first
mount.  All of your old data will still be there and still work
properly, but I strongly recommend a full backup before going to the new
code.

Since I don't want to lock testers into 2.6.31-rc, a stable branch of
btrfs changes for 2.6.30 that includes this new format will be
maintained under the newformat2 branch name on the btrfs git repo.

The format changes significantly lower the overhead of tracking data and
metadata extents, and make a big difference in almost every benchmark.
One example is a random O_DIRECT write workload went from 6,000 ops/sec
on 2.6.30 to 23,000 ops/sec, with most of the gain being less IO
tracking the extents during COW.

Yan Zheng did all the heavy lifting on making these format changes work,
including the backward compatibility.

The pull request includes an assortment of other fixes, and a
number of buffered IO optimizations.

Linus, the master branch of the btrfs-unstable repo:

git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable.git

Has these changes:

Chris Mason (14) commits (+136/-36):
    Btrfs: avoid IO stalls behind congested devices in a multi-device FS (+4/-1)
    Btrfs: avoid races between super writeout and device list updates (+45/-2)
    Btrfs: fix oops when btrfs_inherit_iflags called with a NULL dir (+6/-1)
    Btrfs: don't allow WRITE_SYNC bios to starve out regular writes (+15/-7)
    Btrfs: stop avoiding balancing at the end of the transaction. (+4/-7)
    Btrfs: add mount -o ssd_spread to spread allocations out (+22/-6)
    Btrfs: avoid allocation clusters that are too spread out (+2/-1)
    Btrfs: fix extent_buffer leak during tree log replay (+1/-0)
    Btrfs: fix metadata dirty throttling limits (+2/-5)
    Btrfs: fix -o nodatasum printk spelling (+1/-1)
    Btrfs: reduce mount -o ssd CPU usage (+1/-1)
    Btrfs: balance btree more often (+2/-2)
    Btrfs: autodetect SSD devices (+24/-0)
    Btrfs: Add mount -o nossd (+7/-2)

Yan Zheng (3) commits (+6946/-2058):
    Btrfs: Mixed back reference  (FORWARD ROLLING FORMAT CHANGE) (+6928/-2043)
    Btrfs: check duplicate backrefs for both data and metadata (+4/-11)
    btrfs: Fix set/clear_extent_bit for 'end == (u64)-1' (+14/-4)

Hisashi Hifumi (2) commits (+31/-14):
    Btrfs: fdatasync should skip metadata writeout (+2/-0)
    Btrfs: pin buffers during write_dev_supers (+29/-14)

David Woodhouse (1) commits (+7/-37):
    Btrfs: remove crc32c.h and use libcrc32c directly.

Shin Hong (1) commits (+1/-1):
    Btrfs: init worker struct fields before kthread-run

Christoph Hellwig (1) commits (+200/-21):
    Btrfs: implement FS_IOC_GETFLAGS/SETFLAGS/GETVERSION

Al Viro (1) commits (+4/-5):
    Fix btrfs when ACLs are configured out

Total: (23) commits

 fs/btrfs/Makefile           |    4 
 fs/btrfs/acl.c              |    5 
 fs/btrfs/async-thread.c     |    2 
 fs/btrfs/btrfs_inode.h      |    4 
 fs/btrfs/compression.c      |    6 
 fs/btrfs/crc32c.h           |   29 
 fs/btrfs/ctree.c            |  700 +++-----
 fs/btrfs/ctree.h            |  330 ++-
 fs/btrfs/delayed-ref.c      |  509 ++++--
 fs/btrfs/delayed-ref.h      |   85 -
 fs/btrfs/disk-io.c          |  164 +
 fs/btrfs/export.c           |    4 
 fs/btrfs/extent-tree.c      | 2638 +++++++++++++++++++++----------
 fs/btrfs/extent_io.c        |   18 
 fs/btrfs/file.c             |   78 
 fs/btrfs/free-space-cache.c |   10 
 fs/btrfs/free-space-cache.h |    1 
 fs/btrfs/hash.h             |    4 
 fs/btrfs/inode.c            |  159 +
 fs/btrfs/ioctl.c            |  199 ++
 fs/btrfs/print-tree.c       |  155 +
 fs/btrfs/relocation.c       | 3711 ++++++++++++++++++++++++++++++++++++++++++++
 fs/btrfs/root-tree.c        |   17 
 fs/btrfs/super.c            |   59 
 fs/btrfs/transaction.c      |  410 +---
 fs/btrfs/transaction.h      |   12 
 fs/btrfs/tree-log.c         |  103 -
 fs/btrfs/volumes.c          |   69 
 fs/btrfs/volumes.h          |   12 
 29 files changed, 7325 insertions(+), 2172 deletions(-)

^ permalink raw reply	[relevance 5%]

* [GIT PULL] Btrfs updates
@ 2011-07-27 22:46  5% Chris Mason
  0 siblings, 0 replies; 105+ results
From: Chris Mason @ 2011-07-27 22:46 UTC (permalink / raw)
  To: linux-btrfs, Linus Torvalds, Linux-kernel

Hi everyone,

The for-linus branch of the btrfs-unstable repo is reading for pulling:

git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable.git for-linus

This started off as a larger pull, but I had to pull out a number of
cleanups from Fujitsu, Novell and a few others (sorry guys) while
hunting a crash during stress.sh.  It looks like it is unrelated to
those commits, but I had to pull out a bunch of them until I can be sure
I understand the bug.

I'll have another pull request with the fully tested cleanups on Monday.
Depending on how Linus does rc1, they might end up as the start of my
3.2 branch.

This pull has the commits that I've been able to run through extensive
testing.  The biggest change here is switching the btrfs tree locks to a
reader/writer lock.  This has been one of our biggest bottlenecks for
some time, and it was consistently at the top of profiles on large
machines.

The new locks do away with all the adaptive spinning inside of btrfs and
rely on the spinning/blocking hints in the code to decide when it must
block.

The reader/writer locks break the code I had in place to use kmap on
metadata buffers, so all of our metadata is now in lowmem.  I did test
this on a 32 bit VM, but x86-32 users will want to poke gently.

I also adapted Tejun's lockdep fixes for the btrfs locks, and so far I
haven't seen any lockdep warnings.

Josef has a series of enospc fixes and tweaks here as well.  His bigger
patch to start reworking the enospc reservations seems to be causing the
corruptions during stress.sh, so it will wait for 3.2.

Josef Bacik (11) commits (+320/-322):
    Btrfs: use the normal checksumming infrastructure for free space cache (+59/-110)
    Btrfs: do transaction space reservation before joining the transaction (+17/-42)
    Btrfs: fix how we merge extent states and deal with cached states (+11/-12)
    Btrfs: try to only do one btrfs_search_slot in do_setxattr (+42/-33)
    Btrfs: use find_or_create_page instead of grab_cache_page (+9/-7)
    Btrfs: serialize flushers in reserve_metadata_bytes (+51/-21)
    Btrfs: fix deadlock when throttling transactions (+9/-2)
    Btrfs: fix enospc problems with delalloc (+86/-60)
    Btrfs: use a worker thread to do caching (+27/-29)
    Btrfs: don't flush delalloc arbitrarily (+0/-3)
    Btrfs: tag pages for writeback in sync (+9/-3)

Chris Mason (7) commits (+642/-699):
    Btrfs: make sure reserve_metadata_bytes doesn't leak out strange errors (+6/-1)
    Btrfs: use the commit_root for reading free_space_inode crcs (+28/-19)
    Btrfs: reduce extent_state lock contention for metadata (+41/-14)
    Btrfs: switch the btrfs tree locks to reader/writer (+431/-218)
    Btrfs: remove lockdep magic from btrfs_next_leaf (+5/-31)
    Btrfs: stop using highmem for extent_buffers (+52/-378)
    Btrfs: make a lockdep class for each root (+79/-38)

Miao Xie (1) commits (+21/-7):
    Btrfs: fix BUG_ON() caused by ENOSPC when relocating space

Total: (19)

 fs/btrfs/btrfs_inode.h      |   16 ++-
 fs/btrfs/ctree.c            |  457 +++++++++++++++++++------------------------
 fs/btrfs/ctree.h            |   14 +-
 fs/btrfs/delayed-inode.c    |    2 +-
 fs/btrfs/dir-item.c         |    9 +-
 fs/btrfs/disk-io.c          |  116 ++++++++----
 fs/btrfs/disk-io.h          |   10 +-
 fs/btrfs/extent-tree.c      |  285 +++++++++++++++-------------
 fs/btrfs/extent_io.c        |  168 ++++++++--------
 fs/btrfs/extent_io.h        |   35 ++--
 fs/btrfs/file-item.c        |   41 +---
 fs/btrfs/file.c             |   11 +-
 fs/btrfs/free-space-cache.c |  173 ++++++-----------
 fs/btrfs/inode.c            |   90 ++++------
 fs/btrfs/ioctl.c            |    8 +-
 fs/btrfs/locking.c          |  280 ++++++++++++++-------------
 fs/btrfs/locking.h          |   36 ++++-
 fs/btrfs/relocation.c       |    3 +-
 fs/btrfs/struct-funcs.c     |  100 +++-------
 fs/btrfs/transaction.c      |   47 +++--
 fs/btrfs/tree-log.c         |    6 +-
 fs/btrfs/volumes.c          |    2 +-
 fs/btrfs/xattr.c            |   66 ++++---
 23 files changed, 965 insertions(+), 1010 deletions(-)

^ permalink raw reply	[relevance 5%]

* [GIT PULL] Btrfs updates
@ 2013-05-18 14:30  5% Chris Mason
  0 siblings, 0 replies; 105+ results
From: Chris Mason @ 2013-05-18 14:30 UTC (permalink / raw)
  To: Linus Torvalds, lkml, linux-btrfs

Hi Linus,

Please pull my for-linus branch:

git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git for-linus

Miao Xie has been very busy, fixing races and enospc problems and many
other small but important pieces.

Alexandre Oliva discovered some problems with how our error handling was
interacting with the block layer and for now has disabled our partial
handling of sub-page writes.  The real sub-page work is in a series of
patches from IBM that we still need to integrate and test.  The code
Alexandre has turned off was really incomplete.

Josef has more error handling fixes and an important fix for the new
skinny extent format.

This also has my fix for the tracepoint crash from late in 3.9.  It's
the first stage in a larger clean up to get rid of btrfs_bio and make
a proper bioset for all the items we need to tack into the bio.  For now
the bioset only holds our mirror_num and stripe_index, but for the next
merge window I'll shuffle more in.

Miao Xie (10) commits (+87/-69):
    Btrfs: don't steal the reserved space from the global reserve if their space type is different (+4/-2)
    Btrfs: don't abort the current transaction if there is no enough space for inode cache (+2/-1)
    Btrfs: don't invoke btrfs_invalidate_inodes() in the spin lock context (+6/-0)
    Btrfs: don't use global block reservation for inode cache truncation (+34/-22)
    Btrfs: fix unprotected root node of the subvolume's inode rb-tree (+3/-4)
    Btrfs: remove BUG_ON() in btrfs_read_fs_tree_no_radix() (+0/-1)
    Btrfs: pause the space balance when remounting to R/O (+1/-0)
    Btrfs: optimize the error handle of use_block_rsv() (+28/-37)
    Btrfs: update the global reserve if it is empty (+8/-1)
    Btrfs: fix accessing a freed tree root (+1/-1)

Josef Bacik (4) commits (+35/-32):
    Btrfs: make sure roots are assigned before freeing their nodes (+21/-18)
    Btrfs: handle running extent ops with skinny metadata (+12/-10)
    Btrfs: remove warn on in free space cache writeout (+1/-3)
    Btrfs: don't null pointer deref on abort (+1/-1)

Stefan Behrens (3) commits (+8/-1):
    Btrfs: explicitly use global_block_rsv for quota_tree (+2/-0)
    Btrfs: fix possible memory leak in replace_path() (+1/-1)
    Btrfs: don't allow device replace on RAID5/RAID6 (+5/-0)

Liu Bo (2) commits (+8/-4):
    Btrfs: return errno if possible when we fail to allocate memory (+6/-2)
    Btrfs: fix off-by-one in fiemap (+2/-2)

Gabriel de Perthuis (1) commits (+5/-5):
    btrfs: don't stop searching after encountering the wrong item

Alexandre Oliva (1) commits (+30/-55):
    btrfs: do away with non-whole_page extent I/O

Chris Mason (1) commits (+120/-72):
    Btrfs: use a btrfs bioset instead of abusing bio internals

David Sterba (1) commits (+4/-4):
    btrfs: annotate quota tree for lockdep

Wang Shilong (1) commits (+2/-1):
    Btrfs: fix possible memory leak in the find_parent_nodes()

Andreas Philipp (1) commits (+6/-7):
    Correct allowed raid levels on balance.

Total: (25) commits (+305/-250)

 fs/btrfs/backref.c          |   3 +-
 fs/btrfs/check-integrity.c  |   2 +-
 fs/btrfs/ctree.c            |   4 +-
 fs/btrfs/ctree.h            |   8 +--
 fs/btrfs/delayed-ref.h      |   1 +
 fs/btrfs/dev-replace.c      |   5 ++
 fs/btrfs/disk-io.c          |  52 ++++++++++-------
 fs/btrfs/extent-tree.c      |  94 ++++++++++++++++--------------
 fs/btrfs/extent_io.c        | 138 +++++++++++++++++++++++---------------------
 fs/btrfs/extent_io.h        |   2 +
 fs/btrfs/free-space-cache.c |  43 +++++++-------
 fs/btrfs/free-space-cache.h |   2 +
 fs/btrfs/inode-map.c        |   8 ++-
 fs/btrfs/inode.c            |  81 +++++++++++++++++---------
 fs/btrfs/ioctl.c            |  10 ++--
 fs/btrfs/raid56.c           |   2 +-
 fs/btrfs/relocation.c       |   7 ++-
 fs/btrfs/scrub.c            |  10 ++--
 fs/btrfs/super.c            |   1 +
 fs/btrfs/volumes.c          |  54 ++++-------------
 fs/btrfs/volumes.h          |  20 +++++++
 21 files changed, 301 insertions(+), 246 deletions(-)

^ permalink raw reply	[relevance 5%]

* [GIT PULL] Btrfs updates
@ 2011-01-17 21:13  5% Chris Mason
  0 siblings, 0 replies; 105+ results
From: Chris Mason @ 2011-01-17 21:13 UTC (permalink / raw)
  To: Linus Torvalds, Linux Btrfs, linux-kernel

Hi everyone,

The for-linus branch of the btrfs-unstable git tree:

git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable.git for-linus

Has our collection of features and fixes for 2.6.38-rc1.  The git tree
is actually against 2.6.36 and these commits have been tested against
.36, .37 and Linus' current git.  There's no particular reason for the
.36 part, other than it's what one of my build boxes was running.

The highlights this time around are LZO compression from Li Zefan and a
large collection of multi-device fixes from Miao Xie.  Liubo kicked in
the start of our forced-readonly support, which will be the building
block for ripping out a big collection of BUG_ONs and replacing them
with kinder gentler error messages.

Li Zefan also added readonly snapshot support, and I'll have the
corresponding btrfs-progs changes integrated this week.

This pull does have a duplicate for the btrfs ctree.c build fix that
Linus already has in his tree.  Git merge seems to do magic on this one,
it applies without doing a duplicate #include.

Li Zefan (9) commits (+1354/-542):
    Btrfs: Add BTRFS_IOC_SUBVOL_GETFLAGS/SETFLAGS ioctls (+85/-0)
    btrfs: Allow to specify compress method when defrag (+26/-2)
    btrfs: Allow to add new compression algorithm (+473/-282)
    btrfs: Extract duplicate decompress code (+115/-194)
    Btrfs: Refactor btrfs_ioctl_snap_create() (+40/-44)
    Btrfs: Add readonly snapshots support (+75/-10)
    btrfs: Add lzo compression support (+527/-8)
    btrfs: Fix error handling in zlib (+8/-0)
    btrfs: Fix bugs in zlib workspace (+5/-2)

Miao Xie (6) commits (+695/-186):
    btrfs: make the chunk allocator utilize the devices better (+300/-103)
    btrfs: try to reclaim some space when chunk allocation fails (+7/-2)
    btrfs: fix wrong free space information of btrfs (+286/-7)
    btrfs: restructure find_free_dev_extent() (+91/-68)
    btrfs: fix wrong calculation of stripe size (+8/-2)
    btrfs: fix wrong data space statistics (+3/-4)

Jesper Juhl (2) commits (+5/-1):
    btrfs: Don't pass NULL ptr to func that may deref it. (+2/-0)
    btrfs: Mem leak in btrfs_get_acl() (+3/-1)

Tsutomu Itoh (2) commits (+17/-0):
    btrfs: Fix memory leak in btrfs_read_fs_root_no_radix() (+1/-0)
    btrfs: check NULL or not (+16/-0)

Stefan Schmidt (1) commits (+1/-0):
    fs/btrfs: Fix build of ctree

Ben Hutchings (1) commits (+4/-0):
    btrfs: Require CAP_SYS_ADMIN for filesystem rebalance

Chris Mason (1) commits (+2/-1):
    Btrfs: fix off by one while setting block groups readonly

Dave Young (1) commits (+8/-4):
    btrfs: mount failure return value fix

liubo (1) commits (+523/-2):
    Btrfs: forced readonly mounts on errors

Josef Bacik (1) commits (+0/-5):
    Btrfs: don't warn if we get ENOSPC in btrfs_block_rsv_check

Total: (25) commits (+2609/-741)

 fs/btrfs/Kconfig        |    2 +
 fs/btrfs/Makefile       |    2 +-
 fs/btrfs/acl.c          |    4 +-
 fs/btrfs/btrfs_inode.h  |    2 +-
 fs/btrfs/compression.c  |  329 ++++++++++++++++++++++++-
 fs/btrfs/compression.h  |   72 ++++--
 fs/btrfs/ctree.c        |    8 +
 fs/btrfs/ctree.h        |   49 ++++-
 fs/btrfs/disk-io.c      |  412 ++++++++++++++++++++++++++++++-
 fs/btrfs/disk-io.h      |    1 +
 fs/btrfs/extent-tree.c  |   90 ++++++-
 fs/btrfs/extent_io.c    |    7 +-
 fs/btrfs/extent_io.h    |   17 ++-
 fs/btrfs/extent_map.c   |    2 +
 fs/btrfs/extent_map.h   |    3 +-
 fs/btrfs/file.c         |   13 +
 fs/btrfs/inode.c        |   90 +++++---
 fs/btrfs/ioctl.c        |  220 +++++++++++++----
 fs/btrfs/ioctl.h        |   12 +-
 fs/btrfs/lzo.c          |  420 +++++++++++++++++++++++++++++++
 fs/btrfs/ordered-data.c |   18 ++-
 fs/btrfs/ordered-data.h |    8 +-
 fs/btrfs/super.c        |  281 ++++++++++++++++++++--
 fs/btrfs/transaction.c  |   11 +
 fs/btrfs/transaction.h  |    1 +
 fs/btrfs/volumes.c      |  626 ++++++++++++++++++++++++++++++++++-------------
 fs/btrfs/volumes.h      |   27 ++
 fs/btrfs/xattr.c        |   18 ++
 fs/btrfs/zlib.c         |  369 ++++++----------------------
 29 files changed, 2491 insertions(+), 623 deletions(-)

^ permalink raw reply	[relevance 5%]

* [GIT PULL] Btrfs updates
@ 2012-08-29 16:01  5% Chris Mason
  0 siblings, 0 replies; 105+ results
From: Chris Mason @ 2012-08-29 16:01 UTC (permalink / raw)
  To: Linus Torvalds, Linux Btrfs List, LKML

Hi Linus,

I've split out the big send/receive update from my last pull request and
now have just the fixes in my for-linus branch:

git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git for-linus

For anyone who wants send/receive updates, they are maintained as well.
But it is has enough cleanups (without fixes) that we shouldn't be asking
Linus to take it right now.  The send/recv branch will wander over to
linux-next shortly though.

git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git send-recv

The largest patches in this pull are Josef's patches to fix DIO locking
problems and his patch to fix a crash during balance.
They are both well tested.

The rest are smaller fixes that we've had queued.  The last rc came out
while I was hacking new and exciting ways to recover from a misplaced rm
-rf on my dev box, so these missed rc3.

Josef Bacik (9) commits (+322/-216):
    Btrfs: don't allocate a seperate csums array for direct reads (+19/-32)
    Btrfs: do not use missing devices when showing devname (+2/-0)
    Btrfs: fix enospc problems when deleting a subvol (+1/-1)
    Btrfs: increase the size of the free space cache (+7/-8)
    Btrfs: lock extents as we map them in DIO (+127/-129)
    Btrfs: fix deadlock with freeze and sync V2 (+9/-4)
    Btrfs: allow delayed refs to be merged (+142/-27)
    Btrfs: do not strdup non existent strings (+5/-3)
    Btrfs: barrier before waitqueue_active (+10/-12)

Stefan Behrens (5) commits (+16/-77):
    Btrfs: fix that repair code is spuriously executed for transid failures (+6/-2)
    Btrfs: revert checksum error statistic which can cause a BUG() (+2/-39)
    Btrfs: fix a misplaced address operator in a condition (+1/-1)
    Btrfs: remove superblock writing after fatal error (+5/-33)
    Btrfs: fix that error value is changed by mistake (+2/-2)

Dan Carpenter (4) commits (+16/-8):
    Btrfs: unlock on error in btrfs_delalloc_reserve_metadata() (+3/-1)
    Btrfs: fix some error codes in btrfs_qgroup_inherit() (+6/-2)
    Btrfs: fix some endian bugs handling the root times (+4/-4)
    Btrfs: checking for NULL instead of IS_ERR (+3/-1)

Liu Bo (2) commits (+25/-6):
    Btrfs: fix ordered extent leak when failing to start a transaction (+5/-2)
    Btrfs: fix a dio write regression (+20/-4)

Arne Jansen (2) commits (+38/-73):
    Btrfs: fix deadlock in wait_for_more_refs (+21/-73)
    Btrfs: fix race in run_clustered_refs (+17/-0)

Chris Mason (1) commits (+3/-0):
    Btrfs: don't run __tree_mod_log_free_eb on leaves

Fengguang Wu (1) commits (+3/-2):
    btrfs: fix second lock in btrfs_delete_delayed_items()

Miao Xie (1) commits (+1/-0):
    Btrfs: fix wrong mtime and ctime when creating snapshots

Total: (25) commits (+424/-382)

 fs/btrfs/backref.c       |   4 +-
 fs/btrfs/compression.c   |   1 +
 fs/btrfs/ctree.c         |   9 +-
 fs/btrfs/ctree.h         |   3 +-
 fs/btrfs/delayed-inode.c |  12 +-
 fs/btrfs/delayed-ref.c   | 163 +++++++++++++++++++-----
 fs/btrfs/delayed-ref.h   |   4 +
 fs/btrfs/disk-io.c       |  53 ++------
 fs/btrfs/disk-io.h       |   2 +-
 fs/btrfs/extent-tree.c   | 123 +++++++++---------
 fs/btrfs/extent_io.c     |  17 +--
 fs/btrfs/file-item.c     |   4 +-
 fs/btrfs/inode.c         | 326 ++++++++++++++++++++++++-----------------------
 fs/btrfs/ioctl.c         |   2 +-
 fs/btrfs/locking.c       |   2 +-
 fs/btrfs/qgroup.c        |  12 +-
 fs/btrfs/root-tree.c     |   4 +-
 fs/btrfs/super.c         |  15 ++-
 fs/btrfs/transaction.c   |   3 +-
 fs/btrfs/volumes.c       |  33 +----
 fs/btrfs/volumes.h       |   2 -
 21 files changed, 418 insertions(+), 376 deletions(-)

^ permalink raw reply	[relevance 5%]

* [GIT PULL] Btrfs updates
@ 2011-06-04 14:37  5% Chris Mason
  0 siblings, 0 replies; 105+ results
From: Chris Mason @ 2011-06-04 14:37 UTC (permalink / raw)
  To: Linus, linux-btrfs, Linux-kernel

Hi everyone,

The for-linus branch of the btrfs unstable repo:

git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable.git for-linus

Has our collection of fixes.  It's a little bigger than usual for rc2
because it includes Josef's queue of Btrfs changes.  It seemed best to
split them so we could concentrate on looking for any issues in the new
btrfs rc1 code from Fujitsu.  His tree is bug fixes and journal lock
reduction.

Some people have reported the initial caching of the free inode number
map (which happens only once when it is first enabled) is sucking down
too much CPU and IO time on their systems.  We don't have that one fixed
yet, but this pull does clean up a few other problems in the new inode
number allocatgor.  It also turns it off by default (mount -o
inode_cache to enable).

I was on the fence for turning this on by default, but we've already
kicked out three bugs so it seems best to keep it optional until 3.1.

Josef Bacik (15) commits (+478/-386):
    Btrfs: don't try to allocate from a block group that doesn't have enough space (+8/-0)
    Btrfs: take away the num_items argument from btrfs_join_transaction (+42/-48)
    Btrfs: make sure to use the delalloc reserve when filling delalloc (+2/-0)
    Btrfs: don't save the inode cache if we are deleting this root (+5/-0)
    Btrfs: don't look at the extent buffer level 3 times in a row (+0/-3)
    Btrfs: map the node block when looking for readahead targets (+21/-2)
    Btrfs: set range_start to the right start in count_range_bits (+1/-1)
    Btrfs: if we've already started a trans handle, use that one (+19/-0)
    Btrfs: check for duplicate entries in the free space cache (+24/-3)
    Btrfs: try not to sleep as much when doing slow caching (+11/-8)
    Btrfs: fix how we do space reservation for truncate (+123/-37)
    Btrfs: leave spinning on lookup and map the leaf (+12/-0)
    Btrfs: kill BTRFS_I(inode)->block_group (+13/-110)
    Btrfs: don't always do readahead (+20/-5)
    Btrfs: kill trans_mutex (+177/-169)

Chris Mason (3) commits (+54/-9):
    Btrfs: make sure we don't overflow the free space cache crc page (+19/-8)
    Btrfs: fix uninit variable in the delayed inode code (+1/-0)
    Btrfs: add mount -o inode_cache (+34/-1)

David Sterba (3) commits (+26/-21):
    btrfs: use btrfs_ino to access inode number (+5/-4)
    btrfs: fix uninitialized variable warning (+1/-1)
    btrfs: add helper for fs_info->closing (+20/-16)

Arne Jansen (3) commits (+70/-53):
    btrfs: scrub: don't reuse bios and pages (+65/-49)
    btrfs: scrub: add explicit plugging (+4/-3)
    btrfs: false BUG_ON when degraded (+1/-1)

liubo (1) commits (+6/-0):
    Btrfs: don't save the inode cache in non-FS roots

Total: (25) commits

 fs/btrfs/btrfs_inode.h      |    3 -
 fs/btrfs/ctree.c            |   28 +++-
 fs/btrfs/ctree.h            |   22 +++-
 fs/btrfs/delayed-inode.c    |    8 +-
 fs/btrfs/disk-io.c          |   36 +++---
 fs/btrfs/extent-tree.c      |  103 ++++++++++-----
 fs/btrfs/extent_io.c        |    2 +-
 fs/btrfs/file.c             |   10 +-
 fs/btrfs/free-space-cache.c |   70 ++++++++---
 fs/btrfs/inode-map.c        |   34 +++++-
 fs/btrfs/inode.c            |  261 +++++++++++++++++++------------------
 fs/btrfs/ioctl.c            |   26 ++---
 fs/btrfs/relocation.c       |   34 +++--
 fs/btrfs/scrub.c            |  123 ++++++++++--------
 fs/btrfs/super.c            |    8 +-
 fs/btrfs/transaction.c      |  302 +++++++++++++++++++++++--------------------
 fs/btrfs/transaction.h      |   29 +---
 fs/btrfs/volumes.c          |    2 +-
 fs/btrfs/xattr.c            |    2 -
 19 files changed, 635 insertions(+), 468 deletions(-)

^ permalink raw reply	[relevance 5%]

* [GIT PULL] Btrfs updates
@ 2011-02-07 20:12  5% Chris Mason
  0 siblings, 0 replies; 105+ results
From: Chris Mason @ 2011-02-07 20:12 UTC (permalink / raw)
  To: Linus Torvalds, linux-kernel, linux-btrfs

Hi everyone,

This pull was delayed by a week because my test rig kept throwing out
corruptions.  After a long series of bisects, it looks like the hardware
is just silently corrupting blocks and btrfs is catching it early and
often.

So, here is our collection of bug fixes since rc1.  We have an
assortment of ENOSPC tweaks, allocator fixes  and better error handling
in general.

Linus please pull the master branch of the btrfs-unstable repo:

git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable.git master

Li Zefan (8) commits (+107/-65):
    btrfs: Fix threshold calculation for block groups smaller than 1GB (+6/-2)
    btrfs: Check mergeable free space when removing a cluster (+20/-6)
    btrfs: Update stats when allocating from a cluster (+14/-3)
    Btrfs: Fix file clone when source offset is not 0 (+4/-1)
    btrfs: Add a helper try_merge_free_space() (+43/-32)
    btrfs: Free fully occupied bitmap in cluster (+2/-0)
    btrfs: Add helper function free_bitmap() (+16/-21)
    Btrfs: Fix memory leak at umount (+2/-0)

Josef Bacik (8) commits (+86/-18):
    Btrfs: do not release more reserved bytes to the global_block_rsv than we need (+14/-2)
    Btrfs: make sure search_bitmap finds something in remove_from_bitmap (+1/-0)
    Btrfs: use the global block reserve if we cannot reserve space (+27/-1)
    Btrfs: fix check_path_shared so it returns the right value (+3/-2)
    Btrfs: exclude super blocks when we read in block groups (+18/-8)
    Btrfs: handle no memory properly in prepare_pages (+6/-2)
    Btrfs: make shrink_delalloc a little friendlier (+14/-3)
    Btrfs: do error checking in btrfs_del_csums (+3/-0)

Tsutomu Itoh (5) commits (+100/-21):
    btrfs: check return value of btrfs_start_ioctl_transaction() properly (+1/-1)
    btrfs: fix return value check of btrfs_start_transaction() (+37/-6)
    btrfs: fix return value check of btrfs_join_transaction() (+51/-13)
    btrfs: cleanup error handling in btrfs_unlink_inode() (+1/-1)
    btrfs: checking NULL or not in some functions (+10/-0)

liubo (3) commits (+59/-4):
    btrfs: fix uncheck memory allocation in btrfs_submit_compressed_read (+25/-4)
    btrfs: fix several uncheck memory allocations (+33/-0)
    btrfs: fix missing break in switch phrase (+1/-0)

Miao Xie (2) commits (+7/-0):
    Btrfs: Don't return acl info when mounting with noacl option (+6/-0)
    Btrfs: Fix memory leak in writepage fixup work (+1/-0)

Chris Mason (2) commits (+3/-2):
    Btrfs: avoid uninit variable warnings in ordered-data.c (+1/-1)
    Btrfs: catch errors from btrfs_sync_log (+2/-1)

Zheng Yan (1) commits (+4/-4):
    Btrfs: Fix page count calculation

Julia Lawall (1) commits (+1/-1):
    fs/btrfs/inode.c: Add missing IS_ERR test

Tero Roponen (1) commits (+3/-2):
    Btrfs: Free correct pointer after using strsep

Ian Kent (1) commits (+2/-0):
    Btrfs: Fix memory leak on finding existing super

Alexey Charkov (1) commits (+1/-1):
    btrfs: Drop __exit attribute on btrfs_exit_compress

Total: (33) commits (+373/-118)

 fs/btrfs/acl.c              |    6 ++
 fs/btrfs/compression.c      |   27 +++++++-
 fs/btrfs/disk-io.c          |    7 ++
 fs/btrfs/export.c           |    2 +
 fs/btrfs/extent-tree.c      |   98 +++++++++++++++++++++-----
 fs/btrfs/extent_io.c        |    6 +-
 fs/btrfs/file-item.c        |    5 ++
 fs/btrfs/file.c             |   20 ++++--
 fs/btrfs/free-space-cache.c |  162 ++++++++++++++++++++++++++----------------
 fs/btrfs/inode.c            |   35 ++++++---
 fs/btrfs/ioctl.c            |   19 ++++--
 fs/btrfs/ordered-data.c     |    2 +-
 fs/btrfs/print-tree.c       |    1 +
 fs/btrfs/relocation.c       |   29 +++++++-
 fs/btrfs/super.c            |    9 ++-
 fs/btrfs/transaction.c      |    5 ++
 fs/btrfs/tree-log.c         |   35 +++++++++-
 fs/btrfs/volumes.c          |   19 +++++-
 18 files changed, 371 insertions(+), 116 deletions(-)

^ permalink raw reply	[relevance 5%]

* [GIT PULL] Btrfs updates
@ 2012-02-24 16:41  5% Chris Mason
  0 siblings, 0 replies; 105+ results
From: Chris Mason @ 2012-02-24 16:41 UTC (permalink / raw)
  To: linux-btrfs, LKML, Linus Torvalds

Hi Linus,

Please pull the for-linus branch of the btrfs repo:

git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git for-linus

This is later than I wanted because I got backed up running through
btrfs bugs from the Oracle QA teams.  But they are all bug fixes that
we've queued and tested since rc1.

Nothing in particular stands out, this just reflects bug fixing and QA
done in parallel by all the btrfs developers.  The most user visible of
these is:

Btrfs: clear the extent uptodate bits during parent transid failures 

Because that helps deal with out of date drives (say an iscsi disk that
has gone away and come back).  The old code wasn't always properly
retrying the other mirror for this type of failure.

Liu Bo (6) commits (+24/-15):
    Btrfs: be less strict on finding next node in clear_extent_bit (+1/-2)
    Btrfs: skip states when they does not contain bits to clear (+10/-5)
    Btrfs: kick out redundant stuff in convert_extent_bit (+0/-5)
    Btrfs: increase the global block reserve estimates (+1/-1)
    Btrfs: fix trim 0 bytes after a device delete (+8/-1)
    Btrfs: fix a bug on overcommit stuff (+4/-1)

Chris Mason (6) commits (+93/-47):
    Btrfs: clear the extent uptodate bits during parent transid failures (+3/-4)
    Btrfs: add extra sanity checks on the path names in btrfs_mksubvol (+6/-0)
    Btrfs: don't reserve data with extents locked in btrfs_fallocate (+10/-15)
    Btrfs: improve error handling for btrfs_insert_dir_item callers (+26/-7)
    Btrfs: fix compiler warnings on 32 bit systems (+26/-20)
    Btrfs: make sure we update latest_bdev (+22/-1)

Tsutomu Itoh (3) commits (+15/-8):
    Btrfs: check return value of lookup_extent_mapping() correctly (+4/-2)
    Btrfs: fix memory leak in load_free_space_cache() (+1/-0)
    Btrfs: fix return value check of extent_io_ops (+10/-6)

David Sterba (2) commits (+17/-3):
    btrfs: fix structs where bitfields and spinlock/atomic share 8B word (+3/-3)
    btrfs: silence warning in raid array setup (+14/-0)

Jan Schmidt (1) commits (+2/-0):
    Btrfs: avoid positive number with ERR_PTR

Jeff Mahoney (1) commits (+53/-27):
    btrfs: delalloc for page dirtied out-of-band in fixup worker

Keith Mannthey (1) commits (+6/-0):
    btrfs: Sector Size check during Mount

Arne Jansen (1) commits (+5/-3):
    btrfs: don't check DUP chunks twice

Jeff Liu (1) commits (+2/-2):
    Btrfs: return the internal error unchanged if btrfs_get_extent_fiemap() call failed for SEEK_DATA/SEEK_HOLE inquiry

Miao Xie (1) commits (+29/-24):
    Btrfs: fix deadlock on page lock when doing auto-defragment

Florian Albrechtskirchinger (1) commits (+4/-2):
    btrfs: honor umask when creating subvol root

Total: (24) commits (+250/-131)

 fs/btrfs/backref.c          |    2 +
 fs/btrfs/check-integrity.c  |    2 +-
 fs/btrfs/compression.c      |    2 +
 fs/btrfs/ctree.h            |    2 +-
 fs/btrfs/disk-io.c          |   12 +++++
 fs/btrfs/extent-tree.c      |   51 ++++++++++++-------
 fs/btrfs/extent_io.c        |  113 +++++++++++++++++++++++++------------------
 fs/btrfs/extent_io.h        |    1 +
 fs/btrfs/extent_map.h       |    4 +-
 fs/btrfs/file.c             |   29 +++++-------
 fs/btrfs/free-space-cache.c |    1 +
 fs/btrfs/inode-map.c        |    6 ++-
 fs/btrfs/inode.c            |   40 +++++++++++++--
 fs/btrfs/ioctl.c            |   59 +++++++++++++---------
 fs/btrfs/scrub.c            |    8 ++-
 fs/btrfs/transaction.c      |   16 ++++---
 fs/btrfs/volumes.c          |   33 ++++++++++++-
 17 files changed, 250 insertions(+), 131 deletions(-)

^ permalink raw reply	[relevance 5%]

* [PATCH v2 00/21] btrfs: updates to delayed refs accounting and space reservation
  2023-09-08 12:09  5% [PATCH 00/21] btrfs: updates to delayed refs accounting and space reservation fdmanana
@ 2023-09-08 17:20  5% ` fdmanana
  0 siblings, 0 replies; 105+ results
From: fdmanana @ 2023-09-08 17:20 UTC (permalink / raw)
  To: linux-btrfs

From: Filipe Manana <fdmanana@suse.com>

The following are some fixes, improvements and cleanups around delayed refs.
Mostly about space accouting and reservation and were motivated by a case
hit by a SLE (SUSE Linux Enterprise) user where a filesystem became unmountable
and unusable because it fails a RW mount with -ENOSPC when attempting to do
any orphan cleanup. The problem was that the device had no available space
for allocating new block groups and the available metadata space was about
1.5M, too little to commit any transaction, but enough to start a transaction,
as during the transaction commit we need to COW more than we accounted for
when starting the transaction (running delayed refs generates more delayed
refs to update the extent tree for example). Starting any transaction there,
either to do orphan cleanup, attempt to reclaim data block groups, unlink,
etc, always failed during the transaction commit and result in transaction
aborts.

We have some cases where we use and abuse of the global block reserve
because we don't reserve enough space when starting a transaction or account
delayed refs properly, and can therefore lead to exhaustion of metadata space
in case we don't have more unallocated space to allocate a new metadata block
group.

More details on the individual changelogs.

There are more cases that will be addressed later and depend on this patchset,
but they'll be sent later and separately.

Filipe Manana (21):
  btrfs: fix race when refilling delayed refs block reserve
  btrfs: prevent transaction block reserve underflow when starting transaction
  btrfs: pass a space_info argument to btrfs_reserve_metadata_bytes()
  btrfs: remove unnecessary logic when running new delayed references
  btrfs: remove the refcount warning/check at btrfs_put_delayed_ref()
  btrfs: return -EUCLEAN for delayed tree ref with a ref count not equals to 1
  btrfs: remove redundant BUG_ON() from __btrfs_inc_extent_ref()
  btrfs: remove refs_to_add argument from __btrfs_inc_extent_ref()
  btrfs: remove refs_to_drop argument from __btrfs_free_extent()
  btrfs: initialize key where it's used when running delayed data ref
  btrfs: remove pointless 'ref_root' variable from run_delayed_data_ref()
  btrfs: log message if extent item not found when running delayed extent op
  btrfs: use a single variable for return value at run_delayed_extent_op()
  btrfs: use a single variable for return value at lookup_inline_extent_backref()
  btrfs: return -EUCLEAN if extent item is missing when searching inline backref
  btrfs: simplify check for extent item overrun at lookup_inline_extent_backref()
  btrfs: allow to run delayed refs by bytes to be released instead of count
  btrfs: reserve space for delayed refs on a per ref basis
  btrfs: remove pointless initialization at btrfs_delayed_refs_rsv_release()
  btrfs: stop doing excessive space reservation for csum deletion
  btrfs: always reserve space for delayed refs when starting transaction

 fs/btrfs/block-group.c    |  11 +-
 fs/btrfs/block-rsv.c      |  18 ++--
 fs/btrfs/delalloc-space.c |   3 +-
 fs/btrfs/delayed-ref.c    | 132 +++++++++++++++++-------
 fs/btrfs/delayed-ref.h    |  15 ++-
 fs/btrfs/disk-io.c        |   3 +-
 fs/btrfs/extent-tree.c    | 208 +++++++++++++++++++-------------------
 fs/btrfs/extent-tree.h    |   4 +-
 fs/btrfs/space-info.c     |  29 ++----
 fs/btrfs/space-info.h     |   2 +-
 fs/btrfs/transaction.c    | 143 ++++++++++++++++++++------
 fs/btrfs/transaction.h    |   3 +
 12 files changed, 357 insertions(+), 214 deletions(-)

-- 
2.40.1


^ permalink raw reply	[relevance 5%]

* [PATCH 00/21] btrfs: updates to delayed refs accounting and space reservation
@ 2023-09-08 12:09  5% fdmanana
  2023-09-08 17:20  5% ` [PATCH v2 " fdmanana
  0 siblings, 1 reply; 105+ results
From: fdmanana @ 2023-09-08 12:09 UTC (permalink / raw)
  To: linux-btrfs

From: Filipe Manana <fdmanana@suse.com>

The following are some fixes, improvements and cleanups around delayed refs.
Mostly about space accouting and reservation and were motivated by a case
hit by a SLE (SUSE Linux Enterprise) user where a filesystem became unmountable
and unusable because it fails a RW mount with -ENOSPC when attempting to do
any orphan cleanup. The problem was that the device had no available space
for allocating new block groups and the available metadata space was about
1.5M, too little to commit any transaction, but enough to start a transaction,
as during the transaction commit we need to COW more than we accounted for
when starting the transaction (running delayed refs generates more delayed
refs to update the extent tree for example). Starting any transaction there,
either to do orphan cleanup, attempt to reclaim data block groups, unlink,
etc, always failed during the transaction commit and result in transaction
aborts.

We have some cases where we use and abuse of the global block reserve
because we don't reserve enough space when starting a transaction or account
delayed refs properly, and can therefore lead to exhaustion of metadata space
in case we don't have more unallocated space to allocate a new metadata block
group.

More details on the individual changelogs.

There are more cases that will be addressed later and depend on this patchset,
but they'll be sent later and separately.

Filipe Manana (21):
  btrfs: fix race when refilling delayed refs block reserve
  btrfs: prevent transaction block reserve underflow when starting transaction
  btrfs: pass a space_info argument to btrfs_reserve_metadata_bytes()
  btrfs: remove unnecessary logic when running new delayed references
  btrfs: remove the refcount warning/check at btrfs_put_delayed_ref()
  btrfs: return -EUCLEAN for delayed tree ref with a ref count not equals to 1
  btrfs: remove redundant BUG_ON() from __btrfs_inc_extent_ref()
  btrfs: remove refs_to_add argument from __btrfs_inc_extent_ref()
  btrfs: remove refs_to_drop argument from __btrfs_free_extent()
  btrfs: initialize key where it's used when running delayed data ref
  btrfs: remove pointless 'ref_root' variable from run_delayed_data_ref()
  btrfs: log message if extent item not found when running delayed extent op
  btrfs: use a single variable for return value at run_delayed_extent_op()
  btrfs: use a single variable for return value at lookup_inline_extent_backref()
  btrfs: return -EUCLEAN if extent item is missing when searching inline backref
  btrfs: simplify check for extent item overrun at lookup_inline_extent_backref()
  btrfs: allow to run delayed refs by bytes to be released instead of count
  btrfs: reserve space for delayed refs on a per ref basis
  btrfs: remove pointless initialization at btrfs_delayed_refs_rsv_release()
  btrfs: stop doing excessive space reservation for csum deletion
  btrfs: always reserve space for delayed refs when starting transaction

 fs/btrfs/block-group.c    |  11 +-
 fs/btrfs/block-rsv.c      |  18 ++--
 fs/btrfs/delalloc-space.c |   3 +-
 fs/btrfs/delayed-ref.c    | 132 +++++++++++++++++-------
 fs/btrfs/delayed-ref.h    |  15 ++-
 fs/btrfs/disk-io.c        |   3 +-
 fs/btrfs/extent-tree.c    | 208 +++++++++++++++++++-------------------
 fs/btrfs/extent-tree.h    |   4 +-
 fs/btrfs/space-info.c     |  29 ++----
 fs/btrfs/space-info.h     |   2 +-
 fs/btrfs/transaction.c    | 143 ++++++++++++++++++++------
 fs/btrfs/transaction.h    |   3 +
 12 files changed, 357 insertions(+), 214 deletions(-)

-- 
2.40.1


^ permalink raw reply	[relevance 5%]

* [GIT PULL] Btrfs updates
@ 2011-04-18 14:26  5% Chris Mason
  0 siblings, 0 replies; 105+ results
From: Chris Mason @ 2011-04-18 14:26 UTC (permalink / raw)
  To: Linus Torvalds, Linux Btrfs, linux-kernel

Hi everyone,

The master branch of the btrfs unstable repo:

git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable.git master

Has a nice pile of btrfs fixes.  Josef tackled a variety of DIO problems
including latencies and crc errors.  He also fixed a crash in the
mount -o free_space_cache mode, and dramatically reduced contention on
the journal mutex.  Less contention means we finish up endio processing
faster and we're able to process delalloc much faster as space gets
tight.

Our ENOSPC fixes have returned.  The cluster allocation code was
sometimes getting out of hand and leaving us with a filesystem full of
metadata chunks.

Fujitsu continues a long series of error handling improvements and
fixes, and Sergei Trofimovich fixed a memcpy vs memmove bug.

I've removed a duplicate commit from the shortlog below.  Josef and I
both managed to take his iov_base fix.  Git did the right thing and the
resulting code is correct.

Josef Bacik (10) commits (+224/-133):
    Btrfs: reuse the extent_map we found when calling btrfs_get_extent (+28/-8)
    Btrfs: do not call btrfs_update_inode in endio if nothing changed (+10/-5)
    Btrfs: deal with the case that we run out of space in the cache (+69/-74)
    Btrfs: avoid taking the trans_mutex in btrfs_end_transaction (+19/-24)
    Btrfs: check for duplicate iov_base's when doing dio reads (+16/-1)
    Btrfs: avoid taking the chunk_mutex in do_chunk_alloc (+28/-6)
    Btrfs: map the inode item when doing fill_inode_item (+12/-0)
    Btrfs: do not use async submit for small DIO io's (+19/-5)
    Btrfs: don't split dio bios if we don't have to (+13/-7)
    Btrfs: only retry transaction reservation once (+10/-1)

Chris Mason (4) commits (+78/-29):
    Btrfs end_bio_extent_readpage should look for locked bits (+1/-1)
    Btrfs: don't force chunk allocation in find_free_extent (+73/-22)
    Btrfs: make uncache_state unconditional (+3/-5)
    Btrfs: fix free space cache leak (+1/-1)

Li Zefan (2) commits (+22/-39):
    Btrfs: Check if btrfs_next_leaf() returns error in btrfs_real_readdir() (+10/-18)
    Btrfs: Check if btrfs_next_leaf() returns error in btrfs_listxattr() (+12/-21)

Miao Xie (2) commits (+8/-7):
    Btrfs: Fix incorrect inode nlink in btrfs_link() (+3/-3)
    Btrfs: Check validity before setting an acl (+5/-4)

Sergei Trofimovich (1) commits (+11/-3):
    btrfs: properly handle overlapping areas in memmove_extent_buffer

Yoshinori Sano (1) commits (+4/-1):
    Btrfs: fix memory leaks in btrfs_new_inode()

Xin Zhong (1) commits (+33/-9):
    Btrfs: fix subvolume mount by name problem when default mount subvolume is set

Daniel J Blueman (1) commits (+1/-1):
    fix user annotation in ioctl.c

Arne Jansen (1) commits (+55/-19):
    btrfs: using cached extent_state in set/unlock combinations

Total: (24) commits (+452/-240)

 fs/btrfs/acl.c              |    9 ++-
 fs/btrfs/ctree.h            |    9 ++-
 fs/btrfs/disk-io.c          |    2 +-
 fs/btrfs/extent-tree.c      |  125 +++++++++++++++++++++++++-------
 fs/btrfs/extent_io.c        |   82 ++++++++++++++++-----
 fs/btrfs/extent_io.h        |    2 +-
 fs/btrfs/file.c             |   21 +++---
 fs/btrfs/free-space-cache.c |  119 +++++++++++++++----------------
 fs/btrfs/inode.c            |  165 ++++++++++++++++++++++++++++++-------------
 fs/btrfs/ioctl.c            |    2 +-
 fs/btrfs/super.c            |   42 +++++++++---
 fs/btrfs/transaction.c      |   48 +++++++------
 fs/btrfs/transaction.h      |    4 +-
 fs/btrfs/xattr.c            |   33 +++------
 14 files changed, 430 insertions(+), 233 deletions(-)

^ permalink raw reply	[relevance 5%]

* [GIT PULL] Btrfs updates
@ 2012-06-15 18:09  5% Chris Mason
  0 siblings, 0 replies; 105+ results
From: Chris Mason @ 2012-06-15 18:09 UTC (permalink / raw)
  To: torvalds, linux-btrfs, linux-kernel

Hi Linus,

Please pull my for-linus branch:

git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git for-linus

The dates look like I had to rebase this morning because there was a compiler
warning for a printk arg that I had missed earlier.

These are all fixes, including one to prevent using stale pointers for
device names, and lots of fixes around transaction abort cleanups
(Josef, Liu Bo).

Jan Schmidt also sent in a number of fixes for the new reference number
tracking code.

Liu Bo beat me to updating the MAINTAINERS file.  Since he thought to
also fix the git url, I kept his commit.

Josef Bacik (10) commits (+303/-102):
    Btrfs: pass locked_page into extent_clear_unlock_delalloc if theres an error (+2/-2)
    Btrfs: unlock everything properly in the error case for nocow (+35/-2)
    Btrfs: wake up transaction waiters when aborting a transaction (+7/-6)
    Btrfs: call filemap_fdatawrite twice for compression (+31/-7)
    Btrfs: fix locking in btrfs_destroy_delayed_refs (+17/-13)
    Btrfs: keep inode pinned when compressing writes (+6/-2)
    Btrfs: abort the transaction if the commit fails (+8/-2)
    Btrfs: use rcu to protect device->name (+162/-64)
    Btrfs: fix btrfs_destroy_marked_extents (+2/-4)
    Btrfs: implement ->show_devname (+33/-0)

Jan Schmidt (6) commits (+72/-37):
    Btrfs: remove obsolete btrfs_next_leaf call from __resolve_indirect_ref (+1/-9)
    Btrfs: remove call to btrfs_header_nritems with no effect (+0/-3)
    Btrfs: fix return value for __tree_mod_log_oldest_root (+20/-13)
    Btrfs: use btrfs_read_lock_root_node in get_old_root (+16/-4)
    Btrfs: fix race in tree mod log addition (+19/-4)
    Btrfs: add btrfs_next_old_leaf (+16/-4)

Liu Bo (5) commits (+29/-5):
    Btrfs: avoid memory leak of extent state in error handling routine (+2/-0)
    Btrfs: make sure that we've made everything in pinned tree clean (+11/-0)
    Btrfs: update MAINTAINERS info for BTRFS FILE SYSTEM (+2/-2)
    Btrfs: fix missing inherited flag in rename (+6/-3)
    Btrfs: do not resize a seeding device (+8/-0)

Li Zefan (2) commits (+50/-49):
    Btrfs: fix incompat flags setting (+1/-1)
    Btrfs: fix defrag regression (+49/-48)

Miao Xie (1) commits (+27/-0):
    Btrfs: destroy the items of the delayed inodes in error handling routine

Total: (24) commits (+481/-193)

 MAINTAINERS                |    4 +-
 fs/btrfs/backref.c         |   17 ++-----
 fs/btrfs/btrfs_inode.h     |    1 +
 fs/btrfs/check-integrity.c |   16 +++---
 fs/btrfs/ctree.c           |   86 +++++++++++++++++++++++---------
 fs/btrfs/ctree.h           |    2 +
 fs/btrfs/delayed-inode.c   |   18 +++++++
 fs/btrfs/delayed-inode.h   |    3 ++
 fs/btrfs/disk-io.c         |   76 +++++++++++++++++-----------
 fs/btrfs/extent_io.c       |    7 +--
 fs/btrfs/inode.c           |   73 +++++++++++++++++++++------
 fs/btrfs/ioctl.c           |  118 +++++++++++++++++++++++++-------------------
 fs/btrfs/ordered-data.c    |   22 ++++++++-
 fs/btrfs/rcu-string.h      |   56 +++++++++++++++++++++
 fs/btrfs/scrub.c           |   30 ++++++-----
 fs/btrfs/super.c           |   33 +++++++++++++
 fs/btrfs/transaction.c     |   14 +++++-
 fs/btrfs/volumes.c         |   92 +++++++++++++++++++++-------------
 fs/btrfs/volumes.h         |    2 +-
 19 files changed, 479 insertions(+), 191 deletions(-)

^ permalink raw reply	[relevance 5%]

* [GIT PULL] Btrfs updates for 2.6.33-git
@ 2009-12-17 21:59  5% Chris Mason
  0 siblings, 0 replies; 105+ results
From: Chris Mason @ 2009-12-17 21:59 UTC (permalink / raw)
  To: linux-kernel, linux-btrfs, Linus Torvalds

Hello everyone,

This btrfs update is mostly a collection of fixes.  Josef has the
snapshot-supported yum update code pending, but I wanted to give that
some more time to cook before we send it out.

Linus please pull the for-linus branch of the btrfs-unstable tree

git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable.git for-linus

This has the same code as the master branch (which is based on 2.6.32),
but it is merged Linus' current git.  There is only one trivial
conflict.

This includes a patch to fail mounting if you send btrfs a mount option
it doesn't understand.  So, if you've got something like nodataum in
your fstab you'll find errors instead of silently ignoring it.

Josef patched the block group code to make smaller metadata block groups
by default.  This helps us waste less metadata space in general.

Chris Mason (1) commits (+9/-4):
    Btrfs: make sure fallocate properly starts a transaction

Josef Bacik (1) commits (+2/-11):
    Btrfs: make metadata chunks smaller

Matthew Wilcox (1) commits (+2/-0):
    Btrfs: Show discard option in /proc/mounts

Sage Weil (1) commits (+8/-1):
    Btrfs: fail mount on bad mount options

TARUISI Hiroaki (1) commits (+4/-0):
    Btrfs: deny sys_link across subvolumes.

Zheng Yan (13) commits (+1155/-907):
    Btrfs: Pass transaction handle to security and ACL initialization functions (+96/-63)
    Btrfs: Avoid orphan inodes cleanup during committing transaction (+17/-16)
    Btrfs: Avoid orphan inodes cleanup while replaying log (+55/-36)
    Btrfs: Fix btrfs_drop_extent_cache for skip pinned case (+3/-7)
    Btrfs: don't add extent 0 to the free space cache v2 (+9/-1)
    Btrfs: Make truncate(2) more ENOSPC friendly (+212/-137)
    Btrfs: Make fallocate(2) more ENOSPC friendly (+32/-33)
    Btrfs: Fix disk_i_size update corner case (+127/-56)
    Btrfs: Avoid superfluous tree-log writeout (+47/-31)
    Btrfs: Fix per root used space accounting (+47/-27)
    Btrfs: Rewrite btrfs_drop_extents (+277/-423)
    Btrfs: Add btrfs_duplicate_item (+143/-59)
    Btrfs: Add delayed iput (+90/-18)

Total: (18) commits

 fs/btrfs/acl.c          |   23 -
 fs/btrfs/btrfs_inode.h  |    5 
 fs/btrfs/ctree.c        |  229 ++++++++++------
 fs/btrfs/ctree.h        |   40 ++
 fs/btrfs/dir-item.c     |   19 -
 fs/btrfs/disk-io.c      |   27 +
 fs/btrfs/extent-tree.c  |   72 +++--
 fs/btrfs/file.c         |  669 +++++++++++++++++++-----------------------------
 fs/btrfs/inode.c        |  585 ++++++++++++++++++++++++++---------------
 fs/btrfs/ioctl.c        |   34 +-
 fs/btrfs/ordered-data.c |  115 ++++++--
 fs/btrfs/ordered-data.h |    5 
 fs/btrfs/relocation.c   |   38 +-
 fs/btrfs/super.c        |   15 -
 fs/btrfs/transaction.c  |   44 +--
 fs/btrfs/transaction.h  |    6 
 fs/btrfs/tree-log.c     |   86 +++---
 fs/btrfs/volumes.c      |    2 
 fs/btrfs/xattr.c        |   80 +++--
 fs/btrfs/xattr.h        |    9 
 20 files changed, 1180 insertions(+), 923 deletions(-)

^ permalink raw reply	[relevance 5%]

* [GIT PULL] Btrfs updates for 2.6.37-rc
@ 2010-11-29 16:00  5% Chris Mason
  0 siblings, 0 replies; 105+ results
From: Chris Mason @ 2010-11-29 16:00 UTC (permalink / raw)
  To: Linus Torvalds, linux-kernel, linux-btrfs

Hi everyone,

The master branch of the btrfs unstable tree:

git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable.git master

Has a collection of btrfs bug fixes.

The three most important fixes here address crashes in the btrfs
O_DIRECT code, add a migrate_page operation to avoid metadata corruption
as btree pages go through migration, and fix up our NFS support.

Otherwise we have assorted correctness fixes, many of which were kicked
out by xfsqa.

-chris

Josef Bacik (11) commits (+241/-54):
    Btrfs: make btrfs_add_nondir take parent inode as an argument (+16/-22)
    Btrfs: fix typo in fallocate to make it honor actual size (+5/-4)
    Btrfs: hold i_mutex when calling btrfs_log_dentry_safe (+7/-0)
    Btrfs: setup blank root and fs_info for mount time (+33/-7)
    Btrfs: make sure new inode size is ok in fallocate (+4/-0)
    Btrfs: use dget_parent where we can UPDATED (+43/-12)
    Btrfs: handle the space_cache option properly (+1/-0)
    Btrfs: update inode ctime when using links (+1/-0)
    Btrfs: fix more ESTALE problems with NFS (+1/-0)
    Btrfs: handle NFS lookups properly (+76/-0)
    Btrfs: fix fiemap (+54/-9)

Chris Mason (4) commits (+124/-9):
    Btrfs: deal with DIO bios that span more than one ordered extent (+89/-4)
    Btrfs: avoid NULL pointer deref in try_release_extent_buffer (+4/-2)
    Btrfs: don't use migrate page without CONFIG_MIGRATION (+6/-1)
    Btrfs: add migrate page for metadata inode (+25/-2)

Li Zefan (3) commits (+6/-6):
    btrfs: Check if dest_offset is block-size aligned before cloning file (+3/-4)
    btrfs: Show device attr correctly for symlinks (+1/-0)
    btrfs: Set file size correctly in file clone (+2/-2)

Miao Xie (3) commits (+195/-45):
    btrfs: cleanup duplicate bio allocating functions (+8/-18)
    btrfs: fix free dip and dip->csums twice (+3/-6)
    btrfs: fix panic caused by direct IO (+184/-21)

Mariusz Kozlowski (1) commits (+3/-3):
    btrfs: make 1-bit signed fileds unsigned

Arne Jansen (1) commits (+1/-1):
    btrfs: Fix early enospc because 'unused' calculated with wrong sign.

Ian Kent (1) commits (+6/-0):
    Btrfs - fix race between btrfs_get_sb() and umount

Total: (24) commits (+576/-118)

 fs/btrfs/compression.c  |   15 +---
 fs/btrfs/ctree.h        |    6 +-
 fs/btrfs/disk-io.c      |   38 +++++-
 fs/btrfs/export.c       |   76 ++++++++++++
 fs/btrfs/extent-tree.c  |    2 +-
 fs/btrfs/extent_io.c    |   77 ++++++++++---
 fs/btrfs/extent_io.h    |    3 +
 fs/btrfs/file.c         |    7 +
 fs/btrfs/inode.c        |  294 ++++++++++++++++++++++++++++++++++++++---------
 fs/btrfs/ioctl.c        |   31 ++++--
 fs/btrfs/ordered-data.c |   67 +++++++++++
 fs/btrfs/ordered-data.h |    3 +
 fs/btrfs/super.c        |   41 ++++++-
 fs/btrfs/transaction.c  |    5 +-
 fs/btrfs/tree-log.c     |   21 +++-
 15 files changed, 572 insertions(+), 114 deletions(-)

^ permalink raw reply	[relevance 5%]

* [GIT PULL] Btrfs updates for 2.6.35
@ 2010-06-11 19:37  5% Chris Mason
  0 siblings, 0 replies; 105+ results
From: Chris Mason @ 2010-06-11 19:37 UTC (permalink / raw)
  To: Linus Torvalds, linux-kernel, linux-btrfs

Hello everyone,

The master branch of the btrfs-unstable tree is a collection of fixes
and cleanups, including two btrfs regressions from rc1:

git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable.git master

One is an freeing blocks on an FS converted from ext34 to btrfs,
and the other is a fallocate fix.

The rest are the usual small bug fixes.

Dan Carpenter (11) commits (+24/-17):
    Btrfs: handle error returns from btrfs_lookup_dir_item() (+2/-0)
    Btrfs: btrfs_read_fs_root_no_name() returns ERR_PTRs (+4/-0)
    Btrfs: unwind after btrfs_start_transaction() errors (+1/-1)
    Btrfs: remove unneeded null check in btrfs_rename() (+1/-3)
    Btrfs: The file argument for fsync() is never null (+1/-1)
    Btrfs: handle ERR_PTR from posix_acl_from_xattr() (+2/-0)
    Btrfs: btrfs_lookup_dir_item() can return ERR_PTR (+1/-1)
    Btrfs: uninitialized data is check_path_shared() (+1/-1)
    Btrfs: handle kzalloc() failure in open_ctree() (+5/-2)
    Btrfs: silence sparse warnings in ioctl.c (+4/-6)
    Btrfs: btrfs_iget() returns ERR_PTR (+2/-2)

Zheng Yan (2) commits (+6/-4):
    Btrfs: Fix BUG_ON for fs converted from extN (+2/-1)
    Btrfs: Fix null dereference in relocation.c (+4/-3)

Liu Bo (2) commits (+14/-4):
    Btrfs: Add error check for add_to_page_cache_lru (+13/-3)
    Btrfs: fix break in btrfs_insert_some_items() (+1/-1)

Julia Lawall (2) commits (+9/-17):
    Btrfs: Use memdup_user (+6/-14)
    Btrfs: Use ERR_CAST (+3/-3)

Shi Weihua (2) commits (+6/-0):
    Btrfs: prohibit a operation of changing acl's mask when noacl mount option used (+3/-0)
    Btrfs: should add a permission check for setfacl (+3/-0)

Miao Xie (2) commits (+9/-1):
    Btrfs: fix loop device on top of btrfs (+1/-0)
    Btrfs: fix remap_file_pages error (+8/-1)

Sage Weil (1) commits (+0/-3):
    Btrfs: avoid BUG when dropping root and reference in same transaction

Andi Kleen (1) commits (+2/-94):
    BTRFS: Clean up unused variables -- nonbugs

Josef Bacik (1) commits (+1/-1):
    Btrfs: fix fallocate regression

Prarit Bhargava (1) commits (+1/-1):
    Btrfs: Fix warning in tree_search()

Total: (25) commits (+72/-142)

 fs/btrfs/acl.c          |    8 ++++++++
 fs/btrfs/compression.c  |   18 +++++++++++++-----
 fs/btrfs/ctree.c        |   20 +-------------------
 fs/btrfs/disk-io.c      |   22 +++++++++-------------
 fs/btrfs/extent-tree.c  |    5 ++---
 fs/btrfs/extent_io.c    |    9 ---------
 fs/btrfs/extent_map.c   |    4 ++--
 fs/btrfs/file.c         |   12 ++++++++++--
 fs/btrfs/inode.c        |   22 +++-------------------
 fs/btrfs/ioctl.c        |   36 ++++++++++++------------------------
 fs/btrfs/ordered-data.c |    4 +---
 fs/btrfs/relocation.c   |    7 ++++---
 fs/btrfs/root-tree.c    |    5 -----
 fs/btrfs/super.c        |   14 +++++++-------
 fs/btrfs/tree-defrag.c  |    2 --
 fs/btrfs/tree-log.c     |   15 ---------------
 fs/btrfs/volumes.c      |    4 ----
 fs/btrfs/xattr.c        |    2 --
 fs/btrfs/zlib.c         |    5 -----
 19 files changed, 72 insertions(+), 142 deletions(-)

^ permalink raw reply	[relevance 5%]

* [GIT PULL] Btrfs updates for 6.7-rc2
@ 2023-11-13 16:22  5% David Sterba
  0 siblings, 0 replies; 105+ results
From: David Sterba @ 2023-11-13 16:22 UTC (permalink / raw)
  To: torvalds; +Cc: David Sterba, linux-btrfs, linux-kernel

Hi,

please pull the following fixes that accumulated in the past weeks.

- fix potential overflow in returned value from SEARCH_TREE_V2 ioctl on
  32bit architecture

- zoned mode fixes

  - drop unnecessary write pointer check for RAID0/RAID1/RAID10
    profiles, now it works because of raid-stripe-tree

  - wait for finishing the zone when direct IO needs a new allocation

- simple quota fixes

  - pass correct owning root pointer when cleaning up an aborted
    transaction

  - fix leaking some structures when processing delayed refs

  - change key type number of BTRFS_EXTENT_OWNER_REF_KEY, reorder it
    before inline refs that are supposed to be sorted, keeping the
    original number would complicate a lot of things; this change needs
    an updated version of btrfs-progs to work and filesystems need to be
    recreated

- fix error pointer dereference after failure to allocate fs devices

- fix race between accounting qgroup extents and removing a qgroup

----------------------------------------------------------------
The following changes since commit c6e8f898f56fae2cb5bc4396bec480f23cd8b066:

  btrfs: open code timespec64 in struct btrfs_inode (2023-10-12 16:44:19 +0200)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git tags/for-6.7-rc1-tag

for you to fetch changes up to d3933152442b7f94419e9ea71835d71b620baf0e:

  btrfs: make OWNER_REF_KEY type value smallest among inline refs (2023-11-09 14:02:12 +0100)

----------------------------------------------------------------
Boris Burkov (1):
      btrfs: make OWNER_REF_KEY type value smallest among inline refs

Dan Carpenter (1):
      btrfs: directly return 0 on no error code in btrfs_insert_raid_extent()

Filipe Manana (4):
      btrfs: use u64 for buffer sizes in the tree search ioctls
      btrfs: fix error pointer dereference after failure to allocate fs devices
      btrfs: fix race between accounting qgroup extents and removing a qgroup
      btrfs: fix qgroup record leaks when using simple quotas

Josef Bacik (1):
      btrfs: get correct owning_root when dropping snapshot

Naohiro Aota (2):
      btrfs: zoned: drop no longer valid write pointer check
      btrfs: zoned: wait for data BG to be finished on direct IO allocation

Qu Wenruo (1):
      btrfs: make found_logical_ret parameter mandatory for function queue_scrub_stripe()

 fs/btrfs/ctree.c                |  2 +-
 fs/btrfs/delayed-ref.c          |  4 ++--
 fs/btrfs/extent-tree.c          | 25 +++++++++++++++++--------
 fs/btrfs/extent-tree.h          |  3 ++-
 fs/btrfs/inode.c                |  7 +++++++
 fs/btrfs/ioctl.c                | 10 +++++-----
 fs/btrfs/qgroup.c               | 10 ++++++++--
 fs/btrfs/raid-stripe-tree.c     |  2 +-
 fs/btrfs/scrub.c                | 10 +++++++---
 fs/btrfs/volumes.c              |  6 +++---
 fs/btrfs/zoned.c                |  7 -------
 include/uapi/linux/btrfs_tree.h | 24 ++++++++++++++++--------
 12 files changed, 69 insertions(+), 41 deletions(-)

^ permalink raw reply	[relevance 5%]

* [GIT PULL] Btrfs updates for 5.6, part 2
@ 2020-02-03 15:38  5% David Sterba
  0 siblings, 0 replies; 105+ results
From: David Sterba @ 2020-02-03 15:38 UTC (permalink / raw)
  To: torvalds; +Cc: David Sterba, linux-btrfs, linux-kernel

Hi,

second batch containing fixes that arrived after the merge window
freeze, mostly stable material. The top patch is fresh but addressing
space reporing bug that's been bothering users and we've tested it
meanwhile.

Please pull thanks.

* fix race in tree-mod-log element tracking

* fix bio flushing inside extent writepages

* fix assertion when in-memory tracking of discarded extents finds an
  empty tree (eg. after adding a new device)

* update logic of temporary read-only block groups to take into account
  overcommit

* fix some fixup worker corner cases:
  - page could not go through proper COW cycle and the dirty status is
    lost due to page migration
  - deadlock if delayed allocation is performed under page lock

* fix send emitting invalid clones within the same file

* fix statfs reporting 0 free space when global block reserve size is
  larger than remaining free space but there is still space for new
  chunks

----------------------------------------------------------------
The following changes since commit 4e19443da1941050b346f8fc4c368aa68413bc88:

  btrfs: free block groups after free'ing fs trees (2020-01-23 17:24:39 +0100)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-5.6-tag

for you to fetch changes up to d55966c4279bfc6a0cf0b32bf13f5df228a1eeb6:

  btrfs: do not zero f_bavail if we have available space (2020-02-02 18:49:32 +0100)

----------------------------------------------------------------
Chris Mason (1):
      Btrfs: keep pages dirty when using btrfs_writepage_fixup_worker

Filipe Manana (2):
      Btrfs: fix race between adding and putting tree mod seq elements and nodes
      Btrfs: send, fix emission of invalid clone operations within the same file

Josef Bacik (6):
      btrfs: flush write bio if we loop in extent_write_cache_pages
      btrfs: fix force usage in inc_block_group_ro
      btrfs: take overcommit into account in inc_block_group_ro
      btrfs: drop the -EBUSY case in __extent_writepage_io
      btrfs: do not do delalloc reservation under page lock
      btrfs: do not zero f_bavail if we have available space

Nikolay Borisov (1):
      btrfs: Correctly handle empty trees in find_first_clear_extent_bit

 fs/btrfs/block-group.c           |  39 +++++++++----
 fs/btrfs/ctree.c                 |   8 +--
 fs/btrfs/ctree.h                 |   6 +-
 fs/btrfs/delayed-ref.c           |   8 +--
 fs/btrfs/disk-io.c               |   1 -
 fs/btrfs/extent_io.c             |  49 +++++++++-------
 fs/btrfs/inode.c                 | 121 +++++++++++++++++++++++++++++++--------
 fs/btrfs/send.c                  |   3 +-
 fs/btrfs/space-info.c            |  18 +++---
 fs/btrfs/space-info.h            |   3 +
 fs/btrfs/super.c                 |  10 +++-
 fs/btrfs/tests/btrfs-tests.c     |   1 -
 fs/btrfs/tests/extent-io-tests.c |   9 +++
 13 files changed, 193 insertions(+), 83 deletions(-)

^ permalink raw reply	[relevance 5%]

* [GIT PULL] Btrfs updates for 2.6.32-rc
@ 2009-10-02  0:30  5% Chris Mason
  0 siblings, 0 replies; 105+ results
From: Chris Mason @ 2009-10-02  0:30 UTC (permalink / raw)
  To: Linus Torvalds, linux-kernel, linux-btrfs

Hello everyone,

I've prepared the for-linus branch of the btrfs-unstable tree for
pulling:

git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable.git for-linus

The master branch has the same changes against 2.6.31, minus a cleanup
from Christoph that is 2.6.32-rc specific.

The big part of this pull request is Josef Bacik's ENOSPC support.  He
has added enough tracking to reserve room ahead of time for the metadata
required to meet all the delayed allocations we do, and gotten rid of
the half solutions that were in place before.

We already have small updates planned, and the code doesn't yet make
sure that btrfs-vol -b or device shrinking do the proper reservation to
avoid oopsen.  But, it is working nicely and I'd like to get it out for
broader use.

Another change that may get noticed is that Btrfs now uses
CONFIG_BTRFS_POSIX_ACL for testing to see if it should do acls.  There
has been some confusion around this and it is more consistent with the
other filesystems.  So, if you had acls please make sure you've got the
btrfs posix acl config on.

Chris Ball (2) commits (+7/-5):
    Btrfs: Fix setting umask when POSIX ACLs are not enabled (+2/-0)
    Btrfs: Use CONFIG_BTRFS_POSIX_ACL to enable ACL code (+5/-5)

Chris Mason (1) commits (+17/-8):
    Btrfs: take i_mutex before generic_write_checks

Christoph Hellwig (2) commits (+13/-103):
    Btrfs: fix arguments to btrfs_wait_on_page_writeback_range (+3/-1)
    Btrfs: remove duplicates of filemap_ helpers (+10/-102)

Josef Bacik (2) commits (+689/-115):
    Btrfs: proper -ENOSPC handling (+678/-115)
    Btrfs: fix data space leak fix (+11/-0)

Julia Lawall (1) commits (+3/-1):
    Btrfs: introduce missing kfree

Sage Weil (2) commits (+23/-20):
    Btrfs: fix deadlock with free space handling and user transactions (+1/-1)
    Btrfs: fix error cases for ioctl transactions (+22/-19)

Total: (10) commits

 fs/btrfs/acl.c          |    6 
 fs/btrfs/btrfs_inode.h  |    8 
 fs/btrfs/ctree.h        |   25 ++-
 fs/btrfs/disk-io.c      |   16 -
 fs/btrfs/extent-tree.c  |  391 +++++++++++++++++++++++++++++++++++++++++-------
 fs/btrfs/extent_io.c    |   92 ++++++++---
 fs/btrfs/extent_io.h    |   13 +
 fs/btrfs/file.c         |   41 +++--
 fs/btrfs/inode.c        |  235 +++++++++++++++++++++++++---
 fs/btrfs/ioctl.c        |   62 +++++--
 fs/btrfs/ordered-data.c |   93 -----------
 fs/btrfs/ordered-data.h |    4 
 fs/btrfs/super.c        |    2 
 fs/btrfs/transaction.c  |   10 +
 fs/btrfs/volumes.c      |    4 
 fs/btrfs/xattr.c        |    2 
 16 files changed, 752 insertions(+), 252 deletions(-)

^ permalink raw reply	[relevance 5%]

* [GIT PULL] Btrfs updates
@ 2013-03-29 17:47  5% Chris Mason
  0 siblings, 0 replies; 105+ results
From: Chris Mason @ 2013-03-29 17:47 UTC (permalink / raw)
  To: Linus Torvalds, linux-btrfs, linux-kernel

Hi Linus,

Please pull my for-linus branch:

git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git for-linus

We've had a busy two weeks of bug fixing.  The biggest patches in here
are some long standing early-enospc problems (Josef) and a very old race
where compression and mmap combine forces to lose writes (me).  I'm
fairly sure the mmap bug goes all the way back to the introduction of
the compression code, which is proof that fsx doesn't trigger every
possible mmap corner after all.

I'm sure you'll notice one of these is from this morning, it's a small
and isolated use-after-free fix in our scrub error reporting.  I double
checked it here.

Josef Bacik (6) commits (+90/-18):
    Btrfs: hold the ordered operations mutex when waiting on ordered extents (+2/-0)
    Btrfs: don't drop path when printing out tree errors in scrub (+2/-1)
    Btrfs: fix space leak when we fail to reserve metadata space (+41/-6)
    Btrfs: fix space accounting for unlink and rename (+2/-4)
    Btrfs: limit the global reserve to 512mb (+1/-1)
    Btrfs: handle a bogus chunk tree nicely (+42/-6)

Jan Schmidt (2) commits (+24/-16):
    Btrfs: fix EIO from btrfs send in is_extent_unchanged for punched holes (+4/-6)
    Btrfs: fix locking on ROOT_REPLACE operations in tree mod log (+20/-10)

Wang Shilong (2) commits (+10/-2):
    Btrfs: fix double free in the btrfs_qgroup_account_ref() (+1/-2)
    Btrfs: fix missing qgroup reservation before fallocating (+9/-0)

Miao Xie (2) commits (+5/-3):
    Btrfs: fix wrong return value of btrfs_lookup_csum() (+3/-1)
    Btrfs: fix wrong reservation of csums (+2/-2)

Chris Mason (1) commits (+49/-0):
    Btrfs: fix race between mmap writes and compression

Liu Bo (1) commits (+1/-1):
    Btrfs: update to use fs_state bit

Tsutomu Itoh (1) commits (+9/-3):
    Btrfs: fix memory leak in btrfs_create_tree()

Total: (15) commits

 fs/btrfs/ctree.c        | 30 ++++++++++++------
 fs/btrfs/disk-io.c      | 14 ++++++---
 fs/btrfs/extent-tree.c  | 84 ++++++++++++++++++++++++++++++++++++++++++-------
 fs/btrfs/extent_io.c    | 33 +++++++++++++++++++
 fs/btrfs/extent_io.h    |  2 ++
 fs/btrfs/file-item.c    |  6 ++--
 fs/btrfs/file.c         |  9 ++++++
 fs/btrfs/inode.c        | 22 ++++++++++---
 fs/btrfs/ordered-data.c |  2 ++
 fs/btrfs/qgroup.c       |  3 +-
 fs/btrfs/scrub.c        |  3 +-
 fs/btrfs/send.c         | 10 +++---
 fs/btrfs/volumes.c      | 13 +++++++-
 13 files changed, 188 insertions(+), 43 deletions(-)

^ permalink raw reply	[relevance 5%]

* [GIT PULL] Btrfs updates for 5.12-rc2
@ 2021-03-01 13:44  5% David Sterba
  0 siblings, 0 replies; 105+ results
From: David Sterba @ 2021-03-01 13:44 UTC (permalink / raw)
  To: torvalds; +Cc: David Sterba, linux-btrfs, linux-kernel

From: David Sterba <dsterba@suse.cz>

Hi,

first batch of fixes that usually arrive during the merge window code
freeze. Regressions and stable material. Please pull, thanks.

Regressions:

- fix deadlock in log sync in zoned mode

- fix bugs in subpage mode still wrongly assuming sectorsize == page
  size

Fixes:

- fix missing kunmap of the Q stripe in RAID6

- block group fixes:
  - fix race between extent freeing/allocation when using bitmaps
  - avoid double put of block group when emptying cluster

- swapfile fixes:
  - fix swapfile writes vs running scrub
  - fix swapfile activation vs snapshot creation

- fix stale data exposure after cloning a hole with NO_HOLES enabled

- remove tree-checker check that does not work in case information from
  other leaves is necessary

----------------------------------------------------------------
The following changes since commit 9d294a685fbcb256ce8c5f7fd88a7596d0f52a8a:

  btrfs: zoned: enable to mount ZONED incompat flag (2021-02-09 02:52:24 +0100)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-5.12-rc1-tag

for you to fetch changes up to 6e37d245994189ba757df7dc2950a44d31421ac6:

  btrfs: zoned: fix deadlock on log sync (2021-02-22 18:08:48 +0100)

----------------------------------------------------------------
Filipe Manana (4):
      btrfs: avoid checking for RO block group twice during nocow writeback
      btrfs: fix race between writes to swap files and scrub
      btrfs: fix race between swap file activation and snapshot creation
      btrfs: fix stale data exposure after cloning a hole with NO_HOLES enabled

Ira Weiny (1):
      btrfs: fix raid6 qstripe kmap

Johannes Thumshirn (1):
      btrfs: zoned: fix deadlock on log sync

Josef Bacik (2):
      btrfs: tree-checker: do not error out if extent ref hash doesn't match
      btrfs: avoid double put of block group when emptying cluster

Nikolay Borisov (1):
      btrfs: fix race between extent freeing/allocation when using bitmaps

Qu Wenruo (2):
      btrfs: make btrfs_submit_compressed_read() subpage compatible
      btrfs: make check_compressed_csum() to be subpage compatible

 fs/btrfs/block-group.c      | 33 +++++++++++++++++++++++-
 fs/btrfs/block-group.h      |  9 +++++++
 fs/btrfs/compression.c      | 62 +++++++++++++++++++++++++++++++--------------
 fs/btrfs/ctree.h            |  5 ++++
 fs/btrfs/free-space-cache.c | 14 +++++-----
 fs/btrfs/inode.c            | 44 +++++++++++++++++++++++++++-----
 fs/btrfs/raid56.c           | 21 ++++++++-------
 fs/btrfs/reflink.c          | 18 +++++++++++++
 fs/btrfs/scrub.c            |  9 ++++++-
 fs/btrfs/tree-checker.c     | 16 +++---------
 fs/btrfs/tree-log.c         |  3 ---
 11 files changed, 175 insertions(+), 59 deletions(-)

^ permalink raw reply	[relevance 5%]

* [GIT PULL] Btrfs updates
@ 2010-04-05 19:36  5% Chris Mason
  0 siblings, 0 replies; 105+ results
From: Chris Mason @ 2010-04-05 19:36 UTC (permalink / raw)
  To: Linus Torvalds, linux-btrfs, linux-kernel

Hello everyone,

The master branch of the btrfs-unstable repo has a collection of fixes:

git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable.git master

Josef fixed a few different ENOSPC problems, and removed the mount -o
max_extent mount option, which was not used and didn't fit in well with
enospc at all.

Sage fixed up when and how we add the directory entries that go with
snapshots, which will avoid dangling directory entries if we crash at
the wrong time during snapshot creation.

Nick Piggin made the btrfs page cache code a little bit less of a special
snowflake, switching us back to the proper API.

Zhao Lei and Miao Xie contributed a long series of cleanups and fixes.
I've put the cleanups into a .35 queue and the fixes are here.

Josef Bacik (4) commits (+32/-91):
    Btrfs: fail to mount if we have problems reading the block groups (+12/-4)
    Btrfs: fix small race with delalloc flushing waitqueue's (+4/-5)
    Btrfs: fix chunk allocate size calculation (+3/-1)
    Btrfs: kill max_extent mount option (+13/-81)

Zhao Lei (3) commits (+9/-12):
    Btrfs: Simplify num_stripes's calculation logical for __btrfs_alloc_chunk() (+2/-2)
    Btrfs: Add error handle for btrfs_search_slot() in btrfs_read_chunk_tree() (+2/-0)
    Btrfs: Remove unnecessary finish_wait() in wait_current_trans() (+5/-10)

Dan Carpenter (3) commits (+5/-1):
    Btrfs: handle kmalloc() failure in inode lookup ioctl (+3/-0)
    Btrfs: check btrfs_get_extent return for IS_ERR() (+1/-1)
    Btrfs: dereferencing freed memory (+1/-0)

Sage Weil (1) commits (+31/-66):
    Btrfs: create snapshot references in same commit as snapshot

Andrea Gelmini (1) commits (+0/-1):
    Btrfs: remove duplicate include in ioctl.c

Chris Mason (1) commits (+4/-0):
    Btrfs: add check for changed leaves in setup_leaf_for_split

Miao Xie (1) commits (+4/-1):
    Btrfs: add NULL check for do_walk_down()

Nick Piggin (1) commits (+5/-32):
    Btrfs: use add_to_page_cache_lru, use __page_cache_alloc

Total: (15) commits

 fs/btrfs/transaction.c  |  112 +++++++++++++++---------------------------------
 fs/btrfs/inode.c        |   59 +------------------------
 fs/btrfs/super.c        |   23 +--------
 fs/btrfs/extent-tree.c  |   23 ++++++---
 fs/btrfs/compression.c  |   22 +--------
 fs/btrfs/extent_io.c    |   15 ------
 fs/btrfs/disk-io.c      |   12 +++--
 fs/btrfs/volumes.c      |   10 +++-
 fs/btrfs/ioctl.c        |    7 ++-
 fs/btrfs/ordered-data.c |    6 +-
 fs/btrfs/ctree.c        |    4 +
 fs/btrfs/ctree.h        |    1 
 12 files changed, 90 insertions(+), 204 deletions(-)


^ permalink raw reply	[relevance 5%]

* [GIT PULL] Btrfs updates for 5.9, part 2
@ 2020-08-13 13:52  5% David Sterba
  0 siblings, 0 replies; 105+ results
From: David Sterba @ 2020-08-13 13:52 UTC (permalink / raw)
  To: torvalds; +Cc: David Sterba, linux-btrfs, linux-kernel

Hi,

second batch with one minor update, the rest are fixes that have arrived
a bit late for the first batch. There are also some recent fixes for
bugs that were discovered during the merge window and pop up during
testing.

Please pull, thanks.

Fixes:

- fix compression messages when remounting with different level or
  compression algorithm

- tree-log: fix some memory leaks on error handling paths

- restore I_VERSION on remount

- fix return values and error code mixups

- fix umount crash with quotas enabled when removing sysfs files

- fix trim range on a shrunk device

User visible changes:

- show correct subvolume path in /proc/mounts for bind mounts

----------------------------------------------------------------
The following changes since commit 5e548b32018d96c377fda4bdac2bf511a448ca67:

  btrfs: do not set the full sync flag on the inode during page release (2020-07-27 12:55:48 +0200)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-5.9-tag

for you to fetch changes up to c57dd1f2f6a7cd1bb61802344f59ccdc5278c983:

  btrfs: trim: fix underflow in trim length to prevent access beyond device boundary (2020-08-12 10:15:58 +0200)

----------------------------------------------------------------
Boleyn Su (1):
      btrfs: check correct variable after allocation in btrfs_backref_iter_alloc

David Sterba (1):
      btrfs: fix messages after changing compression level by remount

Filipe Manana (1):
      btrfs: fix memory leaks after failure to lookup checksums during inode logging

Josef Bacik (3):
      btrfs: only search for left_info if there is no right_info in try_merge_free_space
      btrfs: don't show full path of bind mounts in subvol=
      btrfs: make sure SB_I_VERSION doesn't get unset by remount

Pavel Machek (1):
      btrfs: fix return value mixup in btrfs_get_extent

Qu Wenruo (3):
      btrfs: inode: fix NULL pointer dereference if inode doesn't need compression
      btrfs: sysfs: fix NULL pointer dereference at btrfs_sysfs_del_qgroups()
      btrfs: trim: fix underflow in trim length to prevent access beyond device boundary

 fs/btrfs/backref.c          |  2 +-
 fs/btrfs/extent-io-tree.h   |  2 ++
 fs/btrfs/extent-tree.c      | 14 ++++++++++++++
 fs/btrfs/free-space-cache.c |  4 ++--
 fs/btrfs/inode.c            | 18 ++++++++++++------
 fs/btrfs/super.c            | 30 +++++++++++++++++++++++-------
 fs/btrfs/sysfs.c            |  8 +++++---
 fs/btrfs/tree-log.c         |  8 ++------
 fs/btrfs/volumes.c          |  4 ++++
 9 files changed, 65 insertions(+), 25 deletions(-)

^ permalink raw reply	[relevance 5%]

* [GIT PULL] Btrfs updates
@ 2011-06-12 11:57  5% Chris Mason
  0 siblings, 0 replies; 105+ results
From: Chris Mason @ 2011-06-12 11:57 UTC (permalink / raw)
  To: Linus Torvalds, linux-btrfs, linux-kernel

Hi everyone,

The for-linus branch of the btrfs unstable tree:

git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable.git for-linus

Has our current queue of fixes.  Josef's is the biggest pile, mostly in
the allocator.  Josef and I both managed to merge his patch to avoid
mapping the extent buffer if skip_locking was set, git merge is just a
little too easy sometimes (I double checked the resulting code).

We've also got some fixes for the new scrub code, and a regression fix
for the new use of current->journal_info in nested transactions.

Josef Bacik (9) commits (+178/-65):
    Btrfs: don't commit the transaction if we dont have enough pinned bytes (+7/-0)
    Btrfs: don't map extent buffer if path->skip_locking is set (+7/-3)
    Btrfs: cache bitmaps when searching for a cluster (+49/-5)
    Btrfs: noinline the cluster searching functions (+10/-8)
    Btrfs: unlock the trans lock properly (+1/-1)
    Btrfs: fix the allocator loop logic (+25/-23)
    Btrfs: fix duplicate checking logic (+3/-3)
    Btrfs: fix bitmap regression (+69/-19)

Arne Jansen (3) commits (+39/-32):
    btrfs: remove unneeded includes from scrub.c (+0/-6)
    btrfs: scrub: errors in tree enumeration (+34/-23)
    btrfs: reinitialize scrub workers (+5/-3)

Li Zefan (2) commits (+15/-10):
    Btrfs: use join_transaction in btrfs_evict_inode() (+1/-1)
    Btrfs: avoid stack bloat in btrfs_ioctl_fs_info() (+14/-9)

Chris Mason (1) commits (+5/-4):
    Btrfs: make sure to recheck for bitmaps in clusters

Sage Weil (1) commits (+4/-1):
    Btrfs: clear current->journal_info on async transaction commit

Ilya Dryomov (1) commits (+2/-6):
    Btrfs - use %pU to print fsid

Jan Schmidt (1) commits (+1/-1):
    Btrfs: fix extent state leak on failed nodatasum reads

David Sterba (1) commits (+1/-2):
    btrfs: fix unlocked access of delalloc_inodes

richard kennedy (1) commits (+1/-1):
    btrfs: remove 64bit alignment padding to allow extent_buffer to fit into one fewer cacheline

Total: (20) commits (+246/-122)
 fs/btrfs/ctree.c            |   10 ++-
 fs/btrfs/disk-io.c          |    5 +-
 fs/btrfs/extent-tree.c      |   55 +++++++++------
 fs/btrfs/extent_io.h        |    2 +-
 fs/btrfs/free-space-cache.c |  163 ++++++++++++++++++++++++++++++++++---------
 fs/btrfs/inode.c            |    4 +-
 fs/btrfs/ioctl.c            |   23 ++++---
 fs/btrfs/scrub.c            |   69 ++++++++++--------
 fs/btrfs/transaction.c      |    7 ++-
 fs/btrfs/volumes.c          |    8 +--
 10 files changed, 233 insertions(+), 113 deletions(-)

^ permalink raw reply	[relevance 5%]

* [GIT PULL] Btrfs updates
@ 2010-12-14  1:54  5% Chris Mason
  0 siblings, 0 replies; 105+ results
From: Chris Mason @ 2010-12-14  1:54 UTC (permalink / raw)
  To: Linus Torvalds, linux-btrfs, linux-kernel

Hi everyone,

The master branch of the btrfs unstable tree:
git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable.git master

Has an assortment of bug fixes.  It includes some corruption fixes when
mounting the filesystem in degraded mode, and related oopsen as we try
to mount damaged filesystems.

The async snapshot ioctl added in rc1 is fixed to properly do
synchronous snapshots unless the new async ioctl is used.  It is also
updated to be ready for the readonly snapshot feature we'll add in
2.6.38.

Xin Zhong from Intel pitched in a deadlock during copy_from_user and
Josef has fixes for the new fast caching code and a few other bugs.

Josef Bacik (5) commits (+38/-21):
    Btrfs: do not BUG if we fail to remove the orphan item for dead snapshots (+7/-3)
    Btrfs: do not do fast caching if we are allocating blocks for tree_root (+12/-6)
    Btrfs: fixup return code for btrfs_del_orphan_item (+5/-1)
    Btrfs: deal with space cache errors better (+13/-9)
    Btrfs: fix use after free in O_DIRECT (+1/-2)

Chris Mason (3) commits (+59/-5):
    Btrfs: account for missing devices in RAID allocation profiles (+36/-3)
    Btrfs: prevent RAID level downgrades when space is low (+19/-1)
    Btrfs: EIO when we fail to read tree roots (+4/-1)

Li Zefan (2) commits (+37/-23):
    Btrfs: Make async snapshot ioctl more generic (+36/-22)
    Btrfs: Fix a crash when mounting a subvolume (+1/-1)

Zheng Yan (1) commits (+1/-1):
    Btrfs: Fix page leak in compressed writeback path

Xin Zhong (1) commits (+60/-32):
    Btrfs: pwrite blocked when writing from the mmaped buffer of the same page

Sage Weil (1) commits (+11/-9):
    Btrfs: fix sync subvol/snapshot creation

Jan Beulich (1) commits (+5/-7):
    Btrfs: fix compiler warnings

Total: (14) commits (+211/-98)

 fs/btrfs/disk-io.c          |   11 +++--
 fs/btrfs/extent-tree.c      |   75 +++++++++++++++++++++++++++-------
 fs/btrfs/file.c             |   92 ++++++++++++++++++++++++++++---------------
 fs/btrfs/free-space-cache.c |   12 +++--
 fs/btrfs/inode.c            |   11 ++---
 fs/btrfs/ioctl.c            |   56 ++++++++++++++++----------
 fs/btrfs/ioctl.h            |   14 ++++--
 fs/btrfs/orphan.c           |    6 ++-
 fs/btrfs/super.c            |    2 +-
 fs/btrfs/volumes.c          |   20 +++++++++-
 fs/btrfs/volumes.h          |    2 +
 11 files changed, 207 insertions(+), 94 deletions(-)

^ permalink raw reply	[relevance 5%]

* [GIT PULL] Btrfs updates
@ 2011-08-18 18:04  5% Chris Mason
  0 siblings, 0 replies; 105+ results
From: Chris Mason @ 2011-08-18 18:04 UTC (permalink / raw)
  To: Linus Torvalds, Linux Kernel Mailing List, BTRFS Mailing list

Hi everyone,

The for-linus branch of the btrfs-unstable tree:

git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable.git for-linus

Has our current pull request for 3.1-rc.  The for-linus branch includes
3.1-rc2 because it two fixes from Dan Carpenter and Jeff Mahoney that
only apply to 3.1.

The master branch of btrfs-unstable is based on 3.0, and includes
everything except those two changes.

This is a variety pack of fixes.  We do have another fix pending for a
race in our readdir optimizations, but Josef will work that out with Al
Viro and send it in later this week (or early next).

Chris Mason (1) commits (+17/-0):
    Btrfs: force unplugs when switching from high to regular priority bios

Dan Carpenter (2) commits (+10/-4):
    btrfs: unlock on error in btrfs_file_llseek() (+8/-4)
    btrfs: memory leak in btrfs_add_inode_defrag() (+2/-0)

Jeff Mahoney (1) commits (+8/-4):
    btrfs: btrfs_permission's RO check shouldn't apply to device nodes

Josef Bacik (2) commits (+43/-2):
    Btrfs: set i_size properly when fallocating (+14/-0)
    Btrfs: detect wether a device supports discard (+29/-2)

Li Zefan (1) commits (+2/-4):
    Btrfs: use plain page_address() in header fields setget functions

Miao Xie (2) commits (+12/-6):
    Btrfs: fix uninitialized sync_pending (+1/-1)
    Btrfs: fix wrong free space information (+11/-5)

Sage Weil (1) commits (+4/-0):
    Btrfs: truncate pages from clone ioctl target range

Tsutomu Itoh (1) commits (+16/-10):
    Btrfs: forced readonly when btrfs_drop_snapshot() fails

liubo (3) commits (+72/-14):
    Btrfs: check if there is enough space for balancing smarter (+35/-6)
    Btrfs: fix a bug of balance on full multi-disk partitions (+13/-4)
    Btrfs: fix an oops of log replay (+24/-4)

Total: (14) commits (+183/-43)

 fs/btrfs/ctree.h            |   10 ++---
 fs/btrfs/extent-tree.c      |   75 +++++++++++++++++++++++++++++++++---------
 fs/btrfs/file.c             |   28 ++++++++++++++--
 fs/btrfs/free-space-cache.c |   16 ++++++---
 fs/btrfs/inode.c            |   12 ++++--
 fs/btrfs/ioctl.c            |    4 ++
 fs/btrfs/tree-log.c         |   28 ++++++++++++++--
 fs/btrfs/volumes.c          |   51 +++++++++++++++++++++++++++--
 fs/btrfs/volumes.h          |    2 +
 9 files changed, 183 insertions(+), 43 deletions(-)

^ permalink raw reply	[relevance 5%]

* [GIT PULL] Btrfs updates for 6.1-rc7
@ 2022-11-25 20:47  5% David Sterba
  0 siblings, 0 replies; 105+ results
From: David Sterba @ 2022-11-25 20:47 UTC (permalink / raw)
  To: torvalds; +Cc: David Sterba, linux-btrfs, linux-kernel

Hi,

a few more fixes from past two weeks. Please pull, thanks.

- fix a regression in nowait + buffered write

- in zoned mode fix endianness when comparing super block generation

- locking and lockdep fixes:
  - fix potential sleeping under spinlock when setting qgroup limit
  - lockdep warning fixes when btrfs_path is freed after copy_to_user
  - do not modify log tree while holding a leaf from fs tree locked

- fix freeing of sysfs files of static features on error

- use kv.alloc for zone map allocation as a fallback to avoid warnings
  due to high order allocation

- send, avoid unaligned encoded writes when attempting to clone range

----------------------------------------------------------------
The following changes since commit c62f6bec53e63b11112e1ebce6bbaa39ce6f6706:

  btrfs: zoned: fix locking imbalance on scrub (2022-11-07 14:35:25 +0100)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-6.1-rc6-tag

for you to fetch changes up to ffdbb44f2f23f963b8f5672e35c3a26088177a62:

  btrfs: sysfs: normalize the error handling branch in btrfs_init_sysfs() (2022-11-23 16:52:22 +0100)

----------------------------------------------------------------
Anand Jain (3):
      btrfs: free btrfs_path before copying inodes to userspace
      btrfs: free btrfs_path before copying fspath to userspace
      btrfs: free btrfs_path before copying subvol info to userspace

ChenXiaoSong (1):
      btrfs: qgroup: fix sleep from invalid context bug in btrfs_qgroup_inherit()

Christoph Hellwig (2):
      btrfs: zoned: fix missing endianness conversion in sb_write_pointer
      btrfs: use kvcalloc in btrfs_get_dev_zone_info

Filipe Manana (3):
      btrfs: fix assertion failure and blocking during nowait buffered write
      btrfs: send: avoid unaligned encoded writes when attempting to clone range
      btrfs: do not modify log tree while holding a leaf from fs tree locked

Josef Bacik (1):
      btrfs: free btrfs_path before copying root refs to userspace

Zhen Lei (1):
      btrfs: sysfs: normalize the error handling branch in btrfs_init_sysfs()

 fs/btrfs/ctree.c    | 36 ++++++++++++++++++++++++++------
 fs/btrfs/ioctl.c    | 23 ++++++++++++---------
 fs/btrfs/qgroup.c   |  9 +-------
 fs/btrfs/send.c     | 24 +++++++++++++++++++++-
 fs/btrfs/sysfs.c    |  7 +++++--
 fs/btrfs/tree-log.c | 59 +++++++++++++++++++++++++++++++++++++++++++++++++----
 fs/btrfs/zoned.c    |  9 ++++----
 7 files changed, 132 insertions(+), 35 deletions(-)

^ permalink raw reply	[relevance 5%]

* [GIT PULL] Btrfs updates
@ 2012-04-13 13:38  6% Chris Mason
  0 siblings, 0 replies; 105+ results
From: Chris Mason @ 2012-04-13 13:38 UTC (permalink / raw)
  To: Linus Torvalds, LKML, linux-btrfs

Hi Linus,

My for-linus branch has btrfs fixes and updates:

git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git for-linus

The top commit is the only one that isn't strictly a bug fix.  It
updates the btrfs metadata checker code to support metadata blocks
larger than the page size.  This code isn't compiled in by default, and
it is only used by developers.  I put it at the top so you could just
peel it off if you didn't want it.  I also put a for-linus-min branch
without this commit:

git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git for-linus-min

The others are pure bug fixes.  We have a use-after-free in there, along
with errors when mount -o discard is enabled, and a BUG_ON(we should
compile with UP more often).

Stefan Behrens (1) commits (+415/-146):
    Btrfs: change integrity checker to support big blocks

Chris Mason (2) commits (+2/-2):
    Revert "Btrfs: increase the global block reserve estimates" (+1/-1)
    Btrfs: fix uninit variable in repair_eb_io_failure (+1/-1)

Dave Jones (1) commits (+5/-4):
    Btrfs: fix use-after-free in __btrfs_end_transaction

Liu Bo (1) commits (+18/-2):
    Btrfs: fix eof while discarding extents

Ilya Dryomov (1) commits (+2/-3):
    Btrfs: remove lock assert from get_restripe_target()

Josef Bacik (1) commits (+3/-10):
    Btrfs: use commit root when loading free space cache

Tsutomu Itoh (1) commits (+10/-0):
    Btrfs: check return value of bio_alloc() properly

Total: (8) commits (+455/-167)

 fs/btrfs/check-integrity.c  |  561 ++++++++++++++++++++++++++++++++-----------
 fs/btrfs/compression.c      |    2 +
 fs/btrfs/extent-tree.c      |   11 +-
 fs/btrfs/extent_io.c        |    6 +-
 fs/btrfs/free-space-cache.c |    9 +-
 fs/btrfs/scrub.c            |    4 +
 fs/btrfs/transaction.c      |    9 +-
 fs/btrfs/volumes.c          |   20 +-
 8 files changed, 455 insertions(+), 167 deletions(-)

^ permalink raw reply	[relevance 6%]

* [GIT PULL] Btrfs updates
@ 2011-06-20  1:12  6% Chris Mason
  0 siblings, 0 replies; 105+ results
From: Chris Mason @ 2011-06-20  1:12 UTC (permalink / raw)
  To: Linus Torvalds, linux-btrfs, LKML

Hi everyone,

The for-linus branch of the btrfs unstable repo:

git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable.git for-linus

Has our current queue of fixes.  One of the fixes removes our unused
sysfs code, mostly because gcc likes to complain about it since
we removed some dead code in rc1.  We do plan on eventually putting more
info into the sysfs dir, so the directory itself is still there.

Otherwise these are regression fixes.  The new delayed metadata
insertion code and the new transaction locking code had races with the
code to balance space between drives, and races against snapshot
creation.  There are also two ENOSPC regression fixes included as well.

Chris Mason (4) commits (+136/-28):
    Btrfs: drop the delalloc_bytes check in shrink_delalloc (+0/-4)
    Btrfs: avoid delayed metadata items during commits (+28/-10)
    Btrfs: check the return value from set_anon_super (+3/-1)
    Btrfs: fix relocation races (+105/-13)

Josef Bacik (3) commits (+14/-3):
    Btrfs: set no_trans_join after trying to expand the transaction (+11/-3)
    Btrfs: protect the pending_snapshots list with trans_lock (+2/-0)
    Btrfs: fix path leakage on subvol deletion (+1/-0)

David Sterba (2) commits (+4/-4):
    btrfs: fix dereference of ERR_PTR value (+1/-1)
    btrfs: fix uninitialized return value (+3/-3)

Miao Xie (1) commits (+20/-6):
    btrfs: fix wrong reservation when doing delayed inode operations

Maarten Lankhorst (1) commits (+0/-148):
    btrfs: Remove unused sysfs code

Total: (11) commits (+174/-189)

 fs/btrfs/ctree.h         |   15 +++++-
 fs/btrfs/delayed-inode.c |   32 +++++++++--
 fs/btrfs/delayed-inode.h |    5 +-
 fs/btrfs/disk-io.c       |   12 ++--
 fs/btrfs/extent-tree.c   |    4 -
 fs/btrfs/inode.c         |    1 +
 fs/btrfs/ioctl.c         |    2 +
 fs/btrfs/relocation.c    |   30 +++++++---
 fs/btrfs/sysfs.c         |  146 ----------------------------------------------
 fs/btrfs/transaction.c   |  114 ++++++++++++++++++++++++++++++-----
 fs/btrfs/tree-log.c      |    2 +-
 11 files changed, 174 insertions(+), 189 deletions(-)

^ permalink raw reply	[relevance 6%]

* [GIT PULL] Btrfs updates
@ 2013-03-09  0:38  6% Chris Mason
  0 siblings, 0 replies; 105+ results
From: Chris Mason @ 2013-03-09  0:38 UTC (permalink / raw)
  To: Linus Torvalds, linux-btrfs, linux-kernel

Hi Linus,

Please grab my for-linus:

git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git for-linus

These are scattered fixes and one performance improvement.  The biggest
functional change is in how we throttle metadata changes.  The new code
bumps our average file creation rate up by ~13% in fs_mark, and lowers
CPU usage.

Stefan bisected out a regression in our allocation code that made
balance loop on extents larger than 256MB.

Liu Bo (6) commits (+71/-19):
    Btrfs: build up error handling for merge_reloc_roots (+35/-12)
    Btrfs: check for NULL pointer in updating reloc roots (+2/-0)
    Btrfs: avoid deadlock on transaction waiting list (+7/-0)
    Btrfs: free all recorded tree blocks on error (+6/-3)
    Btrfs: do not BUG_ON on aborted situation (+12/-3)
    Btrfs: do not BUG_ON in prepare_to_reloc (+9/-1)

Chris Mason (2) commits (+96/-63):
    Btrfs: enforce min_bytes parameter during extent allocation (+4/-2)
    Btrfs: improve the delayed inode throttling (+92/-61)

Miao Xie (2) commits (+45/-39):
    Btrfs: fix unclosed transaction handler when the async transaction commitment fails (+4/-0)
    Btrfs: fix wrong handle at error path of create_snapshot() when the commit fails (+41/-39)

Stefan Behrens (1) commits (+0/-8):
    Btrfs: allow running defrag in parallel to administrative tasks

Ilya Dryomov (1) commits (+5/-0):
    Btrfs: fix a mismerge in btrfs_balance()

Josef Bacik (1) commits (+4/-1):
    Btrfs: use set_nlink if our i_nlink is 0

Total: (13) commits (+221/-130)

 fs/btrfs/delayed-inode.c | 151 ++++++++++++++++++++++++++++-------------------
 fs/btrfs/delayed-inode.h |   2 +
 fs/btrfs/disk-io.c       |  16 +++--
 fs/btrfs/inode.c         |   6 +-
 fs/btrfs/ioctl.c         |  18 ++----
 fs/btrfs/relocation.c    |  74 +++++++++++++++++------
 fs/btrfs/transaction.c   |  65 ++++++++++++--------
 fs/btrfs/tree-log.c      |   5 +-
 fs/btrfs/volumes.c       |  14 ++++-
 9 files changed, 221 insertions(+), 130 deletions(-)

^ permalink raw reply	[relevance 6%]

* [GIT PULL] Btrfs updates for 2.6.32-rc
@ 2009-11-11 21:25  6% Chris Mason
  0 siblings, 0 replies; 105+ results
From: Chris Mason @ 2009-11-11 21:25 UTC (permalink / raw)
  To: linux-kernel, linux-btrfs, Linus Torvalds

Hello everyone,

The master branch of the btrfs-unstable repo has an assortment of fixes
and speedups.

git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable.git master

These are mostly minor fixes, but there is an important fix for using
btrfs and ceph together.  Josef has a block group caching performance
patch that reduces his boot time dramatically, which is the biggest
change in the bunch.

We also now handle enospc with mount -o compress, before this was
actually more likely to fail than uncompressed mounts because mount -o
compress expected to be able to find multi-block contiguous extents on
disk.

I know Linus likes to look for obvious rebases, and I did rebase this
morning before pushing out to drop a small mount option patch that we
don't strictly need for .32.

Chris Mason (1) commits (+2/-2):
    Btrfs: allow more metadata chunk preallocation

Dan Carpenter (1) commits (+1/-1):
    Btrfs: avoid null deref in unpin_extent_cache()

Josef Bacik (7) commits (+180/-45):
    Btrfs: cleanup transaction starting and fix journal_info usage (+13/-6)
    Btrfs: fix panic when trying to destroy a newly allocated (+10/-0)
    Btrfs: fallback on uncompressed io if compressed io fails (+23/-8)
    Btrfs: fix how we set max_size for free space clusters (+1/-1)
    Btrfs: find ideal block group for caching (+86/-23)
    Btrfs: fix some metadata enospc issues (+31/-5)
    Btrfs: fix data allocation hint start (+16/-2)

Li Dongyang (1) commits (+0/-2):
    Btrfs: skip btrfs_release_path in btrfs_update_root and btrfs_del_root

Total: (10) commits

 fs/btrfs/extent-tree.c      |  113 ++++++++++++++++++++++++++++++++++----------
 fs/btrfs/extent_map.c       |    2 
 fs/btrfs/free-space-cache.c |    2 
 fs/btrfs/inode.c            |   95 +++++++++++++++++++++++++++++++-----
 fs/btrfs/root-tree.c        |    2 
 fs/btrfs/transaction.c      |   19 +++++--
 6 files changed, 183 insertions(+), 50 deletions(-)


^ permalink raw reply	[relevance 6%]

* [GIT PULL] Btrfs updates
@ 2011-12-01 15:39  6% Chris Mason
  0 siblings, 0 replies; 105+ results
From: Chris Mason @ 2011-12-01 15:39 UTC (permalink / raw)
  To: Linus Torvalds, linux-btrfs, LKML

Hi everyone,

The for-linus branch of the btrfs tree:

git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git for-linus

Has our current set of fixes.  This is fairly small, Alexandre Oliva has
been chasing problems in our block allocator and kicked out important
fixes.

Jan Schmidt fixed a merge error in the raid repair code, we're now
properly repairing failed blocks (io errors or crc errors) without
having to run a scrub.

Alexandre Oliva (5) commits (+8/-8):
    Btrfs: skip block groups without enough space for a cluster (+1/-1)
    Btrfs: start search for new cluster at the beginning (+2/-4)
    Btrfs: reset cluster's max_size when creating bitmap (+1/-0)
    Btrfs: skip allocation attempt from empty cluster (+3/-3)
    Btrfs: initialize new bitmaps' list (+1/-0)

Li Zefan (1) commits (+3/-3):
    Btrfs: fix oops when calling statfs on readonly device

Arnd Hannemann (1) commits (+2/-2):
    Fix URL of btrfs-progs git repository in docs

Jan Schmidt (1) commits (+20/-7):
    Btrfs: fix meta data raid-repair merge problem

Dan Carpenter (1) commits (+5/-0):
    btrfs scrub: handle -ENOMEM from init_ipath()

Mike Fleetwood (1) commits (+1/-1):
    Btrfs: Don't error on resizing FS to same size

Miao Xie (1) commits (+22/-5):
    Btrfs: fix deadlock on metadata reservation when evicting a inode

Total: (11) commits (+60/-25)

 Documentation/filesystems/btrfs.txt |    4 ++--
 fs/btrfs/ctree.h                    |    3 +++
 fs/btrfs/extent-tree.c              |   34 +++++++++++++++++++++++-----------
 fs/btrfs/extent_io.c                |   27 ++++++++++++++++++++-------
 fs/btrfs/free-space-cache.c         |    2 ++
 fs/btrfs/inode.c                    |    2 +-
 fs/btrfs/ioctl.c                    |    2 +-
 fs/btrfs/scrub.c                    |    5 +++++
 fs/btrfs/super.c                    |    6 +++---
 9 files changed, 60 insertions(+), 25 deletions(-)

^ permalink raw reply	[relevance 6%]

* [GIT PULL] Btrfs updates for 4.20, part 2
@ 2018-10-30 13:23  6% David Sterba
  0 siblings, 0 replies; 105+ results
From: David Sterba @ 2018-10-30 13:23 UTC (permalink / raw)
  To: torvalds; +Cc: David Sterba, clm, linux-btrfs, linux-kernel

Hi,

this part contains a few minor updates and fixes that were under testing
or arrived shortly after the merge window freeze, mostly stable material.

Please pull, thanks.

----------------------------------------------------------------
The following changes since commit d9352794dad9f28535439d85a815978878c141ab:

  btrfs: switch return_bigger to bool in find_ref_head (2018-10-15 17:23:41 +0200)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-4.20-part2-tag

for you to fetch changes up to 9084cb6a24bf5838a665af92ded1af8363f9e563:

  Btrfs: fix use-after-free when dumping free space (2018-10-22 20:31:22 +0200)

----------------------------------------------------------------
Filipe Manana (5):
      Btrfs: fix null pointer dereference on compressed write path error
      Btrfs: fix assertion on fsync of regular file when using no-holes feature
      Btrfs: fix deadlock when writing out free space caches
      Btrfs: fix use-after-free during inode eviction
      Btrfs: fix use-after-free when dumping free space

Josef Bacik (8):
      MAINTAINERS: update my email address for btrfs
      btrfs: reset max_extent_size properly
      btrfs: set max_extent_size properly
      btrfs: don't use ctl->free_space for max_extent_size
      btrfs: only free reserved extent if we didn't insert it
      btrfs: fix insert_reserved error handling
      btrfs: don't run delayed_iputs in commit
      btrfs: move the dio_sem higher up the callchain

Lu Fengqi (1):
      btrfs: delayed-ref: extract find_first_ref_head from find_ref_head

 MAINTAINERS                 |  2 +-
 fs/btrfs/ctree.c            | 17 +++++++++++++++
 fs/btrfs/delayed-ref.c      | 50 ++++++++++++++++++++++++---------------------
 fs/btrfs/extent-tree.c      | 37 +++++++++++++++------------------
 fs/btrfs/file.c             | 12 +++++++++++
 fs/btrfs/free-space-cache.c | 32 ++++++++++++++++++++---------
 fs/btrfs/inode.c            | 15 ++++++++++++--
 fs/btrfs/transaction.c      |  9 --------
 fs/btrfs/tree-log.c         |  5 ++---
 9 files changed, 111 insertions(+), 68 deletions(-)

^ permalink raw reply	[relevance 6%]

* [GIT PULL] Btrfs updates for 4.19-rc2
@ 2018-09-06 14:37  6% David Sterba
  0 siblings, 0 replies; 105+ results
From: David Sterba @ 2018-09-06 14:37 UTC (permalink / raw)
  To: torvalds; +Cc: David Sterba, clm, linux-btrfs, linux-kernel

Hi,

there are a few more fixes that were sent after the 1st pull request
cut and postponed after the merge window settles down.

* fix for improper fsync after hardlink
* fix for a corruption during file deduplication
* use after free fixes
* RCU warning fix
* fix for buffered write to nodatacow file

There are no merge conflicts. Please pull, thanks.

----------------------------------------------------------------
The following changes since commit 39379faaad79e3cf403a6904a08676b7850043ae:

  btrfs: revert fs_devices state on error of btrfs_init_new_device (2018-08-06 13:13:04 +0200)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-4.19-rc2-tag

for you to fetch changes up to b6fdfbff078975c53383fc146a2a54985eab6b6d:

  btrfs: Fix suspicious RCU usage warning in btrfs_debug_in_rcu (2018-08-24 14:09:43 +0200)

----------------------------------------------------------------
Anand Jain (1):
      btrfs: btrfs_shrink_device should call commit transaction at the end

Dan Carpenter (1):
      btrfs: use after free in btrfs_quota_enable

Filipe Manana (2):
      Btrfs: sync log after logging new name
      Btrfs: fix data corruption when deduplicating between different files

Lu Fengqi (1):
      btrfs: fix qgroup_free wrong num_bytes in btrfs_subvolume_reserve_metadata

Misono Tomohiro (1):
      btrfs: Fix suspicious RCU usage warning in btrfs_debug_in_rcu

Robbie Ko (1):
      Btrfs: fix unexpected failure of nocow buffered writes after snapshotting when low on space

 fs/btrfs/ctree.h       |  12 ++++-
 fs/btrfs/disk-io.c     |   1 +
 fs/btrfs/extent-tree.c |  17 ++++---
 fs/btrfs/inode.c       | 117 +++++++++++++++++++++++++++++++++++--------------
 fs/btrfs/ioctl.c       |  35 +++++++++++++++
 fs/btrfs/qgroup.c      |   5 +--
 fs/btrfs/tree-log.c    |  48 +++++++++++++++++---
 fs/btrfs/tree-log.h    |  10 ++++-
 fs/btrfs/volumes.c     |   7 ++-
 9 files changed, 197 insertions(+), 55 deletions(-)

^ permalink raw reply	[relevance 6%]

* [GIT PULL] Btrfs updates
@ 2009-10-15  0:06  6% Chris Mason
  0 siblings, 0 replies; 105+ results
From: Chris Mason @ 2009-10-15  0:06 UTC (permalink / raw)
  To: Linus Torvalds, linux-kernel, linux-btrfs

Hello everyone,

The master branch of btrfs-unstable:

git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable.git master

Has an assortment of bug fixes and performance improvements.  We've
updated the btrfs fsync code to make sure we don't trigger log commits
when the file hasn't changed, and also tuned the log commit writeback.
This makes a pretty big different for rpm and yum.

Also, Christoph Hellwig spent some time testing btrfs discard support
with his qemu code, so I've included his patches to enable that.

Chris Mason (5) commits (+139/-27):
    Btrfs: avoid tree log commit when there are no changes (+71/-16)
    Btrfs: streamline tree-log btree block writeout (+53/-4)
    Btrfs: only write one super copy during fsync (+1/-1)
    Btrfs: always pin metadata in discard mode (+8/-0)
    Btrfs: fix btrfs acl #ifdef checks (+6/-6)

Christoph Hellwig (2) commits (+10/-7):
    Btrfs: enable discard support (+0/-6)
    Btrfs: add -o discard option (+10/-1)

Josef Bacik (1) commits (+24/-3):
    Btrfs: fix possible ENOSPC problems with truncate

Zheng Yan (1) commits (+6/-5):
    Btrfs: properly wait log writers during log sync

Total: (9) commits

 fs/btrfs/acl.c         |    6 +++---
 fs/btrfs/btrfs_inode.h |    6 ++++++
 fs/btrfs/ctree.h       |    4 +++-
 fs/btrfs/disk-io.c     |    2 ++
 fs/btrfs/extent-tree.c |   17 +++++++++++------
 fs/btrfs/file.c        |   41 ++++++++++++++++++++++++++---------------
 fs/btrfs/inode.c       |   33 +++++++++++++++++++++++++++++----
 fs/btrfs/super.c       |    9 +++++++--
 fs/btrfs/transaction.c |   45 ++++++++++++++++++++++++++++++++++++++++++---
 fs/btrfs/transaction.h |    5 +++++
 fs/btrfs/tree-log.c    |   48 +++++++++++++++++++++++++++++++++++++++++-------
 fs/btrfs/tree-log.h    |    3 +++
 fs/btrfs/xattr.c       |    2 +-
 13 files changed, 179 insertions(+), 42 deletions(-)

^ permalink raw reply	[relevance 6%]

* [GIT PULL] Btrfs updates for 5.8, part 2
@ 2020-06-14 11:56  6% David Sterba
  0 siblings, 0 replies; 105+ results
From: David Sterba @ 2020-06-14 11:56 UTC (permalink / raw)
  To: torvalds; +Cc: David Sterba, linux-btrfs, linux-kernel

Hi,

this reverts the direct io port to iomap infrastructure of btrfs merged
in the first pull request. We found problems in invalidate page that
don't seem to be fixable as regressions or without changing iomap code
that would not affect other filesystems.

There are 4 patches reverted in total, but 3 of them are followup
cleanups needed to revert a43a67a2d715540c13 cleanly. The result is the
buffer head based implementation of direct io.

There's one trivial conflict that git does not auto-resolve, in the
address space operations readpages has been replaced by readahead and
this change is in the context of the direct io callback diff.

Reverts are not great, but under current circumstances I don't see
better options. Please pull, thanks.

----------------------------------------------------------------
The following changes since commit 2166e5edce9ac1edf3b113d6091ef72fcac2d6c4:

  btrfs: fix space_info bytes_may_use underflow during space cache writeout (2020-05-28 14:01:53 +0200)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-5.8-part2-tag

for you to fetch changes up to 55e20bd12a56e06c38b953177bb162cbbaa96004:

  Revert "btrfs: switch to iomap_dio_rw() for dio" (2020-06-14 01:19:02 +0200)

----------------------------------------------------------------
David Sterba (4):
      Revert "btrfs: split btrfs_direct_IO to read and write part"
      Revert "btrfs: remove BTRFS_INODE_READDIO_NEED_LOCK"
      Revert "fs: remove dio_end_io()"
      Revert "btrfs: switch to iomap_dio_rw() for dio"

 fs/btrfs/Kconfig       |   1 -
 fs/btrfs/btrfs_inode.h |  18 +++
 fs/btrfs/ctree.h       |   4 -
 fs/btrfs/file.c        |  97 +------------
 fs/btrfs/inode.c       | 379 +++++++++++++++++++++++++++++++------------------
 fs/direct-io.c         |  19 +++
 include/linux/fs.h     |   2 +
 7 files changed, 286 insertions(+), 234 deletions(-)

^ permalink raw reply	[relevance 6%]

* [GIT PULL] Btrfs updates
@ 2011-06-27 18:15  6% Chris Mason
  0 siblings, 0 replies; 105+ results
From: Chris Mason @ 2011-06-27 18:15 UTC (permalink / raw)
  To: Linus Torvalds, Btrfs mailing list, linux-kernel

Hi everyone,

The for-linus branch of the btrfs unstable tree:

git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable.git for-linus

Has our current set of fixes.  Linus will probably notice the head
commit was from this morning.  I reordered a refcount bump inside the
lock that protects the delayed inode tree and did a commit --amend.

This is just for clarity, the delayed_inode can't go away because it is
pinned by the inode itself.  But, I don't want that code copy & pasted
elsewhere to create bugs later on.

These fix a regression in the new delayed_inode code where inodes that
are dropped from ram need to check for a delayed inode before we load
them back in.

Josef's commit avoids oopsen if the free extent cache had
to be discarded, and my commit makes sure a newly created empty file
gets logged properly if someone calls fsync on it.

Miao Xie (1) commits (+91/-26):
    btrfs: fix inconsonant inode information

Josef Bacik (1) commits (+6/-3):
    Btrfs: make sure to update total_bitmaps when freeing cache V3

Ilya Dryomov (1) commits (+2/-2):
    Btrfs: fix type mismatch in find_free_extent()

Chris Mason (1) commits (+1/-0):
    Btrfs: make sure to record the transid in new inodes

Total: (4) commits (+100/-31)

 fs/btrfs/delayed-inode.c    |  104 +++++++++++++++++++++++++++++++++----------
 fs/btrfs/delayed-inode.h    |    1 +
 fs/btrfs/extent-tree.c      |    4 +-
 fs/btrfs/free-space-cache.c |    9 +++-
 fs/btrfs/inode.c            |   13 +++++-
 5 files changed, 100 insertions(+), 31 deletions(-)

^ permalink raw reply	[relevance 6%]

* [GIT PULL] Btrfs updates for v5.10-rc4
@ 2020-11-10 16:05  6% David Sterba
  0 siblings, 0 replies; 105+ results
From: David Sterba @ 2020-11-10 16:05 UTC (permalink / raw)
  To: torvalds; +Cc: David Sterba, linux-btrfs, linux-kernel

Hi,

a handful of minor fixes and updates:

- handle missing device replace item on mount (syzbot report)

- fix space reservation calculation when finishing relocation

- fix memory leak on error path in ref-verify (debugging feature)

- fix potential overflow during defrag on 32bit arches

- minor code update to silence smatch warning

- minor error message updates

Please pull, thanks.

----------------------------------------------------------------
The following changes since commit d5c8238849e7bae6063dfc16c08ed62cee7ee688:

  btrfs: convert data_seqcount to seqcount_mutex_t (2020-10-27 15:11:51 +0100)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-5.10-rc3-tag

for you to fetch changes up to 468600c6ec28613b756193c5f780aac062f1acdf:

  btrfs: ref-verify: fix memory leak in btrfs_ref_tree_mod (2020-11-05 13:03:39 +0100)

----------------------------------------------------------------
Anand Jain (1):
      btrfs: dev-replace: fail mount if we don't have replace item with target device

Dan Carpenter (1):
      btrfs: clean up NULL checks in qgroup_unreserve_range()

David Sterba (1):
      btrfs: scrub: update message regarding read-only status

Dinghao Liu (1):
      btrfs: ref-verify: fix memory leak in btrfs_ref_tree_mod

Josef Bacik (2):
      btrfs: print the block rsv type when we fail our reservation
      btrfs: fix min reserved size calculation in merge_reloc_root

Matthew Wilcox (Oracle) (1):
      btrfs: fix potential overflow in cluster_pages_for_defrag on 32bit arch

 fs/btrfs/block-rsv.c   |  3 ++-
 fs/btrfs/dev-replace.c | 26 ++++++++++++++++++++++++--
 fs/btrfs/ioctl.c       | 10 ++++------
 fs/btrfs/qgroup.c      | 12 ++++--------
 fs/btrfs/ref-verify.c  |  1 +
 fs/btrfs/relocation.c  |  4 +++-
 fs/btrfs/scrub.c       |  5 +++--
 fs/btrfs/volumes.c     | 26 +++++++-------------------
 8 files changed, 48 insertions(+), 39 deletions(-)

^ permalink raw reply	[relevance 6%]

* [GIT PULL] Btrfs updates for 2.6.33
@ 2010-01-29 17:35  6% Chris Mason
  0 siblings, 0 replies; 105+ results
From: Chris Mason @ 2010-01-29 17:35 UTC (permalink / raw)
  To: Linus Torvalds, linux-kernel, linux-btrfs

Hello everyone,

The btrfs-unstable master branch has some updates:

git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable.git master

It will pull into either 2.6.32 or 2.6.33-git.

These are bug fixes, mostly around btrfs multi-device code and replacing
failed drives.  It also includes a fix for the orphan cleanup fix in the
last pull, this version is much better.

Outside of fixes, this adds mount -o compress-force, which won't back
off compressing files when part of the file doesn't compress well.

Aneesh Kumar K.V (1) commits (+9/-4):
    Btrfs: Use correct values when updating inode i_size on fallocate

Chris Mason (1) commits (+11/-2):
    Btrfs: Add mount -o compress-force

Josef Bacik (4) commits (+15/-10):
    Btrfs: do not mark the chunk as readonly if in degraded mode (+5/-0)
    Btrfs: check total number of devices when removing missing (+2/-2)
    Btrfs: check return value of open_bdev_exclusive properly (+2/-2)
    Btrfs: run orphan cleanup on default fs root (+6/-6)

Miao Xie (1) commits (+0/-14):
    Btrfs: remove tree_search() in extent_map.c

Yang Hongyang (1) commits (+1/-0):
    Btrfs: fix a memory leak in btrfs_init_acl

Total: (8) commits

 fs/btrfs/acl.c        |    1 +
 fs/btrfs/ctree.h      |    1 +
 fs/btrfs/disk-io.c    |    6 ++++++
 fs/btrfs/extent_map.c |   14 --------------
 fs/btrfs/inode.c      |   22 +++++++++++-----------
 fs/btrfs/super.c      |    9 ++++++++-
 fs/btrfs/volumes.c    |   13 +++++++++----
 7 files changed, 36 insertions(+), 30 deletions(-)

^ permalink raw reply	[relevance 6%]

* [GIT PULL] Btrfs updates
@ 2011-04-26 14:24  6% Chris Mason
  0 siblings, 0 replies; 105+ results
From: Chris Mason @ 2011-04-26 14:24 UTC (permalink / raw)
  To: Linus Torvalds, Linux Btrfs, linux-kernel

Hi everyone,

The master branch of the btrfs unstable repo:

git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable.git master

Has a few bug fixes.  Josef fixed up a crash in the free space cache
error handling code, and it should close out the open bugs there.

Li Zefan found a slab corruption in btrfs fitrim support.

Otherwise, these are smaller fixes for corner cases.

This is a separate pull from my plugging fixes because this is against
2.6.38, while the plugging stuff was on top of 2.6.39-rc4.

David Sterba (1) commits (+1/-0):
    btrfs: add missing spin_unlock to a rare exit path

Itaru Kitayama (1) commits (+1/-1):
    btrfs: fix wrong allocating flag when reading page

Josef Bacik (2) commits (+8/-5):
    Btrfs: free bitmaps properly when evicting the cache (+7/-4)
    Btrfs: put the right bio if we have an error (+1/-1)

Li Zefan (1) commits (+1/-1):
    Btrfs: Free free_space item properly in btrfs_trim_block_group()

Tsutomu Itoh (3) commits (+21/-8):
    Btrfs: fix missing mutex_unlock in btrfs_del_dir_entries_in_log() (+5/-2)
    Btrfs: cleanup error handling in inode.c (+9/-6)
    Btrfs: check return value of kmalloc() (+7/-0)

Total: (8) commits (+32/-15)

 fs/btrfs/disk-io.c          |    1 +
 fs/btrfs/extent-tree.c      |    4 ++++
 fs/btrfs/extent_io.c        |    2 +-
 fs/btrfs/free-space-cache.c |   13 ++++++++-----
 fs/btrfs/inode.c            |   20 +++++++++++++-------
 fs/btrfs/tree-log.c         |    7 +++++--
 6 files changed, 32 insertions(+), 15 deletions(-)

^ permalink raw reply	[relevance 6%]

* [GIT PULL] Btrfs updates for 2.6.33-git
@ 2010-01-20  2:42  6% Chris Mason
  0 siblings, 0 replies; 105+ results
From: Chris Mason @ 2010-01-20  2:42 UTC (permalink / raw)
  To: Linus Torvalds, linux-kernel, linux-btrfs

Hello everyone,

The master branch of the btrfs unstable tree:

git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable.git master

Is against 2.6.32 but pulls cleanly into Linus' current git.  These are
various bug fixes, nothing stands out but some are commonly hit.

The readdir fix brings btrfs in line with what xfs does, limiting the
max directory entry offset for proper results in both 32 bit and 64 bit
environments.

For everyone waiting for Josef's snapshot-rollback work for snapshot
protected upgrades, I'm collecting those into a .34 testing branch along
with other development work.  It will be available this week.

Chris Mason (1) commits (+7/-5):
    Btrfs: deal with NULL acl sent to btrfs_set_acl

Jan Engelhardt (1) commits (+5/-1):
    btrfs: fix missing last-entry in readdir(3)

Jiri Slaby (1) commits (+6/-2):
    Btrfs, fix memory leaks in error paths

Josef Bacik (2) commits (+25/-13):
    Btrfs: fix regression in orphan cleanup (+6/-0)
    Btrfs: fix possible panic on unmount (+19/-13)

Zheng Yan (2) commits (+82/-20):
    Btrfs: align offsets for btrfs_ordered_update_i_size (+2/-0)
    Btrfs: Fix race in btrfs_mark_extent_written (+80/-20)

Total: (7) commits

 fs/btrfs/acl.c          |   12 +++--
 fs/btrfs/extent-tree.c  |   32 +++++++++------
 fs/btrfs/file.c         |  100 ++++++++++++++++++++++++++++++++++++++----------
 fs/btrfs/inode.c        |   12 +++++
 fs/btrfs/ordered-data.c |    2 
 fs/btrfs/relocation.c   |    4 +
 fs/btrfs/volumes.c      |    4 +
 7 files changed, 125 insertions(+), 41 deletions(-)

^ permalink raw reply	[relevance 6%]

* [GIT PULL] Btrfs updates for 4.18, part 2
@ 2018-06-13 15:11  6% David Sterba
  0 siblings, 0 replies; 105+ results
From: David Sterba @ 2018-06-13 15:11 UTC (permalink / raw)
  To: torvalds; +Cc: David Sterba, clm, linux-btrfs, linux-kernel

Hi,

a handful of minor updates that would fit the 1st pull but were in next
at that time or arrived last week and there's no reason to delay them
for later rc.

Please pull thanks.

- error handling fixup for one of the new ioctls from 1st pull
- fix for device-replace that incorrectly uses inode pages and can mess up
  compressed extents in some cases
- fiemap fix for reporting incorrect number of extents
- vm_fault_t type conversion

----------------------------------------------------------------
The following changes since commit 23d0b79dfaed2305b500b0215b0421701ada6b1a:

  btrfs: Add unprivileged version of ino_lookup ioctl (2018-05-31 11:35:24 +0200)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-4.18-part2-tag

for you to fetch changes up to ac0b4145d662a3b9e34085dea460fb06ede9b69b:

  btrfs: scrub: Don't use inode pages for device replace (2018-06-11 15:59:14 +0200)

----------------------------------------------------------------
Misono Tomohiro (1):
      btrfs: Check error of btrfs_iget in btrfs_search_path_in_tree_user

Qu Wenruo (1):
      btrfs: scrub: Don't use inode pages for device replace

Robbie Ko (1):
      Btrfs: fiemap: pass correct bytenr when fm_extent_count is zero

Souptick Joarder (1):
      btrfs: change return type of btrfs_page_mkwrite to vm_fault_t

 fs/btrfs/ctree.h     |  2 +-
 fs/btrfs/extent_io.c |  4 +---
 fs/btrfs/inode.c     | 26 ++++++++++++--------------
 fs/btrfs/ioctl.c     |  4 ++++
 fs/btrfs/scrub.c     |  2 +-
 5 files changed, 19 insertions(+), 19 deletions(-)

^ permalink raw reply	[relevance 6%]

* [GIT PULL] Btrfs updates for -rc1
@ 2011-03-16 16:14  6% Josef Bacik
  0 siblings, 0 replies; 105+ results
From: Josef Bacik @ 2011-03-16 16:14 UTC (permalink / raw)
  To: chris.mason; +Cc: linux-btrfs

Hey Chris,

Please pull from

git://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-work.git for-chris

It is based on v2.6.38.  Mostly just cleanups and fixes, the biggest actual
change would be moving us to the new truncate sequence.  Here is the shortlog
and such

Josef Bacik (13):
      Btrfs: fix formatting in file.c
      Btrfs: simplify our write path
      Btrfs: fix how we deal with the pages array in the write path
      Btrfs: change reserved_extents to an atomic_t
      Btrfs: use a slab for the free space entries
      Btrfs: convert to the new truncate sequence
      Btrfs: cleanup error handling in the truncate path
      Btrfs: handle errors in btrfs_orphan_cleanup
      Btrfs: make sure to remove the orphan item from the in-memory list
      Btrfs: only add orphan items when truncating
      Btrfs: use mark_inode_dirty when expanding the file
      Btrfs: add a comment explaining what btrfs_cont_expand does
      Btrfs: return error if the range we want to map is bogus

 fs/btrfs/btrfs_inode.h      |    3 +-
 fs/btrfs/ctree.h            |    5 +-
 fs/btrfs/disk-io.c          |   15 ++-
 fs/btrfs/extent-tree.c      |   45 +++--
 fs/btrfs/extent_io.c        |    1 +
 fs/btrfs/file.c             |  385 ++++++++++++++++++++++---------------------
 fs/btrfs/free-space-cache.c |   34 ++--
 fs/btrfs/inode.c            |  241 +++++++++++++++------------
 fs/btrfs/ioctl.c            |    4 +-
 fs/btrfs/relocation.c       |    2 +-
 10 files changed, 399 insertions(+), 336 deletions(-)

Thanks,

Josef

^ permalink raw reply	[relevance 6%]

* [GIT PULL] Btrfs updates for 4.20-rc4
@ 2018-11-28 12:28  6% David Sterba
  0 siblings, 0 replies; 105+ results
From: David Sterba @ 2018-11-28 12:28 UTC (permalink / raw)
  To: torvalds; +Cc: David Sterba, clm, linux-btrfs, linux-kernel

Hi,

please pull the following fixes. Some of them are being hit during
testing so we'd like to get them merged, otherwise there are usual
stability fixes for stable trees. Thanks.

----------------------------------------------------------------
The following changes since commit d6fd0ae25c6495674dc5a41a8d16bc8e0073276d:

  Btrfs: fix missing delayed iputs on unmount (2018-11-07 20:17:45 +0100)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-4.20-rc4-tag

for you to fetch changes up to 42a657f57628402c73237547f0134e083e2f6764:

  btrfs: relocation: set trans to be NULL after ending transaction (2018-11-23 13:47:46 +0100)

----------------------------------------------------------------
Filipe Manana (3):
      Btrfs: fix rare chances for data loss when doing a fast fsync
      Btrfs: ensure path name is null terminated at btrfs_control_ioctl
      Btrfs: fix race between enabling quotas and subvolume creation

Nikolay Borisov (1):
      btrfs: Always try all copies when reading extent buffers

Pan Bian (1):
      btrfs: relocation: set trans to be NULL after ending transaction

Robbie Ko (1):
      Btrfs: send, fix infinite loop due to directory rename dependencies

 fs/btrfs/disk-io.c    | 11 +----------
 fs/btrfs/file.c       | 24 ++++++++++++++++++++++++
 fs/btrfs/qgroup.c     |  3 ++-
 fs/btrfs/relocation.c |  1 +
 fs/btrfs/send.c       | 11 ++++++++---
 fs/btrfs/super.c      |  1 +
 6 files changed, 37 insertions(+), 14 deletions(-)

^ permalink raw reply	[relevance 6%]

* [GIT PULL] Btrfs updates for 5.1, part 2
@ 2019-03-12 15:08  6% David Sterba
  0 siblings, 0 replies; 105+ results
From: David Sterba @ 2019-03-12 15:08 UTC (permalink / raw)
  To: torvalds; +Cc: David Sterba, clm, linux-btrfs, linux-kernel

Hi,

here's the second part containing mostly fixes. The changelog would
repeat the subject lines, in summary there are correctness and a
deadlock fixes. Please pull, thanks.

----------------------------------------------------------------
The following changes since commit f65e25e343cfc0e6f4db9a687c4085fad268325d:

  btrfs: Remove unnecessary casts in btrfs_read_root_item (2019-02-25 14:19:23 +0100)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-5.1-part2-tag

for you to fetch changes up to d3865159ac7823f645d313fdbac0b256ac01eeb9:

  btrfs: zstd: ensure reclaim timer is properly cleaned up (2019-02-27 17:45:04 +0100)

----------------------------------------------------------------
David Sterba (1):
      btrfs: move ulist allocation out of transaction in quota enable

Dennis Zhou (1):
      btrfs: zstd: ensure reclaim timer is properly cleaned up

Filipe Manana (2):
      Btrfs: fix corruption reading shared and compressed extents after hole punching
      Btrfs: fix deadlock between clone/dedupe and rename

Josef Bacik (2):
      btrfs: check for refs on snapshot delete resume
      btrfs: save drop_progress if we drop refs at all

 fs/btrfs/ctree.h       |  2 ++
 fs/btrfs/extent-tree.c | 74 +++++++++++++++++++++++++++++++++++++++++++++-----
 fs/btrfs/extent_io.c   |  4 +--
 fs/btrfs/ioctl.c       | 21 ++------------
 fs/btrfs/qgroup.c      | 13 ++++-----
 fs/btrfs/root-tree.c   |  8 ++++--
 fs/btrfs/zstd.c        |  6 ++--
 7 files changed, 90 insertions(+), 38 deletions(-)

^ permalink raw reply	[relevance 6%]

* [GIT PULL] Btrfs updates
@ 2011-02-15  3:49  6% Chris Mason
  0 siblings, 0 replies; 105+ results
From: Chris Mason @ 2011-02-15  3:49 UTC (permalink / raw)
  To: Linus Torvalds, Linux Btrfs, linux-kernel

Hi everyone,

The master branch of the btrfs unstable tree has some important btrfs
fixes:

git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable.git master

I was seeing very rare metadata corruptions during long stress runs, and
eventually tracked it down to two different races in the btrfs
releasepage code.  One was making btrfs think pages were up to date when
they really weren't and the other lead to corrupted csum fields in
metadata.

Chris Mason (2) commits (+50/-6):
    Btrfs: don't release pages when we can't clear the uptodate bits (+9/-1)
    Btrfs: fix page->private races (+41/-5)

Zheng Yan (1) commits (+1/-0):
    Btrfs: Fix balance panic

Dan Rosenberg (1) commits (+8/-2):
    btrfs: prevent heap corruption in btrfs_ioctl_space_info()

Tsutomu Itoh (1) commits (+7/-3):
    Btrfs: check return value of alloc_extent_map()

Ilya Dryomov (1) commits (+2/-0):
    Btrfs - Fix memory leak in btrfs_init_new_device()

Total: (6) commits (+68/-11)

 fs/btrfs/disk-io.c     |    8 ++++++--
 fs/btrfs/extent-tree.c |    2 +-
 fs/btrfs/extent_io.c   |   48 ++++++++++++++++++++++++++++++++++++++++++++----
 fs/btrfs/extent_map.c  |    4 ++--
 fs/btrfs/file.c        |    1 +
 fs/btrfs/inode.c       |    3 +++
 fs/btrfs/ioctl.c       |   10 ++++++++--
 fs/btrfs/relocation.c  |    1 +
 fs/btrfs/volumes.c     |    2 ++
 9 files changed, 68 insertions(+), 11 deletions(-)

^ permalink raw reply	[relevance 6%]

* [GIT PULL] Btrfs updates for 2.6.31-rc
@ 2009-07-30 17:56  6% Chris Mason
  0 siblings, 0 replies; 105+ results
From: Chris Mason @ 2009-07-30 17:56 UTC (permalink / raw)
  To: Linus Torvalds, linux-kernel, linux-btrfs

Hello everyone,

We've added two small incrementals for the btrfs async block group
caching.  One fixes a race between the caching thread and transaction
commit.  We haven't seen this one triggered in testing, but it still is
a valid fix.

The second patch makes sure the caching threads don't stall
transaction commits.

Linus, both of these are in the master branch at:

git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable.git

Chris Mason (1) commits (+14/-2):
    Btrfs: be more polite in the async caching threads

Yan Zheng (1) commits (+14/-10):
    Btrfs: preserve commit_root for async caching

Total: (2) commits

 fs/btrfs/ctree.h       |    4 +---
 fs/btrfs/disk-io.c     |    2 +-
 fs/btrfs/extent-tree.c |   11 ++++++-----
 fs/btrfs/transaction.c |   22 +++++++++++++++++++---
 fs/btrfs/transaction.h |    1 +
 5 files changed, 28 insertions(+), 12 deletions(-)

^ permalink raw reply	[relevance 6%]

* [GIT PULL] Btrfs updates for 2.6.33
@ 2010-02-05  1:59  6% Chris Mason
  0 siblings, 0 replies; 105+ results
From: Chris Mason @ 2010-02-05  1:59 UTC (permalink / raw)
  To: Linus Torvalds, linux-kernel, linux-btrfs

Hello everyone,

The master branch of the btrfs unstable tree:

git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable.git master

Has a small collection of fixes.  These are mostly bugs, but I put in
one of Josef's safer performance tweaks as well.

Aneesh Kumar K.V (1) commits (+3/-1):
    Btrfs: apply updated fallocate i_size fix

Josef Bacik (1) commits (+2/-44):
    Btrfs: do not try and lookup the file extent when finishing ordered io

Miao Xie (1) commits (+8/-2):
    Btrfs: remove BUG_ON() due to mounting bad filesystem

Roel Kluin (1) commits (+1/-1):
    Btrfs: make error return negative in btrfs_sync_file()

Zheng Yan (2) commits (+5/-6):
    Btrfs: fix race between allocate and release extent buffer. (+1/-2)
    Btrfs: Fix oopsen when dropping empty tree. (+4/-4)

Total: (6) commits

 fs/btrfs/disk-io.c     |    7 +++++-
 fs/btrfs/extent-tree.c |    8 +++----
 fs/btrfs/extent_io.c   |    3 --
 fs/btrfs/file.c        |    2 -
 fs/btrfs/inode.c       |   50 ++++---------------------------------------------
 fs/btrfs/relocation.c  |    3 +-
 6 files changed, 19 insertions(+), 54 deletions(-)

^ permalink raw reply	[relevance 6%]

* [GIT PULL] Btrfs updates
@ 2011-05-15 14:47  6% Chris Mason
  0 siblings, 0 replies; 105+ results
From: Chris Mason @ 2011-05-15 14:47 UTC (permalink / raw)
  To: linux-btrfs, linux-kernel, Linus Torvalds


Hi everyone,

The master branch of the btrfs unstable tree has a few more fixes:

git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable.git master

These include small fixes in the new per-file flags, an oops in
the btrfs acl code and ENOSPC fixes for mixed block groups (used in very
small filesystems).

Li Zefan (3) commits (+15/-10):
    Btrfs: fix FS_IOC_SETFLAGS ioctl (+2/-0)
    Btrfs: fix FS_IOC_GETFLAGS ioctl (+7/-0)
    fs: remove FS_COW_FL (+6/-10)

Daniel J Blueman (1) commits (+3/-2):
    Prevent oopsing in posix_acl_valid()

liubo (1) commits (+26/-11):
    Btrfs: fix easily get into ENOSPC in mixed case

Total: (5) commits (+44/-23)

 fs/btrfs/acl.c         |    5 +++--
 fs/btrfs/extent-tree.c |   37 ++++++++++++++++++++++++++-----------
 fs/btrfs/ioctl.c       |   24 +++++++++++++++---------
 include/linux/fs.h     |    1 -
 4 files changed, 44 insertions(+), 23 deletions(-)

^ permalink raw reply	[relevance 6%]

* [GIT PULL] Btrfs updates for 3.1
@ 2011-07-01 20:39  6% Josef Bacik
  0 siblings, 0 replies; 105+ results
From: Josef Bacik @ 2011-07-01 20:39 UTC (permalink / raw)
  To: Chris Mason; +Cc: linux-btrfs

Hey Chris,

Since I'm going on vacation next week I wanted to get everything ready for you
in case you get bored with fsck and want to put together a 3.1 tree :).  If you
can pull

git://git.kernel.org/pub/scm/linux/kernel/git/josef/btrfs-work.git for-chris

It is based on your for-linus branch.  Here is the shortlog and diffstat

Josef Bacik (7):
      Btrfs: try to only do one btrfs_search_slot in do_setxattr
      Btrfs: do transaction space reservation before joining the transaction
      Btrfs: serialize flushers in reserve_metadata_bytes
      Btrfs: use the normal checksumming infrastructure for free space cache
      Btrfs: fix how we merge extent states and deal with cached states
      Btrfs: use a worker thread to do caching
      Btrfs: don't panic if we get an error while balancing

 fs/btrfs/ctree.h            |   10 ++-
 fs/btrfs/dir-item.c         |    9 +--
 fs/btrfs/disk-io.c          |    6 ++
 fs/btrfs/extent-tree.c      |  136 +++++++++++++++++------------------
 fs/btrfs/extent_io.c        |   23 +++---
 fs/btrfs/free-space-cache.c |  169 +++++++++++++++----------------------------
 fs/btrfs/transaction.c      |   36 +++++-----
 fs/btrfs/volumes.c          |    3 +-
 fs/btrfs/xattr.c            |   54 +++++++-------
 9 files changed, 196 insertions(+), 250 deletions(-)

Thanks,

Josef

^ permalink raw reply	[relevance 6%]

* [GIT PULL] Btrfs updates
@ 2012-03-10  2:01  6% Chris Mason
  0 siblings, 0 replies; 105+ results
From: Chris Mason @ 2012-03-10  2:01 UTC (permalink / raw)
  To: Linus Torvalds, linux-btrfs, LKML

Hi Linus,

I have two additional and btrfs fixes in my for-linus branch

git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git for-linus

One is a casting error that leads to memory corruption on i386 during
scrub, and the other fixes a corner case in the backref walking code
(also triggered by scrub).

These are reviewed and tested.  I was holding off on this while trying
to track enospc bug reports, but it isn't yet clear if those are
regressions.  These are valid fixes either way.

Chris Mason (1) commits (+1/-1):
    Btrfs: fix casting error in scrub reada code

Li Zefan (1) commits (+6/-2):
    btrfs: fix locking issues in find_parent_nodes()

Total: (2) commits (+7/-3)
 fs/btrfs/backref.c |    8 ++++++--
 fs/btrfs/reada.c   |    2 +-
 2 files changed, 7 insertions(+), 3 deletions(-)

^ permalink raw reply	[relevance 6%]

* [GIT PULL] Btrfs updates
@ 2012-06-21 15:47  6% Chris Mason
  0 siblings, 0 replies; 105+ results
From: Chris Mason @ 2012-06-21 15:47 UTC (permalink / raw)
  To: torvalds, Kernel development list, linux-btrfs

Hi Linus,

Please grab my for-linus branch:

git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git for-linus

This is a small pull with btrfs fixes.  The biggest of the bunch is
another fix for the new backref walking code.

We're still hammering out one btrfs dio vs buffered reads problem, but
that one will have to wait for the next rc.

Josef Bacik (2) commits (+3/-2):
    Btrfs: delay iput with async extents (+2/-2)
    Btrfs: add a missing spin_lock (+1/-0)

Alexander Block (2) commits (+59/-44):
    Btrfs: don't assume to be on the correct extent in add_all_parents (+52/-42)
    Btrfs: introduce btrfs_next_old_item (+7/-2)

Total: (4) commits (+62/-46)

 fs/btrfs/backref.c |   94 +++++++++++++++++++++++++++++-----------------------
 fs/btrfs/ctree.h   |    9 +++--
 fs/btrfs/disk-io.c |    1 +
 fs/btrfs/inode.c   |    4 +--
 4 files changed, 62 insertions(+), 46 deletions(-)

^ permalink raw reply	[relevance 6%]

* [GIT PULL] Btrfs updates
@ 2013-02-16  1:55  6% Chris Mason
  0 siblings, 0 replies; 105+ results
From: Chris Mason @ 2013-02-16  1:55 UTC (permalink / raw)
  To: linux-kernel, Linus Torvalds, linux-btrfs

Hi Linus,

If you're doing another RC, please grab these two.  Otherwise I'll send
them off to -stable.

git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux-btrfs.git for-linus

This fixes a long standing problem where the btrfs scan ioctl was racing
with mkfs.btrfs and dropping dirty pages created by mkfs.  It also fixes
a crash during tree log replay with quota enabled.

David Sterba (1) commits (+64/-6):
    btrfs: access superblock via pagecache in scan_one_device

Arne Jansen (1) commits (+1/-1):
    Btrfs: fix crash in log replay with qgroups enabled

Total: (2) commits (+65/-7)

 fs/btrfs/ctree.c   |  2 +-
 fs/btrfs/volumes.c | 70 +++++++++++++++++++++++++++++++++++++++++++++++++-----
 2 files changed, 65 insertions(+), 7 deletions(-)


^ permalink raw reply	[relevance 6%]

* [PATCH 0/4] Btrfs updates for 3.14-rc - sysfs, ioctl
@ 2014-02-07 13:33  6% David Sterba
  0 siblings, 0 replies; 105+ results
From: David Sterba @ 2014-02-07 13:33 UTC (permalink / raw)
  To: linux-btrfs; +Cc: David Sterba

Two minor fixes to the new sysfs code and a RFC change to replace the
GLOBAL_RSV ioctl with the same information exported through SPACE_INFO ioctl.

This requires to reserve a blockgroup type that will become part of ABI.

David Sterba (3):
  btrfs: reserve no transaction units in btrfs_ioctl_set_features
  btrfs: export global block reserve size as space_info
  Revert "btrfs: add ioctl to export size of global metadata
    reservation"

Jeff Mahoney (1):
  btrfs: commit transaction after setting label and features

 fs/btrfs/ctree.h           |  9 ++++++++-
 fs/btrfs/ioctl.c           | 42 +++++++++++++++++++++++-------------------
 include/uapi/linux/btrfs.h |  1 -
 3 files changed, 31 insertions(+), 21 deletions(-)

-- 
1.8.5.2


^ permalink raw reply	[relevance 6%]

* [PULL] Btrfs updates for 4.7-rc5
@ 2016-06-23 10:56  6% David Sterba
  0 siblings, 0 replies; 105+ results
From: David Sterba @ 2016-06-23 10:56 UTC (permalink / raw)
  To: clm; +Cc: linux-btrfs, David Sterba

Hi,

this is hopefully the last pull for 4.7 from me. There are two fixes that
should finalize the changes introduced in this dev cycle, plus some minor
independent fixes.

The following changes since commit 33688abb2802ff3a230bd2441f765477b94cc89e:

  Linux 4.7-rc4 (2016-06-19 21:30:02 -0700)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-chris

for you to fetch changes up to 917b187d467d87ed8d75b3d2084d906845ed126a:

  Btrfs: Force stripesize to the value of sectorsize (2016-06-23 12:16:01 +0200)

----------------------------------------------------------------
Chandan Rajendra (1):
      Btrfs: Force stripesize to the value of sectorsize

Liu Bo (1):
      Btrfs: fix error handling in map_private_extent_buffer

Omar Sandoval (1):
      Btrfs: fix ->iterate_shared() by upgrading i_rwsem for delayed nodes

Wang Xiaoguang (1):
      btrfs: fix disk_i_size update bug when fallocate() fails

Wei Yongjun (1):
      Btrfs: fix error return code in btrfs_init_test_fs()

 fs/btrfs/ctree.c             |  6 +++++-
 fs/btrfs/delayed-inode.c     | 27 ++++++++++++++++++++++-----
 fs/btrfs/delayed-inode.h     | 10 ++++++----
 fs/btrfs/disk-io.c           |  6 ++----
 fs/btrfs/extent_io.c         |  7 ++++++-
 fs/btrfs/inode.c             |  8 +++++---
 fs/btrfs/ordered-data.c      |  3 ++-
 fs/btrfs/tests/btrfs-tests.c |  2 +-
 fs/btrfs/volumes.c           |  4 ++--
 9 files changed, 51 insertions(+), 22 deletions(-)

^ permalink raw reply	[relevance 6%]

* [PULL] Btrfs updates for 4.11-rc2
@ 2017-03-09 13:55  6% David Sterba
  0 siblings, 0 replies; 105+ results
From: David Sterba @ 2017-03-09 13:55 UTC (permalink / raw)
  To: clm; +Cc: David Sterba, linux-btrfs

Hi,

there's a regression fix for the assertion failure reported by Dave Jones, the
rest of patches are minor updates. Please pull, thanks.

The following changes since commit e9f467d028cd7d8bee2a4d6c4fb806caf8cd580b:

  Merge branch 'for-chris-4.11-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux into for-linus-4.11 (2017-02-28 14:35:09 -0800)

are available in the git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-chris-4.11-rc2

for you to fetch changes up to 94b5a2924fc0ec2bb2347ca31156be8fabe907c4:

  Btrfs: consistent usage of types in balance_args (2017-03-09 14:23:00 +0100)

----------------------------------------------------------------
Dmitry V. Levin (2):
      btrfs: remove btrfs_err_str function from uapi/linux/btrfs.h
      MAINTAINERS: add btrfs file entries for include directories

Goldwyn Rodrigues (1):
      btrfs: No need to check !(flags & MS_RDONLY) twice

Hans van Kranenburg (1):
      Btrfs: consistent usage of types in balance_args

Liu Bo (2):
      Btrfs: update comments in cache_save_setup
      Btrfs: fix regression in lock_delalloc_pages

 MAINTAINERS                |  2 ++
 fs/btrfs/extent-tree.c     |  3 ++-
 fs/btrfs/extent_io.c       |  3 ++-
 fs/btrfs/super.c           |  3 +--
 include/uapi/linux/btrfs.h | 37 +++++--------------------------------
 5 files changed, 12 insertions(+), 36 deletions(-)

^ permalink raw reply	[relevance 6%]

* [GIT PULL] Btrfs updates for 4.17-rc3
@ 2018-05-04 14:45  6% David Sterba
  0 siblings, 0 replies; 105+ results
From: David Sterba @ 2018-05-04 14:45 UTC (permalink / raw)
  To: torvalds; +Cc: David Sterba, clm, linux-btrfs, linux-kernel

Hi,

please pull the following branch with 2 regression fixes and one fix for
stable. Thanks.

----------------------------------------------------------------
The following changes since commit c0872323746e11fc79344e3738b283a8cda86654:

  btrfs: print-tree: debugging output enhancement (2018-04-20 19:18:16 +0200)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-4.17-rc3-tag

for you to fetch changes up to a6aa10c70bf72fb28504cb5de5deac75da78b0f5:

  Btrfs: send, fix missing truncate for inode with prealloc extent past eof (2018-05-02 11:55:29 +0200)

----------------------------------------------------------------
Filipe Manana (1):
      Btrfs: send, fix missing truncate for inode with prealloc extent past eof

Qu Wenruo (1):
      btrfs: Fix wrong first_key parameter in replace_path

ethanwu (1):
      btrfs: Take trans lock before access running trans in check_delayed_ref

 fs/btrfs/extent-tree.c | 7 +++++++
 fs/btrfs/relocation.c  | 2 +-
 fs/btrfs/send.c        | 4 ++++
 3 files changed, 12 insertions(+), 1 deletion(-)

^ permalink raw reply	[relevance 6%]

* [PATCH 0/2] btrfs: updates to error path for delayed dir index insertion failure
@ 2023-08-28  7:37  6% fdmanana
  2023-08-28  8:06  6% ` [PATCH v2 0/3] " fdmanana
  0 siblings, 1 reply; 105+ results
From: fdmanana @ 2023-08-28  7:37 UTC (permalink / raw)
  To: linux-btrfs

From: Filipe Manana <fdmanana@suse.com>

Some updates to the error path for delayed dir index insertion failure,
motivated by a recent syzbot report:

  https://lore.kernel.org/linux-btrfs/00000000000036e1290603e097e0@google.com/

Details in the changelogs.

Filipe Manana (2):
  btrfs: improve error message after failure to add delayed dir index item
  btrfs: remove BUG() after failure to insert delayed dir index item

 fs/btrfs/delayed-inode.c | 71 ++++++++++++++++++++++++++--------------
 1 file changed, 46 insertions(+), 25 deletions(-)

-- 
2.40.1


^ permalink raw reply	[relevance 6%]

* [PATCH v2 0/3] btrfs: updates to error path for delayed dir index insertion failure
  2023-08-28  7:37  6% [PATCH 0/2] btrfs: updates to error path for delayed dir index insertion failure fdmanana
@ 2023-08-28  8:06  6% ` fdmanana
  0 siblings, 0 replies; 105+ results
From: fdmanana @ 2023-08-28  8:06 UTC (permalink / raw)
  To: linux-btrfs

From: Filipe Manana <fdmanana@suse.com>

Some updates to the error path for delayed dir index insertion failure,
motivated by a recent syzbot report:

  https://lore.kernel.org/linux-btrfs/00000000000036e1290603e097e0@google.com/

Details in the changelogs.

v2: Fixed error path in patch 2 to release delayed item before unlocking
    the delayed node. Added patch 3 to prevent such mistakes in the future.

Filipe Manana (3):
  btrfs: improve error message after failure to add delayed dir index item
  btrfs: remove BUG() after failure to insert delayed dir index item
  btrfs: assert delayed node locked when removing delayed item

 fs/btrfs/delayed-inode.c | 85 ++++++++++++++++++++++++++--------------
 1 file changed, 55 insertions(+), 30 deletions(-)

-- 
2.40.1


^ permalink raw reply	[relevance 6%]

* [PATCH 0/2] btrfs: updates for directory reading
@ 2023-09-09 12:08  6% fdmanana
  0 siblings, 0 replies; 105+ results
From: fdmanana @ 2023-09-09 12:08 UTC (permalink / raw)
  To: linux-btrfs; +Cc: ian, Filipe Manana

From: Filipe Manana <fdmanana@suse.com>

Tweak and fix a bug when reading directory entries after a rewinddir(3)
call. Reported by Ian Johnson.

Link: https://lore.kernel.org/linux-btrfs/YR1P0S.NGASEG570GJ8@ianjohnson.dev/T/#u

Filipe Manana (2):
  btrfs: set last dir index to the current last index when opening dir
  btrfs: refresh dir last index during a rewinddir(3) call

 fs/btrfs/inode.c | 18 ++++++++++++++++--
 1 file changed, 16 insertions(+), 2 deletions(-)

-- 
2.40.1


^ permalink raw reply	[relevance 6%]

* [GIT PULL] Btrfs for 4.16
@ 2018-01-29 21:00  6% David Sterba
  0 siblings, 0 replies; 105+ results
From: David Sterba @ 2018-01-29 21:00 UTC (permalink / raw)
  To: torvalds; +Cc: David Sterba, clm, linux-btrfs, linux-kernel

Hi,

the btrfs updates for this cycle are mostly cleanups with a few raid56 bugfixes
and some feature additions. Please pull, thanks.


Features or user visible changes:

- fallocate: implement zero range mode

- avoid losing data raid profile when deleting a device

- tree item checker: more checks for directory items and xattrs

Notable fixes:

- raid56 recovery: don't use cached stripes, that could be potentially changed
  and a later RMW or recovery would lead to corruptions or failures

- let raid56 try harder to rebuild damaged data, reading from all stripes if
  necessary

- fix scrub to repair raid56 in a similar way as in the case above

Other:

- cleanups: device freeing, removed some call indirections, redundant
  bio_put/_get, unused parameters, refactorings and renames

- RCU list traversal fixups

- simplify mount callchain, remove recursing back when mounting a subvolume

- plug for fsync, may improve bio merging on multiple devices

- compression heurisic: replace heap sort with radix sort, gains some
  performance

- add extent map selftests, buffered write vs dio

----------------------------------------------------------------

The following changes since commit 0c5b9b5d9adbad4b60491f9ba0d2af38904bb4b9:

  Linux 4.15-rc9 (2018-01-21 13:51:26 -0800)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-4.16-tag

for you to fetch changes up to 3acbcbfc8f06d4ade2aab2ebba0a2542a05ce90c:

  btrfs: drop devid as device_list_add() arg (2018-01-29 19:31:16 +0100)

----------------------------------------------------------------
Anand Jain (33):
      btrfs: clean up btrfs_dev_stat_inc usage
      btrfs: move volume_mutex into the btrfs_rm_device()
      btrfs: rename btrfs_add_device to btrfs_add_dev_item
      btrfs: set fs_devices->seed directly
      btrfs: move check for device generation to the last
      btrfs: factor __btrfs_open_devices() to create btrfs_open_one_device()
      btrfs: drop btrfs_device::can_discard to query directly
      btrfs: add helper for device path or missing
      btrfs: cleanup device states define BTRFS_DEV_STATE_WRITEABLE
      btrfs: cleanup device states define BTRFS_DEV_STATE_IN_FS_METADATA
      btrfs: cleanup device states define BTRFS_DEV_STATE_MISSING
      btrfs: cleanup device states define BTRFS_DEV_STATE_REPLACE_TGT
      btrfs: cleanup device states define BTRFS_DEV_STATE_FLUSH_SENT
      btrfs: put btrfs_ioctl_vol_args_v2 related defines together
      btrfs: factor btrfs_check_rw_degradable() to check given device
      btrfs: remove check for BTRFS_FS_STATE_ERROR which we just set
      btrfS: collapse btrfs_handle_error() into __btrfs_handle_fs_error()
      btrfs: rename btrfs_device::scrub_device to scrub_ctx
      btrfs: simplify mutex unlocking code in btrfs_commit_transaction
      btrfs: minor style cleanups in btrfs_scan_one_device
      btrfs: define SUPER_FLAG_METADUMP_V2
      btrfs: add support for SUPER_FLAG_CHANGING_FSID
      btrfs: fail mount when sb flag is not in BTRFS_SUPER_FLAG_SUPP
      btrfs: cleanup btrfs_free_stale_device() usage
      btrfs: no need to check for btrfs_fs_devices::seeding
      btrfs: make btrfs_free_stale_device() to iterate all stales
      btrfs: make btrfs_free_stale_devices() argument optional
      btrfs: rename btrfs_free_stale_devices() arg to skip_dev
      btrfs: make btrfs_free_stale_devices() to match the path
      btrfs: move pr_info into device_list_add
      btrfs: set the total_devices in device_list_add()
      btrfs: get device pointer from device_list_add()
      btrfs: drop devid as device_list_add() arg

Arnd Bergmann (1):
      btrfs: tree-checker: use %zu format string for size_t

Colin Ian King (1):
      btrfs: make function update_share_count static

David Sterba (46):
      btrfs: rename device free rcu helper to free_device_rcu
      btrfs: introduce free_device helper
      btrfs: use free_device where opencoded
      btrfs: simplify exit paths in btrfs_init_new_device
      btrfs: document device locking
      btrfs: simplify btrfs_close_bdev
      btrfs: switch to RCU for device traversal in btrfs_ioctl_dev_info
      btrfs: switch to RCU for device traversal in btrfs_ioctl_fs_info
      btrfs: use non-RCU list traversal in write_all_supers callees
      btrfs: prepare to drop gfp mask parameter from clear_extent_bit
      btrfs: sink gfp parameter to clear_extent_bit
      btrfs: sink gfp parameter to clear_extent_uptodate
      btrfs: use GFP_KERNEL in btrfs_alloc_inode
      btrfs: sink get_extent parameter to extent_writepages
      btrfs: sink get_extent parameter to extent_write_locked_range
      btrfs: sink get_extent parameter to extent_write_full_page
      btrfs: drop get_extent from extent_page_data
      btrfs: sink get_extent parameter to extent_fiemap
      btrfs: sink get_extent parameter to get_extent_skip_holes
      btrfs: sink get_extent parameter to extent_readpages
      btrfs: sink get_extent parameter to __extent_readpages
      btrfs: sink get_extent parameter to __do_contiguous_readpages
      btrfs: sink get_extent parameter to read_extent_buffer_pages
      btrfs: switch to on-stack csum buffer in csum_tree_block
      btrfs: switch btrfs_trans_handle::adding_csums to bool
      btrfs: remove unused member of btrfs_trans_handle
      btrfs: switch to refcount_t type for btrfs_trans_handle::use_count
      btrfs: reorder btrfs_trans_handle members for better packing
      btrfs: use narrower type for btrfs_transaction::num_dirty_bgs
      btrfs: reorder btrfs_transaction members for better packing
      btrfs: move some zstd work data from stack to workspace
      btrfs: compression: add helper for type to string conversion
      btrfs: SETFLAGS ioctl: use helper for compression type conversion
      btrfs: prop: use common helper for type to string conversion
      btrfs: show options: use helper to convert compression type string
      btrfs: merge two flush_write_bio helpers
      btrfs: sink flush_fn to extent_write_cache_pages
      btrfs: sink writepage parameter to extent_write_cache_pages
      btrfs: unify extent_page_data type passed as void
      btrfs: heuristic: open code get_num callback of radix sort
      btrfs: heuristic: open code copy_call callback of radix sort
      btrfs: heuristic: call get4bits directly
      btrfs: drop unused parameters from mount_subvol
      btrfs: add separate helper for unlock_extent_cached with GFP_ATOMIC
      btrfs: sink unlock_extent parameter gfp_flags
      btrfs: tree-check: reduce stack consumption in check_dir_item

Edmund Nadolski (2):
      btrfs: btrfs_inode_log_parent should use defined inode_only values.
      btrfs: remove dead code from btrfs_get_extent

Filipe Manana (4):
      Btrfs: add support for fallocate's zero range operation
      Btrfs: use cached state when dirtying pages during buffered write
      Btrfs: fix missing inode i_size update after zero range operation
      Btrfs: fix space leak after fallocate and zero range operations

Geert Uytterhoeven (1):
      btrfs: ref-verify: Remove unused parameter from walk_up_tree() to kill warning

Liu Bo (26):
      Btrfs: remove redundant btrfs_balance_delayed_items
      Btrfs: free btrfs_device in place
      Btrfs: remove rcu_barrier in btrfs_close_devices
      Btrfs: add __init macro to btrfs init functions
      Btrfs: document rules about bio async submit
      Btrfs: set plug for fsync
      Btrfs: remove unused variable wait in lock_stripe_add
      Btrfs: use struct completion in scrub_submit_raid56_bio_wait
      Btrfs: remove unused wait in btrfs_stripe_hash
      Btrfs: fix scrub to repair raid6 corruption
      Btrfs: make raid6 rebuild retry more
      Btrfs: remove redundant check in rbio_can_merge
      Btrfs: do not merge rbios if their fail stripe index are not identical
      Btrfs: avoid losing data raid profile when deleting a device
      Btrfs: raid56: iterate raid56 internal bio with bio_for_each_segment_all
      Btrfs: do not cache rbio pages if using raid6 recover
      Btrfs: raid56: fix race between merge_bio and rbio_orig_end_io
      Btrfs: fix incorrect block_len in merge_extent_mapping
      Btrfs: fix unexpected EEXIST from btrfs_get_extent
      Btrfs: add helper for em merge logic
      Btrfs: move extent map specific code to extent_map.c
      Btrfs: add extent map selftests
      Btrfs: extent map selftest: buffered write vs dio read
      Btrfs: extent map selftest: dio write vs dio read
      Btrfs: add WARN_ONCE to detect unexpected error from merge_extent_mapping
      Btrfs: noinline merge_extent_mapping

Matthew Wilcox (1):
      btrfs: Remove unused readahead spinlock

Misono, Tomohiro (6):
      btrfs: add btrfs_mount_root() and new file_system_type
      btrfs: cleanup btrfs_mount() using btrfs_mount_root()
      btrfs: split parse_early_options() in two
      btrfs: remove unused setup_root_args()
      btrfs: remove unused arg from parse_subvol_options()
      btrfs: cleanup unnecessary string dup in btrfs_parse_options()

Nikolay Borisov (25):
      btrfs: Fix memory barriers usage with device stats counters
      btrfs: Remove redundant memory barrier in dev stats
      btrfs: Remove unused function
      btrfs: Remove redundant mirror_num arg
      btrfs: Make btrfs_async_run_delayed_root use a loop rather than multiple labels
      btrfs: Move checks from btrfs_wq_run_delayed_node to btrfs_balance_delayed_items
      btrfs: Move loop termination condition in while()
      btrfs: Use locked_end rather than open coding it
      btrfs: Reduce scope of delayed_rsv->lock in may_commit_trans
      btrfs: Remove redundant FLAG_VACANCY
      btrfs: Remove unused variable in btrfs_get_extent
      btrfs: remove redundant check in btrfs_get_extent_fiemap
      btrfs: Handle btrfs_set_extent_delalloc failure in fixup worker
      btrfs: Fix out of bounds access in btrfs_search_slot
      btrfs: Remove pair of bio_get/put in btrfs_schedule_bio
      btrfs: sink extent_write_locked_range tree parameter
      btrfs: sink extent_write_full_page tree argument
      btrfs: Rename bin_search -> btrfs_bin_search
      btrfs: Improve btrfs_search_slot description
      btrfs: Remove redundant bio_get/set calls in compressed read/write paths
      btrfs: Remove redundant bio_get/set from submit_dio_repair_bio
      btrfs: Remove redundant bio_get/bio_set pair from submit_one_bio
      btrfs: Remove redundant pair of bio_get/set in __btrfs_submit_dio_bio
      btrfs: Make btrfs_inode_rsv_release static
      btrfs: Use IS_ALIGNED in btrfs_truncate_block instead of opencoding it

Pravin Shedge (1):
      btrfs: remove duplicate includes

Qu Wenruo (4):
      btrfs: Don't generate UUID for non-fs tree
      btrfs: tree-checker: Add checker for dir item
      btrfs: Cleanup existing name_len checks
      btrfs: extent-tree: Make btrfs_inode_rsv_refill function static

Su Yue (1):
      btrfs: correct wrong comment about magic number of index_cnt

Timofey Titovets (2):
      Btrfs: compression heuristic: replace heap sort with radix sort
      Btrfs: compress_file_range() change page dirty status once

Xiongfeng Wang (1):
      btrfs: use correct string length in DEV_INFO ioctl

 fs/btrfs/Makefile                 |   2 +-
 fs/btrfs/backref.c                |   3 +-
 fs/btrfs/compression.c            | 137 ++++++--
 fs/btrfs/compression.h            |   4 +-
 fs/btrfs/ctree.c                  |  56 ++--
 fs/btrfs/ctree.h                  |  12 +-
 fs/btrfs/delayed-inode.c          |  59 ++--
 fs/btrfs/delayed-ref.c            |   2 +-
 fs/btrfs/delayed-ref.h            |   2 +-
 fs/btrfs/dev-replace.c            |  30 +-
 fs/btrfs/dir-item.c               | 108 ------
 fs/btrfs/disk-io.c                |  75 ++---
 fs/btrfs/disk-io.h                |   3 +
 fs/btrfs/export.c                 |   5 -
 fs/btrfs/extent-tree.c            |  21 +-
 fs/btrfs/extent_io.c              | 143 ++++----
 fs/btrfs/extent_io.h              |  48 +--
 fs/btrfs/extent_map.c             | 132 ++++++++
 fs/btrfs/extent_map.h             |   3 +-
 fs/btrfs/file.c                   | 391 ++++++++++++++++-----
 fs/btrfs/free-space-cache.c       |  13 +-
 fs/btrfs/inode.c                  | 278 ++++-----------
 fs/btrfs/ioctl.c                  |  44 +--
 fs/btrfs/props.c                  |  13 +-
 fs/btrfs/qgroup.c                 |   3 +-
 fs/btrfs/raid56.c                 | 119 ++++---
 fs/btrfs/ref-verify.c             |   6 +-
 fs/btrfs/root-tree.c              |   7 -
 fs/btrfs/scrub.c                  |  95 +++---
 fs/btrfs/send.c                   |   6 -
 fs/btrfs/super.c                  | 348 ++++++++++---------
 fs/btrfs/sysfs.c                  |   2 +-
 fs/btrfs/tests/btrfs-tests.c      |   3 +
 fs/btrfs/tests/btrfs-tests.h      |   1 +
 fs/btrfs/tests/extent-map-tests.c | 366 ++++++++++++++++++++
 fs/btrfs/tests/inode-tests.c      |  17 +-
 fs/btrfs/transaction.c            |  22 +-
 fs/btrfs/transaction.h            |  11 +-
 fs/btrfs/tree-checker.c           | 142 ++++++++
 fs/btrfs/tree-log.c               |  54 +--
 fs/btrfs/volumes.c                | 689 ++++++++++++++++++++++----------------
 fs/btrfs/volumes.h                |  45 ++-
 fs/btrfs/xattr.c                  |   6 -
 fs/btrfs/zstd.c                   | 132 ++++----
 include/trace/events/btrfs.h      |   1 -
 include/uapi/linux/btrfs.h        |  11 +-
 include/uapi/linux/btrfs_tree.h   |   2 +
 47 files changed, 2267 insertions(+), 1405 deletions(-)
 create mode 100644 fs/btrfs/tests/extent-map-tests.c

^ permalink raw reply	[relevance 6%]

* Required Kernel version to compile git btrfs with DKMS? Problems with Ubuntu 10.10
@ 2011-04-10 20:50  6% Christian Aßfalg
  0 siblings, 0 replies; 105+ results
From: Christian Aßfalg @ 2011-04-10 20:50 UTC (permalink / raw)
  To: linux-btrfs

[-- Attachment #1: Type: text/plain, Size: 1820 bytes --]

Hi all,

I'd like to look into btrfs code and try some things, so I followed the
instructions on the wiki (link below) to setup git and get a dkms build
against my kernel. I'm using Ubuntu 10.10 with a 2.6.35 Kernel, which I
assume is too old. What version do I need?

https://btrfs.wiki.kernel.org/index.php/Btrfs_source_repositories

I've followed the guide (skipped initrd) until the dkms build command,
which fails with the following error:

dkms build -m btrfs -v git

root@chris-desktop:/home/chris/workspace/btrfs/git-repo/btrfs-unstable#
cat /var/lib/dkms/btrfs/git/build/make.log
DKMS make.log for btrfs-git for kernel 2.6.35-28-generic (i686)
So 10. Apr 22:05:11 CEST 2011
make: Gehe in Verzeichnis '/usr/src/linux-headers-2.6.35-28-generic'
  LD      /var/lib/dkms/btrfs/git/build/built-in.o
  CC [M]  /var/lib/dkms/btrfs/git/build/super.o
In file included from /var/lib/dkms/btrfs/git/build/super.c:43:
/var/lib/dkms/btrfs/git/build/ctree.h:31: fatal error:
trace/events/btrfs.h: Datei oder Verzeichnis nicht gefunden
compilation terminated.
make[1]: *** [/var/lib/dkms/btrfs/git/build/super.o] Fehler 1
make: *** [_module_/var/lib/dkms/btrfs/git/build] Fehler 2
make: Verlasse Verzeichnis '/usr/src/linux-headers-2.6.35-28-generic'

This seems to be fairly new (related to initial tracepoint support),
from the two Mailing list threads "[PATCH] Btrfs: add initial tracepoint
support for btrfs" and "[GIT PULL] Btrfs updates for 2.6.39". The
attached make.log is when I simply copy the missing file over from the
btrfs git tree (fails with among others
"/var/lib/dkms/btrfs/git/build/super.c:578: error: ‘struct super_block’
has no member named ‘s_d_op’"). So I am guessing that my Ubuntu 10.10
2.6.35 Kernel is too old? Will the 2.6.38 from the next Ubuntu release
work?

Regards,
Christian Aßfalg

[-- Attachment #2: make.log --]
[-- Type: text/x-log, Size: 7050 bytes --]

DKMS make.log for btrfs-git for kernel 2.6.35-28-generic (i686)
So 10. Apr 22:15:02 CEST 2011
make: Gehe in Verzeichnis '/usr/src/linux-headers-2.6.35-28-generic'
  LD      /var/lib/dkms/btrfs/git/build/built-in.o
  CC [M]  /var/lib/dkms/btrfs/git/build/super.o
In file included from /var/lib/dkms/btrfs/git/build/super.c:43:
/var/lib/dkms/btrfs/git/build/ctree.h:2237: warning: ‘struct fstrim_range’ declared inside parameter list
/var/lib/dkms/btrfs/git/build/ctree.h:2237: warning: its scope is only this definition or declaration, which is probably not what you want
In file included from include/trace/ftrace.h:285,
                 from include/trace/define_trace.h:73,
                 from include/trace/events/btrfs.h:667,
                 from /var/lib/dkms/btrfs/git/build/super.c:56:
include/trace/events/btrfs.h: In function ‘ftrace_raw_output_btrfs_transaction_commit’:
include/trace/events/btrfs.h:47: warning: large integer implicitly truncated to unsigned type
include/trace/events/btrfs.h:47: warning: large integer implicitly truncated to unsigned type
include/trace/events/btrfs.h:47: warning: large integer implicitly truncated to unsigned type
include/trace/events/btrfs.h: In function ‘ftrace_raw_output_btrfs__inode’:
include/trace/events/btrfs.h:68: warning: large integer implicitly truncated to unsigned type
include/trace/events/btrfs.h:68: warning: large integer implicitly truncated to unsigned type
include/trace/events/btrfs.h:68: warning: large integer implicitly truncated to unsigned type
include/trace/events/btrfs.h: In function ‘ftrace_raw_output_btrfs_get_extent’:
include/trace/events/btrfs.h:144: warning: large integer implicitly truncated to unsigned type
include/trace/events/btrfs.h:144: warning: large integer implicitly truncated to unsigned type
include/trace/events/btrfs.h:144: warning: large integer implicitly truncated to unsigned type
include/trace/events/btrfs.h:144: warning: large integer implicitly truncated to unsigned type
include/trace/events/btrfs.h:144: warning: large integer implicitly truncated to unsigned type
include/trace/events/btrfs.h:144: warning: large integer implicitly truncated to unsigned type
include/trace/events/btrfs.h:144: warning: large integer implicitly truncated to unsigned type
include/trace/events/btrfs.h: In function ‘ftrace_raw_output_btrfs__ordered_extent’:
include/trace/events/btrfs.h:197: warning: large integer implicitly truncated to unsigned type
include/trace/events/btrfs.h:197: warning: large integer implicitly truncated to unsigned type
include/trace/events/btrfs.h:197: warning: large integer implicitly truncated to unsigned type
include/trace/events/btrfs.h: In function ‘ftrace_raw_output_btrfs__writepage’:
include/trace/events/btrfs.h:273: warning: large integer implicitly truncated to unsigned type
include/trace/events/btrfs.h:273: warning: large integer implicitly truncated to unsigned type
include/trace/events/btrfs.h:273: warning: large integer implicitly truncated to unsigned type
include/trace/events/btrfs.h: In function ‘ftrace_raw_output_btrfs_writepage_end_io_hook’:
include/trace/events/btrfs.h:332: warning: large integer implicitly truncated to unsigned type
include/trace/events/btrfs.h:332: warning: large integer implicitly truncated to unsigned type
include/trace/events/btrfs.h:332: warning: large integer implicitly truncated to unsigned type
include/trace/events/btrfs.h: In function ‘ftrace_raw_output_btrfs_sync_file’:
include/trace/events/btrfs.h:365: warning: large integer implicitly truncated to unsigned type
include/trace/events/btrfs.h:365: warning: large integer implicitly truncated to unsigned type
include/trace/events/btrfs.h:365: warning: large integer implicitly truncated to unsigned type
include/trace/events/btrfs.h: In function ‘ftrace_raw_output_btrfs_delayed_tree_ref’:
include/trace/events/btrfs.h:420: warning: large integer implicitly truncated to unsigned type
include/trace/events/btrfs.h:420: warning: large integer implicitly truncated to unsigned type
include/trace/events/btrfs.h:420: warning: large integer implicitly truncated to unsigned type
include/trace/events/btrfs.h:420: warning: large integer implicitly truncated to unsigned type
include/trace/events/btrfs.h:420: warning: large integer implicitly truncated to unsigned type
include/trace/events/btrfs.h:420: warning: large integer implicitly truncated to unsigned type
include/trace/events/btrfs.h: In function ‘ftrace_raw_output_btrfs_delayed_data_ref’:
include/trace/events/btrfs.h:459: warning: large integer implicitly truncated to unsigned type
include/trace/events/btrfs.h:459: warning: large integer implicitly truncated to unsigned type
include/trace/events/btrfs.h:459: warning: large integer implicitly truncated to unsigned type
include/trace/events/btrfs.h:459: warning: large integer implicitly truncated to unsigned type
include/trace/events/btrfs.h:459: warning: large integer implicitly truncated to unsigned type
include/trace/events/btrfs.h:459: warning: large integer implicitly truncated to unsigned type
include/trace/events/btrfs.h: In function ‘ftrace_raw_output_btrfs__chunk’:
include/trace/events/btrfs.h:541: warning: large integer implicitly truncated to unsigned type
include/trace/events/btrfs.h:541: warning: large integer implicitly truncated to unsigned type
include/trace/events/btrfs.h:541: warning: large integer implicitly truncated to unsigned type
include/trace/events/btrfs.h: In function ‘ftrace_raw_output_btrfs_cow_block’:
include/trace/events/btrfs.h:591: warning: large integer implicitly truncated to unsigned type
include/trace/events/btrfs.h:591: warning: large integer implicitly truncated to unsigned type
include/trace/events/btrfs.h:591: warning: large integer implicitly truncated to unsigned type
include/trace/events/btrfs.h: In function ‘ftrace_raw_output_btrfs__reserved_extent’:
include/trace/events/btrfs.h:626: warning: large integer implicitly truncated to unsigned type
include/trace/events/btrfs.h:626: warning: large integer implicitly truncated to unsigned type
include/trace/events/btrfs.h:626: warning: large integer implicitly truncated to unsigned type
/var/lib/dkms/btrfs/git/build/super.c: In function ‘btrfs_fill_super’:
/var/lib/dkms/btrfs/git/build/super.c:578: error: ‘struct super_block’ has no member named ‘s_d_op’
/var/lib/dkms/btrfs/git/build/super.c: At top level:
/var/lib/dkms/btrfs/git/build/super.c:1069: error: unknown field ‘mount’ specified in initializer
/var/lib/dkms/btrfs/git/build/super.c:1069: warning: initialization makes integer from pointer without a cast
/var/lib/dkms/btrfs/git/build/super.c:1119: warning: initialization from incompatible pointer type
/var/lib/dkms/btrfs/git/build/super.c:1120: error: unknown field ‘evict_inode’ specified in initializer
make[1]: *** [/var/lib/dkms/btrfs/git/build/super.o] Fehler 1
make: *** [_module_/var/lib/dkms/btrfs/git/build] Fehler 2
make: Verlasse Verzeichnis '/usr/src/linux-headers-2.6.35-28-generic'

^ permalink raw reply	[relevance 6%]

* WARNING: at fs/btrfs/extent_map.c:226 unpin_extent_cache+0x4b/0xa0()
@ 2012-06-02  2:10  6% Markus Trippelsdorf
  0 siblings, 0 replies; 105+ results
From: Markus Trippelsdorf @ 2012-06-02  2:10 UTC (permalink / raw)
  To: linux-btrfs; +Cc: linux-kernel

I'm running the latest git kernel with the btrfs updates already merged.
Today I've hit the following warnings during rsnapshot backup:

Jun  1 22:26:30 x4 kernel: Adding 1953788k swap on /dev/sda2.  Priority:-1 extents:1 across:1953788k 
Jun  2 01:52:30 x4 kernel: ------------[ cut here ]------------
Jun  2 01:52:30 x4 kernel: WARNING: at fs/btrfs/extent_map.c:226 unpin_extent_cache+0x4b/0xa0()
Jun  2 01:52:30 x4 kernel: Hardware name: System Product Name
Jun  2 01:52:30 x4 kernel: Pid: 24991, comm: btrfs-endio-wri Not tainted 3.4.0-09820-g86c47b7-dirty #50
Jun  2 01:52:30 x4 kernel: Call Trace:
Jun  2 01:52:30 x4 kernel: [<ffffffff8105c6c0>] ? warn_slowpath_common+0x60/0xa0
Jun  2 01:52:30 x4 kernel: [<ffffffff8121d6eb>] ? unpin_extent_cache+0x4b/0xa0
Jun  2 01:52:30 x4 kernel: [<ffffffff8121207e>] ? btrfs_finish_ordered_io+0x27e/0x400
Jun  2 01:52:30 x4 kernel: [<ffffffff8123bb02>] ? worker_loop+0x142/0x4c0
Jun  2 01:52:30 x4 kernel: [<ffffffff8123b9c0>] ? btrfs_queue_worker+0x300/0x300
Jun  2 01:52:30 x4 kernel: [<ffffffff81077ae5>] ? kthread+0x85/0xa0
Jun  2 01:52:30 x4 kernel: [<ffffffff81561c54>] ? kernel_thread_helper+0x4/0x10
Jun  2 01:52:30 x4 kernel: [<ffffffff81077a60>] ? kthread_flush_work_fn+0x20/0x20
Jun  2 01:52:30 x4 kernel: [<ffffffff81561c50>] ? gs_change+0xb/0xb
Jun  2 01:52:30 x4 kernel: ---[ end trace 73bddc9623dbf3c3 ]---
...
Jun  2 01:55:27 x4 kernel: ------------[ cut here ]------------
Jun  2 01:55:27 x4 kernel: WARNING: at fs/btrfs/extent_map.c:226 unpin_extent_cache+0x4b/0xa0()
Jun  2 01:55:27 x4 kernel: Hardware name: System Product Name
Jun  2 01:55:27 x4 kernel: Pid: 24997, comm: btrfs-endio-wri Tainted: G        W    3.4.0-09820-g86c47b7-dirty #50
Jun  2 01:55:27 x4 kernel: Call Trace:
Jun  2 01:55:27 x4 kernel: [<ffffffff8105c6c0>] ? warn_slowpath_common+0x60/0xa0
Jun  2 01:55:27 x4 kernel: [<ffffffff8121d6eb>] ? unpin_extent_cache+0x4b/0xa0
Jun  2 01:55:27 x4 kernel: [<ffffffff8121207e>] ? btrfs_finish_ordered_io+0x27e/0x400
Jun  2 01:55:27 x4 kernel: [<ffffffff8123bb02>] ? worker_loop+0x142/0x4c0
Jun  2 01:55:27 x4 kernel: [<ffffffff8123b9c0>] ? btrfs_queue_worker+0x300/0x300
Jun  2 01:55:27 x4 kernel: [<ffffffff81077ae5>] ? kthread+0x85/0xa0
Jun  2 01:55:27 x4 kernel: [<ffffffff81561c54>] ? kernel_thread_helper+0x4/0x10
Jun  2 01:55:27 x4 kernel: [<ffffffff81077a60>] ? kthread_flush_work_fn+0x20/0x20
Jun  2 01:55:27 x4 kernel: [<ffffffff81561c50>] ? gs_change+0xb/0xb
Jun  2 01:55:27 x4 kernel: ---[ end trace 73bddc9623dbf3eb ]---

 ~ # < /var/log/kern.log | grep extent_map | wc -l
41

>From /var/log/cron.log

Jun  2 01:52:00 x4 fcron[24821]: Job /usr/bin/rsnapshot daily started for user root (pid 24822)
Jun  2 01:55:29 x4 fcron[24821]: Job /usr/bin/rsnapshot daily completed (mailing output)

 ~ # btrfs fi df /var
Data, RAID1: total=758.00GB, used=538.32GB
Data: total=8.00MB, used=0.00
System, RAID1: total=8.00MB, used=116.00KB
System: total=4.00MB, used=0.00
Metadata, RAID1: total=37.50GB, used=1.88GB
Metadata: total=8.00MB, used=0.00

~ # btrfs subvol list /var
ID 773 top level 5 path .snapshots/daily.0
ID 800 top level 5 path .snapshots/monthly.0
ID 811 top level 5 path .snapshots/weekly.3
ID 813 top level 5 path .snapshots/weekly.2
ID 839 top level 5 path .snapshots/weekly.1
ID 870 top level 5 path .snapshots/weekly.0
ID 871 top level 5 path .snapshots/daily.6
ID 872 top level 5 path .snapshots/daily.5
ID 873 top level 5 path .snapshots/daily.4
ID 874 top level 5 path .snapshots/daily.3
ID 875 top level 5 path .snapshots/daily.2
ID 876 top level 5 path .snapshots/daily.1

Rsnapshot creates a new snapshot with:
 btrfs subvolume snapshot -r
and then uses rsync to backup my root drive (on xfs).

-- 
Markus

^ permalink raw reply	[relevance 6%]

* [RFC v3 00/11] btrfs: raid-stripe-tree draft patches
@ 2022-10-17 11:55  7% Johannes Thumshirn
  0 siblings, 0 replies; 105+ results
From: Johannes Thumshirn @ 2022-10-17 11:55 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Johannes Thumshirn

Here's a yet another draft of my btrfs zoned RAID patches. It's based on
Christoph's bio splitting series for btrfs.

Updates of the raid-stripe-tree are done at delayed-ref time to safe on
bandwidth while for reading we do the stripe-tree lookup on bio mapping time,
i.e. when the logical to physical translation happens for regular btrfs RAID
as well.

The stripe tree is keyed by an extent's disk_bytenr and disk_num_bytes and
it's contents are the respective physical device id and position.

For an example 1M write (split into 126K segments due to zone-append)
rapido2:/home/johannes/src/fstests# xfs_io -fdc "pwrite -b 1M 0 1M" -c fsync /mnt/test/test
wrote 1048576/1048576 bytes at offset 0
1 MiB, 1 ops; 0.0065 sec (151.538 MiB/sec and 151.5381 ops/sec)

The tree will look as follows:

rapido2:/home/johannes/src/fstests# btrfs inspect-internal dump-tree -t raid_stripe /dev/nullb0
btrfs-progs v5.16.1 
raid stripe tree key (RAID_STRIPE_TREE ROOT_ITEM 0)
leaf 805847040 items 9 free space 15770 generation 9 owner RAID_STRIPE_TREE
leaf 805847040 flags 0x1(WRITTEN) backref revision 1
checksum stored 1b22e13800000000000000000000000000000000000000000000000000000000
checksum calced 1b22e13800000000000000000000000000000000000000000000000000000000
fs uuid e4f523d1-89a1-41f9-ab75-6ba3c42a28fb
chunk uuid 6f2d8aaa-d348-4bf2-9b5e-141a37ba4c77
        item 0 key (939524096 RAID_STRIPE_KEY 126976) itemoff 16251 itemsize 32
                        stripe 0 devid 1 offset 939524096
                        stripe 1 devid 2 offset 536870912
        item 1 key (939651072 RAID_STRIPE_KEY 126976) itemoff 16219 itemsize 32
                        stripe 0 devid 1 offset 939651072
                        stripe 1 devid 2 offset 536997888
        item 2 key (939778048 RAID_STRIPE_KEY 126976) itemoff 16187 itemsize 32
                        stripe 0 devid 1 offset 939778048
                        stripe 1 devid 2 offset 537124864
        item 3 key (939905024 RAID_STRIPE_KEY 126976) itemoff 16155 itemsize 32
                        stripe 0 devid 1 offset 939905024
                        stripe 1 devid 2 offset 537251840
        item 4 key (940032000 RAID_STRIPE_KEY 126976) itemoff 16123 itemsize 32
                        stripe 0 devid 1 offset 940032000
                        stripe 1 devid 2 offset 537378816
        item 5 key (940158976 RAID_STRIPE_KEY 126976) itemoff 16091 itemsize 32
                        stripe 0 devid 1 offset 940158976
                        stripe 1 devid 2 offset 537505792
        item 6 key (940285952 RAID_STRIPE_KEY 126976) itemoff 16059 itemsize 32
                        stripe 0 devid 1 offset 940285952
                        stripe 1 devid 2 offset 537632768
        item 7 key (940412928 RAID_STRIPE_KEY 126976) itemoff 16027 itemsize 32
                        stripe 0 devid 1 offset 940412928
                        stripe 1 devid 2 offset 537759744
        item 8 key (940539904 RAID_STRIPE_KEY 32768) itemoff 15995 itemsize 32
                        stripe 0 devid 1 offset 940539904
                        stripe 1 devid 2 offset 537886720
total bytes 26843545600
bytes used 1245184
uuid e4f523d1-89a1-41f9-ab75-6ba3c42a28fb

Changes to v2:
- Bug fixes
- Rebased onto 20220901074216.1849941-1-hch@lst.de
- Added tracepoints
- Added leak checker
- Added RAID0 and RAID10

v2 of the patchset can be found here:
https://lore.kernel.org/linux-btrfs/cover.1656513330.git.johannes.thumshirn@wdc.com

Changes to v1:
- Write the stripe-tree at delayed-ref time (Qu)
- Add a different write path for preallocation

v1 of the patchset can be found here:
https://lore.kernel.org/linux-btrfs/cover.1652711187.git.johannes.thumshirn@wdc.com/

Johannes Thumshirn (11):
  btrfs: add raid stripe tree definitions
  btrfs: read raid-stripe-tree from disk
  btrfs: add support for inserting raid stripe extents
  btrfs: delete stripe extent on extent deletion
  btrfs: lookup physical address from stripe extent
  btrfs: add raid stripe tree pretty printer
  btrfs: zoned: allow zoned RAID1
  btrfs: allow zoned RAID0 and 10
  btrfs: fix striping with RST
  btrfs: check for leaks of ordered stripes on umount
  btrfs: add tracepoints for ordered stripes

 fs/btrfs/Makefile               |   2 +-
 fs/btrfs/block-rsv.c            |   1 +
 fs/btrfs/ctree.h                |  33 +++
 fs/btrfs/disk-io.c              |  17 ++
 fs/btrfs/extent-tree.c          |  56 +++++
 fs/btrfs/inode.c                |   6 +
 fs/btrfs/print-tree.c           |  21 ++
 fs/btrfs/raid-stripe-tree.c     | 394 ++++++++++++++++++++++++++++++++
 fs/btrfs/raid-stripe-tree.h     |  60 +++++
 fs/btrfs/super.c                |   1 +
 fs/btrfs/volumes.c              |  66 +++++-
 fs/btrfs/volumes.h              |  14 +-
 fs/btrfs/zoned.c                |  43 ++++
 include/trace/events/btrfs.h    |  50 ++++
 include/uapi/linux/btrfs.h      |   1 +
 include/uapi/linux/btrfs_tree.h |  20 +-
 16 files changed, 768 insertions(+), 17 deletions(-)
 create mode 100644 fs/btrfs/raid-stripe-tree.c
 create mode 100644 fs/btrfs/raid-stripe-tree.h

-- 
2.37.3


^ permalink raw reply	[relevance 7%]

* [GIT PULL] Btrfs fixes for 4.16-rc4
@ 2018-03-04  9:31  7% David Sterba
  0 siblings, 0 replies; 105+ results
From: David Sterba @ 2018-03-04  9:31 UTC (permalink / raw)
  To: torvalds; +Cc: David Sterba, clm, linux-btrfs, linux-kernel

Hi,

please consider the follwing btrfs updates, there are bugfixes or fixes
for user visible behaviour.

No merge conflicts. Please pull, thanks.

- when NR_CPUS is large, a SRCU structure can significantly inflate size
  of the main filesystem structure that would not be possible to
  allocate by kmalloc, so the kvalloc fallback is used

- improved error handling

- fix endiannes when printing some filesystem attributes via sysfs, this
  is could happen when a filesystem is moved between different endianity
  hosts

- send fixes: the NO_HOLE mode should not send a write operation for a
  file hole

- fix log replay for for special files followed by file hardlinks

- fix log replay failure after unlink and link combination

- fix max chunk size calculation for DUP allocation

----------------------------------------------------------------
The following changes since commit fd649f10c3d21ee9d7542c609f29978bdf73ab94:

  btrfs: Fix use-after-free when cleaning up fs_devs with a single stale device (2018-02-05 17:15:14 +0100)

are available in the Git repository at:

  git://git.kernel.org/pub/scm/linux/kernel/git/kdave/linux.git for-4.16-rc3-tag

for you to fetch changes up to 1f250e929a9c9332fd6ea34da684afee73837cfe:

  Btrfs: fix log replay failure after unlink and link combination (2018-03-01 16:18:40 +0100)

----------------------------------------------------------------
Anand Jain (1):
      btrfs: use proper endianness accessors for super_copy

Filipe Manana (3):
      Btrfs: send, fix issuing write op when processing hole in no data mode
      Btrfs: fix log replay failure after linking special file and fsync
      Btrfs: fix log replay failure after unlink and link combination

Hans van Kranenburg (1):
      btrfs: alloc_chunk: fix DUP stripe size handling

Jeff Mahoney (1):
      btrfs: use kvzalloc to allocate btrfs_fs_info

Nikolay Borisov (2):
      btrfs: handle failure of add_pending_csums
      btrfs: Handle btrfs_set_extent_delalloc failure in relocate_file_extent_cluster

 fs/btrfs/ctree.h       |   7 ++-
 fs/btrfs/inode-item.c  |  44 +++++++++++--------
 fs/btrfs/inode.c       |  11 ++++-
 fs/btrfs/relocation.c  |  18 +++++++-
 fs/btrfs/send.c        |   3 ++
 fs/btrfs/super.c       |   2 +-
 fs/btrfs/sysfs.c       |   8 ++--
 fs/btrfs/transaction.c |  20 +++++----
 fs/btrfs/tree-log.c    | 114 +++++++++++++++++++++++++++++++++++++++++++++++--
 fs/btrfs/volumes.c     |  11 ++---
 10 files changed, 191 insertions(+), 47 deletions(-)

^ permalink raw reply	[relevance 7%]

* [PATCH 1/2] Btrfs: make mapping->writeback_index point to the last written page
@ 2016-03-08  0:56  7% Liu Bo
  0 siblings, 0 replies; 105+ results
From: Liu Bo @ 2016-03-08  0:56 UTC (permalink / raw)
  To: linux-btrfs; +Cc: Holger Hoffstätte

If sequential writer is writing in the middle of the page and it just redirties
the last written page by continuing from it.

In the above case this can end up with seeking back to that firstly redirtied
page after writing all the pages at the end of file because btrfs updates
mapping->writeback_index to 1 past the current one.

For non-cow filesystems, the cost is only about extra seek, while for cow 
filesystems such as btrfs, it means unnecessary fragments.

To avoid it, we just need to continue writeback from the last written page.

This also updates btrfs to behave like what write_cache_pages() does, ie, bail
 out immediately if there is an error in writepage().

<Ref: https://www.spinics.net/lists/linux-btrfs/msg52628.html>

Reported-by: Holger Hoffstätte <holger.hoffstaette@googlemail.com>
Signed-off-by: Liu Bo <bo.li.liu@oracle.com>
---
 fs/btrfs/extent_io.c | 32 ++++++++++++++++++++++++++------
 1 file changed, 26 insertions(+), 6 deletions(-)

diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 392592d..1dfcffe 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -3204,14 +3204,10 @@ int extent_read_full_page(struct extent_io_tree *tree, struct page *page,
 	return ret;
 }
 
-static noinline void update_nr_written(struct page *page,
-				      struct writeback_control *wbc,
-				      unsigned long nr_written)
+static void update_nr_written(struct page *page, struct writeback_control *wbc,
+			      unsigned long nr_written)
 {
 	wbc->nr_to_write -= nr_written;
-	if (wbc->range_cyclic || (wbc->nr_to_write > 0 &&
-	    wbc->range_start == 0 && wbc->range_end == LLONG_MAX))
-		page->mapping->writeback_index = page->index + nr_written;
 }
 
 /*
@@ -3932,6 +3928,8 @@ static int extent_write_cache_pages(struct extent_io_tree *tree,
 	int nr_pages;
 	pgoff_t index;
 	pgoff_t end;		/* Inclusive */
+	pgoff_t done_index;
+	int range_whole = 0;
 	int scanned = 0;
 	int tag;
 
@@ -3954,6 +3952,8 @@ static int extent_write_cache_pages(struct extent_io_tree *tree,
 	} else {
 		index = wbc->range_start >> PAGE_CACHE_SHIFT;
 		end = wbc->range_end >> PAGE_CACHE_SHIFT;
+		if (wbc->range_start == 0 && wbc->range_end == LLONG_MAX)
+			range_whole = 1;
 		scanned = 1;
 	}
 	if (wbc->sync_mode == WB_SYNC_ALL)
@@ -3963,6 +3963,7 @@ static int extent_write_cache_pages(struct extent_io_tree *tree,
 retry:
 	if (wbc->sync_mode == WB_SYNC_ALL)
 		tag_pages_for_writeback(mapping, index, end);
+	done_index = index;
 	while (!done && !nr_to_write_done && (index <= end) &&
 	       (nr_pages = pagevec_lookup_tag(&pvec, mapping, &index, tag,
 			min(end - index, (pgoff_t)PAGEVEC_SIZE-1) + 1))) {
@@ -3972,6 +3973,7 @@ retry:
 		for (i = 0; i < nr_pages; i++) {
 			struct page *page = pvec.pages[i];
 
+			done_index = page->index;
 			/*
 			 * At this point we hold neither mapping->tree_lock nor
 			 * lock on the page itself: the page may be truncated or
@@ -4015,6 +4017,20 @@ retry:
 			}
 			if (!err && ret < 0)
 				err = ret;
+			if (ret < 0) {
+				/*
+				 * done_index is set past this page,
+				 * so media errors will not choke
+				 * background writeout for the entire
+				 * file. This has consequences for
+				 * range_cyclic semantics (ie. it may
+				 * not be suitable for data integrity
+				 * writeout).
+				 */
+				done_index = page->index + 1;
+				done = 1;
+				break;
+			}
 
 			/*
 			 * the filesystem may choose to bump up nr_to_write.
@@ -4035,6 +4051,10 @@ retry:
 		index = 0;
 		goto retry;
 	}
+
+	if (wbc->range_cyclic || (wbc->nr_to_write > 0 && range_whole))
+		mapping->writeback_index = done_index;
+
 	btrfs_add_delayed_iput(inode);
 	return err;
 }
-- 
2.5.0


^ permalink raw reply related	[relevance 7%]

* [GIT PULL] Btrfs updates
@ 2010-05-27 15:15 12% Chris Mason
  0 siblings, 0 replies; 105+ results
From: Chris Mason @ 2010-05-27 15:15 UTC (permalink / raw)
  To: Linus Torvalds, linux-btrfs, linux-kernel, linux-fsdevel

Hi everyone,

The master branch of the btrfs-unstable tree:

git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable.git master

Has the first round of btrfs updates for 2.6.35-rc.  I still have some
pending fixes and patches queued up from other people, but this pull
request has the two major features for this release.

First we've got a large ENOSPC improvement from Yan Zheng.  He hit on
all the difficult corners including space balancing, drive management,
fsync logging and many others.  This has been in the works for sometime
and it has held up very well in testing.

The second batch is O_DIRECT work from Josef Bacik.  We've had a few
different iterations on ENOSPC floating on the btrfs list, and this one
takes a much less complex road by hooking into the generic
fs/direct-io.c code.  Josef added a hook for bio submission to
fs/direct-io.c so that we could do proper block number transaction and
properly do multi-device IO.

There are small changes in here to fs/direct-io.c, mm/filemap.c and
include/linux/fs.h.  These have been sent out for review a few times and
commented on.  The filemap.c change allows O_DIRECT reads to fall back
to buffered IO, which we need to support compression and do checksumming
IOs < 1 page.

My commits here are just integrating the two and fixing a few bugs in
the result.

Zheng Yan (13) commits (+4076/-2679):
    Btrfs: Integrate metadata reservation with start_transaction (+678/-528)
    Btrfs: Update metadata reservation for delayed allocation (+232/-415)
    Btrfs: Shrink delay allocated space in a synchronized (+88/-121)
    Btrfs: Introduce contexts for metadata reservation (+853/-385)
    Btrfs: Link block groups of different raid types (+121/-55)
    Btrfs: Metadata ENOSPC handling for balance (+1163/-747)
    Btrfs: Metadata ENOSPC handling for tree log (+156/-128)
    Btrfs: Metadata reservation for orphan inodes (+365/-66)
    Btrfs: Pre-allocate space for data relocation (+92/-45)
    Btrfs: Introduce global metadata reservation (+241/-76)
    Btrfs: Fix block generation verification race (+1/-1)
    Btrfs: Kill allocate_wait in space_info (+58/-76)
    Btrfs: Kill init_btrfs_i() (+28/-36)

Chris Mason (9) commits (+314/-80):
    Btrfs: fix preallocation and nodatacow checks in O_DIRECT (+140/-16)
    Btrfs: move O_DIRECT space reservation to btrfs_direct_IO (+8/-6)
    Btrfs: don't walk around with task->state != TASK_RUNNING (+4/-3)
    Btrfs: use async helpers for DIO write checksumming (+52/-17)
    Btrfs: add more error checking to btrfs_dirty_inode (+13/-2)
    Btrfs: avoid ENOSPC errors in btrfs_dirty_inode (+11/-3)
    Btrfs: rework O_DIRECT enospc handling (+49/-30)
    Btrfs: drop verbose enospc printk (+2/-0)
    Btrfs: allow unaligned DIO (+35/-3)

Josef Bacik (5) commits (+829/-134):
    direct-io: add a hook for the fs to provide its own submit_bio function (+45/-8)
    fs: allow short direct-io reads to be completed via buffered IO (+31/-5)
    direct-io: do not merge logically non-contiguous requests (+18/-2)
    Btrfs: add basic DIO read/write support (+631/-36)
    Btrfs: do aio_write instead of write (+104/-83)

Total: (27) commits

 fs/btrfs/extent-tree.c  | 2317 ++++++++++++++++++++++++++++--------------------
 fs/btrfs/relocation.c   | 1991 +++++++++++++++++++++++++----------------
 fs/btrfs/inode.c        | 1797 +++++++++++++++++++++++++++++--------
 fs/btrfs/file.c         |  304 +++---
 fs/btrfs/tree-log.c     |  241 +++-
 fs/btrfs/transaction.c  |  232 +++-
 fs/btrfs/ioctl.c        |  206 ++--
 fs/btrfs/disk-io.c      |  171 +--
 fs/btrfs/ctree.h        |  163 ++-
 fs/btrfs/ctree.c        |  109 +-
 fs/btrfs/delayed-ref.c  |  101 --
 fs/btrfs/extent_io.c    |   85 -
 fs/btrfs/ordered-data.c |   82 +
 fs/direct-io.c          |   62 +
 mm/filemap.c            |   36 
 fs/btrfs/super.c        |   30 
 fs/btrfs/file-item.c    |   28 
 fs/btrfs/inode-item.c   |   27 
 fs/btrfs/transaction.h  |   24 
 fs/btrfs/root-tree.c    |   23 
 fs/btrfs/volumes.c      |   17 
 fs/btrfs/extent_io.h    |   14 
 fs/btrfs/xattr.c        |   12 
 include/linux/fs.h      |   11 
 fs/btrfs/ordered-data.h |    9 
 fs/btrfs/tree-defrag.c  |    7 
 fs/btrfs/disk-io.h      |    4 
 fs/btrfs/delayed-ref.h  |    3 
 fs/btrfs/btrfs_inode.h  |    3 
 fs/btrfs/tree-log.h     |    2 
 fs/btrfs/async-thread.c |    1 
 31 files changed, 5219 insertions(+), 2893 deletions(-)

^ permalink raw reply	[relevance 12%]

* [GIT PULL] Btrfs updates for 2.6.32-rc
@ 2009-10-09 17:29 13% Chris Mason
  0 siblings, 0 replies; 105+ results
From: Chris Mason @ 2009-10-09 17:29 UTC (permalink / raw)
  To: Linus Torvalds, linux-kernel, linux-btrfs

Hello everyone,

Btrfs updates are in the master branch of the btrfs-unstable repo:

git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable.git master

This branch is still against 2.6.31, but git merging lets it work with
the code Linus has already pulled and merged into 2.6.32-rc

This bunch fine tunes the enospc support, removing a window where the
accounting would let people allocate even though space wasn't yet
available.

There is a deadlock fix where the worker threads would get stuck waiting
for memory while trying to start more worker threads, and an important
fix for the file clone ioctl where it can incorrectly setup extents on the
clone.

Alexey Dobriyan (1) commits (+2/-2):
    Btrfs: constify dentry_operations

Chris Mason (5) commits (+166/-73):
    Btrfs: delay clearing EXTENT_DELALLOC for compressed extents (+4/-2)
    Btrfs: fix uninit compiler warning in cow_file_range_nocow (+1/-0)
    Btrfs: cleanup extent_clear_unlock_delalloc flags (+51/-37)
    Btrfs: fix file clone ioctl for bookend extents (+4/-2)
    Btrfs: fix deadlock on async thread startup (+106/-32)

Josef Bacik (4) commits (+225/-55):
    Btrfs: release delalloc reservations on extent item insertion (+107/-37)
    Btrfs: async delalloc flushing under space pressure (+88/-11)
    Btrfs: optimize fsync for the single writer case (+13/-1)
    Btrfs: fix possible softlockup in the allocator (+17/-6)

Zheng Yan (2) commits (+61/-34):
    Btrfs: optimize back reference update during btrfs_drop_snapshot (+53/-29)
    Btrfs: remove negative dentry when deleting subvolumne (+8/-5)

Total: (12) commits

 fs/btrfs/async-thread.c |   81 ++++++++++++++--
 fs/btrfs/async-thread.h |   10 +-
 fs/btrfs/btrfs_inode.h  |   12 +-
 fs/btrfs/ctree.h        |   21 ++--
 fs/btrfs/disk-io.c      |   48 +++++----
 fs/btrfs/extent-tree.c  |  239 +++++++++++++++++++++++++++++++++++++-----------
 fs/btrfs/extent_io.c    |   46 ++++-----
 fs/btrfs/extent_io.h    |   18 ++-
 fs/btrfs/file.c         |    3 
 fs/btrfs/inode.c        |  111 ++++++++++++++--------
 fs/btrfs/ioctl.c        |    7 +
 fs/btrfs/ordered-data.c |    6 +
 fs/btrfs/relocation.c   |    4 
 fs/btrfs/tree-log.c     |   12 ++
 14 files changed, 454 insertions(+), 164 deletions(-)

^ permalink raw reply	[relevance 13%]

* [GIT PULL] Btrfs updates for 2.6.31-rc
@ 2009-07-02 19:10 14% Chris Mason
  0 siblings, 0 replies; 105+ results
From: Chris Mason @ 2009-07-02 19:10 UTC (permalink / raw)
  To: Linus Torvalds, linux-kernel, linux-btrfs

Hello everyone,

Here are some btrfs updates.  Most of them are small bug fixes, but the
large commit from Yan Zheng is step one in getting snapshot deletion
rolling.  There is also has a nice CPU usage reduction for
streaming writes to a file.

Linus, please pull the master branch of btrfs-unstable:

git://git.kernel.org/pub/scm/linux/kernel/git/mason/btrfs-unstable.git master

Chris Mason (3) commits (+15/-9):
    Btrfs: don't log the inode in file_write while growing the file (+4/-1)
    Btrfs: fix the file clone ioctl for preallocated extents (+4/-2)
    Btrfs: honor nodatacow/sum mount options for new files (+7/-6)

Josef Bacik (1) commits (+11/-1):
    Btrfs: account for space we may use in fallocate

Yan Zheng (1) commits (+395/-181):
    Btrfs: update backrefs while dropping snapshot

Total: (5) commits

 fs/btrfs/ctree.h       |    3 
 fs/btrfs/extent-tree.c |  564 +++++++++++++++++++++++++++++++++----------------
 fs/btrfs/file.c        |    5 
 fs/btrfs/inode.c       |   25 +-
 fs/btrfs/ioctl.c       |    6 
 fs/btrfs/relocation.c  |    5 
 fs/btrfs/transaction.c |    4 
 7 files changed, 421 insertions(+), 191 deletions(-)

^ permalink raw reply	[relevance 14%]

Results 1-105 of 105 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2009-07-02 19:10 14% [GIT PULL] Btrfs updates for 2.6.31-rc Chris Mason
2009-10-09 17:29 13% [GIT PULL] Btrfs updates for 2.6.32-rc Chris Mason
2010-05-27 15:15 12% [GIT PULL] Btrfs updates Chris Mason
2016-03-08  0:56  7% [PATCH 1/2] Btrfs: make mapping->writeback_index point to the last written page Liu Bo
2018-03-04  9:31  7% [GIT PULL] Btrfs fixes for 4.16-rc4 David Sterba
2022-10-17 11:55  7% [RFC v3 00/11] btrfs: raid-stripe-tree draft patches Johannes Thumshirn
2009-10-15  0:06  6% [GIT PULL] Btrfs updates Chris Mason
2013-02-16  1:55  6% Chris Mason
2018-01-29 21:00  6% [GIT PULL] Btrfs for 4.16 David Sterba
2018-10-30 13:23  6% [GIT PULL] Btrfs updates for 4.20, part 2 David Sterba
2011-02-15  3:49  6% [GIT PULL] Btrfs updates Chris Mason
2010-02-05  1:59  6% [GIT PULL] Btrfs updates for 2.6.33 Chris Mason
2010-01-29 17:35  6% Chris Mason
2018-09-06 14:37  6% [GIT PULL] Btrfs updates for 4.19-rc2 David Sterba
2018-05-04 14:45  6% [GIT PULL] Btrfs updates for 4.17-rc3 David Sterba
2016-06-23 10:56  6% [PULL] Btrfs updates for 4.7-rc5 David Sterba
2011-07-01 20:39  6% [GIT PULL] Btrfs updates for 3.1 Josef Bacik
2014-02-07 13:33  6% [PATCH 0/4] Btrfs updates for 3.14-rc - sysfs, ioctl David Sterba
2023-09-09 12:08  6% [PATCH 0/2] btrfs: updates for directory reading fdmanana
2011-12-01 15:39  6% [GIT PULL] Btrfs updates Chris Mason
2011-04-26 14:24  6% Chris Mason
2009-11-11 21:25  6% [GIT PULL] Btrfs updates for 2.6.32-rc Chris Mason
2011-03-16 16:14  6% [GIT PULL] Btrfs updates for -rc1 Josef Bacik
2012-06-21 15:47  6% [GIT PULL] Btrfs updates Chris Mason
2012-04-13 13:38  6% Chris Mason
2011-06-27 18:15  6% Chris Mason
2023-08-28  7:37  6% [PATCH 0/2] btrfs: updates to error path for delayed dir index insertion failure fdmanana
2023-08-28  8:06  6% ` [PATCH v2 0/3] " fdmanana
2011-06-20  1:12  6% [GIT PULL] Btrfs updates Chris Mason
2017-03-09 13:55  6% [PULL] Btrfs updates for 4.11-rc2 David Sterba
2018-06-13 15:11  6% [GIT PULL] Btrfs updates for 4.18, part 2 David Sterba
2012-03-10  2:01  6% [GIT PULL] Btrfs updates Chris Mason
2019-03-12 15:08  6% [GIT PULL] Btrfs updates for 5.1, part 2 David Sterba
2009-07-30 17:56  6% [GIT PULL] Btrfs updates for 2.6.31-rc Chris Mason
2010-01-20  2:42  6% [GIT PULL] Btrfs updates for 2.6.33-git Chris Mason
2020-06-14 11:56  6% [GIT PULL] Btrfs updates for 5.8, part 2 David Sterba
2012-06-02  2:10  6% WARNING: at fs/btrfs/extent_map.c:226 unpin_extent_cache+0x4b/0xa0() Markus Trippelsdorf
2020-11-10 16:05  6% [GIT PULL] Btrfs updates for v5.10-rc4 David Sterba
2013-03-09  0:38  6% [GIT PULL] Btrfs updates Chris Mason
2011-05-15 14:47  6% Chris Mason
2011-04-10 20:50  6% Required Kernel version to compile git btrfs with DKMS? Problems with Ubuntu 10.10 Christian Aßfalg
2018-11-28 12:28  6% [GIT PULL] Btrfs updates for 4.20-rc4 David Sterba
2009-10-02  0:30  5% [GIT PULL] Btrfs updates for 2.6.32-rc Chris Mason
2013-05-18 14:30  5% [GIT PULL] Btrfs updates Chris Mason
2023-11-13 16:22  5% [GIT PULL] Btrfs updates for 6.7-rc2 David Sterba
2023-09-08 12:09  5% [PATCH 00/21] btrfs: updates to delayed refs accounting and space reservation fdmanana
2023-09-08 17:20  5% ` [PATCH v2 " fdmanana
2009-12-17 21:59  5% [GIT PULL] Btrfs updates for 2.6.33-git Chris Mason
2010-06-11 19:37  5% [GIT PULL] Btrfs updates for 2.6.35 Chris Mason
2011-07-27 22:46  5% [GIT PULL] Btrfs updates Chris Mason
2010-04-05 19:36  5% Chris Mason
2021-03-01 13:44  5% [GIT PULL] Btrfs updates for 5.12-rc2 David Sterba
2020-02-03 15:38  5% [GIT PULL] Btrfs updates for 5.6, part 2 David Sterba
2010-12-14  1:54  5% [GIT PULL] Btrfs updates Chris Mason
2022-11-25 20:47  5% [GIT PULL] Btrfs updates for 6.1-rc7 David Sterba
2012-06-15 18:09  5% [GIT PULL] Btrfs updates Chris Mason
2010-11-29 16:00  5% [GIT PULL] Btrfs updates for 2.6.37-rc Chris Mason
2011-04-18 14:26  5% [GIT PULL] Btrfs updates Chris Mason
2011-01-17 21:13  5% Chris Mason
2012-02-24 16:41  5% Chris Mason
2011-08-18 18:04  5% Chris Mason
2012-08-29 16:01  5% Chris Mason
2013-03-29 17:47  5% Chris Mason
2011-06-12 11:57  5% Chris Mason
2009-06-11 20:44  5% [GIT PULL] Btrfs updates for 2.6.31-rc Chris Mason
2011-06-04 14:37  5% [GIT PULL] Btrfs updates Chris Mason
2020-08-13 13:52  5% [GIT PULL] Btrfs updates for 5.9, part 2 David Sterba
2011-02-07 20:12  5% [GIT PULL] Btrfs updates Chris Mason
2011-05-27 19:55  4% Chris Mason
2010-03-15 19:18  4% Chris Mason
2016-11-30 13:11  4% [PULL] Btrfs updates for 4.10 David Sterba
2011-03-28 12:08  4% [GIT PULL] Btrfs updates for 2.6.39 Chris Mason
2018-04-15 12:36  4% [GIT PULL] Btrfs updates for 4.17, part 2 David Sterba
2012-06-01 13:18  4% [GIT PULL] Btrfs updates Chris Mason
2023-02-20 19:20  3% [GIT PULL] Btrfs updates for 6.3 David Sterba
2018-08-13 12:54  3% [GIT PULL] Btrfs updates for 4.19 David Sterba
2022-01-10 19:11  3% [GIT PULL] Btrfs updates for 5.17 David Sterba
2021-02-16 12:56  3% [GIT PULL] Btrfs updates for 5.12 David Sterba
2020-07-31 16:42  3% [GIT PULL] Btrfs updates for 5.9 David Sterba
2019-03-04 19:20  3% [GIT PULL] Btrfs updates for 5.1, part 1 David Sterba
2020-06-01 12:37  3% [GIT PULL] Btrfs updates for 5.8 David Sterba
2019-09-16 11:55  3% [GIT PULL] Btrfs updates for 5.4 David Sterba
2019-11-22 16:23  3% [GIT PULL] Btrfs updates for 5.5 David Sterba
2021-11-01 16:45  3% [GIT PULL] Btrfs updates for 5.16 David Sterba
2020-01-27 16:30  3% [GIT PULL] Btrfs updates for 5.6 David Sterba
2012-12-17 21:28  3% [GIT PULL] Btrfs updates Chris Mason
2018-06-04 15:43  3% [GIT PULL] Btrfs updates for 4.18 David Sterba
2021-06-28 18:16  3% [GIT PULL] Btrfs updates for 5.14 David Sterba
2018-10-22 17:22  3% [GIT PULL] Btrfs updates for 4.20, part 1 David Sterba
2021-08-30 13:18  3% [GIT PULL] Btrfs updates for 5.15 David Sterba
2022-03-21 21:33  3% [GIT PULL] Btrfs updates for 5.18 David Sterba
2018-04-03 13:56  3% [GIT PULL] Btrfs updates for 4.17 David Sterba
2023-04-25 14:51  3% [GIT PULL] Btrfs updates for 6.4 David Sterba
2012-12-17 21:44  3% [GIT PULL] Btrfs updates Chris Mason
2021-04-26 19:59  3% [GIT PULL] Btrfs updates for 5.13 David Sterba
2019-07-15  8:57  3% [GIT PULL] Btrfs updates for 5.3 David Sterba
2018-12-19 15:11  3% [GIT PULL] Btrfs updates for 4.21 David Sterba
2022-05-24 15:50  2% [GIT PULL] Btrfs updates for 5.19 David Sterba
2020-12-14 15:15  2% [GIT PULL] Btrfs updates for 5.11 David Sterba
2022-08-01 16:40  2% [GIT PULL] Btrfs updates for 5.20 David Sterba
2023-10-30 17:35  2% [GIT PULL] Btrfs updates for 6.7 David Sterba
2020-03-30 18:37  2% [GIT PULL] Btrfs updates for 5.7 David Sterba
2022-10-04  6:31  2% [GIT PULL] Btrfs updates for 6.1 David Sterba
2023-06-26 18:14  2% [GIT PULL] Btrfs updates for 6.5 David Sterba
2019-05-06 13:31  2% [GIT PULL] Btrfs updates for 5.2 David Sterba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).