acassis commented on code in PR #16642: URL: https://github.com/apache/nuttx/pull/16642#discussion_r2197660455
########## drivers/mtd/ftl.c: ########## @@ -789,7 +883,8 @@ static int ftl_unlink(FAR struct inode *inode) * ****************************************************************************/ -int ftl_initialize_by_path(FAR const char *path, FAR struct mtd_dev_s *mtd) +int ftl_initialize_by_path(FAR const char *path, FAR struct mtd_dev_s *mtd, + int oflags) Review Comment: > However, as you know, the current logic of this patch is that when a node uses **`register_mtddriver()`for mtd registration, we can pass oflags when opening the mtd_path.** This requires us to modify ftl_initialize_by_path() to accept oflags as a parameter. The open with oflags and oflags pass logic is shown in the figure(The MTD device undergoes two conversions: blockproxy and mtdproxy.):  > > Of course, if you directly use `ftl_initialize_by_path() `to register the MTD as a block device, the registration determines the FTL's oflags. The block device's opening process only goes through one conversion, and at this time, it is impossible to pass oflags during the open process. @jingfei195887 very nice diagram, please include it in the Documentation/ to be used as reference for anyone studying the FTL/MTD -- 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