jingfei195887 commented on PR #16642:
URL: https://github.com/apache/nuttx/pull/16642#issuecomment-3062360609

   > > > > > @jingfei195887 @xiaoxiang781216 is the moving of `ftl_initialize` 
out of the board files really required.
   > > > > > If I am correct the ftl layer creates a block device on top of a 
mtd, but block devices can also be real devices (disks). For real block devices 
this would belong to the board file, so probably for the flt layer also.
   > > > > 
   > > > > 
   > > > > @Laczen Hi from my point of view, If there are real block devices 
such as SD/EMMC, we should use register_blockdriver for registration. The FTL 
exists merely as a wrapper layer for MTD. As long as we can achieve the 
encapsulation from MTD to Block, there is no need to expose the FTL interface 
to the application.
   > > > 
   > > > 
   > > > Ok, that makes sense. When usIng a wear levelling library like dhara 
the user should NOT register the MTD but just pass it to dhara_initialize() 
that would create the block device using register_blockdriver, correct?
   > > 
   > > 
   > > Yes, this is the correct sequence.
   > 
   > In that case I think it would be better not to use `register_mtddriver` 
but instead something like `register_ftlchdriver` or 
`register_b`_and_`chdriver` to be in line with `register_blockdriver`.
   
   Yes, that's correct. I'll include this point in the change description.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to