<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:44:18 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-11486] FLR allows overlapping &quot;write preferred&quot; segments</title>
                <link>https://jira.whamcloud.com/browse/LU-11486</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;Close examination of sanity-flr test 0h shows something troubling.&lt;/p&gt;

&lt;p&gt;Simply run the test to completion, but add an error statement so the file is retained.&#160; Here&apos;s what the getstripe output on the file looks like after 0h (again, with no modification):&lt;/p&gt;
&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
[root@cent7c01 lustre]# lfs getstripe f0h.sanity-flr 
f0h.sanity-flr
 lcm_layout_gen: 9
 lcm_mirror_count: 3
 lcm_entry_count: 4
 lcme_id: 65537
 lcme_mirror_id: 1
 lcme_flags: init
 lcme_extent.e_start: 0
 lcme_extent.e_end: 1048576
 lmm_stripe_count: 1
 lmm_stripe_size: 1048576
 lmm_pattern: raid0
 lmm_layout_gen: 0
 lmm_stripe_offset: 0
 lmm_objects:
 - 0: { l_ost_idx: 0, l_fid: [0x100000000:0x10:0x0] }
lcme_id: 65538
 lcme_mirror_id: 1
 lcme_flags: init,prefer
 lcme_extent.e_start: 1048576
 lcme_extent.e_end: EOF
 lmm_stripe_count: 1
 lmm_stripe_size: 1048576
 lmm_pattern: raid0
 lmm_layout_gen: 0
 lmm_stripe_offset: 0
 lmm_objects:
 - 0: { l_ost_idx: 0, l_fid: [0x100000000:0x11:0x0] }
lcme_id: 131075
 lcme_mirror_id: 2
 lcme_flags: init,prefer
 lcme_extent.e_start: 0
 lcme_extent.e_end: EOF
 lmm_stripe_count: 1
 lmm_stripe_size: 1048576
 lmm_pattern: raid0
 lmm_layout_gen: 0
 lmm_stripe_offset: 1
 lmm_objects:
 - 0: { l_ost_idx: 1, l_fid: [0x100010000:0x10:0x0] }
lcme_id: 196612
 lcme_mirror_id: 3
 lcme_flags: init
 lcme_extent.e_start: 0
 lcme_extent.e_end: EOF
 lmm_stripe_count: 1
 lmm_stripe_size: 1048576
 lmm_pattern: raid0
 lmm_layout_gen: 0
 lmm_stripe_offset: 1
 lmm_objects:
 - 0: { l_ost_idx: 1, l_fid: [0x100010000:0x11:0x0] } &lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;The key part is these two components, the second and third in the list above:&lt;/p&gt;


&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;
    lcme_id:             65538
    lcme_mirror_id:      1
    lcme_flags:          init,prefer
    lcme_extent.e_start: 1048576
    lcme_extent.e_end:   EOF
      lmm_stripe_count:  1
      lmm_stripe_size:   1048576
      lmm_pattern:       raid0
      lmm_layout_gen:    0
      lmm_stripe_offset: 0
      lmm_objects:
      - 0: { l_ost_idx: 0, l_fid: [0x100000000:0x11:0x0] }    lcme_id:             131075
    lcme_mirror_id:      2
    lcme_flags:          init,prefer
    lcme_extent.e_start: 0
    lcme_extent.e_end:   EOF
      lmm_stripe_count:  1
      lmm_stripe_size:   1048576
      lmm_pattern:       raid0
      lmm_layout_gen:    0
      lmm_stripe_offset: 1
      lmm_objects:
      - 0: { l_ost_idx: 1, l_fid: [0x100010000:0x10:0x0] } &lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;&#160;&lt;/p&gt;

&lt;p&gt;The first component is in mirror 1, and runs from 1 MiB to EOF, and is preferred for write.&#160; The second component is in mirror 2 and runs from 0 to EOF...&#160; and is preferred for write.&lt;/p&gt;

&lt;p&gt;This seems to be inherently conflicted.&#160; I would think the tools should prevent setting overlapping &quot;prefer&quot; flags...?&lt;/p&gt;</description>
                <environment></environment>
        <key id="53544">LU-11486</key>
            <summary>FLR allows overlapping &quot;write preferred&quot; segments</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="3" iconUrl="https://jira.whamcloud.com/images/icons/priorities/major.svg">Major</priority>
                        <status id="5" iconUrl="https://jira.whamcloud.com/images/icons/statuses/resolved.png" description="A resolution has been taken, and it is awaiting verification by reporter. From here issues are either reopened, or are closed.">Resolved</status>
                    <statusCategory id="3" key="done" colorName="success"/>
                                    <resolution id="6">Not a Bug</resolution>
                                        <assignee username="wc-triage">WC Triage</assignee>
                                    <reporter username="paf">Patrick Farrell</reporter>
                        <labels>
                    </labels>
                <created>Tue, 9 Oct 2018 16:15:21 +0000</created>
                <updated>Fri, 21 Jan 2022 01:09:20 +0000</updated>
                            <resolved>Fri, 21 Jan 2022 01:09:20 +0000</resolved>
                                                                        <due></due>
                            <votes>0</votes>
                                    <watches>4</watches>
                                                                            <comments>
                            <comment id="234659" author="adilger" created="Tue, 9 Oct 2018 22:05:58 +0000"  >&lt;p&gt;During development, I discussed the case of overlapping &lt;tt&gt;prefer&lt;/tt&gt; components with Jinshan.  The decision was that this was a correct situation.&lt;/p&gt;

&lt;p&gt;The reasoning for this is as follows:&lt;/p&gt;
&lt;ul class=&quot;alternate&quot; type=&quot;square&quot;&gt;
	&lt;li&gt;you might have multiple mirrors on flash (for redundancy or performance), and you still want to prefer writes to one of those mirrors over one of the HDD mirrors&lt;/li&gt;
	&lt;li&gt;if there as only a single &lt;tt&gt;prefer&lt;/tt&gt; component and it becomes unavailable, you don&apos;t necessarily want writes to go to the HDD first (as would be the case if there are multiple mirrors but only one can be marked &lt;tt&gt;prefer&lt;/tt&gt;)&lt;/li&gt;
&lt;/ul&gt;


&lt;p&gt;The MDS will pick among the components marked &lt;tt&gt;prefer&lt;/tt&gt; first, and if the site policy/architecture is to only have a single such mirror then it is as you want, but it shouldn&apos;t be a restriction.&lt;/p&gt;</comment>
                            <comment id="234782" author="paf" created="Thu, 11 Oct 2018 17:30:24 +0000"  >&lt;p&gt;Hmm, OK.&#160; So what happens if we have mirror 0 with component 0 from, say, 0MB to 100MB, and mirror 1 with component 0 at 0MB to 50MB and component 1 at 50MB to EOF.&#160; Mirror 0 component 0 and mirror 1 component 1 are marked write prefer.&lt;/p&gt;

&lt;p&gt;What happens if I write to 75MB?&#160; Assume it picks mirror 0, then both components of mirror 1 will be marked stale, since they overlap with component 0 of mirror 0.&#160; So then what happens if I try to write to 125MB?&#160; Will it reject using mirror 1 because it&apos;s stale?&lt;/p&gt;

&lt;p&gt;The answer, from testing just now, is yes.&#160; And as you said in the other LU, FLR picks entire mirrors for write preference.&#160; That, combined with &quot;won&apos;t use stale mirrors&quot;, seems sound.&#160; So in my example above, it if I wrote to 125 MB first (mirror 1 write preferred there), I&apos;d expect to end up using that mirror for write...&lt;/p&gt;

&lt;p&gt;But it doesn&apos;t work that way.&#160; It still ends up using mirror 0.&#160; In fact, a little more testing suggests that if write prefer is set on any components of mirror 0 it&apos;s preferred to mirror 1, regardless of where we&apos;re writing.&lt;/p&gt;

&lt;p&gt;It seems, then, that write prefer should be a full mirror flag, rather than settable on individual components, since that seems to be how it works..&#160; (I have not verified this in the code.)&lt;/p&gt;</comment>
                            <comment id="234784" author="jinshan" created="Thu, 11 Oct 2018 17:56:16 +0000"  >&lt;p&gt;It depends on the first byte to be written when choosing mirror for writing. As long as a mirror is chosen, this mirror will be used to serve all writes after. Staling components from different mirrors should be avoided for good reasons. We had a long discussion about this before.&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="53543">LU-11485</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                    </attachments>
                <subtasks>
                    </subtasks>
                <customfields>
                                                                                                                                                                                            <customfield id="customfield_10890" key="com.atlassian.jira.plugins.jira-development-integration-plugin:devsummary">
                        <customfieldname>Development</customfieldname>
                        <customfieldvalues>
                            
                        </customfieldvalues>
                    </customfield>
                                                                                                                                                                                                                                                                                                                                                        <customfield id="customfield_10390" key="com.pyxis.greenhopper.jira:gh-lexo-rank">
                        <customfieldname>Rank</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>1|i003uv:</customfieldvalue>

                        </customfieldvalues>
                    </customfield>
                                                                <customfield id="customfield_10090" key="com.pyxis.greenhopper.jira:gh-global-rank">
                        <customfieldname>Rank (Obsolete)</customfieldname>
                        <customfieldvalues>
                            <customfieldvalue>9223372036854775807</customfieldvalue>
                        </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>
                                                                                                                                                                                                                                                                                                                                                        </customfields>
    </item>
</channel>
</rss>