[Ocfs2-devel] [PATCH] fsck.ocfs2: Do not complain about oversized quota files
Jan Kara
jack at suse.cz
Thu Feb 20 06:19:22 PST 2014
Quota files can have blocks beyond i_size. This is correct because quota
code reserves these blocks to allow for extension of quota files without
the need for allocation. So make fsck.ocfs2 not complain about them.
Signed-off-by: Jan Kara <jack at suse.cz>
---
fsck.ocfs2/pass1.c | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/fsck.ocfs2/pass1.c b/fsck.ocfs2/pass1.c
index 22dafdf50647..5118e6c630c4 100644
--- a/fsck.ocfs2/pass1.c
+++ b/fsck.ocfs2/pass1.c
@@ -832,6 +832,12 @@ out:
return ret;
}
+static int is_quota_file(uint64_t ino)
+{
+ return ino == USER_QUOTA_SYSTEM_INODE ||
+ ino == GROUP_QUOTA_SYSTEM_INODE;
+}
+
/*
* this verifies i_size and i_clusters for inodes that use i_list to
* reference extents of data.
@@ -1002,6 +1008,7 @@ size_cluster_check:
* i_clusters, even on a sparsed filesystem
*/
if (!S_ISLNK(di->i_mode) && !S_ISDIR(di->i_mode) &&
+ !is_quota_file(di->i_blkno) &&
di->i_size <= unexpected &&
prompt(ost, PY, PR_INODE_SPARSE_SIZE, "Inode %"PRIu64
" has a size of %"PRIu64" but has %"PRIu64
--
1.8.1.4
More information about the Ocfs2-devel
mailing list