Signed-off-by: Kozlowski Mateusz <mateusz.kozlowski@intel.com> Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com> Change-Id: I986746a008e716705304906ab4f2bdabce0a84c3 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/13324 Reviewed-by: Ben Walker <benjamin.walker@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
45 lines
715 B
C
45 lines
715 B
C
/* SPDX-License-Identifier: BSD-3-Clause
|
|
* Copyright (c) Intel Corporation.
|
|
* All rights reserved.
|
|
*/
|
|
|
|
#ifndef FTL_DEFS_H
|
|
#define FTL_DEFS_H
|
|
|
|
#include "spdk/stdinc.h"
|
|
|
|
#ifndef KiB
|
|
#define KiB (1ULL << 10)
|
|
#endif
|
|
|
|
#ifndef MiB
|
|
#define MiB (1ULL << 20)
|
|
#endif
|
|
|
|
#ifndef GiB
|
|
#define GiB (1ULL << 30)
|
|
#endif
|
|
|
|
#ifndef TiB
|
|
#define TiB (1ULL << 40)
|
|
#endif
|
|
|
|
#define ftl_abort() \
|
|
do { \
|
|
assert(false); \
|
|
abort(); \
|
|
} while (0)
|
|
|
|
#define ftl_bug(cond) \
|
|
do { \
|
|
if (spdk_unlikely((cond))) { \
|
|
ftl_abort(); \
|
|
} \
|
|
} while (0)
|
|
|
|
#define FTL_INVALID_VALUE ((uint64_t)-1)
|
|
#define FTL_BAND_ID_INVALID FTL_INVALID_VALUE
|
|
#define FTL_BAND_PHYS_ID_INVALID FTL_INVALID_VALUE
|
|
|
|
#endif /* FTL_DEFS_H */
|