class FtlRawNandImageWriter

Defined at line 28 of file ../../src/storage/volume_image/ftl/ftl_raw_nand_image_writer.h

This writer provdes an adapter layer between the expected hardware page and oob size, and the

minimum requirements for the FTL.

The FTL requires a minimum number of oob bytes, if this is not met by the underlying hardware,

pages are merged, so that the oob bytes of two consecutive pages can be treated a single one.

The end result is that pages and oob size get multiplied by a factor such that min(k) such that

k * hardware_oob_size >= min FTL oob size.

Public Methods

fpromise::result<std::tuple<FtlRawNandImageWriter, RawNandOptions>, std::string> Create (const RawNandOptions & device_options, std::span<const RawNandImageFlag> flags, ImageFormat format, Writer * writer)

Returns a |FtlRawNandWriter| that will translate requests from the |device_options| into

the returned |options| that are guaranteed to be valid for FTL metadata on success.

Defined at line 24 of file ../../src/storage/volume_image/ftl/ftl_raw_nand_image_writer.cc

void FtlRawNandImageWriter ()

Defined at line 36 of file ../../src/storage/volume_image/ftl/ftl_raw_nand_image_writer.h

void FtlRawNandImageWriter (const FtlRawNandImageWriter & )

Defined at line 37 of file ../../src/storage/volume_image/ftl/ftl_raw_nand_image_writer.h

void FtlRawNandImageWriter (FtlRawNandImageWriter && )

Defined at line 38 of file ../../src/storage/volume_image/ftl/ftl_raw_nand_image_writer.h

FtlRawNandImageWriter & operator= (const FtlRawNandImageWriter & )

Defined at line 39 of file ../../src/storage/volume_image/ftl/ftl_raw_nand_image_writer.h

FtlRawNandImageWriter & operator= (FtlRawNandImageWriter && )

Defined at line 40 of file ../../src/storage/volume_image/ftl/ftl_raw_nand_image_writer.h

uint32_t scale_factor ()

Returns a scalar describing how pages are coalesced to meet the upper layer requirements.

Defined at line 51 of file ../../src/storage/volume_image/ftl/ftl_raw_nand_image_writer.h

fpromise::result<void, std::string> Write (uint64_t offset, std::span<const uint8_t> data)

On success data backing this writer is updated at [|offset|, |offset| +

|buffer.size()|] to |buffer|.

This Write method expects page data and page oob to be performed in separate calls.

On error the returned result to contains a string describing the error.

Defined at line 82 of file ../../src/storage/volume_image/ftl/ftl_raw_nand_image_writer.cc