[LU-5262] setfacl on striped directory will cause the striped directory crash Created: 27/Jun/14 Updated: 02/Jul/14 Resolved: 02/Jul/14 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | Lustre 2.6.0 |
| Type: | Bug | Priority: | Critical |
| Reporter: | nasf (Inactive) | Assignee: | nasf (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | HB | ||
| Severity: | 3 |
| Rank (Obsolete): | 14688 |
| Description |
|
The mdd_acl_set() sets size unexpectedly on the master object and cause the master object's directory content is truncated. This corruption can be easily reproduced by the sanity test_125, unfortunately, there is no way to read the master object directory content directly until we work on the patch for |
| Comments |
| Comment by Andreas Dilger [ 27/Jun/14 ] |
|
Isn't the fix here to clear LA_SIZE (and most others except LA_MODE) from attr->la_valid bits in mdd_xattr_set() before mdo_attr_set() is called so that these values are not all changed? Otherwise, there is a chance that this will set stale values into the inode if it is changed concurrently (e.g. pdirops). It isn't clear why |
| Comment by nasf (Inactive) [ 27/Jun/14 ] |
|
Here is the patch: It is an important patch, should be landed to Lustre-2.6 |
| Comment by nasf (Inactive) [ 27/Jun/14 ] |
|
The basic idea of the patch is that: "NOT set size on directory". The Sanity test_125 test such case, that is why |
| Comment by Alex Zhuravlev [ 27/Jun/14 ] |
|
probably it makes sense to check in OSD for LA_SIZE in case of non-regular file. |
| Comment by nasf (Inactive) [ 27/Jun/14 ] |
|
Then all OSDs need to check LA_SIZE. Why not control that in MDD/LOD, then no need to worry about new OSD in future. |
| Comment by Alex Zhuravlev [ 27/Jun/14 ] |
|
MDD/LOD/OFD should not try to do this of course. I'm saying about something more like LASSERT() in OSD. |
| Comment by Di Wang [ 28/Jun/14 ] |
|
Ah it seems the problem is that in lod_attr_get, it tries to merge the size from all sub-stripes, then in lod_attr_set it set the merged size to master object. |
| Comment by nasf (Inactive) [ 02/Jul/14 ] |
|
The patch has been landed to master |