+ return 0;
+}
+
+int compare_lum(struct obd_uuid *puuid, struct lov_user_md *lum_dir,
+ struct lov_user_md *lum_file1, struct lov_user_md *lum_file2)
+{
+ struct lov_comp_md_v1 *comp_dir, *comp_file1;
+ struct lov_user_md *sub_dir, *sub_file1;
+ int i, rc = 0;
+
+ if (lum_dir == NULL || lum_dir->lmm_magic != LOV_MAGIC_COMP_V1)
+ return compare(puuid, lum_dir, lum_file1, lum_file2);
+
+ comp_dir = (struct lov_comp_md_v1 *)lum_dir;
+ comp_file1 = (struct lov_comp_md_v1 *)lum_file1;
+
+ if (lum_file1->lmm_magic != lum_dir->lmm_magic) {
+ llapi_err_noerrno(LLAPI_MSG_ERROR, "file1 magic %#x != %#x\n",
+ lum_file1->lmm_magic, lum_dir->lmm_magic);
+ return 10;
+ }
+
+ if (comp_file1->lcm_entry_count != comp_dir->lcm_entry_count) {
+ llapi_err_noerrno(LLAPI_MSG_ERROR, "file1 comp cnt %d != %d\n",
+ comp_file1->lcm_entry_count,
+ comp_dir->lcm_entry_count);
+ return 11;
+ }
+
+ for (i = 0; i < comp_dir->lcm_entry_count; i++) {
+ sub_dir = (struct lov_user_md *)((char *)comp_dir +
+ comp_dir->lcm_entries[i].lcme_offset);
+ sub_file1 = (struct lov_user_md *)((char *)comp_file1 +
+ comp_file1->lcm_entries[i].lcme_offset);
+
+ rc = compare(puuid, sub_dir, sub_file1, NULL);
+ if (rc)
+ break;
+ }
+
+ return rc;