Linux 6.13-rc4
[linux.git] / fs / bcachefs / nocow_locking_types.h
blobbd12bf6779241f4d76afc00622480c41343530f5
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #ifndef _BCACHEFS_NOCOW_LOCKING_TYPES_H
3 #define _BCACHEFS_NOCOW_LOCKING_TYPES_H
5 #define BUCKET_NOCOW_LOCKS_BITS 10
6 #define BUCKET_NOCOW_LOCKS (1U << BUCKET_NOCOW_LOCKS_BITS)
8 struct nocow_lock_bucket {
9 struct closure_waitlist wait;
10 spinlock_t lock;
11 u64 b[4];
12 atomic_t l[4];
13 } __aligned(SMP_CACHE_BYTES);
15 struct bucket_nocow_lock_table {
16 struct nocow_lock_bucket l[BUCKET_NOCOW_LOCKS];
19 #endif /* _BCACHEFS_NOCOW_LOCKING_TYPES_H */