Commit 684ef278 authored by Joel Becker's avatar Joel Becker Committed by Mark Fasheh

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: default avatarJoel Becker <joel.becker@oracle.com>
Signed-off-by: default avatarMark Fasheh <mfasheh@suse.com>
parent 70ad1ba7
...@@ -87,13 +87,25 @@ struct qtree_fmt_operations ocfs2_global_ops = { ...@@ -87,13 +87,25 @@ struct qtree_fmt_operations ocfs2_global_ops = {
.is_id = ocfs2_global_is_id, .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, int ocfs2_read_quota_block(struct inode *inode, u64 v_block,
struct buffer_head **bh) struct buffer_head **bh)
{ {
int rc = 0; int rc = 0;
struct buffer_head *tmp = *bh; 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) if (rc)
mlog_errno(rc); mlog_errno(rc);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment