bcachefs: six_lock_counts() is now in six.c
Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
This commit is contained in:
committed by
Kent Overstreet
parent
315c9ba6da
commit
fa3ae3ca4e
@ -131,7 +131,7 @@ void bch2_btree_node_unlock_write(struct btree_trans *trans,
|
|||||||
bch2_btree_node_unlock_write_inlined(trans, path, b);
|
bch2_btree_node_unlock_write_inlined(trans, path, b);
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct six_lock_count btree_node_lock_counts(struct btree_trans *trans,
|
struct six_lock_count bch2_btree_node_lock_counts(struct btree_trans *trans,
|
||||||
struct btree_path *skip,
|
struct btree_path *skip,
|
||||||
struct btree *b,
|
struct btree *b,
|
||||||
unsigned level)
|
unsigned level)
|
||||||
@ -161,7 +161,7 @@ static inline void six_lock_readers_add(struct six_lock *lock, int nr)
|
|||||||
|
|
||||||
void __bch2_btree_node_lock_write(struct btree_trans *trans, struct btree *b)
|
void __bch2_btree_node_lock_write(struct btree_trans *trans, struct btree *b)
|
||||||
{
|
{
|
||||||
int readers = btree_node_lock_counts(trans, NULL, b, b->c.level).read;
|
int readers = bch2_btree_node_lock_counts(trans, NULL, b, b->c.level).read;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Must drop our read locks before calling six_lock_write() -
|
* Must drop our read locks before calling six_lock_write() -
|
||||||
@ -244,7 +244,7 @@ bool bch2_btree_node_upgrade(struct btree_trans *trans,
|
|||||||
path->btree_id,
|
path->btree_id,
|
||||||
&path->pos,
|
&path->pos,
|
||||||
btree_node_locked(path, level),
|
btree_node_locked(path, level),
|
||||||
btree_node_lock_counts(trans, NULL, b, level),
|
bch2_btree_node_lock_counts(trans, NULL, b, level),
|
||||||
six_lock_counts(&b->c.lock));
|
six_lock_counts(&b->c.lock));
|
||||||
return false;
|
return false;
|
||||||
success:
|
success:
|
||||||
|
@ -4,9 +4,9 @@
|
|||||||
#include "buckets.h"
|
#include "buckets.h"
|
||||||
#include "btree_types.h"
|
#include "btree_types.h"
|
||||||
#include "keylist.h"
|
#include "keylist.h"
|
||||||
|
#include "six.h"
|
||||||
|
|
||||||
#include <linux/blktrace_api.h>
|
#include <linux/blktrace_api.h>
|
||||||
#include "keylist.h"
|
|
||||||
|
|
||||||
#define CREATE_TRACE_POINTS
|
#define CREATE_TRACE_POINTS
|
||||||
#include "trace.h"
|
#include "trace.h"
|
||||||
|
Reference in New Issue
Block a user