Whamcloud - gitweb
LU-14739 quota: nodemap squashed root cannot bypass quota
authorSebastien Buisson <sbuisson@ddn.com>
Fri, 11 Jun 2021 14:49:47 +0000 (16:49 +0200)
committerLi Xi <lixi@ddn.com>
Thu, 29 Jul 2021 14:16:51 +0000 (14:16 +0000)
commit0b057b71796cd901813f7dbc08d9459efa266740
tree18a1721d1d111b2fa6e5c2ef532e7dc59910828d
parentf2d1c4ee463c7cb02a8fcbb8a0ea75f37b1a7bab
LU-14739 quota: nodemap squashed root cannot bypass quota

When root on client is squashed via a nodemap's squash_uid/squash_gid,
its IOs must not bypass quota enforcement as it normally does without
squashing.
So on client side, do not set OBD_BRW_FROM_GRANT for every page being
used by root. And on server side, check if root is squashed via a
nodemap and remove OBD_BRW_NOQUOTA.

Lustre-change: https://review.whamcloud.com/43988
Lustre-commit: a4fbe7341baf12c00c6048bb290f8aa26c05cbac

Signed-off-by: Sebastien Buisson <sbuisson@ddn.com>
Change-Id: I95b31277273589e363193cba8b84870f008bb079
Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
Reviewed-by: Wang Shilong <wshilong@whamcloud.com>
Reviewed-on: https://review.whamcloud.com/44292
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Bobi Jam <bobijam@hotmail.com>
lustre/ofd/ofd_io.c
lustre/osc/osc_cache.c
lustre/tests/sanity-quota.sh
lustre/tests/sanity-sec.sh
lustre/tests/test-framework.sh