Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
Add an option, gc_reserve_bytes, to set the copygc reserve as a size
instead of a percent
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
|
|
|
|
Due to compression, the different replicas of a replicated extent don't
necessarily have to take up the same amount of space - so replicated
data sector counts shouldn't be stored divided by the number of
replicas.
|
|
|
|
|
|
|
|
|
|
gc lock must be held while invalidating buckets - fixes
"1f7a95698e bcachefs: Invalidate buckets when writing to alloc btree"
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
|
|
was returning wrong value
|
|
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
|
|
Also improve error reporting - only return an error from
bch2_journal_flush_seq() if we had an error writing that entry (i.e. not
if there was an error with a newer entry).
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
|
|
|
|
|
|
|
|
|
|
Prep work for persistent alloc information. Refactoring also lets us
make free_inc much smaller, which means a lot fewer buckets stranded on
freelists.
|
|
|
|
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>
|
|
New helper for bcachefs - bcachefs doesn't want the
inode_dec_link_count() call that d_tmpfile does, it handles i_nlink on
its own atomically with other btree updates
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
|
|
New helper for bcachefs, so that when we race inserting an inode we can
atomically grab a ref to the inode already in the inode cache.
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>
|