LCOV - code coverage report
Current view: top level - fs/xfs - xfs_buf_xfile.h (source / functions) Hit Total Coverage
Test: fstests of 6.5.0-rc4-xfsa @ Mon Jul 31 20:08:27 PDT 2023 Lines: 1 1 100.0 %
Date: 2023-07-31 20:08:27 Functions: 0 0 -

          Line data    Source code
       1             : // SPDX-License-Identifier: GPL-2.0-or-later
       2             : /*
       3             :  * Copyright (C) 2023 Oracle.  All Rights Reserved.
       4             :  * Author: Darrick J. Wong <djwong@kernel.org>
       5             :  */
       6             : #ifndef __XFS_BUF_XFILE_H__
       7             : #define __XFS_BUF_XFILE_H__
       8             : 
       9             : #ifdef CONFIG_XFS_IN_MEMORY_FILE
      10             : int xfile_buf_ioapply(struct xfs_buf *bp);
      11             : int xfile_alloc_buftarg(struct xfs_mount *mp, const char *descr,
      12             :                 struct xfs_buftarg **btpp);
      13             : void xfile_free_buftarg(struct xfs_buftarg *btp);
      14             : xfs_daddr_t xfile_buftarg_nr_sectors(struct xfs_buftarg *btp);
      15             : int xfile_buf_map_pages(struct xfs_buf *bp, xfs_buf_flags_t flags);
      16             : void xfile_buf_unmap_pages(struct xfs_buf *bp);
      17             : 
      18             : static inline bool xfile_buftarg_can_direct_map(const struct xfs_buftarg *btp)
      19             : {
      20    82492167 :         return (btp->bt_flags & XFS_BUFTARG_XFILE) &&
      21             :                (btp->bt_flags & XFS_BUFTARG_DIRECT_MAP);
      22             : }
      23             : #else
      24             : # define xfile_buf_ioapply(bp)                  (-EOPNOTSUPP)
      25             : # define xfile_buftarg_nr_sectors(btp)          (0)
      26             : # define xfile_buf_map_pages(b,f)               (-ENOTBLK)
      27             : # define xfile_buf_unmap_pages(bp)              ((void)0)
      28             : # define xfile_buftarg_can_direct_map(btp)      (false)
      29             : #endif /* CONFIG_XFS_IN_MEMORY_FILE */
      30             : 
      31             : #endif /* __XFS_BUF_XFILE_H__ */

Generated by: LCOV version 1.14