Lines Matching refs:path

46 int secdiscard_path(const std::string &path);
47 std::unique_ptr<struct fiemap> path_fiemap(const std::string &path, uint32_t extent_count);
48 bool check_fiemap(const struct fiemap &fiemap, const std::string &path);
50 std::string block_device_for_path(const std::string &path);
98 int secdiscard_path(const std::string &path) { in secdiscard_path() argument
99 auto fiemap = path_fiemap(path, max_extents); in secdiscard_path()
100 if (!fiemap || !check_fiemap(*fiemap, path)) { in secdiscard_path()
103 auto block_device = block_device_for_path(path); in secdiscard_path()
117 PLOG(ERROR) << "Unable to BLKSECDISCARD " << path; in secdiscard_path()
125 std::unique_ptr<struct fiemap> path_fiemap(const std::string &path, uint32_t extent_count) in path_fiemap() argument
127 AutoCloseFD fd(path); in path_fiemap()
130 PLOG(DEBUG) << "Unable to open " << path; in path_fiemap()
132 PLOG(ERROR) << "Unable to open " << path; in path_fiemap()
138 PLOG(ERROR) << "Unable to FIEMAP " << path; in path_fiemap()
144 << " in " << path; in path_fiemap()
151 bool check_fiemap(const struct fiemap &fiemap, const std::string &path) { in check_fiemap() argument
154 LOG(ERROR) << "Extent " << mapped -1 << " was not the last in " << path; in check_fiemap()
160 LOG(ERROR) << "Extent " << i << " has unexpected flags " << flags << ": " << path; in check_fiemap()
181 std::string block_device_for_path(const std::string &path) in block_device_for_path() argument
194 path.size() > l && in block_device_for_path()
195 path[l] == '/' && in block_device_for_path()
196 path.compare(0, l, mnt->mnt_dir) == 0) { in block_device_for_path()
202 LOG(ERROR) <<"Didn't find a mountpoint to match path " << path; in block_device_for_path()
205 LOG(DEBUG) << "For path " << path << " block device is " << result; in block_device_for_path()