Home
last modified time | relevance | path

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

123456

/system/core/fs_mgr/liblp/
Dpartition_opener.cpp46 bool GetBlockDeviceInfo(const std::string& block_device, BlockDeviceInfo* device_info) { in GetBlockDeviceInfo() argument
48 unique_fd fd = GetControlFileOrOpen(block_device.c_str(), O_RDONLY); in GetBlockDeviceInfo()
50 PERROR << __PRETTY_FUNCTION__ << "open '" << block_device << "' failed"; in GetBlockDeviceInfo()
57 PERROR << __PRETTY_FUNCTION__ << "BLKIOMIN failed on " << block_device; in GetBlockDeviceInfo()
63 PERROR << __PRETTY_FUNCTION__ << "BLKALIGNOFF failed on " << block_device; in GetBlockDeviceInfo()
68 PERROR << __PRETTY_FUNCTION__ << "BLKSSZGET failed on " << block_device; in GetBlockDeviceInfo()
74 device_info->partition_name = android::base::Basename(block_device); in GetBlockDeviceInfo()
77 (void)block_device; in GetBlockDeviceInfo()
Dwriter.cpp114 for (const auto& block_device : metadata.block_devices) { in ValidateAndSerializeMetadata() local
115 std::string partition_name = GetBlockDevicePartitionName(block_device); in ValidateAndSerializeMetadata()
116 if (block_device.flags & LP_BLOCK_DEVICE_SLOT_SUFFIXED) { in ValidateAndSerializeMetadata()
125 if ((block_device.first_logical_sector + 1) * LP_SECTOR_SIZE > block_device.size) { in ValidateAndSerializeMetadata()
127 << block_device.first_logical_sector << " for size " << block_device.size; in ValidateAndSerializeMetadata()
135 if (info.size != block_device.size) { in ValidateAndSerializeMetadata()
137 << block_device.size << ", got " << info.size << ")"; in ValidateAndSerializeMetadata()
Dutility.cpp124 for (const auto& block_device : metadata.block_devices) { in GetTotalSuperPartitionSize() local
125 size += block_device.size; in GetTotalSuperPartitionSize()
132 for (const auto& block_device : metadata.block_devices) { in GetBlockDevicePartitionNames() local
133 list.emplace_back(GetBlockDevicePartitionName(block_device)); in GetBlockDevicePartitionNames()
Dbuilder.cpp539 const auto& block_device = block_devices_[i]; in GetFreeRegions() local
541 uint64_t first_sector = block_device.first_logical_sector; in GetFreeRegions()
542 uint64_t last_sector = block_device.size / LP_SECTOR_SIZE; in GetFreeRegions()
695 const auto& block_device = block_devices_[extent->device_index()]; in ExtendFinalExtent() local
696 uint64_t next_aligned_sector = AlignSector(block_device, extent->end_sector()); in ExtendFinalExtent()
754 for (const auto& block_device : block_devices_) { in Export() local
755 metadata->block_devices.emplace_back(block_device); in Export()
828 for (const auto& block_device : block_devices_) { in AllocatableSpace() local
829 total_size += block_device.size - (block_device.first_logical_sector * LP_SECTOR_SIZE); in AllocatableSpace()
842 uint64_t MetadataBuilder::AlignSector(const LpMetadataBlockDevice& block_device, in AlignSector() argument
[all …]
Dreader.cpp371 for (auto& block_device : metadata->block_devices) { in AdjustMetadataForSlot() local
372 if (!(block_device.flags & LP_BLOCK_DEVICE_SLOT_SUFFIXED)) { in AdjustMetadataForSlot()
375 std::string partition_name = GetBlockDevicePartitionName(block_device) + slot_suffix; in AdjustMetadataForSlot()
376 if (!UpdateBlockDevicePartitionName(&block_device, partition_name)) { in AdjustMetadataForSlot()
380 block_device.flags &= ~LP_BLOCK_DEVICE_SLOT_SUFFIXED; in AdjustMetadataForSlot()
458 std::string GetBlockDevicePartitionName(const LpMetadataBlockDevice& block_device) { in GetBlockDevicePartitionName() argument
459 return NameFromFixedArray(block_device.partition_name, sizeof(block_device.partition_name)); in GetBlockDevicePartitionName()
/system/core/fs_mgr/
Dfs_mgr_dm_linear.cpp55 const LpMetadataBlockDevice& block_device, in GetPhysicalPartitionDevicePath() argument
60 std::string name = GetBlockDevicePartitionName(block_device); in GetPhysicalPartitionDevicePath()
65 if (GetMetadataSuperBlockDevice(metadata) == &block_device) { in GetPhysicalPartitionDevicePath()
86 const auto& block_device = metadata.block_devices[extent.target_source]; in CreateDmTable() local
88 if (!GetPhysicalPartitionDevicePath(metadata, block_device, super_device, &path)) { in CreateDmTable()
141 bool CreateLogicalPartitions(const std::string& block_device) { in CreateLogicalPartitions() argument
143 auto metadata = ReadMetadata(block_device.c_str(), slot); in CreateLogicalPartitions()
148 return CreateLogicalPartitions(*metadata.get(), block_device); in CreateLogicalPartitions()
151 std::unique_ptr<LpMetadata> ReadCurrentMetadata(const std::string& block_device) { in ReadCurrentMetadata() argument
153 return ReadMetadata(block_device.c_str(), slot); in ReadCurrentMetadata()
[all …]
/system/core/fs_mgr/include/
Dfs_mgr_dm_linear.h42 std::unique_ptr<LpMetadata> ReadCurrentMetadata(const std::string& block_device);
46 bool CreateLogicalPartitions(const LpMetadata& metadata, const std::string& block_device);
50 bool CreateLogicalPartitions(const std::string& block_device);
59 bool CreateLogicalPartition(const std::string& block_device, uint32_t metadata_slot,
65 bool CreateLogicalPartition(const std::string& block_device, const LpMetadata& metadata,
/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/adb/daemon/
Dset_verity_enable_state_service.cpp66 static bool set_verity_enabled_state(int fd, const char* block_device, const char* mount_point, in set_verity_enabled_state() argument
68 if (!make_block_device_writable(block_device)) { in set_verity_enabled_state()
70 block_device, strerror(errno)); in set_verity_enabled_state()
74 fec::io fh(block_device, O_RDWR); in set_verity_enabled_state()
77 WriteFdFmt(fd, "Could not open block device %s (%s).\n", block_device, strerror(errno)); in set_verity_enabled_state()
102 block_device, strerror(errno)); in set_verity_enabled_state()
/system/core/fs_mgr/libdm/include/libdm/
Ddm_target.h94 DmTargetLinear(uint64_t start, uint64_t length, const std::string& block_device, in DmTargetLinear() argument
96 : DmTarget(start, length), block_device_(block_device), physical_sector_(physical_sector) {} in DmTargetLinear()
100 const std::string& block_device() const { return block_device_; } in block_device() function
110 const std::string& block_device, const std::string& hash_device,
131 DmTargetAndroidVerity(uint64_t start, uint64_t length, const std::string& block_device, in DmTargetAndroidVerity() argument
133 : DmTarget(start, length), keyid_(keyid), block_device_(block_device) {} in DmTargetAndroidVerity()
/system/sepolicy/prebuilts/api/27.0/public/
De2fs.te4 allow e2fs block_device:blk_file getattr;
5 allow e2fs block_device:dir search;
Dupdate_verifier.te6 allow update_verifier block_device:dir search;
/system/extras/partition_tools/
Dlpdump.cc141 for (const auto& block_device : metadata->block_devices) { in MergeMetadata() local
142 std::string name = GetBlockDevicePartitionName(block_device); in MergeMetadata()
348 const auto& block_device = pt->block_devices[extent.target_source]; in LpdumpMain() local
349 std::string device_name = GetBlockDevicePartitionName(block_device); in LpdumpMain()
361 for (const auto& block_device : pt->block_devices) { in LpdumpMain() local
362 std::string partition_name = GetBlockDevicePartitionName(block_device); in LpdumpMain()
364 cout << " First sector: " << block_device.first_logical_sector << "\n"; in LpdumpMain()
365 cout << " Size: " << block_device.size << " bytes\n"; in LpdumpMain()
366 cout << " Flags: " << BuildBlockDeviceFlagString(block_device.flags) << "\n"; in LpdumpMain()
/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.h22 bool fscrypt_mount_metadata_encrypted(const std::string& block_device,
/system/core/fs_mgr/tools/
Ddmctl.cpp100 std::string block_device = NextArg(); in Next() local
106 return std::make_unique<DmTargetLinear>(start_sector, num_sectors, block_device, in Next()
115 std::string block_device = NextArg(); in Next() local
117 block_device); in Next()
123 std::string block_device = NextArg(); in Next() local
124 return std::make_unique<DmTargetBow>(start_sector, num_sectors, block_device); in Next()
/system/sepolicy/prebuilts/api/29.0/public/
Dvendor_misc_writer.te7 allow vendor_misc_writer block_device:dir r_dir_perms;
De2fs.te7 allow e2fs block_device:dir search;
/system/extras/ext4_utils/include/ext4_utils/
Dext4_sb.h48 bool block_device; /* target fd is a block device? */ member
/system/sepolicy/public/
Dvendor_misc_writer.te7 allow vendor_misc_writer block_device:dir r_dir_perms;
De2fs.te7 allow e2fs block_device:dir search;
/system/core/fs_mgr/libdm/
Ddm_target.cpp60 const std::string& block_device, const std::string& hash_device, in DmTargetVerity() argument
68 block_device, in DmTargetVerity()
/system/sepolicy/prebuilts/api/26.0/public/
Dupdate_verifier.te6 allow update_verifier block_device:dir search;
/system/sepolicy/prebuilts/api/28.0/public/
De2fs.te7 allow e2fs block_device:dir search;

123456