You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2020/11/19 05:52:26 UTC

[GitHub] [incubator-nuttx] btashton opened a new pull request #2339: Revert "fs/nxffs: Fix scan good block slowly and scan an invalid block"

btashton opened a new pull request #2339:
URL: https://github.com/apache/incubator-nuttx/pull/2339


   ## Summary
   This reverts commit 97be116a39fee62b8f7027fd93d93789a6d04abb which came in as #1431 
   
   This commit broke nxffs.  This leaves the first block as empty which
   then exposes another bug where when the pack is called because we
   have reached the end of flash and need to look for deleted inodes
   we search the first block find no inode and assume that there
   are no more inodes.  This then results in corrupting the filesystem
   by writing over existing inodes.
   
   This can be seen by runing the sim:nxffs configuration.
   Prior to this commit the first pass of writing files would look like
   this:
   ```
   NXFFS Dump:
     BLOCK:OFFS  TYPE  STATE   LENGTH
         0:5     INODE OK       2680
         0:78    DATA  OK        424
         1:5     DATA  OK        497
         2:5     DATA  OK        497
         3:5     DATA  OK        497
         4:5     DATA  OK        497
         5:5     DATA  OK        268
         5:283   INODE OK       7410
         5:425   DATA  OK         77
         6:5     DATA  OK        497
   ```
   With this commit:
   ```
   NXFFS Dump:
     BLOCK:OFFS  TYPE  STATE   LENGTH
         0:0     BLOCK ERASED    512
         1:5     INODE OK       6394
         1:39    DATA  OK        463
         2:5     DATA  OK        497
         3:5     DATA  OK        497
   ```
   Signed-off-by: Brennan Ashton <ba...@brennanashton.com>
   
   ## Impact
   `sim:nxffs` configuration does not result in corrupting the filesystem.
   
   ## Testing
   Running the simulator build as well as inspecting the raw filesystem.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] donghengqaz edited a comment on pull request #2339: Revert "fs/nxffs: Fix scan good block slowly and scan an invalid block"

Posted by GitBox <gi...@apache.org>.
donghengqaz edited a comment on pull request #2339:
URL: https://github.com/apache/incubator-nuttx/pull/2339#issuecomment-730952847


   Hi @btashton,
   
   Checking this needs some time, so please revert it firstly and I will give an exact answer later.
   
   When I tested example `testfs/testing` with ESP32 SPI Flash and found it always failed when reboot. After I added this modification, the fail is fixed. 


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] btashton commented on pull request #2339: Revert "fs/nxffs: Fix scan good block slowly and scan an invalid block"

Posted by GitBox <gi...@apache.org>.
btashton commented on pull request #2339:
URL: https://github.com/apache/incubator-nuttx/pull/2339#issuecomment-730960978


   @donghengqaz I am happy to help, I did a fair bit of digging into this and I think there are still some bugs in the existing code.  I also have a ESP32 device so I am also happy to test.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] btashton commented on pull request #2339: Revert "fs/nxffs: Fix scan good block slowly and scan an invalid block"

Posted by GitBox <gi...@apache.org>.
btashton commented on pull request #2339:
URL: https://github.com/apache/incubator-nuttx/pull/2339#issuecomment-730147077


   @donghengqaz your linked change that this reverts caused corruption to the filesystem.  Can you please look at this and at the other analysis in issue #2092.  We need to back this change out or fix it in order for me to cut our 10.0.0 release candidate.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] donghengqaz commented on pull request #2339: Revert "fs/nxffs: Fix scan good block slowly and scan an invalid block"

Posted by GitBox <gi...@apache.org>.
donghengqaz commented on pull request #2339:
URL: https://github.com/apache/incubator-nuttx/pull/2339#issuecomment-730952847


   Hi @btashton,
   
   Checking this needs some time, so please revert it firstly and I will give an exact answer later.
   
   When I tested example `testing/testfs` and found it always failed when reboot. After I added this modification, the fail is fixed. 


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] xiaoxiang781216 commented on pull request #2339: Revert "fs/nxffs: Fix scan good block slowly and scan an invalid block"

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on pull request #2339:
URL: https://github.com/apache/incubator-nuttx/pull/2339#issuecomment-730799338


   Let revert the patch to unblock the release.


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #2339: Revert "fs/nxffs: Fix scan good block slowly and scan an invalid block"

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 merged pull request #2339:
URL: https://github.com/apache/incubator-nuttx/pull/2339


   


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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org