[LU-9342] It is possible that user defined LOVEA contains uninstantiated flag Created: 14/Apr/17 Updated: 01/May/17 Resolved: 28/Apr/17 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | Lustre 2.10.0 |
| Fix Version/s: | Lustre 2.10.0 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Maloo | Assignee: | Zhenyu Xu |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | pfl | ||
| Issue Links: |
|
||||||||||||||||
| Severity: | 3 | ||||||||||||||||
| Rank (Obsolete): | 9223372036854775807 | ||||||||||||||||
| Description |
|
This issue was created by maloo for bobijam <bobijam.xu@intel.com> This issue relates to the following test suite run: https://testing.hpdd.intel.com/test_sets/67af86be-2027-11e7-9073-5254006e85c2. The sub-test test_184d failed with the following error: swap /mnt/lustre/d184d.sanity/f184d.sanity-1 /mnt/lustre/d184d.sanity/f184d.sanity-2 layouts failed Info required for matching: sanity 184d If "lfs swap" tries to swap a file with partially instantiated layout, the partial LOVEA will passed into lod_declare_xattr_set() |
| Comments |
| Comment by Gerrit Updater [ 14/Apr/17 ] |
|
Bobi Jam (bobijam@hotmail.com) uploaded a new patch: https://review.whamcloud.com/26619 |
| Comment by Gerrit Updater [ 14/Apr/17 ] |
|
Bobi Jam (bobijam@hotmail.com) uploaded a new patch: https://review.whamcloud.com/26635 |
| Comment by Andreas Dilger [ 20/Apr/17 ] |
|
I think the opposite problem is also true - if someone uses getxattr() + setxattr() in userspace to copy a layout to a new file (e.g. tar), then it will copy the LCME_FL_INIT flag to the new file. The llite or MDS setxattr handler needs to clear the INIT flag so that the MDS handles this properly. |
| Comment by Andreas Dilger [ 20/Apr/17 ] |
|
It looks like |
| Comment by Zhenyu Xu [ 24/Apr/17 ] |
|
getxattr() get the EA buffer, and the magic of the LOVEA getting from the buffer surely doesn't contain LOV_MAGIC_DEF (which is a magic only set in the memory buffer, working with LCME_FL_INIT for MDS to inform LOD not to create OST objects), and when this LOVEA buffer passed to MDS with setxattr, MDS will treat it as a LOVEA template, and will create OST objects for the new file. Specifically, patch of this ticket fixes lod_use_defined_striping(), while the getxattr()+setxattr() call path comes to lod_qos_parse_config() will not call lod_use_defined_striping(), but go through it, creating lod_object::ldo_comp_entries according to the layout template without heeding the overly detailed information getting from the old file (including the LCME_FL_INIT flag and ost IDs).
|
| Comment by Gerrit Updater [ 28/Apr/17 ] |
|
Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/26619/ |
| Comment by Peter Jones [ 28/Apr/17 ] |
|
Landed for 2.10 |
| Comment by Gerrit Updater [ 01/May/17 ] |
|
Jinshan Xiong (jinshan.xiong@intel.com) merged in patch https://review.whamcloud.com/26635/ |