Since upstream kernel v6.1-rc4
8994d11395f8 ext4: avoid unaccounted block allocation when expanding inode
If the quota is not initialized when trying to expand the inode size,
ext4/ldiskfs will just bail and return error.
Unfortunately this change made to some distro kernels like el8.10.
Change-Id: I874c86678c592a60c5954fcb2064150cf77e5634
Signed-off-by: Li Dongyang <dongyangli@ddn.com>
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/55673
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Reviewed-by: Hongchao Zhang <hongchao@whamcloud.com>
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
if (projid_eq(kprojid, LDISKFS_I(inode)->i_projid))
return 0;
+ dquot_initialize(inode);
+
err = ldiskfs_get_inode_loc(inode, &iloc);
if (err)
return err;
}
brelse(iloc.bh);
- dquot_initialize(inode);
transfer_to[PRJQUOTA] = dqget(sb, make_kqid_projid(kprojid));
if (transfer_to[PRJQUOTA]) {
lock_dquot_transfer(inode);