summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-08-01wipdisk-usageKent Overstreet
2018-08-01bcachefs: More fs usage stuffKent Overstreet
2018-08-01fooKent Overstreet
2018-08-01bcachefs: BCH_SB_RESERVE_BYTESKent Overstreet
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>
2018-08-01bcachefs: Better calculation of copygc thresholdKent Overstreet
2018-08-01bcachefs: Change how replicated data is accountedKent Overstreet
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.
2018-08-01bcachefs: Account for internal fragmentation betterKent Overstreet
2018-08-01bcachefs: kill s_alloc, use bch_data_typeKent Overstreet
2018-08-01bcachefs: bch2_mark_key() now takes bch_data_typeKent Overstreet
2018-07-24bcachefs: Fix an assertion in the btree node merge pathKent Overstreet
2018-07-24bcachefs: Fix locking in allocator threadKent Overstreet
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>
2018-07-23bcachefs: fix bch2_val_to_text()Kent Overstreet
was returning wrong value
2018-07-23bcachefs: minor fsync fixKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2018-07-23bcachefs: Assorted journal refactoringKent Overstreet
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>
2018-07-23bcachefs: fix last_seq_ondiskKent Overstreet
2018-07-23bcachefs: fix mtime/ctime update on truncateKent Overstreet
2018-07-23bcachefs: fix fsync after createKent Overstreet
2018-07-23bcachefs: fix nbuckets usage on device resizeKent Overstreet
2018-07-23bcachefs: Invalidate buckets when writing to alloc btreeKent Overstreet
Prep work for persistent alloc information. Refactoring also lets us make free_inc much smaller, which means a lot fewer buckets stranded on freelists.
2018-07-23bcachefs: kill bucket mark sector count saturationKent Overstreet
2018-07-23bcachefs: 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>
2018-07-23bcachefs: Fix an assertionKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2018-07-22bcachefs: fix rename + fsyncKent Overstreet
2018-07-21bcachefs: 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>
2018-07-21bcachefs: bch2_trans_update() now takes struct btree_insert_entryKent Overstreet
2018-07-21bcachefs: 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>
2018-07-21bcachefs: 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>
2018-07-21bcachefs: add bch_verbose() statements for shutdownKent Overstreet
2018-07-20bcachefs: Fix a use after free in the journal codeKent Overstreet
2018-07-20bcachefs: Fix device addKent Overstreet
2018-07-16bcachefs: 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>
2018-07-16bcachefs: Convert raw uses of bch2_btree_iter_link() to new transactionsKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2018-07-16bcachefs: 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>
2018-07-16bcachefs: Convert bch2_symlink to new transactionsKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2018-07-16bcachefs: 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>
2018-07-16bcachefs: 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>
2018-07-16bcachefs: 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>
2018-07-16bcachefs: Make hardlink path fully atomicKent Overstreet
much like the create path, but simpler Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2018-07-16bcachefs: 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>
2018-07-16bcachefs: 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>
2018-07-16bcachefs: Convert bch2_write_inode() to new transactionsKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2018-07-16bcachefs: 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>
2018-07-16bcachefs: New transaction infrastructureKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2018-07-16fs: factor out d_mark_tmpfile()Kent Overstreet
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>
2018-07-16fs: insert_inode_locked2()Kent Overstreet
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>
2018-07-16bcachefs: add BCH_INODE_UNLINKEDKent Overstreet
will be used for better tmpfile/unlink Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2018-07-16bcachefs: create lost+found when initializing fsKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2018-07-16bcachefs: trivial optimization for fewer transaction restartsKent Overstreet
Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>
2018-07-16bcachefs: move an assertion to expensive_debug_checksKent Overstreet
2018-07-16bcachefs: improve bch2_btree_iter_copy()Kent Overstreet
so as to generate fewer transaction restarts Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com>