Home
last modified time | relevance | path

Searched full:extent (Results 1 – 25 of 377) sorted by relevance

12345678910>>...16

/linux/Documentation/filesystems/ext4/
H A Difork.rst38 led to the creation of the extent mapping scheme, discussed below.
43 Extent Tree
46 In ext4, the file to logical block map has been replaced with an extent
51 very large files with a single extent, at a considerable reduction in
60 points to a block containing more nodes in the extent tree. If the node
63 point to the file's data blocks. The root node of the extent tree is
67 The extent tree header is recorded in ``struct ext4_extent_header``,
93 - Depth of this extent node in the extent tree. 0 = this extent node
94 points to data blocks; otherwise, this extent node points to other
95 extent nodes. The extent tree can be at most 5 levels deep: a logical
[all …]
/linux/fs/xfs/libxfs/
H A Dxfs_inode_fork.h13 * File incore extent information, present for each of data & attr forks.
19 int if_height; /* height of the extent tree */
20 void *if_data; /* extent tree root or
29 * Worst-case increase in the fork extent count when we're adding a single
30 * extent to a fork and there's no possibility of splitting an existing mapping.
35 * Punching out an extent from the middle of an existing extent can cause the
36 * extent count to increase by 1.
37 * i.e. | Old extent | Hole | Old extent |
43 * be added. One extra extent for dabtree in case a local attr is
44 * large enough to cause a double split. It can also cause extent
[all …]
H A Dxfs_alloc.h27 #define XFS_ALLOC_FLAG_TRYFLUSH (1U << 5) /* don't wait in busy extent flush */
42 xfs_extlen_t minlen; /* minimum size of extent */
43 xfs_extlen_t maxlen; /* maximum size of extent */
44 xfs_extlen_t mod; /* mod value for extent size */
45 xfs_extlen_t prod; /* prod value for extent size */
52 xfs_extlen_t len; /* output: actual size of extent */
56 bool alloc_minlen_only; /* allocate exact minlen extent */
102 * Allocate an extent anywhere in the specific AG given. If there is no
108 * Allocate an extent as close to the target as possible. If there are not
115 * Allocate an extent exactly at the target given. If this is not possible
[all …]
H A Dxfs_rtbitmap.h36 /* Convert an rgbno into an rt extent number. */
69 /* Compute the misalignment between an extent length and a realtime extent .*/
92 /* Convert an rt block count into an rt extent count. */
104 /* Return the offset of a file block length within an rt extent. */
116 /* Round this block count up to the nearest rt extent size. */
125 /* Convert an rt block number into an rt extent number. */
138 /* Return the offset of a rtgroup block number within an rt extent. */
147 /* Return the offset of an rt block number within an rt extent. */
160 /* Round this file block offset up to the nearest rt extent size. */
169 /* Round this file block offset down to the nearest rt extent size. */
[all …]
H A Dxfs_refcount.c140 /* check for valid extent range, including overflow */ in xfs_refcount_check_irec()
161 /* check for valid extent range, including overflow */ in xfs_rtrefcount_check_irec()
351 * adjusted. For any extent that does cross a boundary, split it into
364 * extent with refcount == 1:
372 * For each extent that falls within the interval range, figure out
373 * which extent is to the left or the right of that extent. Now we
374 * have a left, current, and right extent. If the new reference count
375 * of the center extent enables us to merge left, center, and right
376 * into one record covering all three, do so. If the center extent is
377 * at the left end of the range, abuts the left extent, and its new
[all …]
/linux/Documentation/filesystems/
H A Dfiemap.rst8 extent mappings. Instead of block-by-block mapping (such as bmap), fiemap
22 those on disk - that is, the logical offset of the 1st returned extent
24 extent may end after fm_length. All offsets and lengths are in bytes.
55 Extent Mapping
58 Extent information is returned within the embedded fm_extents array
66 fm_extent_count. In that case, the last extent in the array will not
68 flag set (see the next section on extent flags).
70 Each extent is described by a single fiemap_extent structure as
83 The fe_flags field contains flags which describe the extent returned.
84 A special flag, FIEMAP_EXTENT_LAST is always set on the last extent in
[all …]
/linux/fs/btrfs/
H A Dfiemap.c37 * an extent range in order to prevent races with delalloc flushing and
38 * ordered extent completion, which is needed in order to reliably detect
42 * btrfs_page_mkwrite() will try to lock the same extent range.
53 * the next file extent item we must search for in the inode's subvolume
54 * tree after unlocking the extent range in the inode's io tree and
67 /* Fields for the cached extent (unsubmitted, not ready, extent). */
98 * Helper to submit fiemap extent.
100 * Will try to merge current fiemap extent specified by @offset, @phys,
103 * fiemap extent.
122 * find an extent that starts at an offset behind the end offset of the in emit_fiemap_extent()
[all …]
H A Dextent_map.c31 * Initialize the extent tree @tree. Should be called for each new inode or
72 /* Do the math around the end of an extent, handling wrapping. */
170 * Previous extent map found, return as in this case the caller does not in tree_search()
238 * extent maps of 2 (or more) adjacent extents merged, so factor it out. in mergeable_maps()
254 * @prev: left extent to merge
255 * @next: right extent to merge
256 * @merged: the extent we will not discard after the merge; updated with new values
258 * After this, one of the two extents is the new merged extent and the other is
263 * For now only uncompressed regular extent can be merged.
279 * 1) They are referring to the same data extent: in merge_ondisk_extents()
[all …]
H A Ddelayed-ref.h29 /* Record a full extent allocation */
38 /* Inode which refers to this data extent */
71 /* the starting bytenr of the extent */
74 /* the size of the extent */
99 * parent to have more than one ref on an extent
120 * the head refs are used to hold a lock on a given extent, which allows us
122 * at a time for a single extent. They also store the sum of all the
175 * when a new extent is allocated, it is just reserved in memory
176 * The actual extent isn't inserted into the extent allocation tree
181 * It is possible the extent will be freed before it is ever
[all …]
H A Ddefrag.c40 * The extent size threshold for autodefrag.
589 * Defrag specific helper to get an extent map.
602 * Return valid em if we find a file extent matching the requirement.
603 * Return NULL if we can not find a file extent matching the requirement.
663 /* Iterate through the path to find a file extent covering @start */ in defrag_get_extent()
680 /* It's beyond our target range, definitely not extent found */ in defrag_get_extent()
685 * | |<- File extent ->| in defrag_get_extent()
705 * |<- file extent ->| | in defrag_get_extent()
713 /* Now this extent covers @start, convert it to em */ in defrag_get_extent()
743 * Hopefully we have this extent in the tree already, try without the in defrag_lookup_extent()
[all …]
H A Draid-stripe-tree.c22 struct btrfs_stripe_extent *extent, AUTO_KFREE(newitem); in btrfs_partially_delete_raid_extent() local
44 extent = btrfs_item_ptr(leaf, slot, struct btrfs_stripe_extent); in btrfs_partially_delete_raid_extent()
47 struct btrfs_raid_stride *stride = &extent->strides[i]; in btrfs_partially_delete_raid_extent()
130 * The stripe extent starts before the range we want to delete, in btrfs_delete_raid_extent()
131 * but the range spans more than one stripe extent: in btrfs_delete_raid_extent()
133 * |--- RAID Stripe Extent ---||--- RAID Stripe Extent ---| in btrfs_delete_raid_extent()
174 * The stripe extent starts before the range we want to delete in btrfs_delete_raid_extent()
176 * punching a hole in the stripe extent: in btrfs_delete_raid_extent()
178 * |--- RAID Stripe Extent ---| in btrfs_delete_raid_extent()
188 struct btrfs_stripe_extent *extent; in btrfs_delete_raid_extent() local
[all …]
H A Dbackref.c20 #include "extent-tree.h"
119 * find one (some) with a reference to our extent item. in find_extent_in_eb()
157 * Checks for a shared extent during backref search.
171 * Counts number of inodes that refer to an extent (different inodes in
178 * The number of times we found our inode refers to the data extent we
179 * are determining the sharedness. In other words, how many file extent
181 * extent. The value we get here after finishing the extent sharedness
183 * than 1, then we know for sure the inode has multiple file extent
644 * corresponding extent data item. This can happen for example in the in resolve_indirect_ref()
648 * make sure we will find the matching file extent item at in resolve_indirect_ref()
[all …]
/linux/fs/ext4/
H A Dext4_extents.h37 * For non-inode extent blocks, ext4_extent_tail
42 * This is the extent tail on-disk structure.
43 * All other extent structures are 12 bytes long. It turns out that
53 * This is the extent on-disk structure.
57 __le32 ee_block; /* first logical block extent covers */
58 __le16 ee_len; /* number of blocks covered by extent */
101 * Array of ext4_ext_path contains path to some extent.
117 * of an extent while traversing the extent tree during space removal.
134 * initialized extent. This is 2^15 and not (2^16 - 1), since we use the
135 * MSB of ee_len field in the extent datastructure to signify if this
[all …]
H A Dextents.c40 * used by extent splitting.
168 * The extent buffer's verified bit will be set again in in ext4_ext_get_access()
488 error_msg = "invalid extent entries"; in __ext4_ext_check()
495 /* Verify checksum on non-root extent tree nodes */ in __ext4_ext_check()
498 error_msg = "extent tree corrupted"; in __ext4_ext_check()
506 "pblk %llu bad header/extent: %s - magic %x, " in __ext4_ext_check()
600 * This function is called to cache a file's extent information in the
601 * extent status tree
611 return 0; /* not an extent-mapped inode */ in ext4_ext_precache()
618 /* Don't cache anything if there are no external extent blocks */ in ext4_ext_precache()
[all …]
H A Dextents-test.c6 * extent split and conversion in ext4.
9 * 1. By splitting the extents in the extent tree and optionally converting them
12 * areas of the extent and marks the complete extent written.
18 * the split extent should be converted to initialized.
20 * ext4_split_convert_extents(), the split extent should be converted to
23 * to the unwritten areas of the extent and we should not corrupt/leak any
27 * extent tree, call ext4_split_convert_extents() and check the final state of
28 * the extent tree.
34 * Finally, we check the state of the extent tree and zeroout buffer to confirm
52 * Ext4 inode which has only 1 unwrit extent
[all …]
/linux/kernel/
H A Duser_namespace.c295 * map_id_range_down_base - Find idmap via binary search in static extent array.
307 /* Find the matching extent */ in map_id_range_down_base()
309 first = map->extent[idx].first; in map_id_range_down_base()
310 last = first + map->extent[idx].count - 1; in map_id_range_down_base()
313 return &map->extent[idx]; in map_id_range_down_base()
320 struct uid_gid_extent *extent; in map_id_range_down() local
325 extent = map_id_range_down_base(extents, map, id, count); in map_id_range_down()
327 extent = map_id_range_down_max(extents, map, id, count); in map_id_range_down()
330 if (extent) in map_id_range_down()
331 id = (id - extent->first) + extent->lower_first; in map_id_range_down()
[all …]
/linux/fs/btrfs/tests/
H A Dfree-space-tests.c16 * This test just does basic sanity checking, making sure we can add an extent
18 * remove space that covers adjacent extent entries.
24 test_msg("running extent only tests"); in test_extents()
35 test_err("error removing extent %d", ret); in test_extents()
47 test_err("error adding half extent %d", ret); in test_extents()
164 test_msg("running bitmap and extent tests"); in test_bitmaps_and_extents()
167 * First let's do something simple, an extent at the same offset as the in test_bitmaps_and_extents()
168 * bitmap, but the free space completely in the extent and then in test_bitmaps_and_extents()
179 test_err("couldn't add extent entry %d", ret); in test_bitmaps_and_extents()
185 test_err("couldn't remove extent entry %d", ret); in test_bitmaps_and_extents()
[all …]
H A Draid-stripe-tree-tests.c82 test_err("inserting RAID extent failed: %d", ret); in test_punch_hole_3extents()
103 test_err("inserting RAID extent failed: %d", ret); in test_punch_hole_3extents()
124 test_err("inserting RAID extent failed: %d", ret); in test_punch_hole_3extents()
129 * Delete a range starting at logical1 + 256K and 2M in length. Extent in test_punch_hole_3extents()
130 * 1 is truncated to 256k length, extent 2 is completely dropped and in test_punch_hole_3extents()
131 * extent 3 is moved 256K to the right. in test_punch_hole_3extents()
135 test_err("deleting RAID extent [%llu, %llu] failed", in test_punch_hole_3extents()
140 /* Get the first extent and check its size. */ in test_punch_hole_3extents()
144 test_err("lookup of RAID extent [%llu, %llu] failed", in test_punch_hole_3extents()
163 /* Get the second extent and check it's absent. */ in test_punch_hole_3extents()
[all …]
H A Dextent-map-tests.c49 * Suppose that no extent map has been loaded into memory yet, there is a file
50 * extent [0, 16K), followed by another file extent [16K, 20K), two dio reads
87 test_err("cannot add extent range [0, 16K)"); in test_case_1()
109 test_err("cannot add extent range [16K, 20K)"); in test_case_1()
135 test_err("case1 [%llu %llu]: no extent map returned", in test_case_1()
161 * extent and discard page cache and read it again.
177 * Add [0, 1K) which is inlined. And the extent map length must in test_case_2()
189 test_err("cannot add extent range [0, 1K)"); in test_case_2()
211 test_err("cannot add extent range [4K, 8K)"); in test_case_2()
237 test_err("case2 [0 1K]: no extent map returned"); in test_case_2()
[all …]
/linux/fs/jfs/
H A Djfs_extent.c50 * FUNCTION: allocate an extent for a specified page range within a
55 * xlen - requested extent length.
58 * extent that is used as an allocation hint if the
60 * the xad describes the newly allocated extent.
61 * abnr - bool indicating whether the newly allocated extent
88 /* validate extent length */ in extAlloc()
92 /* get the page's starting extent offset */ in extAlloc()
97 /* get the size of the extent described by the hint */ in extAlloc()
102 * request and if hint extent has the same abnr in extAlloc()
104 * extend the hint extent to include the current in extAlloc()
[all …]
H A Djfs_imap.h14 #define EXTSPERIAG 128 /* number of disk inode extent per iag */
19 #define PGSPERIEXT 4 /* number of 4K pages per dinode extent */
32 /* get the starting block number of the 4K page of an inode extent
54 __le32 extfreefwd; /* 4: ag inode extent free list forward */
55 __le32 extfreeback; /* 4: ag inode extent free list back */
58 /* summary map: 1 bit per inode extent */
61 * inodes, if the extent is not backed the
62 * value will be 1. if the extent is
64 * value will be 1. if the extent is
76 pxd_t inoext[EXTSPERIAG]; /* 1024: inode extent addresses */
[all …]
/linux/fs/xfs/
H A Dxfs_discard.c32 * still marked as busy. To serialise against extent state changes whilst we are
34 * allocations and extent free operations that might change extent state.
40 * extent can take a *long* time. Whilst we are doing this walk, nothing else
52 * state of the free extent is out of our control and we cannot run a discard
54 * extent as busy and undergoing a discard operation whilst we held the AGF
58 * they are freed, and once the extent free has been committed to the journal,
59 * the busy extent record is marked as "undergoing discard" and the discard is
60 * then issued on the free extent. Once the discard completes, the busy extent
61 * record is removed and the extent is able to be allocated again.
63 * In the context of fstrim, if we find a free extent we need to discard, we
[all …]
/linux/include/uapi/linux/
H A Dfiemap.h18 * struct fiemap_extent - description of one fiemap extent
19 * @fe_logical: byte offset of the extent in the file
20 * @fe_physical: byte offset of extent on disk
21 * @fe_length: length in bytes for this extent
22 * @fe_flags: FIEMAP_EXTENT_* flags for this extent
37 * struct fiemap - file extent mappings
67 #define FIEMAP_EXTENT_LAST 0x00000001 /* Last extent in file. */
75 #define FIEMAP_EXTENT_NOT_ALIGNED 0x00000100 /* Extent offsets may not be
/linux/arch/s390/include/uapi/asm/
H A Dvtoc.h68 __u8 typeind; /* extent type indicator */
69 __u8 seqno; /* extent sequence number */
70 struct vtoc_cchh llimit; /* starting point of this extent */
71 struct vtoc_cchh ulimit; /* ending point of this extent */
118 struct vtoc_extent DS1EXT1; /* first extent description */
119 struct vtoc_extent DS1EXT2; /* second extent description */
120 struct vtoc_extent DS1EXT3; /* third extent description */
146 struct vtoc_extent DS4VTOCE; /* VTOC extent description */
159 __u16 t; /* RTA of the first track of free extent */
167 struct vtoc_ds5ext DS5AVEXT; /* first available (free-space) extent. */
[all …]
/linux/fs/nfsd/
H A Dblocklayoutxdr.c18 * nfsd4_block_encode_layoutget - encode block/scsi layout extent array
133 * nfsd4_block_decode_layoutupdate - decode the block layout extent array
135 * @iomapp: pointer to store the decoded extent array
137 * @block_size: alignment of extent offset and length
142 * the file offset, storage offset and length of each extent are aligned
148 * %nfserr_inval: An unaligned extent found
228 * nfsd4_scsi_decode_layoutupdate - decode the scsi layout extent array
230 * @iomapp: pointer to store the decoded extent array
232 * @block_size: alignment of extent offset and length
237 * the offset and length of each extent are aligned by @block_size.
[all …]

12345678910>>...16