basic/mountpoint-util: skip dependency on quota services for some filesystems
This commit is contained in:
committed by
Luca Boccassi
parent
d2be5f641d
commit
d72f4a3897
@@ -393,6 +393,32 @@ bool fstype_is_network(const char *fstype) {
|
||||
"sshfs");
|
||||
}
|
||||
|
||||
bool fstype_needs_quota(const char *fstype) {
|
||||
/* 1. quotacheck needs to be run for some filesystems after they are mounted
|
||||
* if the filesystem was not unmounted cleanly.
|
||||
* 2. You may need to run quotaon to enable quota usage tracking and/or
|
||||
* enforcement.
|
||||
* ext2 - needs 1) and 2)
|
||||
* ext3 - needs 2) if configured using usrjquota/grpjquota mount options
|
||||
* ext4 - needs 1) if created without journal, needs 2) if created without QUOTA
|
||||
* filesystem feature
|
||||
* reiserfs - needs 2).
|
||||
* jfs - needs 2)
|
||||
* f2fs - needs 2) if configured using usrjquota/grpjquota/prjjquota mount options
|
||||
* xfs - nothing needed
|
||||
* gfs2 - nothing needed
|
||||
* ocfs2 - nothing needed
|
||||
* btrfs - nothing needed
|
||||
* for reference see filesystem and quota manpages */
|
||||
return STR_IN_SET(fstype,
|
||||
"ext2",
|
||||
"ext3",
|
||||
"ext4",
|
||||
"reiserfs",
|
||||
"jfs",
|
||||
"f2fs");
|
||||
}
|
||||
|
||||
bool fstype_is_api_vfs(const char *fstype) {
|
||||
const FilesystemSet *fs;
|
||||
|
||||
|
||||
@@ -13,6 +13,7 @@ int fd_is_mount_point(int fd, const char *filename, int flags);
|
||||
int path_is_mount_point(const char *path, const char *root, int flags);
|
||||
|
||||
bool fstype_is_network(const char *fstype);
|
||||
bool fstype_needs_quota(const char *fstype);
|
||||
bool fstype_is_api_vfs(const char *fstype);
|
||||
bool fstype_is_blockdev_backed(const char *fstype);
|
||||
bool fstype_is_ro(const char *fsype);
|
||||
|
||||
Reference in New Issue
Block a user