xiaoxiang781216 commented on PR #16642: URL: https://github.com/apache/nuttx/pull/16642#issuecomment-3056707098
> > bch_register and ftl_initilize is designed to be called only inside FS layer, and board files shouldn't call these two functions. So @jingfei195887 will provide new patch to remove/replace both call from all board files, and remove the compatibility concern. BTW, flt behavior change is controlled by special oflags(O_DIRECT/O_SYNC) and the behavior is kept as before without these two flags, so the compatibility still keep. > > @xiaoxiang781216 sometimes there is a need to add a "block converter" between the raw mtd and the ftl layer (e.g. when the raw mtd has a pagesize of 256byte while the fs (fat) needs a block of 512byte). At the moment this can be done by adding `mtd = s512_initialize(mtd);` before calling `ftl_initialize`. Will this still be possible when `ftl_initalize` is called from inside the FS layer? > you can change to `mtddriver_reigster(s512_initialize(mtd))`, and let's FS layer add bch/ftl wrapper in open for you automatically. > @xiaoxiang781216 also, how would a flash wear levelling library (e.g. dhara) be used? Although there is no sample it seems that at the moment a dhara based block device can be created using `dhara_initialize(0, mtd)` instead of `ftl_initalize(0, mtd)`. yes, your demo code is right to replace ftl with dhara. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
