[LU-7787] There is space in the middle of filename under PENDING Created: 17/Feb/16  Updated: 17/Dec/19  Resolved: 03/Mar/18

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

Type: Bug Priority: Minor
Reporter: Di Wang Assignee: Andreas Dilger
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Related
is related to LU-13070 mdd_orphan_destroy loop caused by com... Resolved
is related to LU-2311 clean up MDD orphan handling code style Resolved
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

The orphan filename format is

#define ORPHAN_FILE_NAME_FORMAT         "%016llx:%08x:%08x:%2x"

        rc = snprintf(key, NAME_MAX + 1, ORPHAN_FILE_NAME_FORMAT,
                      (long long unsigned int)fid_seq(lf),
                      fid_oid(lf), fid_ver(lf), op);
        if (rc > 0)
                return (struct dt_key*) key;

So "%2x" might cause the space between fid_ver(lf) and op, instead it should be changed to %02x.

And also a few other place needs to be fixed to resolve compatibility issue. Comments from Andreas:

looks like this will also need an added case in orph_index_delete() to handle the broken filename format. 
both that check and the orph_key_fill_18() code should be put under #if LUSTRE_VERSION_CODE checks.
 possibly the _18 version should just be deleted at this point, or replaced by a "_28" check that allows the space in it


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

Andreas Dilger (andreas.dilger@intel.com) uploaded a new patch: https://review.whamcloud.com/30547
Subject: LU-7787 mdd: clean up orphan object handling
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: a02fd4573fea82b30a9e2f294d871110f6017ee3

Comment by Gerrit Updater [ 03/Mar/18 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch https://review.whamcloud.com/30547/
Subject: LU-7787 mdd: clean up orphan object handling
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 473a4adc4ec2bea393c5b438b38b86f2ada19288

Comment by Peter Jones [ 03/Mar/18 ]

Landed for 2.11

Comment by Gerrit Updater [ 27/Feb/19 ]

Andreas Dilger (adilger@whamcloud.com) uploaded a new patch: https://review.whamcloud.com/34337
Subject: LU-7787 mdd: clean up orphan object handling
Project: fs/lustre-release
Branch: b2_10
Current Patch Set: 1
Commit: a8c4f8bdf621603f40fc190ba87da8454b51ee14

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