The metadump v2 initialization function (introduced in a later commit) writes
the header structure into the metadump file. This will require the program to
open the metadump file before the initialization function has been invoked.
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Chandan Babu R <chandan.babu@oracle.com>
Signed-off-by: Carlos Maiolino <cem@kernel.org>
pop_cur();
}
- ret = init_metadump();
- if (ret)
- return 0;
-
start_iocur_sp = iocur_sp;
if (strcmp(argv[optind], "-") == 0) {
}
}
+ ret = init_metadump();
+ if (ret)
+ goto out;
+
exitcode = 0;
for (agno = 0; agno < mp->m_sb.sb_agcount; agno++) {
/* cleanup iocur stack */
while (iocur_sp > start_iocur_sp)
pop_cur();
-out:
+
release_metadump();
+out:
return 0;
}