Some information about direct-io support on ubifs

Michael Nazzareno Trimarchi michael at amarulasolutions.com
Mon Nov 11 07:08:05 PST 2024


Hi

On Mon, Nov 11, 2024 at 3:15 PM Zhihao Cheng <chengzhihao1 at huawei.com> wrote:
>
> 在 2024/11/11 17:37, Michael Nazzareno Trimarchi 写道:
> > Hi all
> >
> > I would like to have some information on how to implement direct-io
> > support in ubifs. I have tried to mount squashfs image as file in
> > ubifs using loopback and direct-io but it seems that loop can not
> > handle when this is on top of ubifs. From what I understand from the
> > code it seems that the requirement is that the direct-io is
> > implemented in the filesystem where the file is stored. I have
> > simulated using nand sim. The idea is to reduce the buffering. I'm
> > open to have other suggestions regarding this too.
> >
> > Michael
> > .
> >
> Hi Michael,
> There is a discussion(9 years ago) about ubifs dio[1], of course we
> cannot implement it as a fake interface now.
> Before talking about adding dio support for UBIFS, let me know some
> background information. What's the purpose of using dio for opening
> squashfs image file? What's the goal of reducing buffer you mentioned
> above, Better performance? Less memory usage?
>
>
> [1]
> https://lore.kernel.org/lkml/1440016553-26481-2-git-send-email-richard@nod.at/


The goal is less memory usage. Each squashfs is mounted using loopback
device, so according
to some thread on direct-io, I understand that we then not have
buffering two times on ubifs level and loop
level, but the thread was not clear to me. The device has very limited
capability and memory. I have done some
test with fuse  but I did not have numbers to compare them


Michael



More information about the linux-mtd mailing list