<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 01:21:01 UTC 2024

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary append 'field=key&field=summary' to the URL of your request.
-->
<rss version="0.92" >
<channel>
    <title>Whamcloud Community JIRA</title>
    <link>https://jira.whamcloud.com</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>9.4.14</version>
        <build-number>940014</build-number>
        <build-date>05-12-2023</build-date>
    </build-info>


<item>
            <title>[LU-1941] ZFS FIEMAP support</title>
                <link>https://jira.whamcloud.com/browse/LU-1941</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;osd-zfs has lack of fiemap support. That was discussed in bugzilla 23099 originally. This is not blocker for DMU milestone, this task is mostly improvement.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;In sanity.sh test_130* it is verifying that FIEMAP (file extent map) is working properly.  This allows clients to determine the disk block allocation layout for a particular file.&lt;/p&gt;

&lt;p&gt;In 1.x and 2.x FIEMAP is supported for ldiskfs filesystems,.&lt;/p&gt;

&lt;p&gt;Once the &quot;fiemap&quot; request is passed through to the OSD it should be trivial to call the ldiskfs -&amp;gt;fiemap() method to fill in the data structure and return it to the caller.  For ZFS this will need some code (possibly a new DMU interface?) to walk the file&apos;s data blocks and return the block pointer(s?) for each block.&lt;/p&gt;

&lt;p&gt;Open questions include:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;which blockpointer should be returned in case of ditto blocks?  It is possible to return multiple overlapping extents (one for each DVA), but it may be confusing to some users&lt;/li&gt;
	&lt;li&gt;while FIEMAP has space for a &quot;device&quot; for each extent, how will we map different ZFS VDEV devices and Lustre OST devices into the single 32-bit device field?
	&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
		&lt;li&gt;We could use 16-bit &quot;major:minor&quot; with OST index being &quot;major&quot; and VDEV being &quot;minor&quot;, but I don&apos;t think there is a simple index for the VDEVs.&lt;/li&gt;
		&lt;li&gt;We could use the low 16-bit value of the VDEV UUID (assuming it is largely unique) so that users can identify this fairly easily from &quot;zfs&quot; output if needed.&lt;/li&gt;
		&lt;li&gt;We could try and map the VDEV to the underlying Linux block device major/minor, though it is a major layering violation.&lt;/li&gt;
	&lt;/ul&gt;
	&lt;/li&gt;
	&lt;li&gt;should/can the extents be returned to the user in some &quot;device&quot; (VDEV) order so that it is more clear if the extents are contiguous on disk or not, or will we get $((filesize * ditto / 128k)) extents returned to the client, possibly millions for large (128GB) files?&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;Even for local ZFS filesystem mounts, FIEMAP (via filefrag) output would provide useful insight into the on-disk allocation of files and would be needed to improve the ZFS allocation policies.&lt;/p&gt;&lt;/blockquote&gt;</description>
                <environment></environment>
        <key id="12050">LU-1941</key>
            <summary>ZFS FIEMAP support</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="4" iconUrl="https://jira.whamcloud.com/images/icons/priorities/minor.svg">Minor</priority>
                        <status id="1" iconUrl="https://jira.whamcloud.com/images/icons/statuses/open.png" description="The issue is open and ready for the assignee to start work on it.">Open</status>
                    <statusCategory id="2" key="new" colorName="default"/>
                                    <resolution id="-1">Unresolved</resolution>
                                        <assignee username="wc-triage">WC Triage</assignee>
                                    <reporter username="tappro">Mikhail Pershin</reporter>
                        <labels>
                            <label>always_except</label>
                            <label>prz</label>
                            <label>zfs</label>
                    </labels>
                <created>Sat, 8 Oct 2011 04:35:29 +0000</created>
                <updated>Thu, 29 Jun 2023 03:25:54 +0000</updated>
                                                                                <due></due>
                            <votes>1</votes>
                                    <watches>6</watches>
                                                                            <comments>
                            <comment id="44920" author="adilger" created="Fri, 14 Sep 2012 22:17:33 +0000"  >&lt;p&gt;Patch to disable filefrag tests on master: &lt;a href=&quot;http://review.whamcloud.com/3998&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/3998&lt;/a&gt;&lt;/p&gt;</comment>
                            <comment id="44968" author="adilger" created="Sun, 16 Sep 2012 18:27:34 +0000"  >&lt;p&gt;Selected comments from Ricardo:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I don&apos;t think it&apos;s really possible to retrieve the list of &quot;extents&quot; sorted by device order, at&lt;br/&gt;
least not with the current on-disk format and not if you care about performance in any way.&lt;/p&gt;

&lt;p&gt;Currently, to achieve that you&apos;d need to do a global sort of all the DVAs/block pointers in the&lt;br/&gt;
entire file, which for large files could require a huge amount of I/O, memory resources and/or&lt;br/&gt;
time.&lt;/p&gt;

&lt;p&gt;There is still a problem, though: we&apos;re only thinking about the top-level vdevs.&lt;/p&gt;

&lt;p&gt;If you have a RAID-Z vdev with 10 disks, then a single block can be split across the 10 disks.&lt;/p&gt;

&lt;p&gt;So the way we&apos;re thinking, for each block you&apos;ll only get 1 extent, where the offset is the&lt;br/&gt;
&quot;logical&quot; offset of the RAID-Z vdev. But in this way you won&apos;t get the actual per-disk offsets.&lt;/p&gt;

&lt;p&gt;In theory you could return N FIEMAP extents per DMU block (where N is the number of disks you have&lt;br/&gt;
in the RAID-Z vdev), but this won&apos;t be as simple as looking at the DVAs (you&apos;d need to do some&lt;br/&gt;
calculations), and I&apos;d suspect the output would get a bit too verbose...&lt;/p&gt;

&lt;p&gt;So maybe for now I&apos;d suggest to only return 1 extent per block, with the logical offset, because if&lt;br/&gt;
the logical offsets are contiguous, then the per-disk offsets will also be contiguous.&lt;/p&gt;

&lt;p&gt;Another question is - does filefrag understand that an allocated extent size may not correspond to&lt;br/&gt;
a logical extent size?&lt;/p&gt;

&lt;p&gt;Because I was thinking that we need to return the actual &quot;allocated&quot; on-disk size, not the logical&lt;br/&gt;
block size, otherwise we won&apos;t know whether the blocks are actually allocated contiguously or if&lt;br/&gt;
they have holes between them (e.g. a RAID-Zed 128K block actually has an allocated size of&lt;br/&gt;
128K+parity, so it would seem that there are holes between RAID-Z blocks).&lt;/p&gt;

&lt;p&gt;Another problem is that if we&apos;d report the logical block size instead of the allocated size, it&apos;d&lt;br/&gt;
get confusing if you have compression (it would look like some extents would be overlapping...).&lt;/p&gt;

&lt;p&gt;But even then, I&apos;m not sure if we can only get a per-block allocated size or if it&apos;s possible to&lt;br/&gt;
get a per-DVA allocated size...&lt;/p&gt;&lt;/blockquote&gt;</comment>
                            <comment id="89329" author="adilger" created="Thu, 17 Jul 2014 05:36:16 +0000"  >&lt;p&gt;Upstream patch prototype for FIEMAP_FLAG_DATA_COMPRESSED/fe_phys_length and discussion on how the patches should be fixed for upstream kernel acceptance: &lt;a href=&quot;https://lore.kernel.org/linux-fsdevel/cover.1406739708.git.dsterba@suse.cz/&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://lore.kernel.org/linux-fsdevel/cover.1406739708.git.dsterba@suse.cz/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The patch series was discussed and had some improvements that need to be made, but it was never updated after the last time the series was pushed.&lt;/p&gt;</comment>
                            <comment id="124831" author="adilger" created="Fri, 21 Aug 2015 21:21:27 +0000"  >&lt;p&gt;ZFS issue for FIEMAP is tracked at &lt;a href=&quot;https://github.com/zfsonlinux/zfs/issues/264&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/zfsonlinux/zfs/issues/264&lt;/a&gt;&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="55745">LU-12336</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="27842">LU-6007</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="51334">LU-10810</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                    <customfield id="customfield_10020" key="com.atlassian.jira.plugin.system.customfieldtypes:float">
                        <customfieldname>Bugzilla ID</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>23099.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                            <customfield id="customfield_10890" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10030" key="com.atlassian.jira.plugin.system.customfieldtypes:labels">
                        <customfieldname>Epic/Theme</customfieldname>
                        <customfieldvalues>
                                        <label>ORI-12</label>
    
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                            <customfield id="customfield_10070" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Project</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10031"><![CDATA[Orion]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10390" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|hzurxr:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10090" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>2188</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10050" key="com.pyxis.greenhopper.jira:greenhopper-releasedmultiversionhistory">
                        <customfieldname>Release Version History</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10060" key="com.atlassian.jira.plugin.system.customfieldtypes:select">
                        <customfieldname>Severity</customfieldname>
                        <customfieldvalues>
                                <customfieldvalue key="10022"><![CDATA[3]]></customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                                                                                                    <customfield id="customfield_10002" key="com.atlassian.jira.plugin.system.customfieldtypes:float">
                        <customfieldname>Story Points</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>3.0</customfieldvalue>
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                        </customfields>
    </item>
</channel>
</rss>