[LU-15519] fallocate does not increase projid quota usage Created: 03/Feb/22 Updated: 19/Oct/23 Resolved: 30/May/22 |
|
| Status: | Resolved |
| Project: | Lustre |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | Lustre 2.16.0, Lustre 2.15.4 |
| Type: | Bug | Priority: | Major |
| Reporter: | Andreas Dilger | Assignee: | Arshad Hussain |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||||||||||||||||||||||
| Severity: | 3 | ||||||||||||||||||||||||||||
| Rank (Obsolete): | 9223372036854775807 | ||||||||||||||||||||||||||||
| Description |
|
Using "fallocate -l <size> <file>" to allocate space to <file> does not increase the quota usage for the affected project: # lfs quota -p 1000 /mnt/testfs
Disk quotas for prj 1000 (pid 1000):
Filesystem kbytes quota limit grace files quota limit grace
/mnt/testfs 102408 0 204800 - 3 0 10000 -
# mkdir /mnt/testfs/projdir
# lfs project -p 1000 /mnt/testfs/projdir
# fallocate -l 50M /mnt/testfs/projdir/50M
# lfs quota -p 1000 /mnt/testfs
Disk quotas for prj 1000 (pid 1000):
Filesystem kbytes quota limit grace files quota limit grace
/mnt/testfs 102408 0 204800 - 4 0 10000 -
|
| Comments |
| Comment by Andreas Dilger [ 03/Feb/22 ] |
|
Not sure if there is still time to fix this in 2.15.0, but if the patch misses the cutoff there is always 2.15.1. |
| Comment by Andreas Dilger [ 03/Feb/22 ] |
|
Just taking a quick look into the code where OBD_MD_FLUID is used, this may need changes on the client in obdo_from_inode(), vvp_req_attr_set(), osc_io_setattr_start(), struct cl_setattr_io sa_falloc_prjid, osc_brw_prep_request(), lustre_set_wire_obdo(). On the server, it also looks like mdt_obd_commitrw() and dump_obdo() are missing to sete OBD_MD_FLPROJID even though o_projid is set. It also wouldn't hurt to copy o_projid in obdo_cpy_md(), which is only used in echo.c, even though I don't think it affects normal operation. |
| Comment by Arshad Hussain [ 04/Feb/22 ] |
|
Hi Andreas, Thanks for putting in the details. I am looking into this. Targeting 2.15.1 Thanks! |
| Comment by Gerrit Updater [ 02/Mar/22 ] |
|
"Arshad Hussain <arshad.hussain@aeoncomputing.com>" uploaded a new patch: https://review.whamcloud.com/46676 |
| Comment by Gerrit Updater [ 30/May/22 ] |
|
"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/46676/ |
| Comment by Peter Jones [ 30/May/22 ] |
|
Landed for 2.16 |
| Comment by Gerrit Updater [ 03/Jul/23 ] |
|
"Etienne AUJAMES <eaujames@ddn.com>" uploaded a new patch: https://review.whamcloud.com/c/fs/lustre-release/+/51535 |
| Comment by Gerrit Updater [ 19/Oct/23 ] |
|
"Oleg Drokin <green@whamcloud.com>" merged in patch https://review.whamcloud.com/c/fs/lustre-release/+/51535/ |