[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:
Related
is related to LU-9346 replay-single: replay of PFL file ope... Resolved
is related to LU-8998 Progressive File Layout (PFL) Resolved
is related to LU-9349 PFL known issues tracking ticket Resolved
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()>lod_declare_striped_object()>lod_prepare_create()>lod_qos_parse_config()>lod_use_defined_striping(), so that lod_use_defined_striping() also need to take care of uninstantiated component entry.



 Comments   
Comment by Gerrit Updater [ 14/Apr/17 ]

Bobi Jam (bobijam@hotmail.com) uploaded a new patch: https://review.whamcloud.com/26619
Subject: LU-9342 pfl: handle uninited component in user defined LOVEA
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: 97230fa266af407c09b3567df9093049695e2636

Comment by Gerrit Updater [ 14/Apr/17 ]

Bobi Jam (bobijam@hotmail.com) uploaded a new patch: https://review.whamcloud.com/26635
Subject: LU-9342 pfl: handle uninited component in user defined LOVEA
Project: fs/lustre-release
Branch: pfl
Current Patch Set: 1
Commit: 45e8b92d088a602893f29c72fa4cdec69ce48ff4

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 LU-9346 is addressing the issue of LCME_FL_INIT being set in the layout?

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/
Subject: LU-9342 pfl: handle uninited component in user defined LOVEA
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: cbd9992d513ec4d54fae97182747b2e31681a36e

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/
Subject: LU-9342 pfl: handle uninited component in user defined LOVEA
Project: fs/lustre-release
Branch: pfl
Current Patch Set:
Commit: 2c031f6651a5be4f8c5b58f986b584d7821b0f2b

Generated at Sat Feb 10 02:25:21 UTC 2024 using Jira 9.4.14#940014-sha1:734e6822bbf0d45eff9af51f82432957f73aa32c.