bdev: rearrange bdev_module.h
Move some of the bdev_module APIs immediately after the bdev_module structure definition. This prepares for an upcoming patch. Signed-off-by: Jim Harris <james.r.harris@intel.com> Change-Id: I78d534ba047048ec27d8d3159666584a52211de3 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/7736 Community-CI: Broadcom CI Community-CI: Mellanox Build Bot Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Aleksey Marchuk <alexeymar@mellanox.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
This commit is contained in:
parent
bc7da85481
commit
3e54a5bb43
@ -161,6 +161,28 @@ struct spdk_bdev_module {
|
||||
} internal;
|
||||
};
|
||||
|
||||
/**
|
||||
* Called by a bdev module to lay exclusive write claim to a bdev.
|
||||
*
|
||||
* Also upgrades that bdev's descriptor to have write access.
|
||||
*
|
||||
* \param bdev Block device to be claimed.
|
||||
* \param desc Descriptor for the above block device.
|
||||
* \param module Bdev module attempting to claim bdev.
|
||||
*
|
||||
* \return 0 on success
|
||||
* \return -EPERM if the bdev is already claimed by another module.
|
||||
*/
|
||||
int spdk_bdev_module_claim_bdev(struct spdk_bdev *bdev, struct spdk_bdev_desc *desc,
|
||||
struct spdk_bdev_module *module);
|
||||
|
||||
/**
|
||||
* Called to release a write claim on a block device.
|
||||
*
|
||||
* \param bdev Block device to be released.
|
||||
*/
|
||||
void spdk_bdev_module_release_bdev(struct spdk_bdev *bdev);
|
||||
|
||||
typedef void (*spdk_bdev_unregister_cb)(void *cb_arg, int rc);
|
||||
|
||||
/**
|
||||
@ -766,28 +788,6 @@ void spdk_bdev_module_init_done(struct spdk_bdev_module *module);
|
||||
*/
|
||||
void spdk_bdev_module_finish_done(void);
|
||||
|
||||
/**
|
||||
* Called by a bdev module to lay exclusive write claim to a bdev.
|
||||
*
|
||||
* Also upgrades that bdev's descriptor to have write access.
|
||||
*
|
||||
* \param bdev Block device to be claimed.
|
||||
* \param desc Descriptor for the above block device.
|
||||
* \param module Bdev module attempting to claim bdev.
|
||||
*
|
||||
* \return 0 on success
|
||||
* \return -EPERM if the bdev is already claimed by another module.
|
||||
*/
|
||||
int spdk_bdev_module_claim_bdev(struct spdk_bdev *bdev, struct spdk_bdev_desc *desc,
|
||||
struct spdk_bdev_module *module);
|
||||
|
||||
/**
|
||||
* Called to release a write claim on a block device.
|
||||
*
|
||||
* \param bdev Block device to be released.
|
||||
*/
|
||||
void spdk_bdev_module_release_bdev(struct spdk_bdev *bdev);
|
||||
|
||||
/**
|
||||
* Add alias to block device names list.
|
||||
* Aliases can be add only to registered bdev.
|
||||
|
Loading…
Reference in New Issue
Block a user