Hi Miklos, Miklos Szeredi <mik...@szeredi.hu> wrote on Wed, 10 Feb 2021 11:16:45 +0100:
> On Tue, Feb 9, 2021 at 10:39 PM Richard Weinberger <rich...@nod.at> wrote: > > > > Miklos, > > > > ----- Ursprüngliche Mail ----- > > > If you look at fuse_do_ioctl() it does variable length input and > > > output at the same time. I guess you need something similar to that. > > > > I'm not sure whether I understand correctly. > > > > In MUSE one use case would be attaching two distinct (variable length) > > buffers to a > > single FUSE request, in both directions. > > If I read fuse_do_ioctl() correctly, it attaches always a single buffer per > > request > > but does multiple requests. > > Right. > > > In MUSE we cold go the same path and issue up to two requests. > > One for in-band and optionally a second one for the out-of-band data. > > Hmmm? > > Does in-band and OOB data need to be handled together? Short answer: yes. > If so, then two requests is not a good option. More detailed answer: There is a type of MTD device (NAND devices) which are composed, for each page, of X in-band bytes plus Y out-of-band metadata bytes. Accessing either the in-band data, or the out-of-band data, or both at the same time are all valid use cases. * Read operation details: From a hardware point of view, the out-of-band data is (almost) always retrieved when the in-band data is read because it contains meta-data used to correct eventual bitflips. In this case, if both areas are requested, it is highly non-efficient to do two requests, that's why the MTD core allows to do both at the same time. * Write operation details: Even worse, in the write case, you *must* write both at the same time. It is physically impossible to do one after the other (still with actual hardware, of course). That is why it is preferable that MUSE will be able to access both in a single request. Thanks, Miquèl