quota is another type of metadata and quota inconsistency must being handled properly. Signed-off-by: Dmitry Monakhov <dmonakhov@xxxxxxxxxx> --- fs/ext4/super.c | 11 +++++++++-- 1 files changed, 9 insertions(+), 2 deletions(-) diff --git a/fs/ext4/super.c b/fs/ext4/super.c index edcf3b0..9113c16 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c @@ -999,6 +999,12 @@ static int bdev_try_to_free_page(struct super_block *sb, struct page *page, #define QTYPE2NAME(t) ((t) == USRQUOTA ? "user" : "group") #define QTYPE2MOPT(on, t) ((t) == USRQUOTA?((on)##USRJQUOTA):((on)##GRPJQUOTA)) +void ext4_handle_quota_error(struct super_block *sb, int type) +{ + ext4_error(sb, __func__, "Disk quota type:%s probably inconsistent.", + QTYPE2NAME(type)); +} + static int ext4_write_dquot(struct dquot *dquot); static int ext4_acquire_dquot(struct dquot *dquot); static int ext4_release_dquot(struct dquot *dquot); @@ -1023,6 +1029,7 @@ static const struct dquot_operations ext4_quota_operations = { .write_info = ext4_write_info, .alloc_dquot = dquot_alloc, .destroy_dquot = dquot_destroy, + .notify_error = ext4_handle_quota_error, }; static const struct quotactl_ops ext4_qctl_operations = { @@ -1032,7 +1039,7 @@ static const struct quotactl_ops ext4_qctl_operations = { .get_info = vfs_get_dqinfo, .set_info = vfs_set_dqinfo, .get_dqblk = vfs_get_dqblk, - .set_dqblk = vfs_set_dqblk + .set_dqblk = vfs_set_dqblk, }; #endif @@ -3915,7 +3922,7 @@ static ssize_t ext4_quota_write(struct super_block *sb, int type, handle_t *handle = journal_current_handle(); if (EXT4_SB(sb)->s_journal && !handle) { - ext4_msg(sb, KERN_WARNING, "Quota write (off=%llu, len=%llu)" + ext4_error(sb, KERN_WARNING, "Quota write (off=%llu, len=%llu)" " cancelled because transaction is not started", (unsigned long long)off, (unsigned long long)len); return -EIO; -- 1.6.6.1 -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html