/*
* NOTE: Currently there can be only one vg per text file, and locking
- * assumes VG's metadata is only held in metadata areas on PVs
+ * assumes VG's metadata is only held in metadata areas on PVs
* inside the VG.
*/
log_debug("Renaming %s to %s", tc->path_edit, tc->path_live);
if (rename(tc->path_edit, tc->path_live)) {
log_error("%s: rename to %s failed: %s", tc->path_edit,
- tc->path_edit, strerror(errno));
+ tc->path_live, strerror(errno));
return 0;
}
}
- sync();
+ sync_dir(tc->path_edit);
return 1;
}
log_error("%s: rename to %s failed: %s",
tc->path_live, newname,
strerror(errno));
- sync();
+ sync_dir(newname);
return 0;
}
}
return 0;
}
- sync();
+ sync_dir(tc->path_live);
return 1;
}