[LU-6834] idx_array is overwritten in lod_prep_md_striped_create() Created: 10/Jul/15  Updated: 01/Jul/16  Resolved: 21/Jul/15

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

Type: Bug Priority: Blocker
Reporter: Di Wang Assignee: Di Wang
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Related
is related to LU-6831 The ticket for tracking all DNE2 bugs Reopened
Severity: 3
Rank (Obsolete): 9223372036854775807

 Description   

The idx_array is over_written in lod_prep_md_striped_create(), here is the fix

@@ -1895,7 +1895,7 @@ static int lod_prep_md_striped_create(const struct lu_env *env,
                       idx, i, PFID(&fid));
                idx_array[i] = idx;
                /* Set the start index for next stripe allocation */
-               if (i < stripe_count)
+               if (i < stripe_count - 1)
                        idx_array[i + 1] = (idx + 1) %
                                           (lod->lod_remote_mdt_count + 1);
                /* tgt_dt and fid must be ready after search avaible OSP

Otherwise idx_array will be overwritten.



 Comments   
Comment by Gerrit Updater [ 11/Jul/15 ]

wangdi (di.wang@intel.com) uploaded a new patch: http://review.whamcloud.com/15572
Subject: LU-6834 lod: fix idx_array overwritten
Project: fs/lustre-release
Branch: master
Current Patch Set: 1
Commit: bc9d7f294533d193585de720c99433d0f2bd18e3

Comment by Gerrit Updater [ 21/Jul/15 ]

Oleg Drokin (oleg.drokin@intel.com) merged in patch http://review.whamcloud.com/15572/
Subject: LU-6834 lod: fix idx_array overwritten
Project: fs/lustre-release
Branch: master
Current Patch Set:
Commit: 8fd8d4ad055b41ec89b5f81f9318a54ff9ffeed2

Comment by Peter Jones [ 21/Jul/15 ]

Landed for 2.8

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