xiaoxiang781216 commented on code in PR #16642:
URL: https://github.com/apache/nuttx/pull/16642#discussion_r2191445047


##########
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:
   > The issue here is this is called during flash initialization and partition 
creation.
   
   The board call ftl_initialize to manually 
   
   > Therefore, you have to set flags there and can't change it from an 
application during `open` call. Could we set the `oflags` later based on how is 
the partition opened? This would have to be passed from BCH layer, because user 
opens that one, not FTL.
   > 
   > Flags `O_DIRECT` and `O_SYNC` are now basically useless from an 
application, they have no effect.
   
   no, ftl_initialize_by_path will be called every time when usespace open the 
mtd device



##########
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:
   > The issue here is this is called during flash initialization and partition 
creation.
   
   The board call ftl_initialize to manually 
   
   > Therefore, you have to set flags there and can't change it from an 
application during `open` call. Could we set the `oflags` later based on how is 
the partition opened? This would have to be passed from BCH layer, because user 
opens that one, not FTL.
   > 
   > Flags `O_DIRECT` and `O_SYNC` are now basically useless from an 
application, they have no effect.
   
   no, ftl_initialize_by_path will be called every time when usespace open the 
mtd device



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