[LU-2858] Attempts to delete .lustre/ should fail with EPERM Created: 25/Feb/13  Updated: 29/Apr/14  Resolved: 08/Mar/13

Status: Resolved
Project: Lustre
Component/s: None
Affects Version/s: Lustre 2.4.0
Fix Version/s: Lustre 2.4.0

Type: Bug Priority: Blocker
Reporter: Henri Doreau (Inactive) Assignee: Di Wang
Resolution: Fixed Votes: 0
Labels: LB, fid

Severity: 3
Rank (Obsolete): 6921

 Description   

On master, rm -rf $FSROOT/.lustre/ succeeds though it should (and used to) return EPERM.

According to git bisect, the regression was introduced by change I7483b0f023e4e3de6597da58d3d9f3e96c0d53b7 (http://review.whamcloud.com/#change,4339)



 Comments   
Comment by Peter Jones [ 25/Feb/13 ]

Di

Could you please look into this one?

Thanks

Peter

Comment by Henri Doreau (Inactive) [ 27/Feb/13 ]

The problem is that the aforementioned patch I7483b0f023e4e3de6597da58d3d9f3e96c0d53b7
modified mdo_unlink() to make it call the corresponding method of the parent instead
of the one of the child. Therefore, dot_lustre_mdd_unlink (that always return -EPERM)
was never invoked.

In the following patch, that fixes the issue, I've added a check to mdt_reint_unlink()
to make sure that we not trying to unlink .lustre/

See:
http://review.whamcloud.com/#change,5544

Comment by Di Wang [ 27/Feb/13 ]

Yes, I am working on the patch, the dot lustre and obf had a few other problem as well. I will post the fix soon. Thanks.

Comment by Di Wang [ 28/Feb/13 ]

http://review.whamcloud.com/#change,5555

Comment by Peter Jones [ 08/Mar/13 ]

Landed for 2.4

Generated at Sat Feb 10 01:28:49 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.