Home
last modified time | relevance | path

Searched refs:LP_SECTOR_SIZE (Results 1 – 15 of 15) sorted by relevance

/system/core/fs_mgr/libfiemap/
Dmetadata.cpp133 uint64_t sectors_needed = partition_size / LP_SECTOR_SIZE; in FillPartitionExtents()
135 if (extent.fe_length % LP_SECTOR_SIZE != 0) { in FillPartitionExtents()
139 if (extent.fe_physical % LP_SECTOR_SIZE != 0) { in FillPartitionExtents()
145 std::min(static_cast<uint64_t>(extent.fe_length / LP_SECTOR_SIZE), sectors_needed); in FillPartitionExtents()
153 uint64_t physical_sector = extent.fe_physical / LP_SECTOR_SIZE; in FillPartitionExtents()
Dimage_manager.cpp388 if (partition_size % LP_SECTOR_SIZE != 0) { in MapWithLoopDeviceList()
397 uint64_t sectors_needed = partition_size / LP_SECTOR_SIZE; in MapWithLoopDeviceList()
409 uint64_t file_sectors = file_size / LP_SECTOR_SIZE; in MapWithLoopDeviceList()
/system/core/fs_mgr/liblp/
Ddevice_test.cpp52 EXPECT_EQ(device_info.alignment % LP_SECTOR_SIZE, 0); in TEST_F()
53 EXPECT_EQ(device_info.logical_block_size % LP_SECTOR_SIZE, 0); in TEST_F()
Dimages.cpp143 if (block_size % LP_SECTOR_SIZE != 0) { in ImageBuilder()
144 LERROR << "Block size must be a multiple of the sector size, " << LP_SECTOR_SIZE; in ImageBuilder()
248 if ((sector * LP_SECTOR_SIZE) % block_size_ != 0) { in SectorToBlock()
252 *block = (sector * LP_SECTOR_SIZE) / block_size_; in SectorToBlock()
257 return (block * block_size_) / LP_SECTOR_SIZE; in BlockToSector()
276 uint64_t first_sector = LP_PARTITION_RESERVED_BYTES / LP_SECTOR_SIZE; in Build()
402 output_sector += block_size_ / LP_SECTOR_SIZE; in AddPartitionImage()
414 return sectors * LP_SECTOR_SIZE; in ComputePartitionSize()
436 if ((extent.num_sectors * LP_SECTOR_SIZE) % block_size_ != 0) { in CheckExtentOrdering()
Dbuilder.cpp102 size_ += extent->num_sectors() * LP_SECTOR_SIZE; in AddExtent()
134 uint64_t sectors_to_remove = (size_ - aligned_size) / LP_SECTOR_SIZE; in ShrinkTo()
138 size_ -= sectors_to_remove * LP_SECTOR_SIZE; in ShrinkTo()
142 size_ -= (extent->num_sectors() * LP_SECTOR_SIZE); in ShrinkTo()
171 return sectors * LP_SECTOR_SIZE; in BytesOnDisk()
366 if (device_info.logical_block_size % LP_SECTOR_SIZE != 0) { in VerifyDeviceProperties()
376 if (device_info.alignment_offset % LP_SECTOR_SIZE != 0) { in VerifyDeviceProperties()
381 if (device_info.alignment % LP_SECTOR_SIZE != 0) { in VerifyDeviceProperties()
406 if (!AlignTo(metadata_max_size, LP_SECTOR_SIZE, &metadata_max_size)) { in Init()
440 uint64_t free_area_start = LP_SECTOR_SIZE; in Init()
[all …]
Dio_test.cpp239 uint64_t last_sector = super_device->size / LP_SECTOR_SIZE; in TEST_F()
244 char expected[LP_SECTOR_SIZE]; in TEST_F()
247 char buffer[LP_SECTOR_SIZE]; in TEST_F()
248 ASSERT_GE(lseek(fd, i * LP_SECTOR_SIZE, SEEK_SET), 0); in TEST_F()
250 ASSERT_EQ(memcmp(expected, buffer, LP_SECTOR_SIZE), 0); in TEST_F()
283 imported->geometry.metadata_max_size += LP_SECTOR_SIZE; in TEST_F()
413 char expected[LP_SECTOR_SIZE]; in TEST_F()
415 char buffer[LP_SECTOR_SIZE]; in TEST_F()
416 ASSERT_GE(lseek(fd, super_device->first_logical_sector * LP_SECTOR_SIZE, SEEK_SET), 0); in TEST_F()
418 EXPECT_EQ(memcmp(expected, buffer, LP_SECTOR_SIZE), 0); in TEST_F()
Dwriter.cpp112 if (total_reserved > super_device->first_logical_sector * LP_SECTOR_SIZE) { in ValidateAndSerializeMetadata()
127 if ((block_device.first_logical_sector + 1) * LP_SECTOR_SIZE > block_device.size) { in ValidateAndSerializeMetadata()
158 uint64_t last_sector = super_device->size / LP_SECTOR_SIZE; in ValidateAndSerializeMetadata()
179 if (start + size >= super_device->first_logical_sector * LP_SECTOR_SIZE) { in ValidateMetadataRegion()
Dbuilder_test.cpp74 EXPECT_EQ(extent->num_sectors(), 65536 / LP_SECTOR_SIZE); in TEST_F()
85 EXPECT_EQ(system->extents()[0]->num_sectors(), 65536 / LP_SECTOR_SIZE); in TEST_F()
94 EXPECT_EQ(system->extents()[0]->num_sectors(), 131072 / LP_SECTOR_SIZE); in TEST_F()
99 EXPECT_EQ(system->extents()[0]->num_sectors(), (1024 * 256) / LP_SECTOR_SIZE); in TEST_F()
107 EXPECT_EQ(extent->num_sectors(), 32768 / LP_SECTOR_SIZE); in TEST_F()
232 uint64_t lba = extent.target_data * LP_SECTOR_SIZE; in TEST_F()
291 EXPECT_EQ(system1->num_sectors(), 65536 / LP_SECTOR_SIZE); in TEST_F()
293 EXPECT_EQ(system2->num_sectors(), 32768 / LP_SECTOR_SIZE); in TEST_F()
295 EXPECT_EQ(vendor1->num_sectors(), 32768 / LP_SECTOR_SIZE); in TEST_F()
349 EXPECT_GE(super_device->first_logical_sector * LP_SECTOR_SIZE, kMetadataSpace); in TEST_F()
[all …]
Dreader.cpp111 if (geometry->metadata_max_size % LP_SECTOR_SIZE != 0) { in ParseGeometry()
358 if (metadata_region > super_device->first_logical_sector * LP_SECTOR_SIZE) { in ParseMetadata()
Dutility.cpp157 total_size += extent.num_sectors * LP_SECTOR_SIZE; in GetPartitionSize()
/system/extras/partition_tools/
Dlpunpack.cc229 total_size += extent.num_sectors * LP_SECTOR_SIZE; in ExtractPartition()
260 off_t super_offset = extent.target_data * LP_SECTOR_SIZE; in WriteExtent()
266 uint64_t remaining_bytes = extent.num_sectors * LP_SECTOR_SIZE; in WriteExtent()
Dlpadd.cc333 std::min(file_size - (uint64_t)pos, extent.num_sectors * LP_SECTOR_SIZE); in WriteExtent()
336 if (lseek(super_fd_, extent.target_data * LP_SECTOR_SIZE, SEEK_SET) < 0) { in WriteExtent()
Dlpdump.cc274 uint64_t metadata_size = super_device->first_logical_sector * LP_SECTOR_SIZE; in DumpMetadataSize()
/system/core/fs_mgr/liblp/include/liblp/
Dmetadata_format.h105 #define LP_SECTOR_SIZE 512 macro
/system/gsid/
Dgsi_service.cpp180 if (size % LP_SECTOR_SIZE) { in createPartition()
181 LOG(ERROR) << " size " << size << " is not a multiple of " << LP_SECTOR_SIZE; in createPartition()