summaryrefslogtreecommitdiff
path: root/fs/gfs2/incore.h
diff options
context:
space:
mode:
authorSteven Whitehouse <swhiteho@redhat.com>2007-06-08 10:05:33 +0100
committerSteven Whitehouse <swhiteho@redhat.com>2007-07-09 08:23:26 +0100
commitc8cdf479377462315d6b4f56379f8ac989b0ef29 (patch)
tree3eee98ca4af8bba92a6df096f6fd2de615a71fa5 /fs/gfs2/incore.h
parentb35997d4482ed24b43a5951c5b021d224b24293c (diff)
[GFS2] Recovery for lost unlinked inodes
Under certain circumstances its possible (though rather unlikely) that inodes which were unlinked by one node while still open on another might get "lost" in the sense that they don't get deallocated if the node which held the inode open crashed before it was unlinked. This patch adds the recovery code which allows automatic deallocation of the inode if its found during block allocation (the sensible time to look for such inodes since we are scanning the rgrp's bitmaps anyway at this time, so it adds no overhead to do this). Since the inode will have had its i_nlink set to zero, all we need to trigger recovery is a lookup and an iput(), and the normal deallocation code takes care of the rest. Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
Diffstat (limited to 'fs/gfs2/incore.h')
-rw-r--r--fs/gfs2/incore.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/gfs2/incore.h b/fs/gfs2/incore.h
index e5069b912d5e..c7c6ec0f17c7 100644
--- a/fs/gfs2/incore.h
+++ b/fs/gfs2/incore.h
@@ -95,6 +95,8 @@ struct gfs2_rgrpd {
u32 rd_last_alloc_data;
u32 rd_last_alloc_meta;
struct gfs2_sbd *rd_sbd;
+ unsigned long rd_flags;
+#define GFS2_RDF_CHECK 0x0001 /* Need to check for unlinked inodes */
};
enum gfs2_state_bits {