Store nid in un_nids array beginning from the
0-element. Without the patch it starts from
the 1st element because a counter is incremented
before copying.
Fixes:
e4d2d4ff74 ("LU-13306 mgc: handle large NID formats")
Signed-off-by: Sergey Cheremencev <scherementsev@ddn.com>
Change-Id: I257825de515b083df6af8b8f3ab784b48074a1fe
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/56499
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: James Simmons <jsimmons@infradead.org>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
if (NID_BYTES(&nidlist[i]) > nid_size)
continue;
- entry->un_nid_count++;
memset(&entry->un_nids[entry->un_nid_count], 0,
sizeof(entry->un_nids[entry->un_nid_count]));
memcpy(&entry->un_nids[entry->un_nid_count],
&nidlist[i], nid_size);
+ entry->un_nid_count++;
}
break;
}