From e4f445df43ef53633861c82bd2adc59b10fa1a6c Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Thu, 8 Dec 2011 04:11:32 -0700 Subject: [PATCH] Polish: debug messages on swap.state rename failure --- src/fs/ufs/store_dir_ufs.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/fs/ufs/store_dir_ufs.cc b/src/fs/ufs/store_dir_ufs.cc index 7e79850519..1f9f3f4c56 100644 --- a/src/fs/ufs/store_dir_ufs.cc +++ b/src/fs/ufs/store_dir_ufs.cc @@ -733,14 +733,15 @@ UFSSwapDir::closeTmpSwapLog() file_close(swaplog_fd); if (xrename(new_path, swaplog_path) < 0) { - fatal("commonUfsDirCloseTmpSwapLog: rename failed"); + debugs(50, DBG_IMPORTANT, "ERROR: " << swaplog_path << ": " << xstrerror()); + fatalf("Failed to rename log file %s to %s.new", swaplog_path, swaplog_path); } fd = file_open(swaplog_path, O_WRONLY | O_CREAT | O_BINARY); if (fd < 0) { - debugs(50, 1, "" << swaplog_path << ": " << xstrerror()); - fatal("commonUfsDirCloseTmpSwapLog: Failed to open swap log."); + debugs(50, DBG_IMPORTANT, "ERROR: " << swaplog_path << ": " << xstrerror()); + fatalf("Failed to open swap log %s", swaplog_path); } safe_free(swaplog_path); -- 2.47.2