diff options
Diffstat (limited to 'src/mongo/db/storage/storage_engine_lock_file_posix.cpp')
-rw-r--r-- | src/mongo/db/storage/storage_engine_lock_file_posix.cpp | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/src/mongo/db/storage/storage_engine_lock_file_posix.cpp b/src/mongo/db/storage/storage_engine_lock_file_posix.cpp index de9e0bb97aa..ab5f12484ca 100644 --- a/src/mongo/db/storage/storage_engine_lock_file_posix.cpp +++ b/src/mongo/db/storage/storage_engine_lock_file_posix.cpp @@ -35,11 +35,11 @@ #include <boost/filesystem.hpp> #include <fcntl.h> #include <ostream> +#include <sstream> #include <sys/file.h> #include <sys/stat.h> #include <sys/types.h> #include <unistd.h> -#include <sstream> #include "mongo/db/storage/paths.h" #include "mongo/platform/process_id.h" @@ -93,7 +93,8 @@ Status StorageEngineLockFile::open() { } catch (const std::exception& ex) { return Status(ErrorCodes::UnknownError, str::stream() << "Unable to check existence of data directory " << _dbpath - << ": " << ex.what()); + << ": " + << ex.what()); } // Use file permissions 644 @@ -151,7 +152,9 @@ Status StorageEngineLockFile::writePid() { int errorcode = errno; return Status(ErrorCodes::FileStreamFailed, str::stream() << "Unable to write process id to file (ftruncate failed): " - << _filespec << ' ' << errnoWithDescription(errorcode)); + << _filespec + << ' ' + << errnoWithDescription(errorcode)); } ProcessId pid = ProcessId::getCurrent(); @@ -163,20 +166,26 @@ Status StorageEngineLockFile::writePid() { int errorcode = errno; return Status(ErrorCodes::FileStreamFailed, str::stream() << "Unable to write process id " << pid.toString() - << " to file: " << _filespec << ' ' + << " to file: " + << _filespec + << ' ' << errnoWithDescription(errorcode)); } else if (bytesWritten == 0) { return Status(ErrorCodes::FileStreamFailed, str::stream() << "Unable to write process id " << pid.toString() - << " to file: " << _filespec << " no data written."); + << " to file: " + << _filespec + << " no data written."); } if (::fsync(_lockFileHandle->_fd)) { int errorcode = errno; return Status(ErrorCodes::FileStreamFailed, str::stream() << "Unable to write process id " << pid.toString() - << " to file (fsync failed): " << _filespec << ' ' + << " to file (fsync failed): " + << _filespec + << ' ' << errnoWithDescription(errorcode)); } |