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

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

Version: ~ [ linux-6.11-rc3 ] ~ [ linux-6.10.4 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.45 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.104 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.164 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.223 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.281 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.319 ] ~ [ 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.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 // SPDX-License-Identifier: GPL-2.0
  2 /*
  3  * Copyright (c) 2000-2006 Silicon Graphics, Inc.
  4  * All Rights Reserved.
  5  */
  6 #ifndef __XFS_BMAP_UTIL_H__
  7 #define __XFS_BMAP_UTIL_H__
  8 
  9 /* Kernel only BMAP related definitions and functions */
 10 
 11 struct xfs_bmbt_irec;
 12 struct xfs_extent_free_item;
 13 struct xfs_ifork;
 14 struct xfs_inode;
 15 struct xfs_mount;
 16 struct xfs_trans;
 17 struct xfs_bmalloca;
 18 
 19 #ifdef CONFIG_XFS_RT
 20 int     xfs_bmap_rtalloc(struct xfs_bmalloca *ap);
 21 #else /* !CONFIG_XFS_RT */
 22 /*
 23  * Attempts to allocate RT extents when RT is disable indicates corruption and
 24  * should trigger a shutdown.
 25  */
 26 static inline int
 27 xfs_bmap_rtalloc(struct xfs_bmalloca *ap)
 28 {
 29         return -EFSCORRUPTED;
 30 }
 31 #endif /* CONFIG_XFS_RT */
 32 
 33 void    xfs_bmap_punch_delalloc_range(struct xfs_inode *ip,
 34                 xfs_off_t start_byte, xfs_off_t end_byte);
 35 
 36 struct kgetbmap {
 37         __s64           bmv_offset;     /* file offset of segment in blocks */
 38         __s64           bmv_block;      /* starting block (64-bit daddr_t)  */
 39         __s64           bmv_length;     /* length of segment, blocks        */
 40         __s32           bmv_oflags;     /* output flags */
 41 };
 42 int     xfs_getbmap(struct xfs_inode *ip, struct getbmapx *bmv,
 43                 struct kgetbmap *out);
 44 
 45 /* functions in xfs_bmap.c that are only needed by xfs_bmap_util.c */
 46 int     xfs_bmap_extsize_align(struct xfs_mount *mp, struct xfs_bmbt_irec *gotp,
 47                                struct xfs_bmbt_irec *prevp, xfs_extlen_t extsz,
 48                                int rt, int eof, int delay, int convert,
 49                                xfs_fileoff_t *offp, xfs_extlen_t *lenp);
 50 bool    xfs_bmap_adjacent(struct xfs_bmalloca *ap);
 51 int     xfs_bmap_last_extent(struct xfs_trans *tp, struct xfs_inode *ip,
 52                              int whichfork, struct xfs_bmbt_irec *rec,
 53                              int *is_empty);
 54 
 55 /* preallocation and hole punch interface */
 56 int     xfs_alloc_file_space(struct xfs_inode *ip, xfs_off_t offset,
 57                              xfs_off_t len);
 58 int     xfs_free_file_space(struct xfs_inode *ip, xfs_off_t offset,
 59                             xfs_off_t len);
 60 int     xfs_collapse_file_space(struct xfs_inode *, xfs_off_t offset,
 61                                 xfs_off_t len);
 62 int     xfs_insert_file_space(struct xfs_inode *, xfs_off_t offset,
 63                                 xfs_off_t len);
 64 
 65 /* EOF block manipulation functions */
 66 bool    xfs_can_free_eofblocks(struct xfs_inode *ip);
 67 int     xfs_free_eofblocks(struct xfs_inode *ip);
 68 
 69 int     xfs_swap_extents(struct xfs_inode *ip, struct xfs_inode *tip,
 70                          struct xfs_swapext *sx);
 71 
 72 xfs_daddr_t xfs_fsb_to_db(struct xfs_inode *ip, xfs_fsblock_t fsb);
 73 
 74 xfs_extnum_t xfs_bmap_count_leaves(struct xfs_ifork *ifp, xfs_filblks_t *count);
 75 int xfs_bmap_count_blocks(struct xfs_trans *tp, struct xfs_inode *ip,
 76                           int whichfork, xfs_extnum_t *nextents,
 77                           xfs_filblks_t *count);
 78 
 79 int     xfs_flush_unmap_range(struct xfs_inode *ip, xfs_off_t offset,
 80                               xfs_off_t len);
 81 
 82 #endif  /* __XFS_BMAP_UTIL_H__ */
 83 

~ [ 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