Lines Matching refs:path_id
64 std::optional<std::string_view> SessionBase::GetFilePath(size_t path_id) const { in GetFilePath()
65 auto it = path_map_.find(path_id); in GetFilePath()
73 bool SessionBase::RemoveFilePath(size_t path_id) { in RemoveFilePath() argument
74 auto it = path_map_.find(path_id); in RemoveFilePath()
83 bool SessionBase::InsertFilePath(size_t path_id, std::string file_path) { in InsertFilePath() argument
84 path_map_.insert({path_id, std::move(file_path)}); in InsertFilePath()
102 os << "path_id=" << entry.path_id << ","; in operator <<()
115 bool SessionDirect::RegisterFilePath(size_t path_id, std::string_view file_path) { in RegisterFilePath() argument
121 PLOG(ERROR) << "Failed to register file path: " << file_path << ", id=" << path_id in RegisterFilePath()
127 LOG(VERBOSE) << "RegisterFilePath path_id=" << path_id << ", file_path=" << file_path_str; in RegisterFilePath()
129 if (!InsertFilePath(path_id, std::move(file_path_str))) { in RegisterFilePath()
133 path_fd_map_.insert(std::make_pair(path_id, std::move(fd))); in RegisterFilePath()
134 DCHECK(entry_list_map_[path_id].empty()); in RegisterFilePath()
140 bool SessionDirect::UnregisterFilePath(size_t path_id) { in UnregisterFilePath() argument
141 if (!RemoveFilePath(path_id)) { in UnregisterFilePath()
146 auto maybe_fd = GetFdForPath(path_id); in UnregisterFilePath()
151 auto list = entry_list_map_[path_id]; in UnregisterFilePath()
170 auto it = entry_list_map_.find(path_id); in UnregisterFilePath()
176 auto fd_it = path_fd_map_.find(path_id); in UnregisterFilePath()
184 std::optional<android::base::unique_fd*> SessionDirect::GetFdForPath(size_t path_id) { in GetFdForPath() argument
185 auto it = path_fd_map_.find(path_id); in GetFdForPath()
193 bool SessionDirect::ReadAhead(size_t path_id, in ReadAhead() argument
198 auto& list = entry_list_map_[path_id]; in ReadAhead()
200 Entry entry{path_id, kind, length, offset}; in ReadAhead()
205 auto maybe_fd = GetFdForPath(path_id); in ReadAhead()
207 LOG(ERROR) << "SessionDirect: Failed to find FD for path_id=" << path_id; in ReadAhead()
214 std::optional<std::string_view> file_name_opt = GetFilePath(path_id); in ReadAhead()
219 LOG(VERBOSE) << "SessionDirect: No file descriptor for (path_id=" << path_id << ") " in ReadAhead()
282 bool SessionDirect::UnreadAhead(size_t path_id, in UnreadAhead() argument
286 Entry entry{path_id, kind, length, offset}; in UnreadAhead()
288 auto list = entry_list_map_[path_id]; in UnreadAhead()
376 size_t path_id = index_entry.id(); in ProcessFd() local
379 if (!this->RegisterFilePath(path_id, path_file_name)) { in ProcessFd()
521 size_t path_id = it->first; in Dump() local
524 std::optional<std::string_view> file_path = GetFilePath(path_id); in Dump()
525 os << " File Path (id=" << path_id << "): "; in Dump()
532 auto fd_it = path_fd_map_.find(path_id); in Dump()
595 size_t path_id = it->first; in ~SessionDirect() local
598 UnregisterFilePath(path_id); in ~SessionDirect()
652 bool SessionIndirect::RegisterFilePath(size_t path_id, std::string_view file_path) { in RegisterFilePath() argument
656 cmd.id = path_id; in RegisterFilePath()
662 bool SessionIndirect::UnregisterFilePath(size_t path_id) { in UnregisterFilePath() argument
666 cmd.id = path_id; in UnregisterFilePath()
670 bool SessionIndirect::ReadAhead(size_t path_id, in ReadAhead() argument
677 cmd.id = path_id; in ReadAhead()
685 bool SessionIndirect::UnreadAhead(size_t path_id, in UnreadAhead() argument