mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2025-01-18 11:17:07 +00:00
bcachefs: Don't block on allocations when only writing to specific device
Since the copygc thread is now global and not per device, we're not freeing up space on any one device in bounded time - and indeed we never really were, since rebalance wasn't moving data around between devices with that objective. Signed-off-by: Kent Overstreet <kent.overstreet@gmail.com> Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
parent
9f115ce9e9
commit
1421bea38a
@ -1090,6 +1090,11 @@ again:
|
|||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The copygc thread is now global, which means it's no longer
|
||||||
|
* freeing up space on specific disks, which means that
|
||||||
|
* allocations for specific disks may hang arbitrarily long:
|
||||||
|
*/
|
||||||
wp = bch2_alloc_sectors_start(c,
|
wp = bch2_alloc_sectors_start(c,
|
||||||
op->target,
|
op->target,
|
||||||
op->opts.erasure_code,
|
op->opts.erasure_code,
|
||||||
@ -1099,7 +1104,8 @@ again:
|
|||||||
op->nr_replicas_required,
|
op->nr_replicas_required,
|
||||||
op->alloc_reserve,
|
op->alloc_reserve,
|
||||||
op->flags,
|
op->flags,
|
||||||
(op->flags & BCH_WRITE_ALLOC_NOWAIT) ? NULL : cl);
|
(op->flags & (BCH_WRITE_ALLOC_NOWAIT|
|
||||||
|
BCH_WRITE_ONLY_SPECIFIED_DEVS)) ? NULL : cl);
|
||||||
EBUG_ON(!wp);
|
EBUG_ON(!wp);
|
||||||
|
|
||||||
if (unlikely(IS_ERR(wp))) {
|
if (unlikely(IS_ERR(wp))) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user