Lines Matching refs:blockdev
40 static std::string PartitionParent(const std::string& blockdev) { in PartitionParent() argument
41 if (blockdev.find('/') != std::string::npos) { in PartitionParent()
42 LOG(ERROR) << __func__ << ": invalid argument " << blockdev; in PartitionParent()
43 return blockdev; in PartitionParent()
47 return blockdev; in PartitionParent()
53 std::string path = StringPrintf("/sys/class/block/%s/%s", ent->d_name, blockdev.c_str()); in PartitionParent()
59 return blockdev; in PartitionParent()
94 std::string blockdev = "/dev/block/" + BlockdevName(statbuf.st_dev); in BlockDeviceQueueDepth() local
95 LOG(DEBUG) << __func__ << ": " << file_path << " -> " << blockdev; in BlockDeviceQueueDepth()
96 if (blockdev.empty()) { in BlockDeviceQueueDepth()
104 std::optional<std::string> child = dm.GetParentBlockDeviceByPath(blockdev); in BlockDeviceQueueDepth()
108 LOG(DEBUG) << __func__ << ": " << blockdev << " -> " << *child; in BlockDeviceQueueDepth()
109 blockdev = *child; in BlockDeviceQueueDepth()
111 std::optional<std::string> maybe_blockdev = android::dm::ExtractBlockDeviceName(blockdev); in BlockDeviceQueueDepth()
113 return ResultError("Failed to remove /dev/block/ prefix from " + blockdev, 0); in BlockDeviceQueueDepth()
115 blockdev = PartitionParent(*maybe_blockdev); in BlockDeviceQueueDepth()
117 << "Partition parent: " << blockdev; in BlockDeviceQueueDepth()
119 StringPrintf("/sys/class/block/%s/mq/0/nr_tags", blockdev.c_str()); in BlockDeviceQueueDepth()
125 LOG(DEBUG) << __func__ << ": " << file_path << " is backed by /dev/" << blockdev in BlockDeviceQueueDepth()