projectquota: utility class for project quota controls
projectquota: utility class for project quota controls

This class implements XFS project quota controls
for setting quota limits on a newly created directory.
It currently supports the legacy XFS specific ioctls.

Using this class, quota limits per container can be set
by directory based storage drivers (e.g. overlay), when
backing storage is XFS mounted with 'pquota' mount option.

TODO: use generic quota control ioctl FS_IOC_FS{GET,SET}XATTR
      for both xfs/ext4 for kernel version >= v4.5

Signed-off-by: Amir Goldstein <39b28f342388deb5b19584637eaeed658ed0d1e3@aquasec.com>
Signed-off-by: albam.c <c31941575ba99a97392efedea3aaad0205cae11b@navercorp.com>

resin-io/docker,vdemeester/docker,sdurrheimer/docker,gschaetz/moby,tklauser/docker,justincormack/docker,trebonian/docker,whuwxl/docker,Syntaxide/docker,paralin/docker,xuxinkun/docker,kencochrane/docker,imkin/moby,YuPengZTE/docker,ffoysal/docker,estesp/docker,KingEmet/docker,yummypeng/docker,mikedougherty/docker,dsheets/moby,tonistiigi/docker,lixiaobing1/docker,JMesser81/docker,mikedougherty/docker,erikstmartin/docker,prertik/docker,rancher/docker,scotttlin/docker,bearstech/moby,michael-holzheu/docker,maxamillion/docker,djs55/docker,thtanaka/docker,moby/moby,mixja/docker,cpuguy83/docker,ColinHebert/docker,alfred-landrum/docker,nawawi/docker,jwhonce/docker,madhanrm/docker,vdemeester/docker,mike1729/docker,raja-sami-10p/moby,lixiaobing10051267/docker,charleszheng44/moby,liaoqingwei/docker,harche/docker,bearstech/moby,lixiaobing1/docker,charleszheng44/moby,jlhawn/docker,lixiaobing10051267/docker,mtrmac/docker,gnailuy/docker,yongtang/docker,nalind/docker,tophj-ibm/moby,qudongfang/docker,Mokolea/docker,bonczj/moby-json-file-logger,maxamillion/docker,jimjag/docker,endophage/docker,yosifkit/docker,hqhq/moby,diogomonica/docker,estesp/docker,allencloud/docker,ibuildthecloud/docker,moul/docker,q384566678/docker,ffoysal/docker,mstanleyjones/docker,Syntaxide/docker,KarthikNayak/docker,liaoqingwei/docker,konstruktoid/docker-1,rancher/docker,rhatdan/docker,pradipd/moby,cyphar/docker,fcrisciani/docker,Mokolea/docker,flavio/docker,laijs/docker,ripcurld0/moby,tonistiigi/docker,coolljt0725/docker,dmcgowan/docker,mahak/docker,mtesselH/docker,kojiromike/docker,nawawi/docker,jwhonce/docker,konstruktoid/docker-upstream,tonistiigi/docker,mtesselH/docker,mikedougherty/docker,flavio/docker,darrenstahlmsft/docker,Ramzec/docker,johnstep/moby-moby,resin-io/docker,mike1729/docker,HideoYamauchi/docker,amatsus/docker,tophj-ibm/docker,dgageot/docker,noironetworks/docker,kolyshkin/moby,thaJeztah/docker,shishir-a412ed/docker,coolljt0725/docker,erikstmartin/docker,dperny/docker,Syntaxide/docker,lixiaobing10051267/docker,raja-sami-10p/moby,jameszhan/docker,SvenDowideit/docker,dccurtis/docker,SvenDowideit/docker,coreos/docker,mikebrow/docker,crosbymichael/docker,moby/moby,POLJM242/docker,darrenstahlmsft/docker,tophj-ibm/docker,hqhq/moby,moypray/docker,YuPengZTE/docker,moby/moby,dperny/docker,dccurtis/docker,mtrmac/docker,qudongfang/docker,PatrickLang/moby,bonczj/moby-json-file-logger,darrenstahlmsft/moby,mahak/docker,KingEmet/docker,shishir-a412ed/docker,jameszhan/docker,mixja/docker,duglin/docker,ndeloof/docker,whuwxl/docker,thaJeztah/docker,thtanaka/docker,paralin/docker,nalind/docker,bearstech/moby,AkihiroSuda/docker,nawawi/docker,haveatry/docker,ndeloof/docker,johnstep/moby-moby,bearstech/moby,yasiramin10p/moby,x1022as/docker,ibuildthecloud/docker,Ramzec/docker,KingEmet/docker,ndeloof/docker,ColinHebert/docker,tklauser/docker,duglin/docker,yongtang/docker,jimjag/docker,jlhawn/docker,laijs/docker,charleszheng44/moby,jameszhan/docker,moby/moby,unclejack/docker,scotttlin/docker,laijs/docker,srust/docker,dccurtis/docker,duglin/docker,mkumatag/docker,stevvooe/docker,docker/docker,kolyshkin/docker,moul/docker,mstanleyjones/docker,gnailuy/docker,q384566678/docker,YuPengZTE/docker,konstruktoid/docker-1,noironetworks/docker,moul/docker,gjaskiewicz/moby,kojiromike/docker,madhanrm/docker,docker/docker,moypray/docker,yasiramin10p/moby,PatrickLang/moby,thaJeztah/docker,AkihiroSuda/docker,rhatdan/docker,catinthesky/docker,trebonian/docker,pramodhkp/moby,coreos/docker,PatrickLang/moby,tmp6154/docker,sdurrheimer/docker,imkin/moby,coolljt0725/docker,coreos/docker,cpuguy83/docker,darrenstahlmsft/docker,miminar/docker,gjaskiewicz/moby,whuwxl/docker,HideoYamauchi/docker,rremer/moby,AkihiroSuda/docker,shishir-a412ed/docker,kencochrane/docker,crosbymichael/docker,laijs/moby,akira-baruah/docker,rremer/moby,michael-holzheu/docker,mtrmac/docker,stevvooe/docker,docker/docker,sdurrheimer/docker,kolyshkin/moby,tmp6154/docker,yosifkit/docker,AkihiroSuda/docker,KarthikNayak/docker,noironetworks/docker,akira-baruah/docker,tmp6154/docker,x1022as/docker,mike1729/docker,gjaskiewicz/moby,laijs/moby,mahak/docker,konstruktoid/docker-upstream,harche/docker,pramodhkp/moby,endophage/docker,johnstep/moby-moby,ibuildthecloud/docker,flavio/docker,POLJM242/docker,yongtang/docker,shhsu/docker,dmcgowan/docker,jvanz/docker,resin-io/docker,justincormack/docker,msabansal/docker,dmcgowan/docker,dims/docker,haveatry/docker,tophj-ibm/moby,mixja/docker,nalind/docker,unclejack/docker,diogomonica/docker,michael-holzheu/docker,mikebrow/docker,yummypeng/docker,kojiromike/docker,sarnautov/moby,trebonian/docker,tklauser/docker,q384566678/docker,mstanleyjones/docker,kolyshkin/moby,KarthikNayak/docker,moul/docker,crosbymichael/docker,x1022as/docker,konstruktoid/docker-upstream,lixiaobing1/docker,laijs/moby,danyalKhaliq10p/moby,tophj-ibm/moby,ibuildthecloud/docker,jvanz/docker,allencloud/docker,Mokolea/docker,jlhawn/docker,xuxinkun/docker,srust/docker,danyalKhaliq10p/moby,erikh/docker,JMesser81/docker,Mokolea/docker,allencloud/docker,stevvooe/docker,tianon/docker,catinthesky/docker,gschaetz/moby,JMesser81/docker,mkumatag/docker,jthelin/docker,sarnautov/moby,alfred-landrum/docker,sterchelen/docker,gnailuy/docker,gschaetz/moby,moypray/docker,dims/docker,yasiramin10p/moby,thaJeztah/docker,erikh/docker,trebonian/docker,yosifkit/docker,prertik/docker,ripcurld0/moby,erikh/docker,vdemeester/docker,Ramzec/docker,jthelin/docker,dgageot/docker,shhsu/docker,tianon/docker,ColinHebert/docker,sarnautov/moby,Ramzec/docker,jwhonce/docker,mahak/docker,danyalKhaliq10p/moby,mkumatag/docker,msabansal/docker,konstruktoid/docker-upstream,madhanrm/docker,hqhq/moby,maxamillion/docker,bonczj/moby-json-file-logger,fcrisciani/docker,diogomonica/docker,shhsu/docker,raja-sami-10p/moby,dperny/docker,mtesselH/docker,kolyshkin/docker,mikebrow/docker,rhatdan/docker,nalind/docker,amatsus/docker,djs55/docker,cpuguy83/docker,nawawi/docker,paralin/docker,xuxinkun/docker,rancher/docker,ffoysal/docker,darrenstahlmsft/moby,kencochrane/docker,sterchelen/docker,fcrisciani/docker,ripcurld0/moby,endophage/docker,SvenDowideit/docker,djs55/docker,justincormack/docker,konstruktoid/docker-1,flavio/docker,cyphar/docker,miminar/docker,HideoYamauchi/docker,cpuguy83/docker,liaoqingwei/docker,pramodhkp/moby,alfred-landrum/docker,jimjag/docker,yummypeng/docker,jimjag/docker,catinthesky/docker,pradipd/moby,estesp/docker,haveatry/docker,dims/docker,gnailuy/docker,naveed-jamil-tenpearls/moby,sterchelen/docker,dsheets/moby,unclejack/docker,tophj-ibm/docker,naveed-jamil-tenpearls/moby,msabansal/docker,rremer/moby,dsheets/moby,scotttlin/docker,pradipd/moby,paralin/docker,thtanaka/docker,harche/docker,amatsus/docker,naveed-jamil-tenpearls/moby,imkin/moby,miminar/docker,dgageot/docker,ibuildthecloud/docker,erikstmartin/docker,jvanz/docker,cyphar/docker,yosifkit/docker,darrenstahlmsft/moby,qudongfang/docker,srust/docker,prertik/docker