Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d01ca43d authored by Daniel Rosenberg's avatar Daniel Rosenberg
Browse files

fs_mgr: Support 16k F2FS



This passes the block size to mkfs. Currently f2fs must have page size
equal to block size. If this changes, we may want to revisit this.

Change-Id: I1ecdffcb2a271aa80c0bd07fd095941720fb48d0
Signed-off-by: default avatarDaniel Rosenberg <drosen@google.com>
Bug: 279820706
Test: Boot 16K device
parent d922df36
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -136,6 +136,7 @@ static int format_f2fs(const std::string& fs_blkdev, uint64_t dev_sz, bool needs
    /* Format the partition using the calculated length */

    const auto size_str = std::to_string(dev_sz / getpagesize());
    std::string block_size = std::to_string(getpagesize());

    std::vector<const char*> args = {"/system/bin/make_f2fs", "-g", "android"};
    if (needs_projid) {
@@ -154,6 +155,10 @@ static int format_f2fs(const std::string& fs_blkdev, uint64_t dev_sz, bool needs
        args.push_back("-O");
        args.push_back("extra_attr");
    }
    args.push_back("-w");
    args.push_back(block_size.c_str());
    args.push_back("-b");
    args.push_back(block_size.c_str());
    if (!zoned_device.empty()) {
        args.push_back("-c");
        args.push_back(zoned_device.c_str());