summaryrefslogtreecommitdiff
path: root/fs
AgeCommit message (Collapse)Author
2019-04-03bcachefs: kill bucket mark sector count saturationKent Overstreet
2019-04-03bcachefs: don't call bch2_bucket_seq_cleanup from journal_buf_switchKent Overstreet
journal_buf_switch is called from the foreground when getting a journal reservation and thus is somewhat latency sensitive; bch2_bucket_seq_cleanup has to run infrequently but is a bit expensive when it does run. Call it from the journal write path instead, and punt the journal write to worqueue context. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2019-04-03bcachefs: Fix an assertionKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2019-04-03bcachefs: fix rename + fsyncKent Overstreet
2019-04-03bcachefs: Use ei_update_lock consistentlyKent Overstreet
This is prep work for using deferred btree updates for inode updates - the way inodes are done now we're relying on btree locking for ei_inode and ei_update_lock could probably be removed, but it'll actually be needed when we switch to deferred updates. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2019-04-03bcachefs: bch2_trans_update() now takes struct btree_insert_entryKent Overstreet
2019-04-03bcachefs: Fix mtime/ctime updatesKent Overstreet
Also make inode flags consistent with how the rest of the inode is updated Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2019-04-03bcachefs: Simplify bch2_write_inode_trans, fix lockdep splatKent Overstreet
ei_update_lock isn't currently needed for write inode (but it will be needed again when deferred btree updates are used for inode updates) Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2019-04-03bcachefs: add bch_verbose() statements for shutdownKent Overstreet
2019-04-03bcachefs: Fix a use after free in the journal codeKent Overstreet
2019-04-03bcachefs: Fix device addKent Overstreet
2019-04-03bcachefs: trace transaction restartsKent Overstreet
exceptionally crappy "tracing", but it's a start at documenting the places restarts can be triggered Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2019-04-03bcachefs: Convert raw uses of bch2_btree_iter_link() to new transactionsKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2019-04-03bcachefs: Only check inode i_nlink during full fsckKent Overstreet
Now that all filesystem operatinos that manipulate the filesystem heirachy and i_nlink are fully atomic, we can add a feature bit to indicate i_nlink doesn't need to be checked. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2019-04-03bcachefs: Convert bch2_symlink to new transactionsKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2019-04-03bcachefs: Make bch2_setattr_nonsize() fully atomicKent Overstreet
updating i_mode may also require an update to the acl - the inode update and acl xattr updates are now atomic. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2019-04-03bcachefs: Make rename fully atomicKent Overstreet
the core of rename - updating the src and dst dirents - has been atomic for quite some time, but the various inode updates for i_nlink and mtime/time weren't done atomically. Now, they are. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2019-04-03bcachefs: Make unlink path atomicKent Overstreet
We'll still need to scan for inodes flagged as BCH_INODE_UNLINKED on recovery, but we'll no longer need to scan the dirents to and recalculate i_nlink for every inode. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2019-04-03bcachefs: Make hardlink path fully atomicKent Overstreet
much like the create path, but simpler Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2019-04-03bcachefs: Make create path fully atomicKent Overstreet
inode create, dirent create, inode update of parent dir, new acl creation - all are fully atomic now Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2019-04-03bcachefs: Make bch2_set_acl() fully atomicKent Overstreet
setting/modifying an acl can also require updating i_mode - the inode update is now atomic with the xattr update Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2019-04-03bcachefs: Convert bch2_write_inode() to new transactionsKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2019-04-03bcachefs: Convert dirent/xattr/inode code to new transactionsKent Overstreet
No real functional changes in this patch - mostly just prep work for making various filesystem options fully atomic Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2019-04-03bcachefs: New transaction infrastructureKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2019-04-03bcachefs: add BCH_INODE_UNLINKEDKent Overstreet
will be used for better tmpfile/unlink Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2019-04-03bcachefs: create lost+found when initializing fsKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2019-04-03bcachefs: trivial optimization for fewer transaction restartsKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2019-04-03bcachefs: move an assertion to expensive_debug_checksKent Overstreet
2019-04-03bcachefs: improve bch2_btree_iter_copy()Kent Overstreet
so as to generate fewer transaction restarts Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2019-04-03bcachefs: Fix a bug when dropping invalid btree keysKent Overstreet
There was a missing set_btree_bset_end() call, leading to popped assertions later. Also add a quick and dirty debug option for injecting invalid keys. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2019-04-03bcachefs: Fix __bch2_strtohKent Overstreet
when looking up the unit, it was matching against the trailing null in si_units Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2019-04-03bcachefs: work around an older xattr bugKent Overstreet
similar to the dirent bug - making struct bch_dirent and bch_xattr 8 byte aligned changed sizeof, and size calculations that used sizeof(bch_xattr)/sizeof(bch_dirent) wrong
2019-04-03bcachefs: acl code improvementsKent Overstreet
Fewer allocations, and to_disk/from_disk are considerably less sketchy now Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2019-04-03bcachefs: work around an older dirent bugKent Overstreet
2019-04-03bcachefs: fix BTREE_INSERT_NOUNLOCKKent Overstreet
btree_node_merge -> get_sibling -> btree_node_lock could drop locks, when using linked iterators
2019-04-03bcachefs: fix a btree iter error pathKent Overstreet
2019-04-03bcachefs: refactor bch2_btree_node_prefetch()Kent Overstreet
2019-04-03bcachefs: bch2_btree_iter_traverse() no longer has to go up for intent locksKent Overstreet
2019-04-03bcachefs: don't expose extent whiteouts outside of btree codeKent Overstreet
2019-04-03bcachefs: btree_iter_prev()Kent Overstreet
2019-04-03bcachefs: kill BTREE_ITER_ENDKent Overstreet
prep work for btree_iter_prev()
2019-04-03bcachefs: BTREE_ITER_TYPEKent Overstreet
also factor out bch2_btree_iter_checks()
2019-04-03bcachefs: refactor bch2_btree_node_get_sibling() a bitKent Overstreet
2019-04-03bcachefs: improve btree_node_iter_prev()Kent Overstreet
2019-04-03bcachefs: improve bkey_prev()Kent Overstreet
2019-04-03bcachefs: fix __btree_node_iter_used()Kent Overstreet
2019-04-03bcachefs: bch2_btree_iter_set_pos() can now go backwardsKent Overstreet
2019-04-03bcachefs: More btree unit testsKent Overstreet
2019-04-03bcachefs: fix btree reserve calculationsKent Overstreet
2019-04-03bcachefs: fix an assertionKent Overstreet
bch2_btree_iter_peek_slot() -> bch2_bkey_debugcheck() was popping, because __bch2_btree_iter_peek_slot() was using KEY_TYPE_DELETED for an extent hole