kubernetes/pkg/volume/util/fsquota/project.go

var projectsFile

var projidFile

var projectsParseRegexp

var projidParseRegexp

var quotaIDLock

const maxUnusedQuotasToSearch

type projectType

type projectsList

func projFilesAreOK() error {}

func lockFile(file *os.File) error {}

func unlockFile(file *os.File) error {}

// openAndLockProjectFiles opens /etc/projects and /etc/projid locked.
// Creates them if they don't exist
func openAndLockProjectFiles() (*os.File, *os.File, error) {}

func closeProjectFiles(fProjects *os.File, fProjid *os.File) error {}

func parseProject(l string) projectType {}

func parseProjid(l string) projectType {}

func parseProjFile(f *os.File, parser func(l string) projectType) []projectType {}

func readProjectFiles(projects *os.File, projid *os.File) projectsList {}

// findAvailableQuota finds the next available quota from the FirstQuota
// 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) {}

func addDirToProject(path string, id common.QuotaID, list *projectsList) (common.QuotaID, bool, error) {}

func removeDirFromProject(path string, id common.QuotaID, list *projectsList) (bool, error) {}

func writeProjectFile(base *os.File, projects []projectType) (string, error) {}

func writeProjectFiles(fProjects *os.File, fProjid *os.File, writeProjid bool, list projectsList) error {}

// if ID is common.BadQuotaID, generate new project id if the dir is not in a project
func createProjectID(path string, ID common.QuotaID) (common.QuotaID, error) {}

func removeProjectID(path string, ID common.QuotaID) error {}