~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/fs/xfs/xfs_buf_item.h

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 // SPDX-License-Identifier: GPL-2.0
  2 /*
  3  * Copyright (c) 2000-2001,2005 Silicon Graphics, Inc.
  4  * All Rights Reserved.
  5  */
  6 #ifndef __XFS_BUF_ITEM_H__
  7 #define __XFS_BUF_ITEM_H__
  8 
  9 /* kernel only definitions */
 10 
 11 struct xfs_buf;
 12 struct xfs_mount;
 13 
 14 /* buf log item flags */
 15 #define XFS_BLI_HOLD            (1u << 0)
 16 #define XFS_BLI_DIRTY           (1u << 1)
 17 #define XFS_BLI_STALE           (1u << 2)
 18 #define XFS_BLI_LOGGED          (1u << 3)
 19 #define XFS_BLI_INODE_ALLOC_BUF (1u << 4)
 20 #define XFS_BLI_STALE_INODE     (1u << 5)
 21 #define XFS_BLI_INODE_BUF       (1u << 6)
 22 #define XFS_BLI_ORDERED         (1u << 7)
 23 
 24 #define XFS_BLI_FLAGS \
 25         { XFS_BLI_HOLD,         "HOLD" }, \
 26         { XFS_BLI_DIRTY,        "DIRTY" }, \
 27         { XFS_BLI_STALE,        "STALE" }, \
 28         { XFS_BLI_LOGGED,       "LOGGED" }, \
 29         { XFS_BLI_INODE_ALLOC_BUF, "INODE_ALLOC" }, \
 30         { XFS_BLI_STALE_INODE,  "STALE_INODE" }, \
 31         { XFS_BLI_INODE_BUF,    "INODE_BUF" }, \
 32         { XFS_BLI_ORDERED,      "ORDERED" }
 33 
 34 /*
 35  * This is the in core log item structure used to track information
 36  * needed to log buffers.  It tracks how many times the lock has been
 37  * locked, and which 128 byte chunks of the buffer are dirty.
 38  */
 39 struct xfs_buf_log_item {
 40         struct xfs_log_item     bli_item;       /* common item structure */
 41         struct xfs_buf          *bli_buf;       /* real buffer pointer */
 42         unsigned int            bli_flags;      /* misc flags */
 43         unsigned int            bli_recur;      /* lock recursion count */
 44         atomic_t                bli_refcount;   /* cnt of tp refs */
 45         int                     bli_format_count;       /* count of headers */
 46         struct xfs_buf_log_format *bli_formats; /* array of in-log header ptrs */
 47         struct xfs_buf_log_format __bli_format; /* embedded in-log header */
 48 };
 49 
 50 int     xfs_buf_item_init(struct xfs_buf *, struct xfs_mount *);
 51 void    xfs_buf_item_done(struct xfs_buf *bp);
 52 void    xfs_buf_item_relse(struct xfs_buf *);
 53 bool    xfs_buf_item_put(struct xfs_buf_log_item *);
 54 void    xfs_buf_item_log(struct xfs_buf_log_item *, uint, uint);
 55 bool    xfs_buf_item_dirty_format(struct xfs_buf_log_item *);
 56 void    xfs_buf_inode_iodone(struct xfs_buf *);
 57 void    xfs_buf_inode_io_fail(struct xfs_buf *bp);
 58 #ifdef CONFIG_XFS_QUOTA
 59 void    xfs_buf_dquot_iodone(struct xfs_buf *);
 60 void    xfs_buf_dquot_io_fail(struct xfs_buf *bp);
 61 #else
 62 static inline void xfs_buf_dquot_iodone(struct xfs_buf *bp)
 63 {
 64 }
 65 static inline void xfs_buf_dquot_io_fail(struct xfs_buf *bp)
 66 {
 67 }
 68 #endif /* CONFIG_XFS_QUOTA */
 69 void    xfs_buf_iodone(struct xfs_buf *);
 70 bool    xfs_buf_log_check_iovec(struct xfs_log_iovec *iovec);
 71 
 72 extern struct kmem_cache        *xfs_buf_item_cache;
 73 
 74 #endif  /* __XFS_BUF_ITEM_H__ */
 75 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php