Home
last modified time | relevance | path

Searched refs:snapshot_fd (Results 1 – 4 of 4) sorted by relevance

/system/core/fs_mgr/libdm/
Ddm_test.cpp342 unique_fd snapshot_fd(open(harness.snapshot_dev().c_str(), O_RDWR | O_CLOEXEC | O_SYNC)); in TEST() local
343 ASSERT_GE(snapshot_fd, 0); in TEST()
347 ASSERT_TRUE(android::base::WriteFully(snapshot_fd, data.data(), data.size())); in TEST()
348 ASSERT_EQ(lseek(snapshot_fd, 0, SEEK_SET), 0); in TEST()
352 ASSERT_TRUE(android::base::ReadFully(snapshot_fd, read.data(), read.size())); in TEST()
358 ASSERT_EQ(lseek(snapshot_fd, 0, SEEK_SET), 0); in TEST()
384 unique_fd snapshot_fd(open(harness.snapshot_dev().c_str(), O_RDWR | O_CLOEXEC)); in TEST() local
385 ASSERT_GE(snapshot_fd, 0); in TEST()
392 if (!android::base::WriteFully(snapshot_fd, data.data(), data.size())) { in TEST()
402 ASSERT_EQ(fsync(snapshot_fd), -1); in TEST()
/system/core/fs_mgr/libsnapshot/
Dsnapshot_writer.cpp128 void OnlineKernelSnapshotWriter::SetSnapshotDevice(android::base::unique_fd&& snapshot_fd, in SetSnapshotDevice() argument
130 snapshot_fd_ = std::move(snapshot_fd); in SetSnapshotDevice()
Dcow_snapuserd_test.cpp283 unique_fd snapshot_fd(open(snapshot_dev_->path().c_str(), O_RDONLY)); in ReadSnapshotDeviceAndValidate() local
284 ASSERT_TRUE(snapshot_fd > 0); in ReadSnapshotDeviceAndValidate()
290 ASSERT_EQ(ReadFullyAtOffset(snapshot_fd, snapuserd_buffer.get(), size_, offset), true); in ReadSnapshotDeviceAndValidate()
295 ASSERT_EQ(ReadFullyAtOffset(snapshot_fd, snapuserd_buffer.get(), size_, offset), true); in ReadSnapshotDeviceAndValidate()
300 ASSERT_EQ(ReadFullyAtOffset(snapshot_fd, snapuserd_buffer.get(), size_, offset), true); in ReadSnapshotDeviceAndValidate()
305 ASSERT_EQ(ReadFullyAtOffset(snapshot_fd, snapuserd_buffer.get(), size_, offset), true); in ReadSnapshotDeviceAndValidate()
/system/core/fs_mgr/libsnapshot/include/libsnapshot/
Dsnapshot_writer.h92 void SetSnapshotDevice(android::base::unique_fd&& snapshot_fd, uint64_t cow_size);