// check fsid with omap
// get omap fsid
- int omap_fsid_fd;
char omap_fsid_buf[PATH_MAX];
struct ::stat omap_fsid_stat;
snprintf(omap_fsid_buf, sizeof(omap_fsid_buf), "%s/osd_uuid", omap_dir.c_str());
dout(10) << __FUNC__ << ": osd_uuid not found under omap, "
<< "assume as matched."
<< dendl;
- }else{
+ } else {
+ int omap_fsid_fd;
// if osd_uuid exists, compares osd_uuid with fsid
omap_fsid_fd = ::open(omap_fsid_buf, O_RDONLY, 0644);
if (omap_fsid_fd < 0) {
}
ret = read_fsid(omap_fsid_fd, &omap_fsid);
VOID_TEMP_FAILURE_RETRY(::close(omap_fsid_fd));
- omap_fsid_fd = -1; // defensive
if (ret < 0) {
derr << __FUNC__ << ": error reading omap_fsid_fd"
<< ", omap_fsid = " << omap_fsid