sphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget&/translations/zh_CN/filesystems/fiemapmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget&/translations/zh_TW/filesystems/fiemapmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget&/translations/it_IT/filesystems/fiemapmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget&/translations/ja_JP/filesystems/fiemapmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget&/translations/ko_KR/filesystems/fiemapmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget&/translations/sp_SP/filesystems/fiemapmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhcomment)}(h SPDX-License-Identifier: GPL-2.0h]h SPDX-License-Identifier: GPL-2.0}hhsbah}(h]h ]h"]h$]h&] xml:spacepreserveuh1hhhhhh@/var/lib/git/docbuild/linux/Documentation/filesystems/fiemap.rsthKubhsection)}(hhh](htitle)}(h Fiemap Ioctlh]h Fiemap Ioctl}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh paragraph)}(hThe fiemap ioctl is an efficient method for userspace to get file extent mappings. Instead of block-by-block mapping (such as bmap), fiemap returns a list of extents.h]hThe fiemap ioctl is an efficient method for userspace to get file extent mappings. Instead of block-by-block mapping (such as bmap), fiemap returns a list of extents.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hhh](h)}(hRequest Basicsh]hRequest Basics}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhK ubh)}(h1A fiemap request is encoded within struct fiemap:h]h1A fiemap request is encoded within struct fiemap:}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubhindex)}(hhh]h}(h]h ]h"]h$]h&]entries](singlefiemap (C struct)c.fiemaphNtauh1hhhhhhNhNubhdesc)}(hhh](hdesc_signature)}(hfiemaph]hdesc_signature_line)}(h struct fiemaph](hdesc_sig_keyword)}(hstructh]hstruct}(hjhhhNhNubah}(h]h ]kah"]h$]h&]uh1jhjhhh^/var/lib/git/docbuild/linux/Documentation/filesystems/fiemap:17: ./include/uapi/linux/fiemap.hhKubhdesc_sig_space)}(h h]h }(hj.hhhNhNubah}(h]h ]wah"]h$]h&]uh1j,hjhhhj+hKubh desc_name)}(hfiemaph]h desc_sig_name)}(hjh]hfiemap}(hjEhhhNhNubah}(h]h ]nah"]h$]h&]uh1jChj?ubah}(h]h ](sig-namedescnameeh"]h$]h&]hhuh1j=hjhhhj+hKubeh}(h]h ]h"]h$]h&]hh add_permalinkuh1jsphinx_line_type declaratorhjhhhj+hKubah}(h]jah ](sig sig-objecteh"]h$]h&] is_multiline _toc_parts) _toc_namehuh1jhj+hKhj hhubh desc_content)}(hhh]h)}(hfile extent mappingsh]hfile extent mappings}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/filesystems/fiemap:17: ./include/uapi/linux/fiemap.hhK%hjqhhubah}(h]h ]h"]h$]h&]uh1johj hhhj+hKubeh}(h]h ](cstructeh"]h$]h&]domainjobjtypejdesctypejnoindex noindexentrynocontentsentryuh1j hhhhhNhNubh container)}(hXJ**Definition**:: struct fiemap { __u64 fm_start; __u64 fm_length; __u32 fm_flags; __u32 fm_mapped_extents; __u32 fm_extent_count; struct fiemap_extent fm_extents[]; }; **Members** ``fm_start`` byte offset (inclusive) at which to start mapping (in) ``fm_length`` logical length of mapping which userspace wants (in) ``fm_flags`` FIEMAP_FLAG_* flags for request (in/out) ``fm_mapped_extents`` number of extents that were mapped (out) ``fm_extent_count`` size of fm_extents array (in) ``fm_extents`` array of mapped extents (out)h](h)}(h**Definition**::h](hstrong)}(h**Definition**h]h Definition}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/filesystems/fiemap:17: ./include/uapi/linux/fiemap.hhK)hjubh literal_block)}(hstruct fiemap { __u64 fm_start; __u64 fm_length; __u32 fm_flags; __u32 fm_mapped_extents; __u32 fm_extent_count; struct fiemap_extent fm_extents[]; };h]hstruct fiemap { __u64 fm_start; __u64 fm_length; __u32 fm_flags; __u32 fm_mapped_extents; __u32 fm_extent_count; struct fiemap_extent fm_extents[]; };}hjsbah}(h]h ]h"]h$]h&]hhuh1jh^/var/lib/git/docbuild/linux/Documentation/filesystems/fiemap:17: ./include/uapi/linux/fiemap.hhK+hjubh)}(h **Members**h]j)}(hjh]hMembers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/filesystems/fiemap:17: ./include/uapi/linux/fiemap.hhK4hjubhdefinition_list)}(hhh](hdefinition_list_item)}(hD``fm_start`` byte offset (inclusive) at which to start mapping (in) h](hterm)}(h ``fm_start``h]hliteral)}(hjh]hfm_start}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/filesystems/fiemap:17: ./include/uapi/linux/fiemap.hhK'hjubh definition)}(hhh]h)}(h6byte offset (inclusive) at which to start mapping (in)h]h6byte offset (inclusive) at which to start mapping (in)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hK'hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1jhj hK'hjubj)}(hC``fm_length`` logical length of mapping which userspace wants (in) h](j)}(h ``fm_length``h]j)}(hj1h]h fm_length}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj/ubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/filesystems/fiemap:17: ./include/uapi/linux/fiemap.hhK(hj+ubj )}(hhh]h)}(h4logical length of mapping which userspace wants (in)h]h4logical length of mapping which userspace wants (in)}(hjJhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjFhK(hjGubah}(h]h ]h"]h$]h&]uh1j hj+ubeh}(h]h ]h"]h$]h&]uh1jhjFhK(hjubj)}(h6``fm_flags`` FIEMAP_FLAG_* flags for request (in/out) h](j)}(h ``fm_flags``h]j)}(hjjh]hfm_flags}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjhubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/filesystems/fiemap:17: ./include/uapi/linux/fiemap.hhK)hjdubj )}(hhh]h)}(h(FIEMAP_FLAG_* flags for request (in/out)h]h(FIEMAP_FLAG_* flags for request (in/out)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK)hjubah}(h]h ]h"]h$]h&]uh1j hjdubeh}(h]h ]h"]h$]h&]uh1jhjhK)hjubj)}(h?``fm_mapped_extents`` number of extents that were mapped (out) h](j)}(h``fm_mapped_extents``h]j)}(hjh]hfm_mapped_extents}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/filesystems/fiemap:17: ./include/uapi/linux/fiemap.hhK*hjubj )}(hhh]h)}(h(number of extents that were mapped (out)h]h(number of extents that were mapped (out)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK*hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1jhjhK*hjubj)}(h2``fm_extent_count`` size of fm_extents array (in) h](j)}(h``fm_extent_count``h]j)}(hjh]hfm_extent_count}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/filesystems/fiemap:17: ./include/uapi/linux/fiemap.hhK+hjubj )}(hhh]h)}(hsize of fm_extents array (in)h]hsize of fm_extents array (in)}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhK+hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1jhjhK+hjubj)}(h,``fm_extents`` array of mapped extents (out)h](j)}(h``fm_extents``h]j)}(hjh]h fm_extents}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/filesystems/fiemap:17: ./include/uapi/linux/fiemap.hhK+hjubj )}(hhh]h)}(harray of mapped extents (out)h]harray of mapped extents (out)}(hj.hhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/filesystems/fiemap:17: ./include/uapi/linux/fiemap.hhK,hj+ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1jhj*hK+hjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhhhhhNhNubh)}(hXWfm_start, and fm_length specify the logical range within the file which the process would like mappings for. Extents returned mirror those on disk - that is, the logical offset of the 1st returned extent may start before fm_start, and the range covered by the last returned extent may end after fm_length. All offsets and lengths are in bytes.h]hXWfm_start, and fm_length specify the logical range within the file which the process would like mappings for. Extents returned mirror those on disk - that is, the logical offset of the 1st returned extent may start before fm_start, and the range covered by the last returned extent may end after fm_length. All offsets and lengths are in bytes.}(hjVhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hX<Certain flags to modify the way in which mappings are looked up can be set in fm_flags. If the kernel doesn't understand some particular flags, it will return EBADR and the contents of fm_flags will contain the set of flags which caused the error. If the kernel is compatible with all flags passed, the contents of fm_flags will be unmodified. It is up to userspace to determine whether rejection of a particular flag is fatal to its operation. This scheme is intended to allow the fiemap interface to grow in the future but without losing compatibility with old software.h]hX>Certain flags to modify the way in which mappings are looked up can be set in fm_flags. If the kernel doesn’t understand some particular flags, it will return EBADR and the contents of fm_flags will contain the set of flags which caused the error. If the kernel is compatible with all flags passed, the contents of fm_flags will be unmodified. It is up to userspace to determine whether rejection of a particular flag is fatal to its operation. This scheme is intended to allow the fiemap interface to grow in the future but without losing compatibility with old software.}(hjdhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hXfm_extent_count specifies the number of elements in the fm_extents[] array that can be used to return extents. If fm_extent_count is zero, then the fm_extents[] array is ignored (no extents will be returned), and the fm_mapped_extents count will hold the number of extents needed in fm_extents[] to hold the file's current mapping. Note that there is nothing to prevent the file from changing between calls to FIEMAP.h]hXfm_extent_count specifies the number of elements in the fm_extents[] array that can be used to return extents. If fm_extent_count is zero, then the fm_extents[] array is ignored (no extents will be returned), and the fm_mapped_extents count will hold the number of extents needed in fm_extents[] to hold the file’s current mapping. Note that there is nothing to prevent the file from changing between calls to FIEMAP.}(hjrhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK$hhhhubh)}(h+The following flags can be set in fm_flags:h]h+The following flags can be set in fm_flags:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK+hhhhubj)}(hhh](j)}(h\FIEMAP_FLAG_SYNC If this flag is set, the kernel will sync the file before mapping extents. h](j)}(hFIEMAP_FLAG_SYNCh]hFIEMAP_FLAG_SYNC}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhK.hjubj )}(hhh]h)}(hJIf this flag is set, the kernel will sync the file before mapping extents.h]hJIf this flag is set, the kernel will sync the file before mapping extents.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK.hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1jhhhK.hjubj)}(hFIEMAP_FLAG_XATTR If this flag is set, the extents returned will describe the inodes extended attribute lookup tree, instead of its data tree. h](j)}(hFIEMAP_FLAG_XATTRh]hFIEMAP_FLAG_XATTR}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhK2hjubj )}(hhh]h)}(h|If this flag is set, the extents returned will describe the inodes extended attribute lookup tree, instead of its data tree.h]h|If this flag is set, the extents returned will describe the inodes extended attribute lookup tree, instead of its data tree.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK1hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1jhhhK2hjhhubj)}(h=FIEMAP_FLAG_CACHE This flag requests caching of the extents. h](j)}(hFIEMAP_FLAG_CACHEh]hFIEMAP_FLAG_CACHE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhK5hjubj )}(hhh]h)}(h*This flag requests caching of the extents.h]h*This flag requests caching of the extents.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK5hjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1jhhhK5hjhhubeh}(h]h ]h"]h$]h&]uh1jhhhhhhhNubeh}(h]request-basicsah ]h"]request basicsah$]h&]uh1hhhhhhhhK ubh)}(hhh](h)}(hExtent Mappingh]hExtent Mapping}(hj/hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj,hhhhhK8ubh)}(hXExtent information is returned within the embedded fm_extents array which userspace must allocate along with the fiemap structure. The number of elements in the fiemap_extents[] array should be passed via fm_extent_count. The number of extents mapped by kernel will be returned via fm_mapped_extents. If the number of fiemap_extents allocated is less than would be required to map the requested range, the maximum number of extents that can be mapped in the fm_extent[] array will be returned and fm_mapped_extents will be equal to fm_extent_count. In that case, the last extent in the array will not complete the requested range and will not have the FIEMAP_EXTENT_LAST flag set (see the next section on extent flags).h]hXExtent information is returned within the embedded fm_extents array which userspace must allocate along with the fiemap structure. The number of elements in the fiemap_extents[] array should be passed via fm_extent_count. The number of extents mapped by kernel will be returned via fm_mapped_extents. If the number of fiemap_extents allocated is less than would be required to map the requested range, the maximum number of extents that can be mapped in the fm_extent[] array will be returned and fm_mapped_extents will be equal to fm_extent_count. In that case, the last extent in the array will not complete the requested range and will not have the FIEMAP_EXTENT_LAST flag set (see the next section on extent flags).}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK:hj,hhubh)}(hWEach extent is described by a single fiemap_extent structure as returned in fm_extents:h]hWEach extent is described by a single fiemap_extent structure as returned in fm_extents:}(hjKhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKFhj,hhubh)}(hhh]h}(h]h ]h"]h$]h&]entries](jfiemap_extent (C struct)c.fiemap_extenthNtauh1hhj,hhhNhNubj )}(hhh](j)}(h fiemap_extenth]j)}(hstruct fiemap_extenth](j)}(hjh]hstruct}(hjrhhhNhNubah}(h]h ]j'ah"]h$]h&]uh1jhjnhhh^/var/lib/git/docbuild/linux/Documentation/filesystems/fiemap:73: ./include/uapi/linux/fiemap.hhKubj-)}(h h]h }(hjhhhNhNubah}(h]h ]j9ah"]h$]h&]uh1j,hjnhhhjhKubj>)}(h fiemap_extenth]jD)}(hjlh]h fiemap_extent}(hjhhhNhNubah}(h]h ]jOah"]h$]h&]uh1jChjubah}(h]h ](jVjWeh"]h$]h&]hhuh1j=hjnhhhjhKubeh}(h]h ]h"]h$]h&]hhjauh1jjbjchjjhhhjhKubah}(h]jeah ](jgjheh"]h$]h&]jljm)jnhuh1jhjhKhjghhubjp)}(hhh]h)}(h description of one fiemap extenth]h description of one fiemap extent}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/filesystems/fiemap:73: ./include/uapi/linux/fiemap.hhKhjhhubah}(h]h ]h"]h$]h&]uh1johjghhhjhKubeh}(h]h ](jstructeh"]h$]h&]jjjjjjjjjuh1j hhhj,hNhNubj)}(hXj**Definition**:: struct fiemap_extent { __u64 fe_logical; __u64 fe_physical; __u64 fe_length; __u32 fe_flags; }; **Members** ``fe_logical`` byte offset of the extent in the file ``fe_physical`` byte offset of extent on disk ``fe_length`` length in bytes for this extent ``fe_flags`` FIEMAP_EXTENT_* flags for this extenth](h)}(h**Definition**::h](j)}(h**Definition**h]h Definition}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubh:}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/filesystems/fiemap:73: ./include/uapi/linux/fiemap.hhKhjubj)}(hostruct fiemap_extent { __u64 fe_logical; __u64 fe_physical; __u64 fe_length; __u32 fe_flags; };h]hostruct fiemap_extent { __u64 fe_logical; __u64 fe_physical; __u64 fe_length; __u32 fe_flags; };}hjsbah}(h]h ]h"]h$]h&]hhuh1jh^/var/lib/git/docbuild/linux/Documentation/filesystems/fiemap:73: ./include/uapi/linux/fiemap.hhKhjubh)}(h **Members**h]j)}(hjh]hMembers}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/filesystems/fiemap:73: ./include/uapi/linux/fiemap.hhKhjubj)}(hhh](j)}(h5``fe_logical`` byte offset of the extent in the file h](j)}(h``fe_logical``h]j)}(hj!h]h fe_logical}(hj#hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/filesystems/fiemap:73: ./include/uapi/linux/fiemap.hhKhjubj )}(hhh]h)}(h%byte offset of the extent in the fileh]h%byte offset of the extent in the file}(hj:hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj6hKhj7ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1jhj6hKhjubj)}(h.``fe_physical`` byte offset of extent on disk h](j)}(h``fe_physical``h]j)}(hjZh]h fe_physical}(hj\hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjXubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/filesystems/fiemap:73: ./include/uapi/linux/fiemap.hhKhjTubj )}(hhh]h)}(hbyte offset of extent on diskh]hbyte offset of extent on disk}(hjshhhNhNubah}(h]h ]h"]h$]h&]uh1hhjohKhjpubah}(h]h ]h"]h$]h&]uh1j hjTubeh}(h]h ]h"]h$]h&]uh1jhjohKhjubj)}(h.``fe_length`` length in bytes for this extent h](j)}(h ``fe_length``h]j)}(hjh]h fe_length}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/filesystems/fiemap:73: ./include/uapi/linux/fiemap.hhKhjubj )}(hhh]h)}(hlength in bytes for this extenth]hlength in bytes for this extent}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhKhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1jhjhKhjubj)}(h2``fe_flags`` FIEMAP_EXTENT_* flags for this extenth](j)}(h ``fe_flags``h]j)}(hjh]hfe_flags}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jh^/var/lib/git/docbuild/linux/Documentation/filesystems/fiemap:73: ./include/uapi/linux/fiemap.hhKhjubj )}(hhh]h)}(h%FIEMAP_EXTENT_* flags for this extenth]h%FIEMAP_EXTENT_* flags for this extent}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hh^/var/lib/git/docbuild/linux/Documentation/filesystems/fiemap:73: ./include/uapi/linux/fiemap.hhKhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1jhjhKhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ] kernelindentah"]h$]h&]uh1jhj,hhhNhNubh)}(hXAll offsets and lengths are in bytes and mirror those on disk. It is valid for an extents logical offset to start before the request or its logical length to extend past the request. Unless FIEMAP_EXTENT_NOT_ALIGNED is returned, fe_logical, fe_physical, and fe_length will be aligned to the block size of the file system. With the exception of extents flagged as FIEMAP_EXTENT_MERGED, adjacent extents will not be merged.h]hXAll offsets and lengths are in bytes and mirror those on disk. It is valid for an extents logical offset to start before the request or its logical length to extend past the request. Unless FIEMAP_EXTENT_NOT_ALIGNED is returned, fe_logical, fe_physical, and fe_length will be aligned to the block size of the file system. With the exception of extents flagged as FIEMAP_EXTENT_MERGED, adjacent extents will not be merged.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKLhj,hhubh)}(hXThe fe_flags field contains flags which describe the extent returned. A special flag, FIEMAP_EXTENT_LAST is always set on the last extent in the file so that the process making fiemap calls can determine when no more extents are available, without having to call the ioctl again.h]hXThe fe_flags field contains flags which describe the extent returned. A special flag, FIEMAP_EXTENT_LAST is always set on the last extent in the file so that the process making fiemap calls can determine when no more extents are available, without having to call the ioctl again.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKShj,hhubh)}(hSome flags are intentionally vague and will always be set in the presence of other more specific flags. This way a program looking for a general property does not have to know all existing and future flags which imply that property.h]hSome flags are intentionally vague and will always be set in the presence of other more specific flags. This way a program looking for a general property does not have to know all existing and future flags which imply that property.}(hj)hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKXhj,hhubh)}(hXFor example, if FIEMAP_EXTENT_DATA_INLINE or FIEMAP_EXTENT_DATA_TAIL are set, FIEMAP_EXTENT_NOT_ALIGNED will also be set. A program looking for inline or tail-packed data can key on the specific flag. Software which simply cares not to try operating on non-aligned extents however, can just key on FIEMAP_EXTENT_NOT_ALIGNED, and not have to worry about all present and future flags which might imply unaligned data. Note that the opposite is not true - it would be valid for FIEMAP_EXTENT_NOT_ALIGNED to appear alone.h]hXFor example, if FIEMAP_EXTENT_DATA_INLINE or FIEMAP_EXTENT_DATA_TAIL are set, FIEMAP_EXTENT_NOT_ALIGNED will also be set. A program looking for inline or tail-packed data can key on the specific flag. Software which simply cares not to try operating on non-aligned extents however, can just key on FIEMAP_EXTENT_NOT_ALIGNED, and not have to worry about all present and future flags which might imply unaligned data. Note that the opposite is not true - it would be valid for FIEMAP_EXTENT_NOT_ALIGNED to appear alone.}(hj7hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK]hj,hhubj)}(hhh](j)}(hFIEMAP_EXTENT_LAST This is generally the last extent in the file. A mapping attempt past this extent may return nothing. Some implementations set this flag to indicate this extent is the last one in the range queried by the user (via fiemap->fm_length). h](j)}(hFIEMAP_EXTENT_LASTh]hFIEMAP_EXTENT_LAST}(hjLhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKjhjHubj )}(hhh]h)}(hThis is generally the last extent in the file. A mapping attempt past this extent may return nothing. Some implementations set this flag to indicate this extent is the last one in the range queried by the user (via fiemap->fm_length).h]hThis is generally the last extent in the file. A mapping attempt past this extent may return nothing. Some implementations set this flag to indicate this extent is the last one in the range queried by the user (via fiemap->fm_length).}(hj]hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKghjZubah}(h]h ]h"]h$]h&]uh1j hjHubeh}(h]h ]h"]h$]h&]uh1jhhhKjhjEubj)}(hFIEMAP_EXTENT_UNKNOWN The location of this extent is currently unknown. This may indicate the data is stored on an inaccessible volume or that no storage has been allocated for the file yet. h](j)}(hFIEMAP_EXTENT_UNKNOWNh]hFIEMAP_EXTENT_UNKNOWN}(hj{hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKohjwubj )}(hhh]h)}(hThe location of this extent is currently unknown. This may indicate the data is stored on an inaccessible volume or that no storage has been allocated for the file yet.h]hThe location of this extent is currently unknown. This may indicate the data is stored on an inaccessible volume or that no storage has been allocated for the file yet.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKmhjubah}(h]h ]h"]h$]h&]uh1j hjwubeh}(h]h ]h"]h$]h&]uh1jhhhKohjEhhubj)}(hFIEMAP_EXTENT_DELALLOC This will also set FIEMAP_EXTENT_UNKNOWN. Delayed allocation - while there is data for this extent, its physical location has not been allocated yet. h](j)}(hFIEMAP_EXTENT_DELALLOCh]hFIEMAP_EXTENT_DELALLOC}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKuhjubj )}(hhh](h)}(h)This will also set FIEMAP_EXTENT_UNKNOWN.h]h)This will also set FIEMAP_EXTENT_UNKNOWN.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKrhjubh)}(hkDelayed allocation - while there is data for this extent, its physical location has not been allocated yet.h]hkDelayed allocation - while there is data for this extent, its physical location has not been allocated yet.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKthjubeh}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1jhhhKuhjEhhubj)}(hFIEMAP_EXTENT_ENCODED This extent does not consist of plain filesystem blocks but is encoded (e.g. encrypted or compressed). Reading the data in this extent via I/O to the block device will have undefined results. h](j)}(hFIEMAP_EXTENT_ENCODEDh]hFIEMAP_EXTENT_ENCODED}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKzhjubj )}(hhh]h)}(hThis extent does not consist of plain filesystem blocks but is encoded (e.g. encrypted or compressed). Reading the data in this extent via I/O to the block device will have undefined results.h]hThis extent does not consist of plain filesystem blocks but is encoded (e.g. encrypted or compressed). Reading the data in this extent via I/O to the block device will have undefined results.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKxhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1jhhhKzhjEhhubeh}(h]h ]h"]h$]h&]uh1jhj,hhhhhNubh)}(hX4Note that it is *always* undefined to try to update the data in-place by writing to the indicated location without the assistance of the filesystem, or to access the data using the information returned by the FIEMAP interface while the filesystem is mounted. In other words, user applications may only read the extent data via I/O to the block device while the filesystem is unmounted, and then only if the FIEMAP_EXTENT_ENCODED flag is clear; user applications must not try reading or writing to the filesystem via the block device under any other circumstances.h](hNote that it is }(hjhhhNhNubhemphasis)}(h*always*h]halways}(hj"hhhNhNubah}(h]h ]h"]h$]h&]uh1j hjubhX undefined to try to update the data in-place by writing to the indicated location without the assistance of the filesystem, or to access the data using the information returned by the FIEMAP interface while the filesystem is mounted. In other words, user applications may only read the extent data via I/O to the block device while the filesystem is unmounted, and then only if the FIEMAP_EXTENT_ENCODED flag is clear; user applications must not try reading or writing to the filesystem via the block device under any other circumstances.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK|hj,hhubj)}(hhh](j)}(hFIEMAP_EXTENT_DATA_ENCRYPTED This will also set FIEMAP_EXTENT_ENCODED The data in this extent has been encrypted by the file system. h](j)}(hFIEMAP_EXTENT_DATA_ENCRYPTEDh]hFIEMAP_EXTENT_DATA_ENCRYPTED}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhj=ubj )}(hhh]h)}(hgThis will also set FIEMAP_EXTENT_ENCODED The data in this extent has been encrypted by the file system.h]hgThis will also set FIEMAP_EXTENT_ENCODED The data in this extent has been encrypted by the file system.}(hjRhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjOubah}(h]h ]h"]h$]h&]uh1j hj=ubeh}(h]h ]h"]h$]h&]uh1jhhhKhj:ubj)}(h\FIEMAP_EXTENT_NOT_ALIGNED Extent offsets and length are not guaranteed to be block aligned. h](j)}(hFIEMAP_EXTENT_NOT_ALIGNEDh]hFIEMAP_EXTENT_NOT_ALIGNED}(hjphhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjlubj )}(hhh]h)}(hAExtent offsets and length are not guaranteed to be block aligned.h]hAExtent offsets and length are not guaranteed to be block aligned.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj~ubah}(h]h ]h"]h$]h&]uh1j hjlubeh}(h]h ]h"]h$]h&]uh1jhhhKhj:hhubj)}(hqFIEMAP_EXTENT_DATA_INLINE This will also set FIEMAP_EXTENT_NOT_ALIGNED Data is located within a meta data block. h](j)}(hFIEMAP_EXTENT_DATA_INLINEh]hFIEMAP_EXTENT_DATA_INLINE}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjubj )}(hhh]h)}(hVThis will also set FIEMAP_EXTENT_NOT_ALIGNED Data is located within a meta data block.h]hVThis will also set FIEMAP_EXTENT_NOT_ALIGNED Data is located within a meta data block.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1jhhhKhj:hhubj)}(h}FIEMAP_EXTENT_DATA_TAIL This will also set FIEMAP_EXTENT_NOT_ALIGNED Data is packed into a block with data from other files. h](j)}(hFIEMAP_EXTENT_DATA_TAILh]hFIEMAP_EXTENT_DATA_TAIL}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjubj )}(hhh]h)}(hdThis will also set FIEMAP_EXTENT_NOT_ALIGNED Data is packed into a block with data from other files.h]hdThis will also set FIEMAP_EXTENT_NOT_ALIGNED Data is packed into a block with data from other files.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1jhhhKhj:hhubj)}(hFIEMAP_EXTENT_UNWRITTEN Unwritten extent - the extent is allocated but its data has not been initialized. This indicates the extent's data will be all zero if read through the filesystem but the contents are undefined if read directly from the device. h](j)}(hFIEMAP_EXTENT_UNWRITTENh]hFIEMAP_EXTENT_UNWRITTEN}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjubj )}(hhh]h)}(hUnwritten extent - the extent is allocated but its data has not been initialized. This indicates the extent's data will be all zero if read through the filesystem but the contents are undefined if read directly from the device.h]hUnwritten extent - the extent is allocated but its data has not been initialized. This indicates the extent’s data will be all zero if read through the filesystem but the contents are undefined if read directly from the device.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj ubah}(h]h ]h"]h$]h&]uh1j hjubeh}(h]h ]h"]h$]h&]uh1jhhhKhj:hhubj)}(hXFIEMAP_EXTENT_MERGED This will be set when a file does not support extents, i.e., it uses a block based addressing scheme. Since returning an extent for each block back to userspace would be highly inefficient, the kernel will try to merge most adjacent blocks into 'extents'. h](j)}(hFIEMAP_EXTENT_MERGEDh]hFIEMAP_EXTENT_MERGED}(hj,hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhj(ubj )}(hhh]h)}(hXThis will be set when a file does not support extents, i.e., it uses a block based addressing scheme. Since returning an extent for each block back to userspace would be highly inefficient, the kernel will try to merge most adjacent blocks into 'extents'.h]hXThis will be set when a file does not support extents, i.e., it uses a block based addressing scheme. Since returning an extent for each block back to userspace would be highly inefficient, the kernel will try to merge most adjacent blocks into ‘extents’.}(hj=hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj:ubah}(h]h ]h"]h$]h&]uh1j hj(ubeh}(h]h ]h"]h$]h&]uh1jhhhKhj:hhubj)}(hXFIEMAP_EXTENT_SHARED This flag is set to request that space be shared with other files. h](j)}(hFIEMAP_EXTENT_SHAREDh]hFIEMAP_EXTENT_SHARED}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1jhhhKhjWubj )}(hhh]h)}(hBThis flag is set to request that space be shared with other files.h]hBThis flag is set to request that space be shared with other files.}(hjlhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjiubah}(h]h ]h"]h$]h&]uh1j hjWubeh}(h]h ]h"]h$]h&]uh1jhhhKhj:hhubeh}(h]h ]h"]h$]h&]uh1jhj,hhhhhNubeh}(h]extent-mappingah ]h"]extent mappingah$]h&]uh1hhhhhhhhK8ubh)}(hhh](h)}(h!VFS -> File System Implementationh]h!VFS -> File System Implementation}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjhhhhhKubh)}(hFile systems wishing to support fiemap must implement a ->fiemap callback on their inode_operations structure. The fs ->fiemap call is responsible for defining its set of supported fiemap flags, and calling a helper function on each discovered extent::h]hFile systems wishing to support fiemap must implement a ->fiemap callback on their inode_operations structure. The fs ->fiemap call is responsible for defining its set of supported fiemap flags, and calling a helper function on each discovered extent:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj)}(hstruct inode_operations { ... int (*fiemap)(struct inode *, struct fiemap_extent_info *, u64 start, u64 len);h]hstruct inode_operations { ... int (*fiemap)(struct inode *, struct fiemap_extent_info *, u64 start, u64 len);}hjsbah}(h]h ]h"]h$]h&]hhuh1jhhhKhjhhubh)}(hP->fiemap is passed struct fiemap_extent_info which describes the fiemap request:h]hP->fiemap is passed struct fiemap_extent_info which describes the fiemap request:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hhh]h}(h]h ]h"]h$]h&]entries](jfiemap_extent_info (C struct)c.fiemap_extent_infohNtauh1hhjhhhNhNubj )}(hhh](j)}(hfiemap_extent_infoh]j)}(hstruct fiemap_extent_infoh](j)}(hjh]hstruct}(hjhhhNhNubah}(h]h ]j'ah"]h$]h&]uh1jhjhhhZ/var/lib/git/docbuild/linux/Documentation/filesystems/fiemap:181: ./include/linux/fiemap.hhKubj-)}(h h]h }(hjhhhNhNubah}(h]h ]j9ah"]h$]h&]uh1j,hjhhhjhKubj>)}(hfiemap_extent_infoh]jD)}(hjh]hfiemap_extent_info}(hj hhhNhNubah}(h]h ]jOah"]h$]h&]uh1jChj ubah}(h]h ](jVjWeh"]h$]h&]hhuh1j=hjhhhjhKubeh}(h]h ]h"]h$]h&]hhjauh1jjbjchjhhhjhKubah}(h]jah ](jgjheh"]h$]h&]jljm)jnhuh1jhjhKhjhhubjp)}(hhh]h)}(hfiemap request to a filesystemh]hfiemap request to a filesystem}(hj* hhhNhNubah}(h]h ]h"]h$]h&]uh1hhZ/var/lib/git/docbuild/linux/Documentation/filesystems/fiemap:181: ./include/linux/fiemap.hhK hj' hhubah}(h]h ]h"]h$]h&]uh1johjhhhjhKubeh}(h]h ](jstructeh"]h$]h&]jjjjB jjB jjjuh1j hhhjhNhNubj)}(hX**Definition**:: struct fiemap_extent_info { unsigned int fi_flags; unsigned int fi_extents_mapped; unsigned int fi_extents_max; struct fiemap_extent __user *fi_extents_start; }; **Members** ``fi_flags`` Flags as passed from user ``fi_extents_mapped`` Number of mapped extents ``fi_extents_max`` Size of fiemap_extent array ``fi_extents_start`` Start of fiemap_extent arrayh](h)}(h**Definition**::h](j)}(h**Definition**h]h Definition}(hjN hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjJ ubh:}(hjJ hhhNhNubeh}(h]h ]h"]h$]h&]uh1hhZ/var/lib/git/docbuild/linux/Documentation/filesystems/fiemap:181: ./include/linux/fiemap.hhK hjF ubj)}(hstruct fiemap_extent_info { unsigned int fi_flags; unsigned int fi_extents_mapped; unsigned int fi_extents_max; struct fiemap_extent __user *fi_extents_start; };h]hstruct fiemap_extent_info { unsigned int fi_flags; unsigned int fi_extents_mapped; unsigned int fi_extents_max; struct fiemap_extent __user *fi_extents_start; };}hjg sbah}(h]h ]h"]h$]h&]hhuh1jhZ/var/lib/git/docbuild/linux/Documentation/filesystems/fiemap:181: ./include/linux/fiemap.hhKhjF ubh)}(h **Members**h]j)}(hjx h]hMembers}(hjz hhhNhNubah}(h]h ]h"]h$]h&]uh1jhjv ubah}(h]h ]h"]h$]h&]uh1hhZ/var/lib/git/docbuild/linux/Documentation/filesystems/fiemap:181: ./include/linux/fiemap.hhKhjF ubj)}(hhh](j)}(h'``fi_flags`` Flags as passed from user h](j)}(h ``fi_flags``h]j)}(hj h]hfi_flags}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhZ/var/lib/git/docbuild/linux/Documentation/filesystems/fiemap:181: ./include/linux/fiemap.hhK hj ubj )}(hhh]h)}(hFlags as passed from userh]hFlags as passed from user}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hK hj ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1jhj hK hj ubj)}(h/``fi_extents_mapped`` Number of mapped extents h](j)}(h``fi_extents_mapped``h]j)}(hj h]hfi_extents_mapped}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhZ/var/lib/git/docbuild/linux/Documentation/filesystems/fiemap:181: ./include/linux/fiemap.hhK hj ubj )}(hhh]h)}(hNumber of mapped extentsh]hNumber of mapped extents}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hK hj ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1jhj hK hj ubj)}(h/``fi_extents_max`` Size of fiemap_extent array h](j)}(h``fi_extents_max``h]j)}(hj h]hfi_extents_max}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj ubah}(h]h ]h"]h$]h&]uh1jhZ/var/lib/git/docbuild/linux/Documentation/filesystems/fiemap:181: ./include/linux/fiemap.hhK hj ubj )}(hhh]h)}(hSize of fiemap_extent arrayh]hSize of fiemap_extent array}(hj" hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj hK hj ubah}(h]h ]h"]h$]h&]uh1j hj ubeh}(h]h ]h"]h$]h&]uh1jhj hK hj ubj)}(h1``fi_extents_start`` Start of fiemap_extent arrayh](j)}(h``fi_extents_start``h]j)}(hjB h]hfi_extents_start}(hjD hhhNhNubah}(h]h ]h"]h$]h&]uh1jhj@ ubah}(h]h ]h"]h$]h&]uh1jhZ/var/lib/git/docbuild/linux/Documentation/filesystems/fiemap:181: ./include/linux/fiemap.hhK hj< ubj )}(hhh]h)}(hStart of fiemap_extent arrayh]hStart of fiemap_extent array}(hj[ hhhNhNubah}(h]h ]h"]h$]h&]uh1hhZ/var/lib/git/docbuild/linux/Documentation/filesystems/fiemap:181: ./include/linux/fiemap.hhKhjX ubah}(h]h ]h"]h$]h&]uh1j hj< ubeh}(h]h ]h"]h$]h&]uh1jhjW hK hj ubeh}(h]h ]h"]h$]h&]uh1jhjF ubeh}(h]h ] kernelindentah"]h$]h&]uh1jhjhhhNhNubh)}(hIt is intended that the file system should not need to access any of this structure directly. Filesystem handlers should be tolerant to signals and return EINTR once fatal signal received.h]hIt is intended that the file system should not need to access any of this structure directly. Filesystem handlers should be tolerant to signals and return EINTR once fatal signal received.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(heFlag checking should be done at the beginning of the ->fiemap callback via the fiemap_prep() helper::h]hdFlag checking should be done at the beginning of the ->fiemap callback via the fiemap_prep() helper:}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj)}(hint fiemap_prep(struct inode *inode, struct fiemap_extent_info *fieinfo, u64 start, u64 *len, u32 supported_flags);h]hint fiemap_prep(struct inode *inode, struct fiemap_extent_info *fieinfo, u64 start, u64 *len, u32 supported_flags);}hj sbah}(h]h ]h"]h$]h&]hhuh1jhhhKhjhhubh)}(hXThe struct fieinfo should be passed in as received from ioctl_fiemap(). The set of fiemap flags which the fs understands should be passed via fs_flags. If fiemap_prep finds invalid user flags, it will place the bad values in fieinfo->fi_flags and return -EBADR. If the file system gets -EBADR, from fiemap_prep(), it should immediately exit, returning that error back to ioctl_fiemap(). Additionally the range is validate against the supported maximum file size.h]hXThe struct fieinfo should be passed in as received from ioctl_fiemap(). The set of fiemap flags which the fs understands should be passed via fs_flags. If fiemap_prep finds invalid user flags, it will place the bad values in fieinfo->fi_flags and return -EBADR. If the file system gets -EBADR, from fiemap_prep(), it should immediately exit, returning that error back to ioctl_fiemap(). Additionally the range is validate against the supported maximum file size.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hrFor each extent in the request range, the file system should call the helper function, fiemap_fill_next_extent()::h]hqFor each extent in the request range, the file system should call the helper function, fiemap_fill_next_extent():}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubj)}(hint fiemap_fill_next_extent(struct fiemap_extent_info *info, u64 logical, u64 phys, u64 len, u32 flags, u32 dev);h]hint fiemap_fill_next_extent(struct fiemap_extent_info *info, u64 logical, u64 phys, u64 len, u32 flags, u32 dev);}hj sbah}(h]h ]h"]h$]h&]hhuh1jhhhKhjhhubh)}(hXfiemap_fill_next_extent() will use the passed values to populate the next free extent in the fm_extents array. 'General' extent flags will automatically be set from specific flags on behalf of the calling file system so that the userspace API is not broken.h]hXfiemap_fill_next_extent() will use the passed values to populate the next free extent in the fm_extents array. ‘General’ extent flags will automatically be set from specific flags on behalf of the calling file system so that the userspace API is not broken.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubh)}(hfiemap_fill_next_extent() returns 0 on success, and 1 when the user-supplied fm_extents array is full. If an error is encountered while copying the extent to user memory, -EFAULT will be returned.h]hfiemap_fill_next_extent() returns 0 on success, and 1 when the user-supplied fm_extents array is full. If an error is encountered while copying the extent to user memory, -EFAULT will be returned.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhjhhubeh}(h]vfs-file-system-implementationah ]h"]!vfs -> file system implementationah$]h&]uh1hhhhhhhhKubeh}(h] fiemap-ioctlah ]h"] fiemap ioctlah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksentryfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerj& error_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(j j j)j&jjj j u nametypes}(j j)jj uh}(j hj&hjjjj,jejjj jjju footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log] decorationNhhub.