34 lines
1.2 KiB
C
34 lines
1.2 KiB
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
#ifndef _NWFS_PRJQUOTA_H_
|
|
#define _NWFS_PRJQUOTA_H_ 1
|
|
|
|
#include <stdint.h>
|
|
|
|
/*
|
|
* Linux project-quota backend for NetWare directory quotas.
|
|
*
|
|
* On Linux quota-capable volumes, project quota is the authoritative live
|
|
* directory-quota backend: directory subtree -> project id -> block limit.
|
|
* netware.metadata is kept as a mirror for backup/restore/offline tools. On
|
|
* metadata-only/NWQUOTA volumes, netware.metadata remains authoritative.
|
|
*/
|
|
#define NWFS_PRJQUOTA_OK 0
|
|
#define NWFS_PRJQUOTA_NO_DEVICE 1
|
|
#define NWFS_PRJQUOTA_PROBE_FAILED 2
|
|
#define NWFS_PRJQUOTA_SET_FAILED 3
|
|
#define NWFS_PRJQUOTA_UNSUPPORTED 4
|
|
#define NWFS_PRJQUOTA_NO_PROJECT 5
|
|
#define NWFS_PRJQUOTA_NO_ENTRY 6
|
|
|
|
#define NWFS_PRJQUOTA_UNLIMITED_4K 0x7fffffffU
|
|
|
|
int nwfs_prjquota_set_dir_limit(const char *dir_path, uint32_t limit4k);
|
|
int nwfs_prjquota_get_dir_limit(const char *dir_path, uint32_t *limit4k,
|
|
uint32_t *used4k);
|
|
int nwfs_prjquota_get_dir_project_id(const char *dir_path,
|
|
uint32_t *project_id);
|
|
const char *nwfs_prjquota_result_name(int result);
|
|
const char *nwfs_prjquota_last_debug(void);
|
|
|
|
#endif
|