Remove excess logging in secdiscard

Remove all debug logs to reduce logspam a bit.

Bug: 64349233
Test: manual
Change-Id: I234fae7b9fb719b09af27985736f43f085dad301
This commit is contained in:
Rubin Xu 2019-03-21 18:13:40 +00:00
parent a41b7849d0
commit f2e846f153
2 changed files with 1 additions and 4 deletions

View file

@ -61,7 +61,6 @@ std::string BlockDeviceForPath(const std::string& path) {
LOG(ERROR) << "Didn't find a mountpoint to match path " << path; LOG(ERROR) << "Didn't find a mountpoint to match path " << path;
return ""; return "";
} }
LOG(DEBUG) << "For path " << path << " block device is " << result;
return result; return result;
} }

View file

@ -94,7 +94,6 @@ int main(int argc, const char* const argv[]) {
} }
set = 0; set = 0;
ioctl(fd, F2FS_IOC_SET_PIN_FILE, &set); ioctl(fd, F2FS_IOC_SET_PIN_FILE, &set);
LOG(DEBUG) << "Discarded: " << target;
} }
return 0; return 0;
} }
@ -143,9 +142,8 @@ bool secdiscard_path(const std::string& path) {
range[0] = fiemap->fm_extents[i].fe_physical; range[0] = fiemap->fm_extents[i].fe_physical;
range[1] = fiemap->fm_extents[i].fe_length; range[1] = fiemap->fm_extents[i].fe_length;
if (ioctl(fs_fd.get(), BLKSECDISCARD, range) == -1) { if (ioctl(fs_fd.get(), BLKSECDISCARD, range) == -1) {
PLOG(ERROR) << "Unable to BLKSECDISCARD " << path; // Use zero overwrite as a fallback for BLKSECDISCARD
if (!overwrite_with_zeros(fs_fd.get(), range[0], range[1])) return false; if (!overwrite_with_zeros(fs_fd.get(), range[0], range[1])) return false;
LOG(DEBUG) << "Used zero overwrite";
} }
} }
return true; return true;