xiaoxiang781216 commented on PR #16789:
URL: https://github.com/apache/nuttx/pull/16789#issuecomment-3139030371

   > @xiaoxiang781216 first I would like to thank you for reviewing this PR so 
fast.
   > 
   > Regarding the mtd_proxy approach I still have my doubts: when a flash wear 
levelling library like dhara or nvblk is inserted the direct link between the 
mtd and block device is broken. And I don't think it is possible to use direct 
mtd writing/reading and block writing/reading at the same time. 
   
   Yes, the direct mode isn't suitable for the advanced wear leveling algo like 
dhara/nvblk since both save the meta data into flash. The direct mode will 
destroy this critical information.
    
   > Suppose you would like to `dd` into the mtd device resp. the block device, 
they have a complete different meaning: `dd` into the mtd device would be a 
change on the hardware directly, `dd` into the block device would be writing 
blocks. How to differentiate between these two ?
   > 
   > I think the same problem might exist for nand flashes (but I haven't 
checked the ftl thoroughly).
   > 
   
   But since ftl doesn't save any meta data into flash, so the direct mode(skip 
buffer and erase) works well with it in some special user case.
   
   > I remember that you made a remark that `ftl_initialize` should not be 
called from a board startup, but I didn't quite understand this. Could you 
explain this a little more?
   
   That's because fs layer will add FTL wrapper on mtd device automatically 
when the user open /dev/mtdblockx, which equal to you call ftl_initialize in 
board file manually.


-- 
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