LCOV - code coverage report
Current view: top level - spdk/lib/ftl - ftl_nv_cache_io.h (source / functions) Hit Total Coverage
Test: Combined Lines: 4 4 100.0 %
Date: 2024-07-15 14:16:56 Functions: 2 2 100.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 4 4 100.0 %

           Branch data     Line data    Source code
       1                 :            : /*   SPDX-License-Identifier: BSD-3-Clause
       2                 :            :  *   Copyright 2023 Solidigm All Rights Reserved
       3                 :            :  *   Copyright (C) 2022 Intel Corporation.
       4                 :            :  *   All rights reserved.
       5                 :            :  */
       6                 :            : 
       7                 :            : #ifndef FTL_NV_CACHE_IO_H
       8                 :            : #define FTL_NV_CACHE_IO_H
       9                 :            : 
      10                 :            : #include "spdk/bdev.h"
      11                 :            : #include "ftl_core.h"
      12                 :            : 
      13                 :            : static inline int
      14                 :    1274958 : ftl_nv_cache_bdev_read_blocks_with_md(struct spdk_ftl_dev *dev,
      15                 :            :                                       struct spdk_bdev_desc *desc,
      16                 :            :                                       struct spdk_io_channel *ch,
      17                 :            :                                       void *buf, void *md,
      18                 :            :                                       uint64_t offset_blocks, uint64_t num_blocks,
      19                 :            :                                       spdk_bdev_io_completion_cb cb, void *cb_arg)
      20                 :            : {
      21         [ +  + ]:    1274958 :         return spdk_bdev_read_blocks_with_md(desc, ch, buf, md ? : g_ftl_read_buf,
      22                 :            :                                              offset_blocks, num_blocks,
      23                 :            :                                              cb, cb_arg);
      24                 :            : }
      25                 :            : 
      26                 :            : static inline int
      27                 :     112102 : ftl_nv_cache_bdev_write_blocks_with_md(struct spdk_ftl_dev *dev,
      28                 :            :                                        struct spdk_bdev_desc *desc,
      29                 :            :                                        struct spdk_io_channel *ch,
      30                 :            :                                        void *buf, void *md,
      31                 :            :                                        uint64_t offset_blocks, uint64_t num_blocks,
      32                 :            :                                        spdk_bdev_io_completion_cb cb, void *cb_arg)
      33                 :            : {
      34         [ +  + ]:     112102 :         return spdk_bdev_write_blocks_with_md(desc, ch, buf, md ? : g_ftl_write_buf,
      35                 :            :                                               offset_blocks, num_blocks,
      36                 :            :                                               cb, cb_arg);
      37                 :            : }
      38                 :            : 
      39                 :            : #endif /* FTL_NV_CACHE_IO_H */

Generated by: LCOV version 1.14