Whamcloud - gitweb
LU-5152 quota: enforce block quota for chgrp 10/31210/2
authorHongchao Zhang <hongchao.zhang@intel.com>
Sat, 27 Jan 2018 21:21:35 +0000 (05:21 +0800)
committerJohn L. Hammond <john.hammond@intel.com>
Fri, 9 Feb 2018 22:30:24 +0000 (22:30 +0000)
commit07412234ec60de20cb8d8e45d755297fe6da2d61
treed0ce15d2dea53dfdccf616ad2ea68ee4c92e64c9
parent3d270d3a5a9ffec79aa7d6ab4a7f131afbfb06d2
LU-5152 quota: enforce block quota for chgrp

When an unprivileged user calls chgrp to change the group
of one of his files, the block quota limit of that new group
should be checked to ensure it not exceeds the limit.

The side effect of this patch could be,
1.The performance of chgrp from non-privileged user will be
very slow, no matter if quota is enabled. Since we assume that
chgrp issued from non-privileged user is very rare, the performance
impact possibly is acceptable.
2.If MDT crash while performing chgrp, inconsistency (group ownership
among MDT and OST objects) will be created. It should be acceptable.

This patch has fixed the bug while calculating the disk space of
some file for ldiskfs and zfs, the block unit is always 512.

Lustre-change: https://review.whamcloud.com/30146
Lustre-commit: 8a71fd5061bd073e055e6cbba1d238305e6827bb

Change-Id: I4b781e94493fe63c8cbd5700dc68293b2504c2ac
Signed-off-by: Hongchao Zhang <hongchao.zhang@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Niu Yawei <yawei.niu@intel.com>
Signed-off-by: Minh Diep <minh.diep@intel.com>
Reviewed-on: https://review.whamcloud.com/31210
Tested-by: Jenkins
Tested-by: Maloo <hpdd-maloo@intel.com>
Reviewed-by: John L. Hammond <john.hammond@intel.com>
lustre/include/lustre/lustre_idl.h
lustre/mdd/mdd_object.c
lustre/osd-ldiskfs/osd_handler.c
lustre/osd-zfs/osd_object.c
lustre/osp/osp_object.c
lustre/quota/qsd_handler.c
lustre/target/out_lib.c