From: Alex Zhuravlev Date: Fri, 5 Jun 2020 05:16:32 +0000 (+0300) Subject: LU-13636 osd: create agent inode with explicit owner X-Git-Tag: 2.12.6-RC1~17 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;ds=sidebyside;h=492428ec2fdf3cdcc88d39821f6751ca77fbf8c6;p=fs%2Flustre-release.git LU-13636 osd: create agent inode with explicit owner to avoid quota misaccounting. Lustre-change: https://review.whamcloud.com/38842 Lustre-commit: 7805b45f1182ed21198c0cd2000ffe93b7de5340 Test-Parameters: fstype=ldiskfs Signed-off-by: Alex Zhuravlev Change-Id: I5a02e6e7de71821a10704ac3516ee087998c9c21 Reviewed-by: Hongchao Zhang Reviewed-by: Andreas Dilger Signed-off-by: Minh Diep Reviewed-on: https://review.whamcloud.com/40403 Tested-by: jenkins Tested-by: Maloo --- diff --git a/lustre/osd-ldiskfs/osd_handler.c b/lustre/osd-ldiskfs/osd_handler.c index e496189..7b7782a 100644 --- a/lustre/osd-ldiskfs/osd_handler.c +++ b/lustre/osd-ldiskfs/osd_handler.c @@ -3823,6 +3823,7 @@ static struct inode *osd_create_local_agent_inode(const struct lu_env *env, struct osd_thread_info *info = osd_oti_get(env); struct inode *local; struct osd_thandle *oh; + uid_t own[2] = {0, 0}; int rc; ENTRY; @@ -3831,8 +3832,7 @@ static struct inode *osd_create_local_agent_inode(const struct lu_env *env, oh = container_of(th, struct osd_thandle, ot_super); LASSERT(oh->ot_handle->h_transaction != NULL); - local = ldiskfs_create_inode(oh->ot_handle, pobj->oo_inode, type, - NULL); + local = ldiskfs_create_inode(oh->ot_handle, pobj->oo_inode, type, own); if (IS_ERR(local)) { CERROR("%s: create local error %d\n", osd_name(osd), (int)PTR_ERR(local));