summaryrefslogtreecommitdiff
path: root/fs/ocfs2
diff options
context:
space:
mode:
authorJoel Becker <joel.becker@oracle.com>2008-12-02 17:44:05 -0800
committerMark Fasheh <mfasheh@suse.com>2008-12-17 17:22:51 -0800
commit1f79c1efd55d859c92809668abb692a700a4b0a1 (patch)
tree924a18e5156bfc86c3d5f9fc4a940f4b95e6f29c /fs/ocfs2
parent88627b49b9b13666cb3e9d5b79f5fb42019b9ae1 (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')
-rw-r--r--fs/ocfs2/quota_global.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/fs/ocfs2/quota_global.c b/fs/ocfs2/quota_global.c
index 4b38a2ef7aae..5b05f9461219 100644
--- a/fs/ocfs2/quota_global.c
+++ b/fs/ocfs2/quota_global.c
@@ -85,13 +85,25 @@ struct qtree_fmt_operations ocfs2_global_ops = {
.is_id = ocfs2_global_is_id,
};
+static int ocfs2_validate_quota_block(struct super_block *sb,
+ struct buffer_head *bh)
+{
+ struct ocfs2_disk_dqtrailer *dqt = ocfs2_dq_trailer(sb, bh->b_data);
+
+ mlog(0, "Validating quota block %llu\n",
+ (unsigned long long)bh->b_blocknr);
+
+ return 0;
+}
+
int ocfs2_read_quota_block(struct inode *inode, u64 v_block,
struct buffer_head **bh)
{
int rc = 0;
struct buffer_head *tmp = *bh;
- rc = ocfs2_read_virt_blocks(inode, v_block, 1, &tmp, 0, NULL);
+ rc = ocfs2_read_virt_blocks(inode, v_block, 1, &tmp, 0,
+ ocfs2_validate_quota_block);
if (rc)
mlog_errno(rc);