However, I think it is a mistake to put the hooks in for syncfs and not implement syncfs for other file systems that need it.   From what you say, syncfs() would be a no-op for those other file systems which is (usually) wrong.  Perhaps they could just call fsync() from sync()?  Doing nothing would be an error.

If that is true, then you might want to open an issue.  Or perhaps just add to https://github.com/apache/nuttx/issues/3399

Actually it won't "do nothing."  It should return EBADF if the syncfs() method is not provided.    But that is error too.  That is not the correct return value.  EBADF should signify "/fd/ is not a valid file descriptor." which is not the case here.  It should return ENOTSUP

Reply via email to