Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for QuotaIDIsInUse (0.14 sec)

  1. pkg/volume/util/fsquota/common/quota_common_linux.go

    	// Negative value for bytes means that a non-enforcing quota
    	// should be applied (perhaps by setting a quota too large to
    	// be hit)
    	SetQuotaOnDir(path string, id QuotaID, bytes int64) error
    
    	// QuotaIDIsInUse determines whether the quota ID is in use.
    	// Implementations should not check /etc/project or /etc/projid,
    	// only whether their underlying mechanism already has the ID in
    	// use.
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Jan 28 06:09:31 UTC 2023
    - 3.2K bytes
    - Viewed (0)
  2. pkg/volume/util/fsquota/common/quota_common_linux_impl.go

    func (v linuxVolumeQuotaApplier) GetInodes(_ string, id QuotaID) (int64, error) {
    	return getQuantity(v.mountpoint, id, "-i", 1, v.allowEmptyOutput)
    }
    
    // QuotaIDIsInUse checks whether the specified quota ID is in use on the specified
    // filesystem
    func (v linuxVolumeQuotaApplier) QuotaIDIsInUse(id QuotaID) (bool, error) {
    	bytes, err := v.GetConsumption(v.mountpoint, id)
    	if err != nil {
    		return false, err
    	}
    	if bytes > 0 {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 20 14:49:03 UTC 2023
    - 9.1K bytes
    - Viewed (0)
  3. pkg/volume/util/fsquota/project.go

    // it returns error if QuotaIDIsInUse returns error when getting quota id in use;
    // it searches at most maxUnusedQuotasToSearch(128) time
    func findAvailableQuota(path string, idMap map[common.QuotaID]bool) (common.QuotaID, error) {
    	unusedQuotasSearched := 0
    	for id := common.FirstQuota; true; id++ {
    		if _, ok := idMap[id]; !ok {
    			isInUse, err := getApplier(path).QuotaIDIsInUse(id)
    			if err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 20 14:49:03 UTC 2023
    - 10.6K bytes
    - Viewed (0)
  4. pkg/volume/util/fsquota/quota_linux_test.go

    	id, ok := testQuotaIDMap[path]
    	if ok {
    		return id, nil
    	}
    	return common.BadQuotaID, fmt.Errorf("no quota available for %s", path)
    }
    
    func (v testVolumeQuota) QuotaIDIsInUse(id common.QuotaID) (bool, error) {
    	if _, ok := testIDQuotaMap[id]; ok {
    		return true, nil
    	}
    	// So that we reject some
    	if id%3 == 0 {
    		return false, nil
    	}
    	return false, nil
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 20.7K bytes
    - Viewed (0)
Back to top