Home
last modified time | relevance | path

Searched refs:block_device (Results 1 – 25 of 200) sorted by relevance

12345678

/system/core/fs_mgr/liblp/
Dpartition_opener.cpp61 bool GetBlockDeviceInfo(const std::string& block_device, BlockDeviceInfo* device_info) { in GetBlockDeviceInfo() argument
63 unique_fd fd = GetControlFileOrOpen(block_device.c_str(), O_RDONLY); in GetBlockDeviceInfo()
65 PERROR << __PRETTY_FUNCTION__ << "open '" << block_device << "' failed"; in GetBlockDeviceInfo()
72 PERROR << __PRETTY_FUNCTION__ << "BLKIOMIN failed on " << block_device; in GetBlockDeviceInfo()
78 PERROR << __PRETTY_FUNCTION__ << "BLKALIGNOFF failed on " << block_device; in GetBlockDeviceInfo()
89 PERROR << __PRETTY_FUNCTION__ << "BLKSSZGET failed on " << block_device; in GetBlockDeviceInfo()
95 device_info->partition_name = android::base::Basename(block_device); in GetBlockDeviceInfo()
98 (void)block_device; in GetBlockDeviceInfo()
Dwriter.cpp116 for (const auto& block_device : metadata.block_devices) { in ValidateAndSerializeMetadata() local
117 std::string partition_name = GetBlockDevicePartitionName(block_device); in ValidateAndSerializeMetadata()
118 if (block_device.flags & LP_BLOCK_DEVICE_SLOT_SUFFIXED) { in ValidateAndSerializeMetadata()
127 if ((block_device.first_logical_sector + 1) * LP_SECTOR_SIZE > block_device.size) { in ValidateAndSerializeMetadata()
129 << block_device.first_logical_sector << " for size " << block_device.size; in ValidateAndSerializeMetadata()
141 if (info.size != block_device.size) { in ValidateAndSerializeMetadata()
143 << block_device.size << ", got " << info.size << ")"; in ValidateAndSerializeMetadata()
Dreader.cpp412 for (auto& block_device : metadata->block_devices) { in AdjustMetadataForSlot() local
413 if (!(block_device.flags & LP_BLOCK_DEVICE_SLOT_SUFFIXED)) { in AdjustMetadataForSlot()
416 std::string partition_name = GetBlockDevicePartitionName(block_device) + slot_suffix; in AdjustMetadataForSlot()
417 if (!UpdateBlockDevicePartitionName(&block_device, partition_name)) { in AdjustMetadataForSlot()
421 block_device.flags &= ~LP_BLOCK_DEVICE_SLOT_SUFFIXED; in AdjustMetadataForSlot()
499 std::string GetBlockDevicePartitionName(const LpMetadataBlockDevice& block_device) { in GetBlockDevicePartitionName() argument
500 return NameFromFixedArray(block_device.partition_name, sizeof(block_device.partition_name)); in GetBlockDevicePartitionName()
Dbuilder.cpp640 const auto& block_device = block_devices_[i]; in GetFreeRegions() local
642 uint64_t first_sector = block_device.first_logical_sector; in GetFreeRegions()
643 uint64_t last_sector = block_device.size / LP_SECTOR_SIZE; in GetFreeRegions()
829 const auto& block_device = block_devices_[extent->device_index()]; in ExtendFinalExtent() local
831 if (!AlignSector(block_device, extent->end_sector(), &next_aligned_sector)) { in ExtendFinalExtent()
890 for (const auto& block_device : block_devices_) { in Export() local
891 metadata->block_devices.emplace_back(block_device); in Export()
977 for (const auto& block_device : block_devices_) { in AllocatableSpace() local
978 total_size += block_device.size - (block_device.first_logical_sector * LP_SECTOR_SIZE); in AllocatableSpace()
991 bool MetadataBuilder::AlignSector(const LpMetadataBlockDevice& block_device, uint64_t sector, in AlignSector() argument
[all …]
Dutility.cpp130 for (const auto& block_device : metadata.block_devices) { in GetTotalSuperPartitionSize() local
131 size += block_device.size; in GetTotalSuperPartitionSize()
138 for (const auto& block_device : metadata.block_devices) { in GetBlockDevicePartitionNames() local
139 list.emplace_back(GetBlockDevicePartitionName(block_device)); in GetBlockDevicePartitionNames()
/system/core/fs_mgr/
Dfs_mgr_dm_linear.cpp56 const LpMetadataBlockDevice& block_device, in GetPhysicalPartitionDevicePath() argument
61 std::string name = GetBlockDevicePartitionName(block_device); in GetPhysicalPartitionDevicePath()
74 if (GetMetadataSuperBlockDevice(*params.metadata) == &block_device) { in GetPhysicalPartitionDevicePath()
93 const auto& super_device = params.block_device; in CreateDmTableInternal()
104 const auto& block_device = params.metadata->block_devices[extent.target_source]; in CreateDmTableInternal() local
106 if (!GetPhysicalPartitionDevicePath(params, block_device, super_device, in CreateDmTableInternal()
139 bool CreateLogicalPartitions(const std::string& block_device) { in CreateLogicalPartitions() argument
141 auto metadata = ReadMetadata(block_device.c_str(), slot); in CreateLogicalPartitions()
146 return CreateLogicalPartitions(*metadata.get(), block_device); in CreateLogicalPartitions()
149 std::unique_ptr<LpMetadata> ReadCurrentMetadata(const std::string& block_device) { in ReadCurrentMetadata() argument
[all …]
Dfs_mgr.cpp1061 bool Update(FstabEntry* entry, const std::string& block_device = std::string()) { in Update() argument
1074 if (!UpdateCheckpointPartition(entry, block_device)) { in Update()
1104 bool UpdateCheckpointPartition(FstabEntry* entry, const std::string& block_device) { in UpdateCheckpointPartition() argument
1112 auto actual_block_device = block_device.empty() ? entry->blk_device : block_device; in UpdateCheckpointPartition()
1179 std::string fs_mgr_find_bow_device(const std::string& block_device) { in fs_mgr_find_bow_device() argument
1180 if (block_device.substr(0, 5) != "/dev/") { in fs_mgr_find_bow_device()
1181 LOG(ERROR) << "Expected block device, got " << block_device; in fs_mgr_find_bow_device()
1185 std::string sys_dir = std::string("/sys/") + block_device.substr(5); in fs_mgr_find_bow_device()
1190 PLOG(ERROR) << block_device << " is not dm device"; in fs_mgr_find_bow_device()
1225 static void WrapUserdata(FstabEntry* entry, dev_t dev, const std::string& block_device) { in WrapUserdata() argument
[all …]
/system/core/fs_mgr/include/
Dfs_mgr_dm_linear.h43 std::unique_ptr<LpMetadata> ReadCurrentMetadata(const std::string& block_device);
47 bool CreateLogicalPartitions(const LpMetadata& metadata, const std::string& block_device);
51 bool CreateLogicalPartitions(const std::string& block_device);
55 std::string block_device; member
/system/extras/verity/
Dbuild_verity_metadata.py63 def build_verity_table(block_device, data_blocks, root_hash, salt): argument
65 table %= ( block_device,
66 block_device,
76 block_device, signer_path, signing_key, signer_args=None, argument
79 verity_table = build_verity_table(block_device, data_blocks, root_hash, salt)
115 args.root_hash, args.salt, args.block_device,
/system/extras/ioblame/
Dioblame.sh68 block_device=mmcblk0
74 block_device=mmcblk0
79 block_device=mmcblk0
84 block_device=sda
89block_device=`adb shell 'find /dev/block/platform -name by-name | xargs ls -l' | grep system | awk…
91 block_device=`echo $block_device | awk 'BEGIN { FS ="/" } ; { print $4 }' | sed 's/p.*//g' `
97 DISKSTATS=`adb shell 'cat /proc/diskstats' | fgrep -w $block_device `
113 DISKSTATS=`adb shell 'cat /proc/diskstats' | fgrep -w $block_device `
133 echo "Total (ALL) Read KB $block_device = "$READ_KB
136 echo "Total (ALL) Read IOs $block_device = "`expr $AFTER_RD_IOS - $BEFORE_RD_IOS`
[all …]
/system/core/set-verity-state/
Dset-verity-state.cpp63 static bool set_verity_enabled_state(const char* block_device, const char* mount_point, in set_verity_enabled_state() argument
65 if (!make_block_device_writable(block_device)) { in set_verity_enabled_state()
66 printf("Could not make block device %s writable (%s).\n", block_device, strerror(errno)); in set_verity_enabled_state()
70 fec::io fh(block_device, O_RDWR); in set_verity_enabled_state()
73 printf("Could not open block device %s (%s).\n", block_device, strerror(errno)); in set_verity_enabled_state()
97 enable ? "enabled" : "disabled", block_device, strerror(errno)); in set_verity_enabled_state()
/system/extras/partition_tools/
Dlpdump.cc163 for (const auto& block_device : metadata->block_devices) { in MergeMetadata() local
164 std::string name = GetBlockDevicePartitionName(block_device); in MergeMetadata()
301 const auto& block_device = pt.block_devices[extent.target_source]; in ParseLinearExtentData() local
302 std::string device_name = GetBlockDevicePartitionName(block_device); in ParseLinearExtentData()
332 const auto& block_device = pt.block_devices[extent.target_source]; in PrintMetadata() local
333 std::string device_name = GetBlockDevicePartitionName(block_device); in PrintMetadata()
355 auto&& [block_device, offset] = *data; in PrintMetadata()
356 cout << block_device << ": " << offset << " .. " << (offset + extent->num_sectors) in PrintMetadata()
363 for (const auto& block_device : pt.block_devices) { in PrintMetadata() local
364 std::string partition_name = GetBlockDevicePartitionName(block_device); in PrintMetadata()
[all …]
/system/sepolicy/prebuilts/api/27.0/public/
De2fs.te4 allow e2fs block_device:blk_file getattr;
5 allow e2fs block_device:dir search;
/system/vold/
Dsecdiscard.cpp131 auto block_device = android::vold::BlockDeviceForPath(path); in secdiscard_path() local
132 if (block_device.empty()) { in secdiscard_path()
136 TEMP_FAILURE_RETRY(open(block_device.c_str(), O_RDWR | O_LARGEFILE | O_CLOEXEC, 0))); in secdiscard_path()
138 PLOG(ERROR) << "Failed to open device " << block_device; in secdiscard_path()
DMetadataCrypt.h28 bool fscrypt_mount_metadata_encrypted(const std::string& block_device,
/system/core/fs_mgr/libfiemap/
Dimage_manager.cpp208 std::string block_device; in ZeroFillNewImage() local
210 if (!FiemapWriter::GetBlockDeviceForFile(data_path, &block_device, &can_use_devicemapper)) { in ZeroFillNewImage()
293 auto block_device = android::fs_mgr::GetBlockDevicePartitionName(*super); in MapWithDmLinear() local
296 .block_device = block_device, in MapWithDmLinear()
384 for (const auto& block_device : device_list) { in MapWithLoopDeviceList() local
388 unique_fd fd(open(block_device.c_str(), kOpenFlags)); in MapWithLoopDeviceList()
390 PLOG(ERROR) << "Open failed: " << block_device; in MapWithLoopDeviceList()
398 table.Emplace<DmTargetLinear>(start_sector, segment_size, block_device, 0); in MapWithLoopDeviceList()
416 for (const auto& block_device : device_list) { in MapWithLoopDeviceList() local
417 lines.emplace_back("loop:" + block_device); in MapWithLoopDeviceList()
[all …]
/system/core/fs_mgr/libdm/include/libdm/
Ddm_target.h106 DmTargetLinear(uint64_t start, uint64_t length, const std::string& block_device, in DmTargetLinear() argument
108 : DmTarget(start, length), block_device_(block_device), physical_sector_(physical_sector) {} in DmTargetLinear()
112 const std::string& block_device() const { return block_device_; } in block_device() function
122 const std::string& block_device, const std::string& hash_device,
143 DmTargetAndroidVerity(uint64_t start, uint64_t length, const std::string& block_device, in DmTargetAndroidVerity() argument
145 : DmTarget(start, length), keyid_(keyid), block_device_(block_device) {} in DmTargetAndroidVerity()
/system/sepolicy/vendor/
Dhal_rebootescrow_default.te10 allow hal_rebootescrow_default block_device:dir search;
/system/core/fs_mgr/tools/
Ddmctl.cpp96 std::string block_device = NextArg(); in Next() local
102 return std::make_unique<DmTargetLinear>(start_sector, num_sectors, block_device, in Next()
111 std::string block_device = NextArg(); in Next() local
113 block_device); in Next()
119 std::string block_device = NextArg(); in Next() local
120 return std::make_unique<DmTargetBow>(start_sector, num_sectors, block_device); in Next()
126 std::string block_device = NextArg(); in Next() local
128 block_device); in Next()
/system/extras/ext4_utils/include/ext4_utils/
Dext4_sb.h48 bool block_device; /* target fd is a block device? */ member
/system/update_engine/payload_consumer/
Dpartition_update_generator_android.cc207 const std::string& block_device, int64_t partition_size) { in CalculateHashForPartition() argument
215 if (HashCalculator::RawHashOfFile(block_device, partition_size, &raw_hash) != in CalculateHashForPartition()
217 LOG(ERROR) << "Failed to calculate hash for " << block_device; in CalculateHashForPartition()
/system/sepolicy/prebuilts/api/29.0/public/
Dvendor_misc_writer.te7 allow vendor_misc_writer block_device:dir r_dir_perms;
/system/sepolicy/prebuilts/api/30.0/public/
Dvendor_misc_writer.te7 allow vendor_misc_writer block_device:dir r_dir_perms;
/system/sepolicy/public/
Dvendor_misc_writer.te7 allow vendor_misc_writer block_device:dir r_dir_perms;
/system/sepolicy/prebuilts/api/26.0/public/
Dupdate_verifier.te6 allow update_verifier block_device:dir search;

12345678