From c59a386a9f0d8426397955e87788766ebe8f7a69 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sun, 1 Feb 2015 21:24:21 +0000 Subject: Suppress multiple links warnings for now. --- bin/bbackupd/BackupClientDirectoryRecord.cpp | 31 +++------------------------- bin/bbackupd/BackupClientDirectoryRecord.h | 1 - 2 files changed, 3 insertions(+), 29 deletions(-) (limited to 'bin') diff --git a/bin/bbackupd/BackupClientDirectoryRecord.cpp b/bin/bbackupd/BackupClientDirectoryRecord.cpp index 64716a8b..9808820f 100644 --- a/bin/bbackupd/BackupClientDirectoryRecord.cpp +++ b/bin/bbackupd/BackupClientDirectoryRecord.cpp @@ -56,7 +56,6 @@ BackupClientDirectoryRecord::BackupClientDirectoryRecord(int64_t ObjectID, const mSubDirName(rSubDirName), mInitialSyncDone(false), mSyncDone(false), - mSuppressMultipleLinksWarning(false), mpPendingEntries(0) { ::memset(mStateChecksum, 0, sizeof(mStateChecksum)); @@ -472,31 +471,6 @@ bool BackupClientDirectoryRecord::SyncDirectoryEntry( return false; } - int type = file_st.st_mode & S_IFMT; - - // ecryptfs reports nlink > 1 for directories - // with contents, but no filesystem supports - // hardlinking directories? so we can ignore - // this if the entry is a directory. - if(file_st.st_nlink != 1 && type == S_IFDIR) - { - BOX_INFO("Ignoring apparent hard link count on directory: " << - filename << ", nlink=" << file_st.st_nlink); - } - else if(file_st.st_nlink > 1) - { - if(!mSuppressMultipleLinksWarning) - { - BOX_WARNING("File is hard linked, this may cause " - "rename tracking to fail and move files " - "incorrectly in your backup! " << filename << - ", nlink=" << file_st.st_nlink << - " (suppressing further warnings)"); - mSuppressMultipleLinksWarning = true; - } - SetErrorWhenReadingFilesystemObject(rParams, filename); - } - BOX_TRACE("Stat entry '" << filename << "' found device/inode " << file_st.st_dev << "/" << file_st.st_ino); @@ -504,6 +478,7 @@ bool BackupClientDirectoryRecord::SyncDirectoryEntry( // a different filesystem than their containing directory, thanks to // Toke Hoiland-Jorgensen. + int type = file_st.st_mode & S_IFMT; if(type == S_IFDIR && file_st.st_dev != dir_st.st_dev) { if(!(rParams.mrContext.ExcludeDir(filename))) @@ -904,7 +879,7 @@ bool BackupClientDirectoryRecord::UpdateItems( if(rContext.FindFilename(renameObjectID, renameInDirectory, localPotentialOldName, isDir, isCurrentVersion, &srvModTime, &srvAttributesHash, &oldLeafname)) - { + { // Only interested if it's a file and the latest version if(!isDir && isCurrentVersion) { @@ -915,7 +890,7 @@ bool BackupClientDirectoryRecord::UpdateItems( // Doesn't exist locally, but does exist on the server. // Therefore we can safely rename it to this new file. - // Get the connection to the server + // Get the connection to the server BackupProtocolCallable &connection(rContext.GetConnection()); // Only do this step if there is room on the server. diff --git a/bin/bbackupd/BackupClientDirectoryRecord.h b/bin/bbackupd/BackupClientDirectoryRecord.h index 230c7854..865fc747 100644 --- a/bin/bbackupd/BackupClientDirectoryRecord.h +++ b/bin/bbackupd/BackupClientDirectoryRecord.h @@ -202,7 +202,6 @@ private: std::string mSubDirName; bool mInitialSyncDone; bool mSyncDone; - bool mSuppressMultipleLinksWarning; // Checksum of directory contents and attributes, used to detect changes uint8_t mStateChecksum[MD5Digest::DigestLength]; -- cgit v1.2.3