bcachefs: bch2_dev_tryget()
authorKent Overstreet <kent.overstreet@linux.dev>
Tue, 30 Apr 2024 19:30:35 +0000 (15:30 -0400)
committerKent Overstreet <kent.overstreet@linux.dev>
Wed, 8 May 2024 21:29:22 +0000 (17:29 -0400)
commitb07eb8252fb1455cc54bb306e253e193a7a39228
tree65e2777820f463c20a743eeabaffba921f0f7e56
parent6349b07c25a03dbad3ff0e9a20a27a367ddd2997
bcachefs: bch2_dev_tryget()

Most uses of bch2_dev_bkey_exists() are going away, where we assume that
because a key references a device the device most exist - instead, we'll
be explicitly checking if the device exists and getting a reference to
it.

This adds the new helpers.

Signed-off-by: Kent Overstreet <kent.overstreet@linux.dev>
fs/bcachefs/sb-members.c
fs/bcachefs/sb-members.h