lib/bdev: Move some bdev.c static functions to internal header
Some internal bdev.c static function will be shared with new zoned bdev module. Change-Id: Ifbb8bf443f67b2daf97858b15d474ecce98a9efb Signed-off-by: Wojciech Malikowski <wojciech.malikowski@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/469100 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Maciej Szwed <maciej.szwed@intel.com>
This commit is contained in:
parent
aa35048d15
commit
ec63516af5
@ -52,6 +52,8 @@
|
||||
#include "spdk_internal/log.h"
|
||||
#include "spdk/string.h"
|
||||
|
||||
#include "bdev_internal.h"
|
||||
|
||||
#ifdef SPDK_CONFIG_VTUNE
|
||||
#include "ittnotify.h"
|
||||
#include "ittnotify_types.h"
|
||||
@ -1278,7 +1280,7 @@ spdk_bdev_finish(spdk_bdev_fini_cb cb_fn, void *cb_arg)
|
||||
_spdk_bdev_finish_unregister_bdevs_iter(NULL, 0);
|
||||
}
|
||||
|
||||
static struct spdk_bdev_io *
|
||||
struct spdk_bdev_io *
|
||||
spdk_bdev_get_io(struct spdk_bdev_channel *channel)
|
||||
{
|
||||
struct spdk_bdev_mgmt_channel *ch = channel->shared_resource->mgmt_ch;
|
||||
@ -1855,7 +1857,7 @@ _spdk_bdev_io_submit(void *ctx)
|
||||
bdev_io->internal.in_submit_request = false;
|
||||
}
|
||||
|
||||
static void
|
||||
void
|
||||
spdk_bdev_io_submit(struct spdk_bdev_io *bdev_io)
|
||||
{
|
||||
struct spdk_bdev *bdev = bdev_io->bdev;
|
||||
@ -1896,7 +1898,7 @@ spdk_bdev_io_submit_reset(struct spdk_bdev_io *bdev_io)
|
||||
bdev_io->internal.in_submit_request = false;
|
||||
}
|
||||
|
||||
static void
|
||||
void
|
||||
spdk_bdev_io_init(struct spdk_bdev_io *bdev_io,
|
||||
struct spdk_bdev *bdev, void *cb_arg,
|
||||
spdk_bdev_io_completion_cb cb)
|
||||
|
50
lib/bdev/bdev_internal.h
Normal file
50
lib/bdev/bdev_internal.h
Normal file
@ -0,0 +1,50 @@
|
||||
/*-
|
||||
* BSD LICENSE
|
||||
*
|
||||
* Copyright (c) Intel Corporation.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
*
|
||||
* * Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* * Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in
|
||||
* the documentation and/or other materials provided with the
|
||||
* distribution.
|
||||
* * Neither the name of Intel Corporation nor the names of its
|
||||
* contributors may be used to endorse or promote products derived
|
||||
* from this software without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#ifndef SPDK_BDEV_INTERNAL_H
|
||||
#define SPDK_BDEV_INTERNAL_H
|
||||
|
||||
#include "spdk/bdev.h"
|
||||
|
||||
struct spdk_bdev;
|
||||
struct spdk_bdev_io;
|
||||
struct spdk_bdev_channel;
|
||||
|
||||
struct spdk_bdev_io *spdk_bdev_get_io(struct spdk_bdev_channel *channel);
|
||||
|
||||
void spdk_bdev_io_init(struct spdk_bdev_io *bdev_io, struct spdk_bdev *bdev, void *cb_arg,
|
||||
spdk_bdev_io_completion_cb cb);
|
||||
|
||||
void spdk_bdev_io_submit(struct spdk_bdev_io *bdev_io);
|
||||
|
||||
#endif /* SPDK_BDEV_INTERNAL_H */
|
Loading…
Reference in New Issue
Block a user