func generateUniqueProjectID(path string) (uint32, error) {
	fileinfo, err := os.Stat(path)
	if err != nil {
		return 0, err
	}
	stat, ok := fileinfo.Sys().(*syscall.Stat_t)
	if !ok {
		return 0, fmt.Errorf("Not a syscall.Stat_t %s", path)
	}
	projectID := projectIDsAllocatedPerQuotaHome + (stat.Ino*projectIDsAllocatedPerQuotaHome)%(math.MaxUint32-projectIDsAllocatedPerQuotaHome)
	return uint32(projectID), nil
}
Attempt to generate a unigue projectid.  Multiple directories
per file system can have quota and they need a group of unique
ids. This function attempts to allocate at least projectIDsAllocatedPerQuotaHome(10000)
unique projectids, based on the inode of the basepath.
package quota
import "C"
import (
	"fmt"
	"io/ioutil"
	"math"
	"os"
	"path"
	"path/filepath"
	"syscall"
	"unsafe"
	"github.com/containers/storage/pkg/directory"
	"github.com/sirupsen/logrus"
	"golang.org/x/sys/unix"
)
const projectIDsAllocatedPerQuotaHome = 10000
type Quota struct {
	Size   uint64
	Inodes uint64
}
type Control struct {
	backingFsBlockDev string
	nextProjectID     uint32
	quotas            map[string]uint32
}