History log of /linux-master/fs/bcachefs/two_state_shared_lock.h
Revision Date Author Comments
# 19fe87e0 22-Nov-2022 Kent Overstreet <kent.overstreet@linux.dev>

bcachefs: Inline bch2_two_state_(trylock|unlock)

Standard inlining of fast paths - these locks are now used by our new
nocow mode.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>


# a7ecd30c 04-Nov-2022 Kent Overstreet <kent.overstreet@linux.dev>

bcachefs: Factor out two_state_shared_lock

We have a unique lock used for controlling adding to the pagecache: the
lock has two states, where both states are shared - the lock may be held
multiple times for either state - but not both states at the same time.

This is exactly what we need for nocow mode locking, so this patch pulls
it out of fs.c into its own file.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>