Lines Matching +full:data +full:- +full:mapping

1 /* SPDX-License-Identifier: GPL-2.0 */
32 #define IOMAP_INLINE 4 /* data inline in the inode */
38 * zeroing for areas that no data is copied to.
41 * written data and requires fdatasync to commit them to persistent storage.
52 * buffer heads for this mapping.
55 * rather than a file data extent.
90 #define IOMAP_NULL_ADDR -1ULL /* addr is not valid */
95 u64 addr; /* disk offset of mapping, bytes */
96 loff_t offset; /* file offset of mapping, bytes */
97 u64 length; /* length of mapping, bytes */
98 u16 type; /* type of mapping */
99 u16 flags; /* flags for mapping */
110 return (iomap->addr + pos - iomap->offset) >> SECTOR_SHIFT; in iomap_sector()
114 * Returns the inline data pointer for logical offset @pos.
118 return iomap->inline_data + pos - iomap->offset; in iomap_inline_data()
122 * Check if the mapping's length is within the valid range for inline data.
123 * This is used to guard against accessing data beyond the page inline_data
128 return iomap->length <= PAGE_SIZE - offset_in_page(iomap->inline_data); in iomap_inline_data_valid()
132 * When a filesystem sets folio_ops in an iomap mapping it returns, get_folio
155 * iomap->validity_cookie when the iomap is first mapped to be able to
156 * detect changes between mapping time and whenever .iomap_valid() is
171 #define IOMAP_FAULT (1 << 3) /* mapping for page fault */
177 #define IOMAP_DAX (1 << 8) /* DAX mapping */
184 * Return the existing mapping at pos, or reserve space starting at
185 * pos for up to length, as long as we can do it as a single mapping.
186 * The actual length is returned in iomap->length.
196 * Written might be zero if no data was written.
203 * struct iomap_iter - Iterate through a range of a file
206 * calls to iomap_iter(). Treat as read-only in the body.
229 * iomap_length - length of the current iomap iteration
236 u64 end = iter->iomap.offset + iter->iomap.length; in iomap_length()
238 if (iter->srcmap.type != IOMAP_HOLE) in iomap_length()
239 end = min(end, iter->srcmap.offset + iter->srcmap.length); in iomap_length()
240 return min(iter->len, end - iter->pos); in iomap_length()
244 * iomap_iter_srcmap - return the source map for the current iomap iteration
250 * map in &i->iomap.
254 if (i->srcmap.type != IOMAP_HOLE) in iomap_iter_srcmap()
255 return &i->srcmap; in iomap_iter_srcmap()
256 return &i->iomap; in iomap_iter_srcmap()
271 bool iomap_dirty_folio(struct address_space *mapping, struct folio *folio);
286 sector_t iomap_bmap(struct address_space *mapping, sector_t bno,
338 int iomap_writepages(struct address_space *mapping,
343 * Flags for direct I/O ->end_io:
356 * must provide a ->submit_io method that attaches the additional
357 * information to the bio and changes the ->bi_end_io callback to a
359 * relevant post-processing of the bio and end with a call to
373 * the caller by returning -EAGAIN. Used to optimize direct I/O writes that
402 # define iomap_swapfile_activate(sis, swapfile, pagespan, ops) (-EIO)