alloc.c (08fdb2cddbdc783fecadfb606868c4498165fc30) | alloc.c (6f9414e0f6f35c7669dad5ac1a838ce323302f03) |
---|---|
1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Primary bucket allocation code 4 * 5 * Copyright 2012 Google, Inc. 6 * 7 * Allocation in bcache is done in terms of buckets: 8 * --- 347 unchanged lines hidden (view full) --- 356 !ca->invalidate_needs_gc); 357 invalidate_buckets(ca); 358 359 /* 360 * Now, we write their new gens to disk so we can start writing 361 * new stuff to them: 362 */ 363 allocator_wait(ca, !atomic_read(&ca->set->prio_blocked)); | 1// SPDX-License-Identifier: GPL-2.0 2/* 3 * Primary bucket allocation code 4 * 5 * Copyright 2012 Google, Inc. 6 * 7 * Allocation in bcache is done in terms of buckets: 8 * --- 347 unchanged lines hidden (view full) --- 356 !ca->invalidate_needs_gc); 357 invalidate_buckets(ca); 358 359 /* 360 * Now, we write their new gens to disk so we can start writing 361 * new stuff to them: 362 */ 363 allocator_wait(ca, !atomic_read(&ca->set->prio_blocked)); |
364 if (CACHE_SYNC(&ca->set->sb)) { | 364 if (CACHE_SYNC(&ca->sb)) { |
365 /* 366 * This could deadlock if an allocation with a btree 367 * node locked ever blocked - having the btree node 368 * locked would block garbage collection, but here we're 369 * waiting on garbage collection before we invalidate 370 * and free anything. 371 * 372 * But this should be safe since the btree code always --- 365 unchanged lines hidden --- | 365 /* 366 * This could deadlock if an allocation with a btree 367 * node locked ever blocked - having the btree node 368 * locked would block garbage collection, but here we're 369 * waiting on garbage collection before we invalidate 370 * and free anything. 371 * 372 * But this should be safe since the btree code always --- 365 unchanged lines hidden --- |