On 8/7/14, 8:41 AM, Felipe Monteiro de Carvalho wrote: > On Thu, Aug 7, 2014 at 2:56 PM, Brian Foster <bfoster@xxxxxxxxxx> wrote: >>> But di_mode in particular is a key element as I am using it to >>> differentiate files from directories. >> In general you can't rely on on-disk data once the inode has been freed. >> Perhaps you should start a new thread with some kind of write up about >> what you're trying to accomplish and how you're going about it. > > Yes, I know it is unreliable, and that's OK for me. I'm satisfied in > having a best effort solution which works often, it does not have to > be fully reliable. > > What I am trying to accomplish is quite simple: Recover as many > deleted files in a XFS partition as possible. For example if someone > deletes a file by mistake, how to get it back? Do you have a link to the project you're working on? Is it an open source tool? There's another tool out there already called "xfs_irecover" which looks for any inode anywhere on disk, and tries to copy back out any data that it points to, deleted or not. It could use some love. Thanks, -Eric _______________________________________________ xfs mailing list xfs@xxxxxxxxxxx http://oss.sgi.com/mailman/listinfo/xfs