diff options
author | Joel Becker <joel.becker@oracle.com> | 2008-12-02 20:44:05 -0500 |
---|---|---|
committer | Mark Fasheh <mfasheh@suse.com> | 2009-01-05 11:40:31 -0500 |
commit | 684ef278377725d505aa23259ee673dab9b11851 (patch) | |
tree | 7034049bc755b90eb555f515ba7661e77a846e6d /fs/ocfs2/quota_global.c | |
parent | 70ad1ba7b48364d758a112df0823edc5ca6632aa (diff) |
ocfs2: Add a validation hook for quota block reads.
Add a currently-returns-success hook for quota block reads. We'll be
adding checks to this.
Signed-off-by: Joel Becker <joel.becker@oracle.com>
Signed-off-by: Mark Fasheh <mfasheh@suse.com>
Diffstat (limited to 'fs/ocfs2/quota_global.c')
-rw-r--r-- | fs/ocfs2/quota_global.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/fs/ocfs2/quota_global.c b/fs/ocfs2/quota_global.c index a10faebe88a1..7dbcfd7f65e6 100644 --- a/fs/ocfs2/quota_global.c +++ b/fs/ocfs2/quota_global.c | |||
@@ -87,13 +87,25 @@ struct qtree_fmt_operations ocfs2_global_ops = { | |||
87 | .is_id = ocfs2_global_is_id, | 87 | .is_id = ocfs2_global_is_id, |
88 | }; | 88 | }; |
89 | 89 | ||
90 | static int ocfs2_validate_quota_block(struct super_block *sb, | ||
91 | struct buffer_head *bh) | ||
92 | { | ||
93 | struct ocfs2_disk_dqtrailer *dqt = ocfs2_dq_trailer(sb, bh->b_data); | ||
94 | |||
95 | mlog(0, "Validating quota block %llu\n", | ||
96 | (unsigned long long)bh->b_blocknr); | ||
97 | |||
98 | return 0; | ||
99 | } | ||
100 | |||
90 | int ocfs2_read_quota_block(struct inode *inode, u64 v_block, | 101 | int ocfs2_read_quota_block(struct inode *inode, u64 v_block, |
91 | struct buffer_head **bh) | 102 | struct buffer_head **bh) |
92 | { | 103 | { |
93 | int rc = 0; | 104 | int rc = 0; |
94 | struct buffer_head *tmp = *bh; | 105 | struct buffer_head *tmp = *bh; |
95 | 106 | ||
96 | rc = ocfs2_read_virt_blocks(inode, v_block, 1, &tmp, 0, NULL); | 107 | rc = ocfs2_read_virt_blocks(inode, v_block, 1, &tmp, 0, |
108 | ocfs2_validate_quota_block); | ||
97 | if (rc) | 109 | if (rc) |
98 | mlog_errno(rc); | 110 | mlog_errno(rc); |
99 | 111 | ||