Lines Matching refs:nr_sec
159 static bool get_number_of_sectors(const std::string& real_blkdev, uint64_t* nr_sec) { in get_number_of_sectors() argument
160 if (android::vold::GetBlockDev512Sectors(real_blkdev, nr_sec) != android::OK) { in get_number_of_sectors()
185 static bool create_crypto_blk_dev(const std::string& dm_name, uint64_t nr_sec, in create_crypto_blk_dev() argument
224 tgt->length = nr_sec; in create_crypto_blk_dev()
268 uint64_t nr_sec; in fscrypt_mount_metadata_encrypted() local
269 if (!get_number_of_sectors(data_rec->blk_device, &nr_sec)) return false; in fscrypt_mount_metadata_encrypted()
271 if (!create_crypto_blk_dev(kDmNameUserdata, nr_sec, DEFAULT_KEY_TARGET_TYPE, in fscrypt_mount_metadata_encrypted()
277 LOG(INFO) << "Beginning inplace encryption, nr_sec: " << nr_sec; in fscrypt_mount_metadata_encrypted()
279 auto rc = cryptfs_enable_inplace(crypto_blkdev.data(), blk_device.data(), nr_sec, in fscrypt_mount_metadata_encrypted()
280 &size_already_done, nr_sec, 0, false); in fscrypt_mount_metadata_encrypted()
285 if (static_cast<uint64_t>(size_already_done) != nr_sec) { in fscrypt_mount_metadata_encrypted()