~aleteoryx/muditaos

aa8a69812979bda0de886c3cacd99f5d19117e09 — Lucjan Bryndza 4 years ago 1348391
[EGD-7757] Improve stdlib iobuf MTP for ext4 fs

Improve stdlib file transfer performance for ext4
on the MTP file transfer

Signed-off-by: Lucjan Bryndza <lucjan.bryndza@mudita.com>
M .gitmodules => .gitmodules +1 -1
@@ 95,7 95,7 @@
[submodule "klib"]
	path = third-party/klib/src
	url = https://github.com/attractivechaos/klib.git
[submodule "third-party/lwext4/lwext4"]
[submodule "lwext4"]
	path = third-party/lwext4/lwext4
	url = ../lwext4.git
	branch = mudita

M module-vfs/drivers/include/purefs/fs/drivers/directory_handle_ext4.hpp => module-vfs/drivers/include/purefs/fs/drivers/directory_handle_ext4.hpp +1 -1
@@ 23,4 23,4 @@ namespace purefs::fs::drivers
      private:
        ext4_dir m_dir{};
    };
} // namespace purefs::fs::drivers
\ No newline at end of file
} // namespace purefs::fs::drivers

M module-vfs/drivers/src/purefs/fs/filesystem_ext4.cpp => module-vfs/drivers/src/purefs/fs/filesystem_ext4.cpp +4 -5
@@ 26,8 26,7 @@ namespace purefs::fs::drivers
{
    namespace
    {
        template <typename T, typename... Args>
        auto invoke_efs(filesystem_ext4::fsfile zfil, T efs_fun, Args &&... args)
        template <typename T, typename... Args> auto invoke_efs(filesystem_ext4::fsfile zfil, T efs_fun, Args &&...args)
        {
            auto vfile = std::dynamic_pointer_cast<file_handle_ext4>(zfil);
            if (!vfile) {


@@ 58,7 57,7 @@ namespace purefs::fs::drivers
            return -err;
        }
        template <typename T, typename... Args>
        auto invoke_efs(filesystem_ext4::fsmount fmnt, T efs_fun, std::string_view path, Args &&... args)
        auto invoke_efs(filesystem_ext4::fsmount fmnt, T efs_fun, std::string_view path, Args &&...args)
        {
            auto mntp = std::static_pointer_cast<mount_point_ext4>(fmnt);
            if (!mntp) {


@@ 70,7 69,7 @@ namespace purefs::fs::drivers
            auto err = efs_fun(native_path.c_str(), std::forward<Args>(args)...);
            return -err;
        }
        template <typename T, typename... Args> auto invoke_efs(filesystem_ext4::fsdir zdir, T lfs_fun, Args &&... args)
        template <typename T, typename... Args> auto invoke_efs(filesystem_ext4::fsdir zdir, T lfs_fun, Args &&...args)
        {
            auto vdir = std::dynamic_pointer_cast<directory_handle_ext4>(zdir);
            if (!vdir) {


@@ 412,7 411,7 @@ namespace purefs::fs::drivers
        if (fspath.empty()) {
            fspath = vmnt->mount_path();
        }
        const auto dirp   = std::make_shared<directory_handle_ext4>(mnt, 0);
        const auto dirp = std::make_shared<directory_handle_ext4>(mnt, 0);
        ext4_locker _lck(vmnt);
        const auto lret = ext4_dir_open(dirp->dirp(), fspath.c_str());
        dirp->error(-lret);

M third-party/usb_stack => third-party/usb_stack +1 -1
@@ 1,1 1,1 @@
Subproject commit 3811843e165ce1a3d86edd59d0def07f7c085108
Subproject commit c13d077cdf1750a9cf83985804a397d25aa4c0bf