#include "xfs.h"
#include "xfs_fs.h"
#include "xfs_shared.h"
#include "xfs_format.h"
#include "xfs_log_format.h"
#include "xfs_trans_resv.h"
#include "xfs_mount.h"
#include "xfs_inode.h"
#include "xfs_btree.h"
#include "xfs_bmap_btree.h"
#include "xfs_bmap.h"
#include "xfs_bmap_util.h"
#include "xfs_errortag.h"
#include "xfs_error.h"
#include "xfs_trans.h"
#include "xfs_trans_space.h"
#include "xfs_inode_item.h"
#include "xfs_iomap.h"
#include "xfs_trace.h"
#include "xfs_quota.h"
#include "xfs_dquot_item.h"
#include "xfs_dquot.h"
#include "xfs_reflink.h"
#include "xfs_health.h"
#include "xfs_rtbitmap.h"
#define XFS_ALLOC_ALIGN(mp, off) …
static int
xfs_alert_fsblock_zero(
xfs_inode_t *ip,
xfs_bmbt_irec_t *imap)
{ … }
u64
xfs_iomap_inode_sequence(
struct xfs_inode *ip,
u16 iomap_flags)
{ … }
static bool
xfs_iomap_valid(
struct inode *inode,
const struct iomap *iomap)
{ … }
static const struct iomap_folio_ops xfs_iomap_folio_ops = …;
int
xfs_bmbt_to_iomap(
struct xfs_inode *ip,
struct iomap *iomap,
struct xfs_bmbt_irec *imap,
unsigned int mapping_flags,
u16 iomap_flags,
u64 sequence_cookie)
{ … }
static void
xfs_hole_to_iomap(
struct xfs_inode *ip,
struct iomap *iomap,
xfs_fileoff_t offset_fsb,
xfs_fileoff_t end_fsb)
{ … }
static inline xfs_fileoff_t
xfs_iomap_end_fsb(
struct xfs_mount *mp,
loff_t offset,
loff_t count)
{ … }
static xfs_extlen_t
xfs_eof_alignment(
struct xfs_inode *ip)
{ … }
xfs_fileoff_t
xfs_iomap_eof_align_last_fsb(
struct xfs_inode *ip,
xfs_fileoff_t end_fsb)
{ … }
int
xfs_iomap_write_direct(
struct xfs_inode *ip,
xfs_fileoff_t offset_fsb,
xfs_fileoff_t count_fsb,
unsigned int flags,
struct xfs_bmbt_irec *imap,
u64 *seq)
{ … }
STATIC bool
xfs_quota_need_throttle(
struct xfs_inode *ip,
xfs_dqtype_t type,
xfs_fsblock_t alloc_blocks)
{ … }
STATIC void
xfs_quota_calc_throttle(
struct xfs_inode *ip,
xfs_dqtype_t type,
xfs_fsblock_t *qblocks,
int *qshift,
int64_t *qfreesp)
{ … }
static int64_t
xfs_iomap_freesp(
struct percpu_counter *counter,
uint64_t low_space[XFS_LOWSP_MAX],
int *shift)
{ … }
STATIC xfs_fsblock_t
xfs_iomap_prealloc_size(
struct xfs_inode *ip,
int whichfork,
loff_t offset,
loff_t count,
struct xfs_iext_cursor *icur)
{ … }
int
xfs_iomap_write_unwritten(
xfs_inode_t *ip,
xfs_off_t offset,
xfs_off_t count,
bool update_isize)
{ … }
static inline bool
imap_needs_alloc(
struct inode *inode,
unsigned flags,
struct xfs_bmbt_irec *imap,
int nimaps)
{ … }
static inline bool
imap_needs_cow(
struct xfs_inode *ip,
unsigned int flags,
struct xfs_bmbt_irec *imap,
int nimaps)
{ … }
static int
xfs_ilock_for_iomap(
struct xfs_inode *ip,
unsigned flags,
unsigned *lockmode)
{ … }
static bool
imap_spans_range(
struct xfs_bmbt_irec *imap,
xfs_fileoff_t offset_fsb,
xfs_fileoff_t end_fsb)
{ … }
static int
xfs_direct_write_iomap_begin(
struct inode *inode,
loff_t offset,
loff_t length,
unsigned flags,
struct iomap *iomap,
struct iomap *srcmap)
{ … }
const struct iomap_ops xfs_direct_write_iomap_ops = …;
static int
xfs_dax_write_iomap_end(
struct inode *inode,
loff_t pos,
loff_t length,
ssize_t written,
unsigned flags,
struct iomap *iomap)
{ … }
const struct iomap_ops xfs_dax_write_iomap_ops = …;
static int
xfs_buffered_write_iomap_begin(
struct inode *inode,
loff_t offset,
loff_t count,
unsigned flags,
struct iomap *iomap,
struct iomap *srcmap)
{ … }
static int
xfs_buffered_write_delalloc_punch(
struct inode *inode,
loff_t offset,
loff_t length)
{ … }
static int
xfs_buffered_write_iomap_end(
struct inode *inode,
loff_t offset,
loff_t length,
ssize_t written,
unsigned flags,
struct iomap *iomap)
{ … }
const struct iomap_ops xfs_buffered_write_iomap_ops = …;
const struct iomap_ops xfs_page_mkwrite_iomap_ops = …;
static int
xfs_read_iomap_begin(
struct inode *inode,
loff_t offset,
loff_t length,
unsigned flags,
struct iomap *iomap,
struct iomap *srcmap)
{ … }
const struct iomap_ops xfs_read_iomap_ops = …;
static int
xfs_seek_iomap_begin(
struct inode *inode,
loff_t offset,
loff_t length,
unsigned flags,
struct iomap *iomap,
struct iomap *srcmap)
{ … }
const struct iomap_ops xfs_seek_iomap_ops = …;
static int
xfs_xattr_iomap_begin(
struct inode *inode,
loff_t offset,
loff_t length,
unsigned flags,
struct iomap *iomap,
struct iomap *srcmap)
{ … }
const struct iomap_ops xfs_xattr_iomap_ops = …;
int
xfs_zero_range(
struct xfs_inode *ip,
loff_t pos,
loff_t len,
bool *did_zero)
{ … }
int
xfs_truncate_page(
struct xfs_inode *ip,
loff_t pos,
bool *did_zero)
{ … }