Home
last modified time | relevance | path

Searched refs:blk_device (Results 1 – 25 of 49) sorted by relevance

12

/aosp_15_r20/system/core/fs_mgr/
H A Dfs_mgr.cpp137 static void log_fs_stat(const std::string& blk_device, int fs_stat) { in log_fs_stat() argument
139 android::base::StringPrintf("\nfs_stat,%s,0x%x\n", blk_device.c_str(), fs_stat); in log_fs_stat()
155 static std::string realpath(const std::string& blk_device) { in realpath() argument
157 if (!Realpath(blk_device, &real_path)) { in realpath()
158 real_path = blk_device; in realpath()
187 static void check_fs(const std::string& blk_device, const std::string& fs_type, in check_fs() argument
193 const char* e2fsck_argv[] = {E2FSCK_BIN, "-y", blk_device.c_str()}; in check_fs()
194 const char* e2fsck_forced_argv[] = {E2FSCK_BIN, "-f", "-y", blk_device.c_str()}; in check_fs()
218 ret = mount(blk_device.c_str(), target.c_str(), fs_type.c_str(), tmpmnt_flags, in check_fs()
220 PINFO << __FUNCTION__ << "(): mount(" << blk_device << "," << target << "," << fs_type in check_fs()
[all …]
H A Dfs_mgr_remount.cpp347 auto blk_device = entry.blk_device; in RemountPartition() local
354 blk_device = rentry.blk_device; in RemountPartition()
361 blk_device = rentry.blk_device; in RemountPartition()
368 PLOG(INFO) << "skip unmounted partition dev:" << blk_device << " mnt:" << mount_point; in RemountPartition()
371 if (blk_device == "/dev/root") { in RemountPartition()
373 if (from_fstab) blk_device = from_fstab->blk_device; in RemountPartition()
375 fs_mgr_set_blk_ro(blk_device, false); in RemountPartition()
385 if (::mount(blk_device.c_str(), mnt_point.c_str(), entry.fs_type.c_str(), in RemountPartition()
395 PLOG(ERROR) << "failed to remount partition dev:" << blk_device << " mnt:" << mount_point; in RemountPartition()
H A Dfs_mgr_overlayfs_mount.cpp136 if (access(entry->blk_device.c_str(), F_OK) == 0) { in fs_mgr_update_blk_device()
139 if (entry->blk_device != "/dev/root") { in fs_mgr_update_blk_device()
144 auto blk_device = kPhysicalDevice + "system"s; in fs_mgr_update_blk_device() local
145 if (access(blk_device.c_str(), F_OK)) { in fs_mgr_update_blk_device()
146 blk_device += fs_mgr_get_slot_suffix(); in fs_mgr_update_blk_device()
147 if (access(blk_device.c_str(), F_OK)) { in fs_mgr_update_blk_device()
151 entry->blk_device = blk_device; in fs_mgr_update_blk_device()
210 if (fs_mgr_is_read_only_f2fs(entry->blk_device)) { in fs_mgr_overlayfs_enabled()
215 auto has_shared_blocks = fs_mgr_has_shared_blocks(entry->mount_point, entry->blk_device); in fs_mgr_overlayfs_enabled()
217 has_shared_blocks = fs_mgr_has_shared_blocks("/", entry->blk_device); in fs_mgr_overlayfs_enabled()
[all …]
H A Dfs_mgr_format.cpp190 LERROR << __FUNCTION__ << ": Format " << entry.blk_device << " as '" << entry.fs_type << "'"; in fs_mgr_do_format()
200 return format_f2fs(entry.blk_device, entry.length, needs_projid, needs_casefold, in fs_mgr_do_format()
204 return format_ext4(entry.blk_device, entry.mount_point, needs_projid, in fs_mgr_do_format()
/aosp_15_r20/bootable/recovery/recovery_utils/
H A Droots.cpp59 .blk_device = "ramdisk", in load_volume_table()
69 << " " << entry.fs_type << " " << entry.blk_device << " " << entry.length in load_volume_table()
145 LOG(INFO) << "Skipping F2FS format for block device " << entry->blk_device << " @ " in LocateFormattableEntry()
154 LOG(INFO) << "Using F2FS for " << f2fs_entry->blk_device << " @ " << f2fs_entry->mount_point in LocateFormattableEntry()
223 android::base::unique_fd fd(open(v->blk_device.c_str(), O_RDONLY)); in format_volume()
225 PLOG(ERROR) << "format_volume: failed to open " << v->blk_device; in format_volume()
230 LOG(ERROR) << "get_file_size: invalid size " << length << " for " << v->blk_device; in format_volume()
243 android::base::unique_fd fd(open(v->blk_device.c_str(), O_RDWR)); in format_volume()
245 PLOG(ERROR) << "format_volume: failed to open " << v->blk_device; in format_volume()
250 LOG(INFO) << "format_volume: wipe metadata encrypted " << v->blk_device << " with size " in format_volume()
[all …]
/aosp_15_r20/system/core/init/
H A Dmount_handler.cpp63 fields[0] = entry->blk_device; in ParseMount()
108 if (!android::base::StartsWith(entry.blk_device, devblock)) return; in SetMountProperty()
109 auto target = entry.blk_device.substr(strlen(devblock)); in SetMountProperty()
155 MountHandlerEntry::MountHandlerEntry(const std::string& blk_device, const std::string& mount_point, in MountHandlerEntry() argument
157 : blk_device(blk_device), mount_point(mount_point), fs_type(fs_type) {} in MountHandlerEntry()
160 if (blk_device < r.blk_device) return true; in operator <()
161 if (blk_device > r.blk_device) return false; in operator <()
H A Dfirst_stage_mount.cpp455 if (!block_dev_init_.InitDmDevice(begin->blk_device)) { in MountPartition()
472 current->blk_device = begin->blk_device; in MountPartition()
565 microdroid_vendor_block_dev.emplace(entry->blk_device); in MaybeDeriveMicrodroidVendorDiceNode()
776 logical_partitions.emplace(basename(fstab_entry.blk_device.c_str())); in GetDmVerityDevices()
778 devices->emplace(basename(fstab_entry.blk_device.c_str())); in GetDmVerityDevices()
873 return block_dev_init_.InitDmDevice(fstab_entry->blk_device); in SetUpDmVerity()
H A Dmount_handler.h31 MountHandlerEntry(const std::string& blk_device, const std::string& mount_point,
36 const std::string blk_device; member
H A Dselinux.cpp601 entry.blk_device = in MountMissingSystemPartitions()
602 android::base::StringReplace(entry.blk_device, replace_name, partition_name, false); in MountMissingSystemPartitions()
619 if (access(entry.blk_device.c_str(), F_OK) != 0) { in MountMissingSystemPartitions()
620 auto block_dev = android::base::Basename(entry.blk_device); in MountMissingSystemPartitions()
/aosp_15_r20/system/vold/
H A DMetadataCrypt.cpp99 static bool mount_via_fs_mgr(const char* mount_point, const char* blk_device, bool needs_encrypt) { in mount_via_fs_mgr() argument
106 auto mount_rc = fs_mgr_do_mount(&fstab_default, mount_point, blk_device, in mount_via_fs_mgr()
155 static bool create_crypto_blk_dev(const std::string& dm_name, const std::string& blk_device, in create_crypto_blk_dev() argument
158 if (!get_number_of_sectors(blk_device, nr_sec)) return false; in create_crypto_blk_dev()
181 hex_key, blk_device, 0); in create_crypto_blk_dev()
290 bool fscrypt_mount_metadata_encrypted(const std::string& blk_device, const std::string& mount_point, in fscrypt_mount_metadata_encrypted() argument
297 << fs_type << " block device: " << blk_device << " with zoned " << is_zoned in fscrypt_mount_metadata_encrypted()
355 if (!create_crypto_blk_dev(kDmNameUserdata, blk_device, key, options, &crypto_blkdev, &nr_sec, in fscrypt_mount_metadata_encrypted()
406 if (!encrypt_inplace(crypto_blkdev, blk_device, nr_sec)) { in fscrypt_mount_metadata_encrypted()
436 bool defaultkey_setup_ext_volume(const std::string& label, const std::string& blk_device, in defaultkey_setup_ext_volume() argument
[all …]
H A DCheckpoint.cpp208 if (mount(mount_rec.blk_device.c_str(), mount_rec.mount_point.c_str(), "none", in cp_commitChanges()
214 if (!setBowState(mount_rec.blk_device, "2")) in cp_commitChanges()
323 static void cp_healthDaemon(std::string mnt_pnt, std::string blk_device, bool is_fs_cp) { in cp_healthDaemon() argument
340 std::string bow_device = fs_mgr_find_bow_device(blk_device); in cp_healthDaemon()
401 isBow &= setBowState(mount_rec.blk_device, "1"); in cp_prepareCheckpoint()
405 std::string(mount_rec.blk_device), in cp_prepareCheckpoint()
H A DFsCrypt.cpp250 static bool DoesHardwareSupportOnly32DunBits(const std::string& blk_device) { in DoesHardwareSupportOnly32DunBits() argument
253 if (!Realpath(blk_device, &real_path)) { in DoesHardwareSupportOnly32DunBits()
254 real_path = blk_device; in DoesHardwareSupportOnly32DunBits()
306 LOG(DEBUG) << __func__ << "(): << blk_device = " << blk_device in DoesHardwareSupportOnly32DunBits()
311 LOG(ERROR) << __func__ << "(): << blk_device = " << blk_device << ", real_path = " << real_path; in DoesHardwareSupportOnly32DunBits()
328 !DoesHardwareSupportOnly32DunBits(entry->blk_device)) { in init_data_file_encryption_options()
/aosp_15_r20/system/core/fs_mgr/libfstab/
H A Dfstab.cpp473 std::string blk_device = entry.blk_device; in ExtraBootDevices() local
475 if (!android::base::StartsWith(blk_device, "/dev/block") || in ExtraBootDevices()
476 android::base::StartsWith(blk_device, "/dev/block/by-name") || in ExtraBootDevices()
477 android::base::StartsWith(blk_device, "/dev/block/bootdevice/by-name")) { in ExtraBootDevices()
483 auto slash_by_name = blk_device.find("/by-name"); in ExtraBootDevices()
485 blk_device.erase(slash_by_name); // erases /by-name/<partition> in ExtraBootDevices()
488 blk_device.erase(0, std::string("/dev/block/").size()); in ExtraBootDevices()
492 auto first_slash = blk_device.find('/'); in ExtraBootDevices()
495 auto boot_device = blk_device.substr(first_slash + 1); in ExtraBootDevices()
597 entry.blk_device = std::move(*it++); in ParseFstabFromString()
[all …]
H A Dslotselect.cpp72 entry.blk_device = entry.blk_device + update_suffix; in fs_mgr_update_for_slotselect()
/aosp_15_r20/system/core/fs_mgr/libfs_avb/
H A Davb_util.cpp43 const std::string& blk_device, android::dm::DmTable* table) { in ConstructVerityTable() argument
67 0, hashtree_desc.image_size / 512, hashtree_desc.dm_verity_version, blk_device, in ConstructVerityTable()
68 blk_device, hashtree_desc.data_block_size, hashtree_desc.hash_block_size, in ConstructVerityTable()
73 target.UseFec(blk_device, hashtree_desc.fec_num_roots, in ConstructVerityTable()
95 if (!ConstructVerityTable(hashtree_desc, fstab_entry->blk_device, &table) || !table.valid()) { in HashtreeDmVeritySetup()
113 SetBlockDeviceReadOnly(fstab_entry->blk_device); in HashtreeDmVeritySetup()
116 fstab_entry->blk_device = dev_path; in HashtreeDmVeritySetup()
239 partition_name = Basename(fstab_entry.blk_device); in DeriveAvbPartitionName()
H A Dfs_avb_util.cpp51 std::string device_path = fstab_entry.blk_device; in LoadAndVerifyVbmeta()
53 !android::base::StartsWith(fstab_entry.blk_device, "/")) { in LoadAndVerifyVbmeta()
55 if (!dm.GetDmDevicePathByName(fstab_entry.blk_device, &device_path)) { in LoadAndVerifyVbmeta()
56 LERROR << "Failed to resolve logical device path for: " << fstab_entry.blk_device; in LoadAndVerifyVbmeta()
/aosp_15_r20/system/core/fs_mgr/tests/
H A Dfs_mgr_test.cpp298 EXPECT_EQ(mentry->mnt_fsname, entry.blk_device); in TEST()
1152 EXPECT_EQ("userdata_gsi", entry->blk_device); in TEST()
1156 EXPECT_EQ("system_gsi", entry->blk_device); in TEST()
1161 EXPECT_EQ("system_gsi", entry->blk_device); in TEST()
1166 EXPECT_EQ("vendor", entry->blk_device); in TEST()
1189 EXPECT_EQ("system_gsi", entry->blk_device); in TEST()
1194 EXPECT_EQ("system_gsi", entry->blk_device); in TEST()
1199 EXPECT_EQ("vendor", entry->blk_device); in TEST()
1203 EXPECT_EQ("userdata_gsi", entry->blk_device); in TEST()
1225 EXPECT_EQ("userdata_gsi", entry->blk_device); in TEST()
[all …]
/aosp_15_r20/system/extras/boot_control_copy/
H A Dbootinfo.cpp76 path = strdup(record->blk_device.c_str()); in boot_info_open_partition()
79 const char* end_slash = strrchr(record->blk_device.c_str(), '/'); in boot_info_open_partition()
83 trimmed_len = end_slash - record->blk_device.c_str() + 1; in boot_info_open_partition()
86 strncpy(path, record->blk_device.c_str(), trimmed_len); in boot_info_open_partition()
/aosp_15_r20/test/vts-testcase/kernel/encryption/
Dmetadata_encryption_tests.cpp100 static bool ReadBlockDevice(const std::string &blk_device, size_t count, in ReadBlockDevice() argument
102 GTEST_LOG_(INFO) << "Reading " << count << " bytes from " << blk_device; in ReadBlockDevice()
112 open(blk_device.c_str(), O_RDONLY | O_DIRECT | O_CLOEXEC)); in ReadBlockDevice()
114 ADD_FAILURE() << "Failed to open " << blk_device << Errno(); in ReadBlockDevice()
118 ADD_FAILURE() << "Failed to read from " << blk_device << Errno(); in ReadBlockDevice()
/aosp_15_r20/hardware/ti/am57x/bootctrl/
Dbootloader_message.cpp49 return record->blk_device; in get_misc_blk_device()
54 static bool wait_for_device(const std::string& blk_device, std::string* err) { in wait_for_device() argument
61 ret = stat(blk_device.c_str(), &buf); in wait_for_device()
64 blk_device.c_str(), tries, strerror(errno)); in wait_for_device()
70 *err += android::base::StringPrintf("failed to stat %s\n", blk_device.c_str()); in wait_for_device()
/aosp_15_r20/device/amlogic/yukawa/hal/bootctrl/
Dbootloader_message.cpp49 return record->blk_device; in get_misc_blk_device()
54 static bool wait_for_device(const std::string& blk_device, std::string* err) { in wait_for_device() argument
61 ret = stat(blk_device.c_str(), &buf); in wait_for_device()
64 blk_device.c_str(), tries, strerror(errno)); in wait_for_device()
70 *err += android::base::StringPrintf("failed to stat %s\n", blk_device.c_str()); in wait_for_device()
/aosp_15_r20/system/vold/model/
H A DVolumeEncryption.cpp79 bool setup_ext_volume(const std::string& label, const std::string& blk_device, in setup_ext_volume() argument
86 return cryptfs_setup_ext_volume(label.c_str(), blk_device.c_str(), key, in setup_ext_volume()
89 return defaultkey_setup_ext_volume(label, blk_device, key, out_crypto_blkdev); in setup_ext_volume()
/aosp_15_r20/external/avb/libavb_user/
H A Davb_ops_user.cpp101 path = strdup(record->blk_device.c_str()); in open_partition()
104 const char* end_slash = strrchr(record->blk_device.c_str(), '/'); in open_partition()
108 trimmed_len = end_slash - record->blk_device.c_str() + 1; in open_partition()
111 strncpy(path, record->blk_device.c_str(), trimmed_len); in open_partition()
/aosp_15_r20/bootable/recovery/bootloader_message/
H A Dbootloader_message.cpp61 return entry.blk_device; in get_misc_blk_device()
71 static bool wait_for_device(const std::string& blk_device, std::string* err) { in wait_for_device() argument
78 ret = stat(blk_device.c_str(), &buf); in wait_for_device()
81 blk_device.c_str(), tries, strerror(errno)); in wait_for_device()
87 *err += android::base::StringPrintf("failed to stat %s\n", blk_device.c_str()); in wait_for_device()
/aosp_15_r20/system/extras/squashfs_utils/
H A Dsquashfs_utils.c60 int squashfs_parse_sb(const char *blk_device, struct squashfs_info *info) in squashfs_parse_sb() argument
66 data_device = TEMP_FAILURE_RETRY(open(blk_device, O_RDONLY | O_CLOEXEC)); in squashfs_parse_sb()

12