jingfei195887 commented on code in PR #16642: URL: https://github.com/apache/nuttx/pull/16642#discussion_r2190019022
########## include/nuttx/mtd/mtd.h: ########## @@ -298,10 +298,25 @@ FAR struct mtd_dev_s *mtd_rwb_initialize(FAR struct mtd_dev_s *mtd); * Input Parameters: * path - The block device path. * mtd - The MTD device that supports the FLASH interface. + * oflags - oflags passed to the ftl layer. Currently, the ftl is affected + * by two oflags: + * 1. O_DIRECT when this flag is passed in, ftl internally uses + * the direct write strategy and no read cache is used in ftl; + * otherwise, each write will be executed with the minimum + * granularity of flash erase sector size which means a + * "sector read back - erase sector - write sector" operation + * is performed by using a read cache buffer in heap. + * + * 2. O_SYNC, when this flag is passed in, we assume that the + * flash has been erased in advance and no erasure operation Review Comment: yes, this is bettter -- 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