per Intel policy to include file commit date using git cmd below. The policy does not apply to non-Intel (C) notices. git log --follow -C90% --format=%ad --date default <file> | tail -1 and then pull just the 4 digit year from the result. Intel copyrights were not added to files where Intel either had no contribution ot the contribution lacked substance (ie license header updates, formatting changes, etc). Contribution date used "--follow -C95%" to get the most accurate date. Note that several files in this patch didn't end the license/(c) block with a blank comment line so these were added as the vast majority of files do have this last blank line. Simply there for consistency. Signed-off-by: paul luse <paul.e.luse@intel.com> Change-Id: Id5b7ce4f658fe87132f14139ead58d6e285c04d4 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/15192 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> Community-CI: Mellanox Build Bot
52 lines
1.2 KiB
C
52 lines
1.2 KiB
C
/* SPDX-License-Identifier: BSD-3-Clause
|
|
* Copyright (C) 2017 Intel Corporation.
|
|
* All rights reserved.
|
|
*/
|
|
|
|
/** \file
|
|
* Helper library to use spdk_bdev as the backing device for a blobstore
|
|
*/
|
|
|
|
#ifndef SPDK_BLOB_BDEV_H
|
|
#define SPDK_BLOB_BDEV_H
|
|
|
|
#include "spdk/stdinc.h"
|
|
#include "spdk/bdev.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
struct spdk_bs_dev;
|
|
struct spdk_bdev;
|
|
struct spdk_bdev_module;
|
|
|
|
/**
|
|
* Create a blobstore block device from a bdev.
|
|
*
|
|
* \param bdev_name Name of the bdev to use.
|
|
* \param event_cb Called when the bdev triggers asynchronous event.
|
|
* \param event_ctx Argument passed to function event_cb.
|
|
* \param bs_dev Output parameter for a pointer to the blobstore block device.
|
|
*
|
|
* \return 0 if operation is successful, or suitable errno value otherwise.
|
|
*/
|
|
int spdk_bdev_create_bs_dev_ext(const char *bdev_name, spdk_bdev_event_cb_t event_cb,
|
|
void *event_ctx, struct spdk_bs_dev **bs_dev);
|
|
|
|
/**
|
|
* Claim the bdev module for the given blobstore.
|
|
*
|
|
* \param bs_dev Blobstore block device.
|
|
* \param module Bdev module to claim.
|
|
*
|
|
* \return 0 on success, negative errno on failure.
|
|
*/
|
|
int spdk_bs_bdev_claim(struct spdk_bs_dev *bs_dev, struct spdk_bdev_module *module);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
|
|
#endif
|