Checking Undelete Flag
In order to treat the files with
the undelete flag in a special way, we had to check whether that flag was
indeed set on a specific file. We first had to create the undelete
filesystem flag. The next available bit combination was the one corresponding
to 1024, which we then used and named it S_UNDELETE. The next step was
to check the presence of the flag. This was achieved by writing the
macro IS_UNDELETE in linux/fs.h that executes a bitwise or between the
inode's flags field and the S_UNDELETE flag.
Back ...