linux-stable/fs/bcachefs
Kent Overstreet adbcada43f bcachefs: Don't require flush/fua on every journal write
This patch adds a flag to journal entries which, if set, indicates that
they weren't done as flush/fua writes.

 - non flush/fua journal writes don't update last_seq (i.e. they don't
   free up space in the journal), thus the journal free space
   calculations now check whether nonflush journal writes are currently
   allowed (i.e. are we low on free space, or would doing a flush write
   free up a lot of space in the journal)

 - write_delay_ms, the user configurable option for when open journal
   entries are automatically written, is now interpreted as the max
   delay between flush journal writes (default 1 second).

 - bch2_journal_flush_seq_async is changed to ensure a flush write >=
   the requested sequence number has happened

 - journal read/replay must now ignore, and blacklist, any journal
   entries newer than the most recent flush entry in the journal. Also,
   the way the read_entire_journal option is handled has been improved;
   struct journal_replay now has an entry, 'ignore', for entries that
   were read but should not be used.

 - assorted refactoring and improvements related to journal read in
   journal_io.c and recovery.c

Previously, we'd have to issue a flush/fua write every time we
accumulated a full journal entry - typically the bucket size. Now we
need to issue them much less frequently: when an fsync is requested, or
it's been more than write_delay_ms since the last flush, or when we need
to free up space in the journal. This is a significant performance
improvement on many write heavy workloads.

Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
2023-10-22 17:08:49 -04:00
..
Kconfig bcachefs: Take a SRCU lock in btree transactions 2023-10-22 17:08:47 -04:00
Makefile bcachefs: New varints 2023-10-22 17:08:46 -04:00
acl.c bcachefs: Split out btree_trigger_flags 2023-10-22 17:08:33 -04:00
acl.h
alloc_background.c bcachefs: Move journal reclaim to a kthread 2023-10-22 17:08:48 -04:00
alloc_background.h bcachefs: Drop sysfs interface to debug parameters 2023-10-22 17:08:45 -04:00
alloc_foreground.c bcachefs: Ensure we only allocate one EC bucket per writepoint 2023-10-22 17:08:43 -04:00
alloc_foreground.h bcachefs: Don't let copygc buckets be stolen by other threads 2023-10-22 17:08:43 -04:00
alloc_types.h bcachefs: Don't let copygc buckets be stolen by other threads 2023-10-22 17:08:43 -04:00
bcachefs.h bcachefs: Improve some IO error messages 2023-10-22 17:08:49 -04:00
bcachefs_format.h bcachefs: Don't require flush/fua on every journal write 2023-10-22 17:08:49 -04:00
bcachefs_ioctl.h bcachefs: Add an ioctl for resizing journal on a device 2023-10-22 17:08:47 -04:00
bkey.c bcachefs: Drop typechecking from bkey_cmp_packed() 2023-10-22 17:08:46 -04:00
bkey.h bcachefs: Drop typechecking from bkey_cmp_packed() 2023-10-22 17:08:46 -04:00
bkey_methods.c bcachefs: Be more careful in bch2_bkey_to_text() 2023-10-22 17:08:47 -04:00
bkey_methods.h bcachefs: Kill bkey_type_successor 2023-10-22 17:08:37 -04:00
bkey_on_stack.h bcachefs: bkey_on_stack_reassemble() 2023-10-22 17:08:32 -04:00
bkey_sort.c bcachefs: Drop typechecking from bkey_cmp_packed() 2023-10-22 17:08:46 -04:00
bkey_sort.h bcachefs: Kill btree_node_iter_large 2023-10-22 17:08:32 -04:00
bset.c bcachefs: Inline make_bfloat() into __build_ro_aux_tree() 2023-10-22 17:08:46 -04:00
bset.h bcachefs: Drop typechecking from bkey_cmp_packed() 2023-10-22 17:08:46 -04:00
btree_cache.c bcachefs: Add btree cache stats to sysfs 2023-10-22 17:08:47 -04:00
btree_cache.h bcachefs: Add btree cache stats to sysfs 2023-10-22 17:08:47 -04:00
btree_gc.c bcachefs: Refactor filesystem usage accounting 2023-10-22 17:08:49 -04:00
btree_gc.h bcachefs: Implement a new gc that only recalcs oldest gen 2023-10-22 17:08:41 -04:00
btree_io.c bcachefs: Don't issue btree writes that weren't journalled 2023-10-22 17:08:49 -04:00
btree_io.h bcachefs: Add accounting for dirty btree nodes/keys 2023-10-22 17:08:46 -04:00
btree_iter.c bcachefs: bch2_trans_get_iter() no longer returns errors 2023-10-22 17:08:48 -04:00
btree_iter.h bcachefs: bch2_trans_get_iter() no longer returns errors 2023-10-22 17:08:48 -04:00
btree_key_cache.c bcachefs: Fix some spurious gcc warnings 2023-10-22 17:08:49 -04:00
btree_key_cache.h bcachefs: Throttle updates when btree key cache is too dirty 2023-10-22 17:08:48 -04:00
btree_locking.h bcachefs: Improve tracing for transaction restarts 2023-10-22 17:08:45 -04:00
btree_types.h bcachefs: Don't issue btree writes that weren't journalled 2023-10-22 17:08:49 -04:00
btree_update.h bcachefs: bch2_btree_delete_range_trans() 2023-10-22 17:08:48 -04:00
btree_update_interior.c bcachefs: Don't issue btree writes that weren't journalled 2023-10-22 17:08:49 -04:00
btree_update_interior.h bcachefs: Delete dead code 2023-10-22 17:08:48 -04:00
btree_update_leaf.c bcachefs: Check for errors in bch2_journal_reclaim() 2023-10-22 17:08:49 -04:00
buckets.c bcachefs: Refactor filesystem usage accounting 2023-10-22 17:08:49 -04:00
buckets.h bcachefs: Delete unused arguments 2023-10-22 17:08:43 -04:00
buckets_types.h bcachefs: Don't drop replicas when copygcing ec data 2023-10-22 17:08:45 -04:00
chardev.c bcachefs: Move journal reclaim to a kthread 2023-10-22 17:08:48 -04:00
chardev.h
checksum.c bcachefs: Track incompressible data 2023-10-22 17:08:34 -04:00
checksum.h bcachefs: Track incompressible data 2023-10-22 17:08:34 -04:00
clock.c bcachefs: Convert various code to printbuf 2023-10-22 17:08:43 -04:00
clock.h bcachefs: Convert various code to printbuf 2023-10-22 17:08:43 -04:00
clock_types.h bcachefs: Make io timers less buggy 2023-10-22 17:08:33 -04:00
compress.c bcachefs: Improve check for when bios are physically contiguous 2023-10-22 17:08:45 -04:00
compress.h
debug.c bcachefs: Drop sysfs interface to debug parameters 2023-10-22 17:08:45 -04:00
debug.h bcachefs: Drop sysfs interface to debug parameters 2023-10-22 17:08:45 -04:00
dirent.c bcachefs: Print out d_type in dirent_to_text() 2023-10-22 17:08:39 -04:00
dirent.h bcachefs: Convert all bch2_trans_commit() users to BTREE_INSERT_ATOMIC 2023-10-22 17:08:33 -04:00
disk_groups.c bcachefs: Fix a couple null ptr derefs when no disk groups exist 2023-10-22 17:08:43 -04:00
disk_groups.h bcachefs: Fix disk groups not being updated when set via sysfs 2023-10-22 17:08:43 -04:00
ec.c bcachefs: Improve some IO error messages 2023-10-22 17:08:49 -04:00
ec.h bcachefs: Account for stripe parity sectors separately 2023-10-22 17:08:45 -04:00
ec_types.h bcachefs: Improve stripe triggers/heap code 2023-10-22 17:08:42 -04:00
error.c bcachefs: Turn c->state_lock into an rwsem 2023-10-22 17:08:41 -04:00
error.h bcachefs: Improve some IO error messages 2023-10-22 17:08:49 -04:00
extent_update.c bcachefs: Fix another iterator counting bug 2023-10-22 17:08:39 -04:00
extent_update.h bcachefs: Move extent overwrite handling out of core btree code 2023-10-22 17:08:36 -04:00
extents.c bcachefs: Drop sysfs interface to debug parameters 2023-10-22 17:08:45 -04:00
extents.h bcachefs: Indirect inline data extents 2023-10-22 17:08:45 -04:00
extents_types.h bcachefs: Limit pointers to being in only one stripe 2023-10-22 17:08:29 -04:00
eytzinger.h bcachefs: Fix check for if extent update is allocating 2023-10-22 17:08:14 -04:00
fifo.h bcachefs: Convert bucket invalidation to key marking path 2023-10-22 17:08:16 -04:00
fs-common.c bcachefs: Inode create optimization 2023-10-22 17:08:45 -04:00
fs-common.h bcachefs: Update directory timestamps during link 2023-10-22 17:08:33 -04:00
fs-io.c bcachefs: Flag inodes that had btree update errors 2023-10-22 17:08:49 -04:00
fs-io.h bcachefs: Kill bchfs_extent_update() 2023-10-22 17:08:29 -04:00
fs-ioctl.c bcachefs: Some project id fixes 2023-10-22 17:08:44 -04:00
fs-ioctl.h bcachefs: Fix mtime/ctime updates 2023-10-22 17:08:07 -04:00
fs.c bcachefs: Flag inodes that had btree update errors 2023-10-22 17:08:49 -04:00
fs.h bcachefs: Flag inodes that had btree update errors 2023-10-22 17:08:49 -04:00
fsck.c bcachefs: bch2_trans_get_iter() no longer returns errors 2023-10-22 17:08:48 -04:00
fsck.h bcachefs: some improvements to startup messages and options 2023-10-22 17:08:21 -04:00
inode.c bcachefs: bch2_trans_get_iter() no longer returns errors 2023-10-22 17:08:48 -04:00
inode.h bcachefs: Don't use bkey cache for inode update in fsck 2023-10-22 17:08:48 -04:00
io.c bcachefs: Improve some IO error messages 2023-10-22 17:08:49 -04:00
io.h bcachefs: Add bch2_blk_status_to_str() 2023-10-22 17:08:43 -04:00
io_types.h bcachefs: Remove some uses of PAGE_SIZE in the btree code 2023-10-22 17:08:43 -04:00
journal.c bcachefs: Don't require flush/fua on every journal write 2023-10-22 17:08:49 -04:00
journal.h bcachefs: Don't require flush/fua on every journal write 2023-10-22 17:08:49 -04:00
journal_io.c bcachefs: Don't require flush/fua on every journal write 2023-10-22 17:08:49 -04:00
journal_io.h bcachefs: Don't require flush/fua on every journal write 2023-10-22 17:08:49 -04:00
journal_reclaim.c bcachefs: Don't require flush/fua on every journal write 2023-10-22 17:08:49 -04:00
journal_reclaim.h bcachefs: Improve journal free space calculations 2023-10-22 17:08:49 -04:00
journal_seq_blacklist.c bcachefs: Don't require flush/fua on every journal write 2023-10-22 17:08:49 -04:00
journal_seq_blacklist.h bcachefs: Fix a bug with the journal_seq_blacklist mechanism 2023-10-22 17:08:43 -04:00
journal_types.h bcachefs: Don't require flush/fua on every journal write 2023-10-22 17:08:49 -04:00
keylist.c bcachefs: Interior btree updates are now fully transactional 2023-10-22 17:08:40 -04:00
keylist.h bcachefs: Interior btree updates are now fully transactional 2023-10-22 17:08:40 -04:00
keylist_types.h
migrate.c bcachefs: Interior btree updates are now fully transactional 2023-10-22 17:08:40 -04:00
migrate.h
move.c bcachefs: Don't drop replicas when copygcing ec data 2023-10-22 17:08:45 -04:00
move.h bcachefs: Don't drop replicas when copygcing ec data 2023-10-22 17:08:45 -04:00
move_types.h bcachefs: Improve warning for copygc failing to move data 2023-10-22 17:08:40 -04:00
movinggc.c bcachefs: Fix some spurious gcc warnings 2023-10-22 17:08:49 -04:00
movinggc.h bcachefs: Make copygc thread global 2023-10-22 17:08:42 -04:00
opts.c bcachefs: Fix for passing target= opts as mount opts 2023-10-22 17:08:45 -04:00
opts.h bcachefs: Indirect inline data extents 2023-10-22 17:08:45 -04:00
quota.c bcachefs: Fix setquota 2023-10-22 17:08:39 -04:00
quota.h bcachefs: more project quota fixes 2023-10-22 17:08:14 -04:00
quota_types.h bcachefs: bch2_fs_quota_transfer 2023-10-22 17:08:13 -04:00
rebalance.c bcachefs: Move journal reclaim to a kthread 2023-10-22 17:08:48 -04:00
rebalance.h bcachefs: Convert various code to printbuf 2023-10-22 17:08:43 -04:00
rebalance_types.h
recovery.c bcachefs: Don't require flush/fua on every journal write 2023-10-22 17:08:49 -04:00
recovery.h bcachefs: Fix reading of alloc info after unclean shutdown 2023-10-22 17:08:40 -04:00
reflink.c bcachefs: Indirect inline data extents 2023-10-22 17:08:45 -04:00
reflink.h bcachefs: Indirect inline data extents 2023-10-22 17:08:45 -04:00
replicas.c bcachefs: Refactor filesystem usage accounting 2023-10-22 17:08:49 -04:00
replicas.h bcachefs: Refactor replicas code 2023-10-22 17:08:43 -04:00
replicas_types.h bcachefs: Switch replicas to mark_lock 2023-10-22 17:08:13 -04:00
siphash.c
siphash.h
six.c
six.h
str_hash.h bcachefs: bch2_trans_get_iter() no longer returns errors 2023-10-22 17:08:48 -04:00
super-io.c bcachefs: Improve some IO error messages 2023-10-22 17:08:49 -04:00
super-io.h bcachefs: bch2_check_set_feature() 2023-10-22 17:08:32 -04:00
super.c bcachefs: Refactor filesystem usage accounting 2023-10-22 17:08:49 -04:00
super.h bcachefs: Fix unmount path 2023-10-22 17:08:44 -04:00
super_types.h bcachefs: Verify fs hasn't been modified before going rw 2023-10-22 17:08:18 -04:00
sysfs.c bcachefs: Add error handling to unit & perf tests 2023-10-22 17:08:48 -04:00
sysfs.h
tests.c bcachefs: Add error handling to unit & perf tests 2023-10-22 17:08:48 -04:00
tests.h bcachefs: Add error handling to unit & perf tests 2023-10-22 17:08:48 -04:00
trace.c
trace.h bcachefs: Throttle updates when btree key cache is too dirty 2023-10-22 17:08:48 -04:00
util.c bcachefs: Convert various code to printbuf 2023-10-22 17:08:43 -04:00
util.h bcachefs: Convert various code to printbuf 2023-10-22 17:08:43 -04:00
varint.c bcachefs: New varints 2023-10-22 17:08:46 -04:00
varint.h bcachefs: New varints 2023-10-22 17:08:46 -04:00
vstructs.h
xattr.c bcachefs: Some project id fixes 2023-10-22 17:08:44 -04:00
xattr.h bcachefs: Make bkey types globally unique 2023-10-22 17:08:12 -04:00