<!-- 
RSS generated by JIRA (9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c) at Sat Feb 10 01:17:21 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-1518] Missing/bad operations in mdd_{obf,dot_lustre}_obj_op causing LBUGs</title>
                <link>https://jira.whamcloud.com/browse/LU-1518</link>
                <project id="10000" key="LU">Lustre</project>
                    <description>&lt;p&gt;An unprivileged user can cause an MDS LBUG by issuing &quot;chmod +x /mnt/lustre/.lustre/fid&quot;.  Similarly root can cause an LBUG by issuing &lt;/p&gt;
{get,set}
&lt;p&gt;facl calls against this directory.  Privileged users cannot changes the attributes of /mnt/lustre/.lustre.&lt;/p&gt;</description>
                <environment></environment>
        <key id="14908">LU-1518</key>
            <summary>Missing/bad operations in mdd_{obf,dot_lustre}_obj_op causing LBUGs</summary>
                <type id="1" iconUrl="https://jira.whamcloud.com/secure/viewavatar?size=xsmall&amp;avatarId=11303&amp;avatarType=issuetype">Bug</type>
                                            <priority id="1" iconUrl="https://jira.whamcloud.com/images/icons/priorities/blocker.svg">Blocker</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="1">Fixed</resolution>
                                        <assignee username="niu">Niu Yawei</assignee>
                                    <reporter username="jhammond">John Hammond</reporter>
                        <labels>
                            <label>fid</label>
                    </labels>
                <created>Wed, 13 Jun 2012 12:16:47 +0000</created>
                <updated>Tue, 29 Apr 2014 20:13:42 +0000</updated>
                            <resolved>Fri, 31 Aug 2012 20:04:28 +0000</resolved>
                                    <version>Lustre 2.3.0</version>
                    <version>Lustre 2.1.2</version>
                    <version>Lustre 2.1.3</version>
                                    <fixVersion>Lustre 2.3.0</fixVersion>
                    <fixVersion>Lustre 2.4.0</fixVersion>
                    <fixVersion>Lustre 2.1.4</fixVersion>
                                        <due></due>
                            <votes>0</votes>
                                    <watches>3</watches>
                                                                            <comments>
                            <comment id="40518" author="jhammond" created="Wed, 13 Jun 2012 12:23:43 +0000"  >&lt;p&gt;Please see &lt;a href=&quot;http://review.whamcloud.com/3103&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/3103&lt;/a&gt;.&lt;/p&gt;</comment>
                            <comment id="40793" author="pjones" created="Mon, 18 Jun 2012 18:24:24 +0000"  >&lt;p&gt;Keith&lt;/p&gt;

&lt;p&gt;Can you please review the existing patch and create a test for it?&lt;/p&gt;

&lt;p&gt;Peter&lt;/p&gt;</comment>
                            <comment id="40817" author="jhammond" created="Mon, 18 Jun 2012 21:37:04 +0000"  >&lt;p&gt;Hi Peter, Keith,&lt;/p&gt;

&lt;p&gt;Note that the patch on Gerrit is against 2.1.x.  It doesn&apos;t port directly to 2.2.x.  Part of the issue is that moo_version_&lt;/p&gt;
{get,set}
&lt;p&gt; have been taken out of md_object_operations (part of commit 22464d1230ed58461f51d881f512d5e16644a735 for &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-909&quot; title=&quot;changes to OSD API&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-909&quot;&gt;&lt;del&gt;LU-909&lt;/del&gt;&lt;/a&gt;), which makes life difficult for virtual objects like .lustre/fid.  I&apos;ve been looking at this to understand why they were.  If anyone can comment here then that would be helpful.&lt;/p&gt;

&lt;p&gt;John&lt;/p&gt;</comment>
                            <comment id="40839" author="bzzz" created="Tue, 19 Jun 2012 06:33:18 +0000"  >&lt;p&gt;because version is now treated as an extended attribute and corresponded method is used.&lt;/p&gt;</comment>
                            <comment id="40923" author="keith" created="Wed, 20 Jun 2012 10:27:35 +0000"  >&lt;p&gt;John I am working on properly porting this to master using the extended attributes interface. &lt;/p&gt;</comment>
                            <comment id="40939" author="jhammond" created="Wed, 20 Jun 2012 13:33:04 +0000"  >&lt;p&gt;Thanks Keith.&lt;/p&gt;

&lt;p&gt;I made a rough cut at some tests for sanity (see attached).  Feel free to use it or not.  The operations that will fail call echo instead of error, and those that cause an Oops/LBUG are or-ed out.&lt;/p&gt;</comment>
                            <comment id="41420" author="keith" created="Tue, 3 Jul 2012 17:03:27 +0000"  >&lt;p&gt;Sorry for the delay on this I will submit a patch to master soon.  The tests look nice and I have been using them with development, I may re-factor them a little but the overall operation check is a great help.  &lt;/p&gt;</comment>
                            <comment id="41421" author="jhammond" created="Tue, 3 Jul 2012 17:14:31 +0000"  >&lt;p&gt;Hi Keith,&lt;/p&gt;

&lt;p&gt;Cool.&lt;/p&gt;

&lt;p&gt;I was poking at a patch to mdd_device.c that would give .lustre/fid a real inode on disk.  I don&apos;t know if you&apos;ve been doing the same.  It&apos;s not ready for primetime but it does address many of the issues above, so I will attach it here.&lt;/p&gt;

&lt;p&gt;Best,&lt;/p&gt;

&lt;p&gt;John&lt;/p&gt;</comment>
                            <comment id="41522" author="adilger" created="Thu, 5 Jul 2012 15:39:24 +0000"  >&lt;p&gt;John, I don&apos;t think .lustre/fid should be given a real inode on disk.  This is a &quot;virtual&quot; interface for lookup-by-FID, and does not correspond to a real file at all.&lt;/p&gt;</comment>
                            <comment id="41530" author="jhammond" created="Thu, 5 Jul 2012 16:48:43 +0000"  >&lt;p&gt;From my point of view, giving .lustre/fid a real inode has some advantages:&lt;/p&gt;

&lt;p&gt;1. We address &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-1518&quot; title=&quot;Missing/bad operations in mdd_{obf,dot_lustre}_obj_op causing LBUGs&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-1518&quot;&gt;&lt;del&gt;LU-1518&lt;/del&gt;&lt;/a&gt;, &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-1531&quot; title=&quot;Accessing .lustre/fid/[0x1:0x0:0x0] triggers LBUG in osd_compat_objid_lookup()&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-1531&quot;&gt;&lt;del&gt;LU-1531&lt;/del&gt;&lt;/a&gt;, &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-1550&quot; title=&quot;open-by-fid getdents may return inconsistend data&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-1550&quot;&gt;&lt;del&gt;LU-1550&lt;/del&gt;&lt;/a&gt;, &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-1553&quot; title=&quot;inaccessible files in .lustre&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-1553&quot;&gt;&lt;del&gt;LU-1553&lt;/del&gt;&lt;/a&gt;, and some currently un-LU-ed issues mostly by &lt;b&gt;deleting&lt;/b&gt; some special case code.  Whereas, keeping .lustre/fid virtual while addressing these issues will likely mean &lt;b&gt;adding&lt;/b&gt; code to the general case handlers.  Watching master lately, the real inode approach seems much more durable in the face of the osd restructuring landings.&lt;/p&gt;

&lt;p&gt;2. We give admins a transparent way (chmod, chown) to make persistent changes to who can perform open-by-fid.  Again without adding any special code or sysfs paramaters.&lt;/p&gt;

&lt;p&gt;There doesn&apos;t seem to be a difference in performance between the two approaches.  What downsides do you see?&lt;/p&gt;</comment>
                            <comment id="41771" author="adilger" created="Thu, 12 Jul 2012 18:41:20 +0000"  >&lt;p&gt;Alex and Fan Yong, can you please comment on John&apos;s proposal?  I&apos;m all for reducing code complexity where possible.&lt;/p&gt;</comment>
                            <comment id="41773" author="keith" created="Thu, 12 Jul 2012 19:30:20 +0000"  >&lt;p&gt;I am holding off until we make a direction decision.  &lt;/p&gt;</comment>
                            <comment id="43356" author="adilger" created="Thu, 16 Aug 2012 14:27:40 +0000"  >&lt;p&gt;Making this a blocker for 2.1 and 2.3.  The patch in &lt;a href=&quot;http://review.whamcloud.com/3103&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/3103&lt;/a&gt; was merged and then reverted, because it was based on the wrong branch.  That patch needs to be updated for master, since it otherwise presents a DOS possibility.  There are a number of related bugs that may also need to be fixed in order to avoid potential problems.&lt;/p&gt;</comment>
                            <comment id="43360" author="keith" created="Thu, 16 Aug 2012 14:50:56 +0000"  >&lt;p&gt;I will work to get an inode approach patch out for review. &lt;/p&gt;</comment>
                            <comment id="43434" author="pjones" created="Fri, 17 Aug 2012 15:25:55 +0000"  >&lt;p&gt;Bob&lt;/p&gt;

&lt;p&gt;Could you please help out with this one?&lt;/p&gt;

&lt;p&gt;Thanks&lt;/p&gt;

&lt;p&gt;Peter&lt;/p&gt;</comment>
                            <comment id="43498" author="bogl" created="Mon, 20 Aug 2012 14:31:05 +0000"  >&lt;p&gt;John,&lt;br/&gt;
I couldn&apos;t get the real inode approach from your attachment to fly at all.  Instead I&apos;ve been looking at rebasing the patch in &lt;a href=&quot;http://review.whamcloud.com/#change,3103&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/#change,3103&lt;/a&gt; on current master. I&apos;ve gotten it to build &amp;amp; run, but can&apos;t get it to pass the sanity tests 154b,c from your sanity tests patch.  I edited out all the echo &quot;SKIPPING&quot; to enable everything.  I&apos;m not seeing any oops from missing ops, but I&apos;m not seeing passes either. I&apos;m not clear about which ops are supposed to succeed and which are supposed to fail. results look like:&lt;/p&gt;

&lt;p&gt;== sanity test 154b: Test md operations on .lustre == 11:13:50 (1345486430)&lt;br/&gt;
stat /mnt/lustre/.lustre&lt;br/&gt;
touch /mnt/lustre/.lustre&lt;br/&gt;
ln /mnt/lustre/.lustre /mnt/lustre/d0.sanity/d154/x154&lt;br/&gt;
ln: `/mnt/lustre/.lustre&apos;: hard link not allowed for directory&lt;br/&gt;
touch /mnt/lustre/.lustre/f154&lt;br/&gt;
touch .lustre/f154 should fail.&lt;br/&gt;
mknod /mnt/lustre/.lustre/p154 p&lt;br/&gt;
mknod .lustre/p154 p should fail.&lt;br/&gt;
mkdir /mnt/lustre/.lustre/d154&lt;br/&gt;
mkdir .lustre/d154 should fail.&lt;br/&gt;
ls /mnt/lustre/.lustre&lt;br/&gt;
d154&lt;br/&gt;
f154&lt;br/&gt;
p154&lt;br/&gt;
chmod ugo+rwx /mnt/lustre/.lustre (Oops in osd_xattr_get()).&lt;br/&gt;
skipping chown 0:0 /mnt/lustre/.lustre (Oops in osd_xattr_get()).&lt;br/&gt;
setfattr -n user.test_md_ops -v foo /mnt/lustre/.lustre (Oops).&lt;br/&gt;
setfattr: /mnt/lustre/.lustre: Operation not permitted&lt;br/&gt;
getfattr -n user.test_md_ops /mnt/lustre/.lustre&lt;br/&gt;
getfattr: Removing leading &apos;/&apos; from absolute path names&lt;/p&gt;
&lt;ol&gt;
	&lt;li&gt;file: mnt/lustre/.lustre&lt;br/&gt;
user.test_md_ops&lt;/li&gt;
&lt;/ol&gt;


&lt;p&gt;getfattr -d /mnt/lustre/.lustre (LBUG in mo_xattr_list()).&lt;br/&gt;
setfattr -x user.test_md_ops /mnt/lustre/.lustre (Oops in osd_xattr_get()).&lt;br/&gt;
setfattr: /mnt/lustre/.lustre: Operation not permitted&lt;br/&gt;
rename /mnt/lustre/d0.sanity/d154 onto /mnt/lustre/.lustre (Oops in osd_xattr_get()).&lt;br/&gt;
mv: cannot move `/mnt/lustre/d0.sanity/d154&apos; to `/mnt/lustre/.lustre&apos;: Directory not empty&lt;br/&gt;
rename /mnt/lustre/.lustre into /mnt/lustre/d0.sanity/d154&lt;br/&gt;
 sanity test_154b: @@@@@@ FAIL: mv -T /mnt/lustre/.lustre /mnt/lustre/d0.sanity/d154 should fail. &lt;br/&gt;
  Trace dump:&lt;br/&gt;
  = /usr/lib64/lustre/tests/test-framework.sh:3617:error_noexit()&lt;br/&gt;
  = /usr/lib64/lustre/tests/test-framework.sh:3639:error()&lt;br/&gt;
  = /usr/lib64/lustre/tests/sanity.sh:7921:test_md_ops()&lt;br/&gt;
  = /usr/lib64/lustre/tests/sanity.sh:7931:test_154b()&lt;br/&gt;
  = /usr/lib64/lustre/tests/test-framework.sh:3872:run_one()&lt;br/&gt;
  = /usr/lib64/lustre/tests/test-framework.sh:3901:run_one_logged()&lt;br/&gt;
  = /usr/lib64/lustre/tests/test-framework.sh:3721:run_test()&lt;br/&gt;
  = /usr/lib64/lustre/tests/sanity.sh:7934:main()&lt;br/&gt;
Dumping lctl log to /tmp/test_logs/2012-08-20/111348/sanity.test_154b.*.1345486430.log&lt;br/&gt;
Dumping logs only on local client.&lt;br/&gt;
FAIL 154b (0s)&lt;/p&gt;

&lt;p&gt;== sanity test 154c: Test md operations on .lustre/fid == 11:13:50 (1345486430)&lt;br/&gt;
stat /mnt/lustre/.lustre/fid&lt;br/&gt;
stat: cannot stat `/mnt/lustre/.lustre/fid&apos;: No such file or directory&lt;br/&gt;
 sanity test_154c: @@@@@@ FAIL: cannot stat /mnt/lustre/.lustre/fid. &lt;br/&gt;
  Trace dump:&lt;br/&gt;
  = /usr/lib64/lustre/tests/test-framework.sh:3617:error_noexit()&lt;br/&gt;
  = /usr/lib64/lustre/tests/test-framework.sh:3639:error()&lt;br/&gt;
  = /usr/lib64/lustre/tests/sanity.sh:7874:test_md_ops()&lt;br/&gt;
  = /usr/lib64/lustre/tests/sanity.sh:7939:test_154c()&lt;br/&gt;
  = /usr/lib64/lustre/tests/test-framework.sh:3872:run_one()&lt;br/&gt;
  = /usr/lib64/lustre/tests/test-framework.sh:3901:run_one_logged()&lt;br/&gt;
  = /usr/lib64/lustre/tests/test-framework.sh:3721:run_test()&lt;br/&gt;
  = /usr/lib64/lustre/tests/sanity.sh:7942:main()&lt;br/&gt;
Dumping lctl log to /tmp/test_logs/2012-08-20/111348/sanity.test_154c.*.1345486430.log&lt;br/&gt;
Dumping logs only on local client.&lt;br/&gt;
FAIL 154c (0s)&lt;br/&gt;
..................................................== sanity sanity.sh test complete, duration 1 sec == 11:13:50 (1345486430)&lt;br/&gt;
/usr/lib64/lustre/tests/sanity.sh: FAIL: test_154b mv -T /mnt/lustre/.lustre /mnt/lustre/d0.sanity/d154 should fail.&lt;br/&gt;
/usr/lib64/lustre/tests/sanity.sh: FAIL: test_154c cannot stat /mnt/lustre/.lustre/fid.&lt;br/&gt;
rm: cannot remove `/mnt/lustre/d0.sanity/d154/.lustre&apos;: Operation not permitted&lt;br/&gt;
 sanity : @@@@@@ FAIL: remove sub-test dirs failed &lt;br/&gt;
  Trace dump:&lt;br/&gt;
  = /usr/lib64/lustre/tests/test-framework.sh:3617:error_noexit()&lt;br/&gt;
  = /usr/lib64/lustre/tests/test-framework.sh:3639:error()&lt;br/&gt;
  = /usr/lib64/lustre/tests/test-framework.sh:3238:check_and_cleanup_lustre()&lt;br/&gt;
  = /usr/lib64/lustre/tests/sanity.sh:9648:main()&lt;br/&gt;
Dumping lctl log to /tmp/test_logs/2012-08-20/111348/sanity..*.1345486430.log&lt;br/&gt;
Dumping logs only on local client.&lt;br/&gt;
sanity returned 0&lt;br/&gt;
Finished at Mon Aug 20 11:13:50 PDT 2012 in 2s&lt;br/&gt;
/usr/lib64/lustre/tests/auster: completed with rc 0&lt;/p&gt;

</comment>
                            <comment id="43501" author="jhammond" created="Mon, 20 Aug 2012 15:42:04 +0000"  >&lt;p&gt;Hi Bob,&lt;/p&gt;

&lt;p&gt;First off, please post your version when you get a chance.&lt;/p&gt;

&lt;p&gt;If you&apos;re basing on 3013 then .lustre has a special lookup() implementation.  So logically no creates, links, unlinks, rmdirs, or renames (to/from/into/onto) should be allowed---since you could never access the file by that name afterwards.&lt;/p&gt;

&lt;p&gt;I say allow chown, chmod, getfattr, setfattr on .lustre and .lustre/fid.&lt;/p&gt;

&lt;p&gt;stat &apos;.lustre/fid&apos; should succeed.  That it failed is worrisome.  After your patch did you check that open-by-fid still worked as intended?&lt;/p&gt;

&lt;p&gt;All that said, I think the real-boy approach is much more sound in the long term.  I will rebase my build setup to see about porting the patch to master.&lt;/p&gt;

&lt;p&gt;Thanks,&lt;/p&gt;

&lt;p&gt;John&lt;/p&gt;</comment>
                            <comment id="43502" author="bogl" created="Mon, 20 Aug 2012 16:06:03 +0000"  >&lt;p&gt;refreshed version available for review at &lt;a href=&quot;http://review.whamcloud.com/#change,3726&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/#change,3726&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I tend to agree that the approach minimizing special case code would be more elegant, but couldn&apos;t massage the existing attachment into a working form.  refreshed the old commit as the quicker path.&lt;/p&gt;</comment>
                            <comment id="43506" author="bogl" created="Mon, 20 Aug 2012 16:26:59 +0000"  >&lt;p&gt;And to answer your question, yes the existing open-by-fid test works fine. example results:&lt;/p&gt;

&lt;p&gt;== sanity test 154: Open-by-FID == 13:24:16 (1345494256)&lt;br/&gt;
stat fid &lt;span class=&quot;error&quot;&gt;&amp;#91;0x200000400:0x3:0x0&amp;#93;&lt;/span&gt;&lt;br/&gt;
touch fid &lt;span class=&quot;error&quot;&gt;&amp;#91;0x200000400:0x3:0x0&amp;#93;&lt;/span&gt;&lt;br/&gt;
write to fid &lt;span class=&quot;error&quot;&gt;&amp;#91;0x200000400:0x3:0x0&amp;#93;&lt;/span&gt;&lt;br/&gt;
read fid &lt;span class=&quot;error&quot;&gt;&amp;#91;0x200000400:0x3:0x0&amp;#93;&lt;/span&gt;&lt;br/&gt;
append write to fid &lt;span class=&quot;error&quot;&gt;&amp;#91;0x200000400:0x3:0x0&amp;#93;&lt;/span&gt;&lt;br/&gt;
rename fid &lt;span class=&quot;error&quot;&gt;&amp;#91;0x200000400:0x3:0x0&amp;#93;&lt;/span&gt;&lt;br/&gt;
mv: cannot move `/mnt/lustre/.lustre/fid/&lt;span class=&quot;error&quot;&gt;&amp;#91;0x200000400:0x3:0x0&amp;#93;&lt;/span&gt;&apos; to `/mnt/lustre/f.sanity.154.1&apos;: Operation not permitted&lt;br/&gt;
mv: cannot move `/mnt/lustre/f.sanity.154.1&apos; to `/mnt/lustre/.lustre/fid/&lt;span class=&quot;error&quot;&gt;&amp;#91;0x200000400:0x3:0x0&amp;#93;&lt;/span&gt;&apos;: Operation not permitted&lt;br/&gt;
truncate fid &lt;span class=&quot;error&quot;&gt;&amp;#91;0x200000400:0x3:0x0&amp;#93;&lt;/span&gt;&lt;br/&gt;
link fid &lt;span class=&quot;error&quot;&gt;&amp;#91;0x200000400:0x3:0x0&amp;#93;&lt;/span&gt;&lt;br/&gt;
setfacl fid &lt;span class=&quot;error&quot;&gt;&amp;#91;0x200000400:0x3:0x0&amp;#93;&lt;/span&gt;&lt;br/&gt;
getfacl fid &lt;span class=&quot;error&quot;&gt;&amp;#91;0x200000400:0x3:0x0&amp;#93;&lt;/span&gt;&lt;br/&gt;
getfacl: Removing leading &apos;/&apos; from absolute path names&lt;br/&gt;
unlink fid &lt;span class=&quot;error&quot;&gt;&amp;#91;0x200000400:0x3:0x0&amp;#93;&lt;/span&gt;&lt;br/&gt;
unlink: cannot unlink `/mnt/lustre/.lustre/fid/&lt;span class=&quot;error&quot;&gt;&amp;#91;0x200000400:0x3:0x0&amp;#93;&lt;/span&gt;&apos;: Operation not permitted&lt;br/&gt;
mknod fid &lt;span class=&quot;error&quot;&gt;&amp;#91;0x200000400:0x3:0x0&amp;#93;&lt;/span&gt;&lt;br/&gt;
mknod: `/mnt/lustre/.lustre/fid/&lt;span class=&quot;error&quot;&gt;&amp;#91;0x200000400:0x3:0x0&amp;#93;&lt;/span&gt;&apos;: Operation not permitted&lt;br/&gt;
stat non-exist fid &lt;span class=&quot;error&quot;&gt;&amp;#91;0xf00000400:0x1:0x0&amp;#93;&lt;/span&gt;&lt;br/&gt;
stat: cannot stat `/mnt/lustre/.lustre/fid/&lt;span class=&quot;error&quot;&gt;&amp;#91;0xf00000400:0x1:0x0&amp;#93;&lt;/span&gt;&apos;: No such file or directory&lt;br/&gt;
write to non-exist fid &lt;span class=&quot;error&quot;&gt;&amp;#91;0xf00000400:0x1:0x0&amp;#93;&lt;/span&gt;&lt;br/&gt;
/usr/lib64/lustre/tests/sanity.sh: line 7846: /mnt/lustre/.lustre/fid/&lt;span class=&quot;error&quot;&gt;&amp;#91;0xf00000400:0x1:0x0&amp;#93;&lt;/span&gt;: Operation not permitted&lt;br/&gt;
link new fid &lt;span class=&quot;error&quot;&gt;&amp;#91;0xf00000400:0x1:0x0&amp;#93;&lt;/span&gt;&lt;br/&gt;
ln: creating hard link `/mnt/lustre/.lustre/fid/&lt;span class=&quot;error&quot;&gt;&amp;#91;0xf00000400:0x1:0x0&amp;#93;&lt;/span&gt;&apos; =&amp;gt; `/mnt/lustre/f.sanity.154&apos;: Operation not permitted&lt;br/&gt;
ls &lt;span class=&quot;error&quot;&gt;&amp;#91;0x200000400:0xb:0x0&amp;#93;&lt;/span&gt;&lt;br/&gt;
touch &lt;span class=&quot;error&quot;&gt;&amp;#91;0x200000400:0xb:0x0&amp;#93;&lt;/span&gt;/f.sanity.154.1&lt;br/&gt;
touch /mnt/lustre/.lustre/fid/f.sanity.154&lt;br/&gt;
touch: setting times of `/mnt/lustre/.lustre/fid/f.sanity.154&apos;: Invalid argument&lt;br/&gt;
Open-by-FID succeeded&lt;br/&gt;
Resetting fail_loc on all nodes...done.&lt;br/&gt;
PASS 154 (1s)&lt;/p&gt;</comment>
                            <comment id="43555" author="jhammond" created="Tue, 21 Aug 2012 10:17:04 +0000"  >&lt;p&gt;I think this patch is fine for 2.1.x, but may not be the right approach for master (I tried 2.2.93 + epsilon).  There are places where the osd code assumes an inode and some of these are before any of the members of mdd_{obf,dot_lustre}_obj_ops are invoked.&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;# uname -r
2.6.32-279.5.1.el6.x86_64
# cd /usr/src/lustre-release/
# git show HEAD | head
commit f67757d350fe010592927a45f0c99d9551165a3b
Author: John L. Hammond &amp;lt;jhammond@tacc.utexas.edu&amp;gt;
Date:   Wed Jun 13 11:20:12 2012 -0500

    LU-1518 mdd: Fixup mdd_{obf,dot_lustre}_obj_ops.

    Define several missing md_object ops for .lustre/fid.  Unify
    attribute handling for .lustre with that of normal md_objects.

    Signed-off-by: John L. Hammond &amp;lt;jhammond@tacc.utexas.edu&amp;gt;
# ./lustre/tests/llmount.sh
...
# cat /proc/fs/lustre/version
lustre: 2.2.93
kernel: patchless_client
build:  2.2.93-gbaaf628-CHANGED-2.6.32-279.5.1.el6.x86_64
# cd /mnt/lustre/
# su sanity
$ chown sanity: .lustre
chown: changing ownership of `.lustre&apos;: Operation not permitted
$ chown sanity: .lustre/fid

BUG: unable to handle kernel NULL pointer dereference at 0000000000000340
IP: [&amp;lt;ffffffffa0aa7c90&amp;gt;] osd_xattr_get+0x170/0x350 [osd_ldiskfs]
PGD 5d941067 PUD 5d95b067 PMD 0
Oops: 0000 [#1] SMP
last sysfs file: /sys/devices/system/cpu/possible
CPU 0
Modules linked in: lustre(U) obdfilter(U) ost(U) cmm(U) mdt(U) osd_ldiskfs(U) fsfilt_ldiskfs(U) ldi\
skfs(U) exportfs mdd(U) mds(U) mgs(U) lquota(U) jbd obdecho(U) mgc(U) lov(U) osc(U) mdc(U) lmv(U) f\
id(U) fld(U) ptlrpc(U) obdclass(U) lvfs(U) ksocklnd(U) lnet(U) sha512_generic sha256_generic libcfs\
(U) autofs4 nfs lockd fscache nfs_acl auth_rpcgss sunrpc ipt_REJECT nf_conntrack_ipv4 nf_defrag_ipv\
4 iptable_filter ip_tables ip6t_REJECT nf_conntrack_ipv6 nf_defrag_ipv6 xt_state nf_conntrack ip6ta\
ble_filter ip6_tables ipv6 dm_mirror dm_region_hash dm_log dm_mod microcode virtio_balloon virtio_n\
et i2c_piix4 i2c_core ext4 mbcache jbd2 virtio_blk virtio_pci virtio_ring virtio pata_acpi ata_gene\
ric ata_piix [last unloaded: speedstep_lib]

Pid: 2653, comm: mdt00_002 Not tainted 2.6.32-279.5.1.el6.x86_64 #1 Bochs Bochs
RIP: 0010:[&amp;lt;ffffffffa0aa7c90&amp;gt;]  [&amp;lt;ffffffffa0aa7c90&amp;gt;] osd_xattr_get+0x170/0x350 [osd_ldiskfs]
RSP: 0018:ffff8800667d1af0  EFLAGS: 00010246
RAX: 0000000000000000 RBX: ffffffffffffff30 RCX: 0000000000000000
RDX: ffff88006667e2c0 RSI: ffffffffa04c7a3c RDI: ffffffffa0ac872b
RBP: ffff8800667d1b30 R08: fffffffffffffffe R09: 00000000fffffffe
R10: 0000000000000000 R11: 0000000000000004 R12: ffff8800667d1b58
R13: ffff880066762b80 R14: ffffffffa04c7a2c R15: 0000000000000000
FS:  00007fdae5c05700(0000) GS:ffff880002200000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
CR2: 0000000000000340 CR3: 000000005d8e6000 CR4: 00000000000006f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Process mdt00_002 (pid: 2653, threadinfo ffff8800667d0000, task ffff88007bc09500)
Stack:
 fffffffffffffffe ffff8800667d8000 ffff8800667c3000 ffff88007d366780
&amp;lt;d&amp;gt; ffff8800667c3000 ffff8800667c3250 ffff88007ce16000 ffff8800667c3010
&amp;lt;d&amp;gt; ffff8800667d1b60 ffffffffa0497f84 ffff8800667d1b58 0000000000000008
Call Trace:
 [&amp;lt;ffffffffa0497f84&amp;gt;] dt_version_get+0x54/0x190 [obdclass]
 [&amp;lt;ffffffffa0b2aa3f&amp;gt;] mdt_obj_version_get+0x6f/0x1f0 [mdt]
 [&amp;lt;ffffffffa0b2b73f&amp;gt;] mdt_version_get_check_save+0x2f/0xf0 [mdt]
 [&amp;lt;ffffffffa0b30a51&amp;gt;] mdt_attr_set+0x251/0x590 [mdt]
 [&amp;lt;ffffffffa0b310f5&amp;gt;] mdt_reint_setattr+0x365/0x1330 [mdt]
 [&amp;lt;ffffffffa062f886&amp;gt;] ? __req_capsule_get+0x176/0x750 [ptlrpc]
 [&amp;lt;ffffffffa0603646&amp;gt;] ? lustre_pack_reply_flags+0xb6/0x210 [ptlrpc]
 [&amp;lt;ffffffffa0b2a281&amp;gt;] mdt_reint_rec+0x41/0xe0 [mdt]
 [&amp;lt;ffffffffa0b23ada&amp;gt;] mdt_reint_internal+0x50a/0x810 [mdt]
 [&amp;lt;ffffffffa0b23e24&amp;gt;] mdt_reint+0x44/0xe0 [mdt]
 [&amp;lt;ffffffffa0b17932&amp;gt;] mdt_handle_common+0x922/0x1740 [mdt]
 [&amp;lt;ffffffffa0b18825&amp;gt;] mdt_regular_handle+0x15/0x20 [mdt]
 [&amp;lt;ffffffffa061382d&amp;gt;] ptlrpc_server_handle_request+0x40d/0xea0 [ptlrpc]
 [&amp;lt;ffffffffa031765e&amp;gt;] ? cfs_timer_arm+0xe/0x10 [libcfs]
 [&amp;lt;ffffffffa060acb7&amp;gt;] ? ptlrpc_wait_event+0xa7/0x2a0 [ptlrpc]
 [&amp;lt;ffffffff810533f3&amp;gt;] ? __wake_up+0x53/0x70
 [&amp;lt;ffffffffa0614e19&amp;gt;] ptlrpc_main+0xb59/0x1860 [ptlrpc]
 [&amp;lt;ffffffffa06142c0&amp;gt;] ? ptlrpc_main+0x0/0x1860 [ptlrpc]
 [&amp;lt;ffffffff8100c14a&amp;gt;] child_rip+0xa/0x20
 [&amp;lt;ffffffffa06142c0&amp;gt;] ? ptlrpc_main+0x0/0x1860 [ptlrpc]
 [&amp;lt;ffffffffa06142c0&amp;gt;] ? ptlrpc_main+0x0/0x1860 [ptlrpc]
 [&amp;lt;ffffffff8100c140&amp;gt;] ? child_rip+0x0/0x20
Code: 33 4b 03 00 00 00 00 00 c7 05 21 4b 03 00 02 00 00 00 48 c7 c7 80 c7 ad a0 48 8b 48 40 48 8b \
93 10 04 00 00 31 c0 e8 50 f8 87 ff &amp;lt;48&amp;gt; 8b 83 10 04 00 00 49 89 04 24 b8 08 00 00 00 48 8b 5d d8 4\
c
RIP  [&amp;lt;ffffffffa0aa7c90&amp;gt;] osd_xattr_get+0x170/0x350 [osd_ldiskfs]
 RSP &amp;lt;ffff8800667d1af0&amp;gt;
CR2: 0000000000000340
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="43560" author="bogl" created="Tue, 21 Aug 2012 11:40:43 +0000"  >&lt;p&gt;John, given this LBUG I&apos;m surprised you gave &lt;a href=&quot;http://review.whamcloud.com/#change,3726&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;http://review.whamcloud.com/#change,3726&lt;/a&gt; a +review.&lt;/p&gt;</comment>
                            <comment id="43569" author="bogl" created="Tue, 21 Aug 2012 13:34:27 +0000"  >&lt;p&gt;John,&lt;br/&gt;
I think the small additional patch below will avoid the BUG you see on chown of .lustre/fid.  I really hate adding even more special case code, but I don&apos;t see a way around it in the current framework.  I note that many other mdt_reint ops already have special case tests for mdt_object_obf().  I&apos;m not expert enough to spot additional places that might also need special case checks.&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;--- a/lustre/mdt/mdt_reint.c
+++ b/lustre/mdt/mdt_reint.c
@@ -492,6 +492,9 @@ static int mdt_reint_setattr(struct mdt_thread_info *info,
         if (IS_ERR(mo))
                 GOTO(out, rc = PTR_ERR(mo));
 
+       if (mdt_object_obf(mo))
+               GOTO(out_put, rc = -EPERM);
+
         /* start a log jounal handle if needed */
         if (!(mdt_conn_flags(info) &amp;amp; OBD_CONNECT_SOM)) {
                 if ((ma-&amp;gt;ma_attr.la_valid &amp;amp; LA_SIZE) ||

&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="43570" author="bogl" created="Tue, 21 Aug 2012 13:35:43 +0000"  >&lt;p&gt;I see that cut/paste didn&apos;t go in very nicely.  Will add the patch as an attachment with better formatting.&lt;/p&gt;</comment>
                            <comment id="43571" author="bogl" created="Tue, 21 Aug 2012 13:37:55 +0000"  >&lt;p&gt;patch with incremental special case test in mdt_reint_setattr()&lt;/p&gt;</comment>
                            <comment id="43576" author="jhammond" created="Tue, 21 Aug 2012 16:36:51 +0000"  >&lt;p&gt;Please add &lt;a href=&quot;https://jira.whamcloud.com/browse/LU-1777&quot; title=&quot;open-by-fid: deadlock in lock_rename()&quot; class=&quot;issue-link&quot; data-issue-key=&quot;LU-1777&quot;&gt;LU-1777&lt;/a&gt; as a sub-issue, as I guess I don&apos;t have sufficient Jira clout to do so.&lt;/p&gt;</comment>
                            <comment id="43583" author="jhammond" created="Tue, 21 Aug 2012 17:11:57 +0000"  >&lt;p&gt;With your latest patch I found one more LBUG related to the handling of .lustre/fid.  If root does&lt;/p&gt;
&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;cd /mnt/lustre
sys_mkdir XXX
sys_rename XXX .lustre/fid
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;
&lt;p&gt;Then you get to the same null pointer dereference osd_xattr_get().  But I didn&apos;t have much time to poke at it, so I bet there are probably more there.&lt;/p&gt;</comment>
                            <comment id="43584" author="jhammond" created="Tue, 21 Aug 2012 17:13:15 +0000"  >&lt;p&gt;Results of some poking after Bob&apos;s lu1518.setattr.patch from Aug 21 2012.&lt;/p&gt;</comment>
                            <comment id="43585" author="bogl" created="Tue, 21 Aug 2012 17:20:16 +0000"  >&lt;p&gt;sys_mkdir?  sys_rename?  what are these?&lt;/p&gt;

&lt;p&gt;I can&apos;t reproduce this with ordinary cmds:&lt;/p&gt;


&lt;p&gt;&lt;span class=&quot;error&quot;&gt;&amp;#91;root@centos26 ~&amp;#93;&lt;/span&gt;# cd /mnt/lustre&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;root@centos26 lustre&amp;#93;&lt;/span&gt;# mkdir XXX&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;root@centos26 lustre&amp;#93;&lt;/span&gt;# rename XXX .lustre/fid&lt;br/&gt;
&lt;span class=&quot;error&quot;&gt;&amp;#91;root@centos26 lustre&amp;#93;&lt;/span&gt;# &lt;/p&gt;

&lt;p&gt;No LBUG, no pointer dereference seen.&lt;/p&gt;</comment>
                            <comment id="43586" author="jhammond" created="Tue, 21 Aug 2012 17:33:00 +0000"  >&lt;p&gt;sys_rename is an imaginary command that only calls rename(argv&lt;span class=&quot;error&quot;&gt;&amp;#91;1&amp;#93;&lt;/span&gt;, argv&lt;span class=&quot;error&quot;&gt;&amp;#91;2&amp;#93;&lt;/span&gt;).&lt;/p&gt;

&lt;div class=&quot;preformatted panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;preformattedContent panelContent&quot;&gt;
&lt;pre&gt;[root]# cd /mnt/lustre/
[root]# mkdir XXX
[root]# man mv
[root]# mv --no-target-directory XXX .lustre/fid
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</comment>
                            <comment id="43642" author="bogl" created="Wed, 22 Aug 2012 12:51:57 +0000"  >&lt;p&gt;additional revisions fixed LBUGs seen in sys_rename XXX .lustre/fid and sys_rename .lustre/fid XXX.  still working on other issues in bug-notes attachment.&lt;/p&gt;</comment>
                            <comment id="43681" author="jhammond" created="Thu, 23 Aug 2012 08:08:20 +0000"  >&lt;p&gt;Thanks Bob.&lt;/p&gt;

&lt;p&gt;I pushed the commands I used in bug-notes to &lt;a href=&quot;https://github.com/jhammond/sys&quot; class=&quot;external-link&quot; target=&quot;_blank&quot; rel=&quot;nofollow noopener&quot;&gt;https://github.com/jhammond/sys&lt;/a&gt;.  There all pretty simple and you can probably get by without them.  But they are useful in that they do what it says on the can, whereas mv, ln, or ls do a lot of stating end up doing different things depending on the types of their operands, whether you added a trailing slash, and so on.&lt;/p&gt;</comment>
                            <comment id="43716" author="bogl" created="Thu, 23 Aug 2012 17:27:47 +0000"  >&lt;p&gt;John, Thanks for pointing me at your sys_ tests. I had no problem cloning your git &amp;amp; building the tiny tests.  That should make it a bit easier to exactly reproduce your results.&lt;/p&gt;</comment>
                            <comment id="43810" author="pjones" created="Mon, 27 Aug 2012 12:40:07 +0000"  >&lt;p&gt;Niu is working on this now&lt;/p&gt;</comment>
                            <comment id="44070" author="pjones" created="Fri, 31 Aug 2012 20:04:28 +0000"  >&lt;p&gt;Landed for 2.3 and 2.4. If any more edge cases are found let&apos;s track them under a new ticket&lt;/p&gt;</comment>
                            <comment id="44071" author="jhammond" created="Fri, 31 Aug 2012 20:07:23 +0000"  >&lt;p&gt;Hi Peter,&lt;/p&gt;

&lt;p&gt;I believe that most of the related issues have been addressed and will verify exactly which.  However 1777 has not been addresses by the patch and should probably be changed from a duplicate of this issue to an open issue.&lt;/p&gt;

&lt;p&gt;Thanks,&lt;/p&gt;

&lt;p&gt;John&lt;/p&gt;</comment>
                            <comment id="44072" author="pjones" created="Sat, 1 Sep 2012 09:03:56 +0000"  >&lt;p&gt;ok - thanks John!&lt;/p&gt;</comment>
                    </comments>
                <issuelinks>
                            <issuelinktype id="10011">
                    <name>Related</name>
                                            <outwardlinks description="is related to ">
                                        <issuelink>
            <issuekey id="14949">LU-1532</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="14947">LU-1531</issuekey>
        </issuelink>
                            </outwardlinks>
                                                                <inwardlinks description="is related to">
                                        <issuelink>
            <issuekey id="15546">LU-1777</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="17500">LU-2780</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="14997">LU-1549</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="14998">LU-1550</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="15001">LU-1553</issuekey>
        </issuelink>
            <issuelink>
            <issuekey id="15000">LU-1552</issuekey>
        </issuelink>
                            </inwardlinks>
                                    </issuelinktype>
                    </issuelinks>
                <attachments>
                            <attachment id="11638" name="LU-1518-sanity-tests.patch" size="3261" author="jhammond" created="Wed, 20 Jun 2012 13:33:04 +0000"/>
                            <attachment id="11790" name="bug-notes" size="18106" author="jhammond" created="Tue, 21 Aug 2012 17:13:15 +0000"/>
                            <attachment id="11786" name="lu1518.setattr.patch" size="6220" author="bogl" created="Tue, 21 Aug 2012 13:37:55 +0000"/>
                            <attachment id="11671" name="make-dot-lustre-obf-a-real-inode.patch" size="26944" author="jhammond" created="Tue, 3 Jul 2012 17:14:46 +0000"/>
                    </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|hzv5rz:</customfieldvalue>

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