diff options
author | Kent Overstreet <kent.overstreet@gmail.com> | 2019-03-13 13:31:02 -0400 |
---|---|---|
committer | Kent Overstreet <kent.overstreet@linux.dev> | 2023-10-22 17:08:17 -0400 |
commit | 61f321fc8bcb844ff0b2520ba71753cb5a511a9a (patch) | |
tree | 9c9c11595a51cf308855e9e1463434ecf195a253 /fs/bcachefs/alloc_background.c | |
parent | 3aea434272884b8dc77c57624a6d3fec55ade898 (diff) | |
download | linux-61f321fc8bcb844ff0b2520ba71753cb5a511a9a.tar.gz linux-61f321fc8bcb844ff0b2520ba71753cb5a511a9a.tar.bz2 linux-61f321fc8bcb844ff0b2520ba71753cb5a511a9a.zip |
bcachefs: Make deferred inode updates a mount option
Journal reclaim may still need performance tuning
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
Diffstat (limited to 'fs/bcachefs/alloc_background.c')
-rw-r--r-- | fs/bcachefs/alloc_background.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/bcachefs/alloc_background.c b/fs/bcachefs/alloc_background.c index bb067e4f627e..0ea4bebdd0af 100644 --- a/fs/bcachefs/alloc_background.c +++ b/fs/bcachefs/alloc_background.c @@ -953,6 +953,13 @@ retry: a->k.p = iter->pos; bch2_alloc_pack(a, u); + /* + * XXX: + * when using deferred btree updates, we have journal reclaim doing + * btree updates and thus requiring the allocator to make forward + * progress, and here the allocator is requiring space in the journal - + * so we need a journal pre-reservation: + */ ret = bch2_btree_insert_at(c, NULL, invalidating_cached_data ? journal_seq : NULL, BTREE_INSERT_ATOMIC| @@ -960,7 +967,6 @@ retry: BTREE_INSERT_NOFAIL| BTREE_INSERT_USE_RESERVE| BTREE_INSERT_USE_ALLOC_RESERVE| - BTREE_INSERT_JOURNAL_RESERVED| flags, BTREE_INSERT_ENTRY(iter, &a->k_i)); if (ret == -EINTR) |