<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 02:41:14 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-11134] exclusive layout lock</title>
                <link>https://jira.whamcloud.com/browse/LU-11134</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;to be able to write to OST objects the client needs to lock them with extent locks. those are synchronous RPC(s) which slow down workloads like untar where relatively small amount of data needs few sync RPCs (metadata, locks, etc).&lt;/p&gt;

&lt;p&gt;the client can be given an exclusive access to layout information making OST locks optional. this can improve small file performance.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</description>
                <environment></environment>
        <key id="52675">LU-11134</key>
            <summary>exclusive layout lock</summary>
                <type id="4" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11310&amp;avatarType=issuetype">Improvement</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="bzzz">Alex Zhuravlev</assignee>
                                    <reporter username="bzzz">Alex Zhuravlev</reporter>
                        <labels>
                            <label>SFIO</label>
                    </labels>
                <created>Tue, 10 Jul 2018 10:26:00 +0000</created>
                <updated>Fri, 3 Aug 2018 18:27:40 +0000</updated>
                                                                                <due></due>
                            <votes>0</votes>
                                    <watches>7</watches>
                                                                            <comments>
                            <comment id="230108" author="green" created="Tue, 10 Jul 2018 14:00:05 +0000"  >&lt;p&gt;It&apos;s important to note that while the layout could be locked on the metadata server we still need to talk to OSTs to cancel out all the currently outstanding OST locks before we are sure the exclusive layout lock is truly exclusive.&lt;/p&gt;</comment>
                            <comment id="230123" author="bzzz" created="Tue, 10 Jul 2018 16:54:22 +0000"  >&lt;p&gt;the primary purpose is new files where new layout (or some components) have been just created.&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</comment>
                            <comment id="230124" author="green" created="Tue, 10 Jul 2018 16:56:28 +0000"  >&lt;p&gt;Unless you obtain such a lock at file creation time, you can never ensure there&apos;s no race with some other process taking an extent lock so would always need to make sure.&lt;/p&gt;</comment>
                            <comment id="230312" author="adilger" created="Mon, 16 Jul 2018 22:38:43 +0000"  >&lt;p&gt;How does this differ from the DoM files taking the full-file lock via IBITS lock?  It would be good to have a consistent mechanism for doing this between DoM files and regular files.&lt;/p&gt;</comment>
                            <comment id="231312" author="bzzz" created="Thu, 2 Aug 2018 12:16:23 +0000"  >&lt;p&gt;&lt;a href=&quot;https://jira.whamcloud.com/secure/ViewProfile.jspa?name=adilger&quot; class=&quot;user-hover&quot; rel=&quot;adilger&quot;&gt;adilger&lt;/a&gt; I discussed this with Mike a bit.. it sounds like we could reuse that IBIT lock (taken as PW) for few purposes actually:&lt;br/&gt;
1) have an exclusive access to &lt;span class=&quot;error&quot;&gt;&amp;#91;0; EOF&amp;#93;&lt;/span&gt; for newly created files and avoid OST locking (synchronous RPC)&lt;/p&gt;

&lt;p&gt;2) cache some trivial changes like UID/GID/time and write them back on close (or upon lock cancellation) to save chmod/chown applied by tar to every file (sometime twice)&lt;/p&gt;

&lt;p&gt;&#160;&lt;/p&gt;</comment>
                            <comment id="231358" author="green" created="Fri, 3 Aug 2018 02:30:16 +0000"  >&lt;p&gt;don&apos;t use PW, use EX. The reason is CR lock is compatible with PW (I stepped on it working on WBC).&lt;/p&gt;

&lt;p&gt;Also I wonder if layout lock is better to do dom content locking too? (was this already discussed somewhere and I missed it?)&lt;/p&gt;

&lt;p&gt;To cache uid/gid/... take appropriate bits (also as EX).&lt;/p&gt;

&lt;p&gt;All in all it just sounds you want to get EX lock on all/most of the bits at create time and cache a bunch of stuff under it without talking back to server. As conflicts arise you might want to reduce the bits and flush the data in progress (or downgrade the lock mode - but you&apos;d need to do it on all bits at the same time)&lt;/p&gt;</comment>
                            <comment id="231374" author="tappro" created="Fri, 3 Aug 2018 07:55:15 +0000"  >&lt;p&gt;Oleg, why should we be incompatible with CR lock? I tend to think it would be even bad to have that lock dropped by CR so I&apos;d say PW is the right thing. As I got it, that lock protects just data range [0; EOF) exclusively and it will not be taken with CR mode, just PR or PW. Correct me here if I am not right. Also I wonder what should cause the cancel for such lock? I suppose IO from other client? Then how that is handled?&lt;/p&gt;

&lt;p&gt;As for LAYOUT lock vs DOM lock, LAYOUT lock cannot be used to protect data due to several reason, e.g. it is not staying long with PR/PW mode and data is just not cached on client, it conflict also with LVB stuff on server, both layout and IO (dom) use it but for different reasons and in different ways so we have to separate them, and finally it is becoming too complicated to properly distinguish when we are using LAYOUT for layout work and where for IO-related things, especially with all FLR work. So DOM bits works just like extent lock and is separated from LAYOUT bit and in fact there are no good reasons to combine them in a single bit, it doesn&apos;t simplify things but vice versa.&lt;/p&gt;
</comment>
                            <comment id="231376" author="tappro" created="Fri, 3 Aug 2018 08:00:27 +0000"  >&lt;p&gt;Andreas, Alex, about re-using DOM bit for that purposes with OST files. Note that DOM bit doesn&apos;t protect whole file but just DOM stripe. We could count it as &apos;full range lock&apos; for non-DOM files but what about DOM files? How are we going to distinguish cases whether it is protecting dom stripe or whole file (e.g. if it has both dom and ost stripes)?&lt;/p&gt;</comment>
                            <comment id="231387" author="green" created="Fri, 3 Aug 2018 14:17:17 +0000"  >&lt;p&gt;Mike, we have CR lock issued to clients for lookup and related bits. Generally you want your lookup bit together with other bits to ensure the file could still be found without talking to the server.&lt;/p&gt;

&lt;p&gt;About the layout vs dom bit. Yes, certainly staying power of layout lock is low. I guess if you envision massive contended r/w workloads on the same file from multiple clients it would make a difference allowing the writing client to hold on to the dom bit for longer. outside of this scenario I am not sure it would matter much.&lt;/p&gt;</comment>
                            <comment id="231388" author="green" created="Fri, 3 Aug 2018 14:18:33 +0000"  >&lt;p&gt;hm, actually yes - I guess when we want to have other stripes it makes sense to have dom bit separate from layout.&lt;/p&gt;</comment>
                            <comment id="231392" author="tappro" created="Fri, 3 Aug 2018 14:44:12 +0000"  >&lt;p&gt;Oleg, considering combined bits case, I still don&apos;t get why CR lock should conflict with that exclusive lock Alex is describing. If it is combined with LOOKUP then better to be PW also, so other CR lookups would not drop that combined one for nothing, isn&apos;t it?&lt;/p&gt;</comment>
                            <comment id="231400" author="green" created="Fri, 3 Aug 2018 16:57:08 +0000"  >&lt;p&gt;The risk is this:&lt;/p&gt;

&lt;p&gt;client 1: get PW LAYOUT lock&lt;br/&gt;
client 2: get CR LAYOUT|LOOKUP|UPDATE lock (as part of regular lookup or open)&lt;/p&gt;

&lt;p&gt;no conflict, but the client 2 now thinks it has valid layout information while client 1 thinks it&apos;s got exclusive access.&lt;/p&gt;</comment>
                            <comment id="231411" author="tappro" created="Fri, 3 Aug 2018 17:56:53 +0000"  >&lt;p&gt;indeed, that is the case for layout lock and valid layout information but I was thinking that Alex meant DOM lock.&lt;br/&gt;
We have discussed using of DOM bit vs LAYOUT bit today and it seems that LAYOUT lock will work better also due to glimpse handling. Before glimpse will be done the layout lock will be taken and exclusive lock will be revoked automatically. But with DOM lock it is not so simple and glimpse itself will not work just out of box.&lt;/p&gt;</comment>
                            <comment id="231413" author="green" created="Fri, 3 Aug 2018 18:27:40 +0000"  >&lt;p&gt;Yeah, the whole glimpse thing - I had some questions about too. But it again boils down to how much do we expect contended workloads are going to be in the DoM case. If we mostly envision &quot;write once and then only read&quot; workloads, glimpses don&apos;t matter.&lt;/p&gt;

&lt;p&gt;This is not to say I disagree and I am fine to take layout lock in EX mode if needed as it does simplify some other things too, e.g. on create when the data starts flowing in, and there&apos;s too much of it, we can seamlessly decide to do normal striping too.&lt;/p&gt;</comment>
                    </comments>
                    <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|hzzyyn:</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>
                                                                                                                                                                                                                                                                                                                                                                                                                </customfields>
    </item>
</channel>
</rss>