Age | Commit message (Collapse) | Author |
|
|
|
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>
|
|
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
|
|
|
|
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>
|
|
|
|
Also make inode flags consistent with how the rest of the inode is
updated
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
|
|
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>
|
|
|
|
|
|
|
|
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>
|
|
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
|
|
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>
|
|
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
|
|
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>
|
|
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>
|
|
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>
|
|
much like the create path, but simpler
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
|
|
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>
|
|
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>
|
|
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
|
|
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>
|
|
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
|
|
will be used for better tmpfile/unlink
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
|
|
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
|
|
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
|
|
|
|
so as to generate fewer transaction restarts
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
|
|
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>
|
|
when looking up the unit, it was matching against the trailing null in
si_units
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
|
|
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
|
|
Fewer allocations, and to_disk/from_disk are considerably less sketchy
now
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
|
|
|
|
btree_node_merge -> get_sibling -> btree_node_lock could drop locks,
when using linked iterators
|
|
|
|
|
|
|
|
|
|
|
|
prep work for btree_iter_prev()
|
|
also factor out bch2_btree_iter_checks()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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
|