(cc:ing xfs-masters to keep everyone in the loop)
How was the filesystem damaged before running xfs_repair the first time?
I'm not sure how much effort was put into protecting xfs_repair from
crashes... I can believe that a poorly-timed crash could cause problems.
-Eric
Junfeng Yang wrote:
> Hi Eric,
>
> do you guys intend to make xfs_repair crash-safe?
>
> out tool flagged a warning for xfs_repair, where a prefectly correct file
> system can be messed up by xfs_repair if crash happens during xfs_repair.
> the warning can be triggered this way:
>
> 1. run xfs_repair on a xfs image containg 1 file. crash it right before
> the last sector is written to disk. (in our case it is the write to
> sector 103.)
>
> 2. run xfs_repair again on the same image. it reports that root dir
> content is corrupted so it cleans up root dir and moves the file to
> lost+found
>
> it appears to me that a crash during xfs_repair may wipe off all the
> entries under '/'. does xfs_repair try to rebuild the root dir? I'm not
> sure if this should be considered as a bug or not. any
> conformation/clarafication is appreciated.
>
> the fs image before step 1 can be obtainted at
> http://keeda.stanford.edu/~junfeng/orig.img.bz2
>
> image after step 1 is at
> http://keeda.stanford.edu/~junfeng/half.img.bz2
>
> Thanks,
> -Junfeng
|