RTEMS Filesystem check

Joel Sherrill joel.sherrill at OARcorp.com
Sun Dec 1 00:48:05 UTC 2013


On 11/30/2013 5:55 PM, Wendell Silva wrote:
> Hello,
> 
> I'm testing RTEMS RFS file system using qemu (pc386) and huge virtual
> disk file (10G). 
> I've created a rfs partition with 8GB with a block size = 4096, which
> allows for huge single file (~ 21 GiB).
> 
> The test program (adapted from fileio example) uses synchronized cache
> and create large files (~1GiB). After creation, the file is deleted and
> during the deletion I just close the qemu window in order to simulate a
> system crash an assess the impact of such event on the file system
> integrity. 
> 
> After repeating this (destructive) test lots of times, I've found that
> rfs survives well, but the free disc space is inconsistent because of
> the non-deleted (marked as free) blocks.
> 
> The question is: is there any program/example on how to "sanitize" an
> RFS filesystem, in order the recover these lost/orphans blocks?
> Something like checkdisk.
> 
> If such code does not exist, can you provide me directions on how to do
> that? I think this could be an interesting contribution.

Chris Johns should comment on this as it is his filesystem. :)

Have you looked at the debugrfs shell command? I don't know what
it can do but may be helpful.  I don't think it can do what you
need based on the manual page.

http://rtems.org/onlinedocs/doc-current/share/rtems/html/shell/File-and-Directory-Commands-debugrfsut-_002d-debug-RFS-file-system.html#File-and-Directory-Commands-debugrfs-_002d-debug-RFS-file-system

Looks like an area needing contributions. Hopefully Chris will
pipe up soon but I think he was traveling.

> --Wendell.
> 
> 
> 



-- 
Joel Sherrill, Ph.D.             Director of Research & Development
joel.sherrill at OARcorp.com        On-Line Applications Research
Ask me about RTEMS: a free RTOS  Huntsville AL 35805
Support Available                (256) 722-9985



More information about the users mailing list