mirror of
https://git.kernel.org/pub/scm/fs/ext2/e2fsprogs.git
synced 2024-11-27 12:04:43 +08:00
tune2fs: do not enable project feature or quota if inode size is 128 bytes
Don't allow the user to enable the project feature (or project quota) if the inode size is 128 bytes. Signed-off-by: Theodore Ts'o <tytso@mit.edu>
This commit is contained in:
parent
66aae96507
commit
9667504178
@ -1310,6 +1310,11 @@ mmp_error:
|
||||
|
||||
if (FEATURE_ON(E2P_FEATURE_RO_INCOMPAT,
|
||||
EXT4_FEATURE_RO_COMPAT_PROJECT)) {
|
||||
if (fs->super->s_inode_size == EXT2_GOOD_OLD_INODE_SIZE) {
|
||||
fprintf(stderr, _("Cannot enable project feature; "
|
||||
"inode size too small.\n"));
|
||||
exit(1);
|
||||
}
|
||||
Q_flag = 1;
|
||||
quota_enable[PRJQUOTA] = QOPT_ENABLE;
|
||||
}
|
||||
@ -1497,6 +1502,13 @@ static void handle_quota_options(ext2_filsys fs)
|
||||
/* Nothing to do. */
|
||||
return;
|
||||
|
||||
if (quota_enable[PRJQUOTA] == QOPT_ENABLE &&
|
||||
fs->super->s_inode_size == EXT2_GOOD_OLD_INODE_SIZE) {
|
||||
fprintf(stderr, _("Cannot enable project quota; "
|
||||
"inode size too small.\n"));
|
||||
exit(1);
|
||||
}
|
||||
|
||||
for (qtype = 0; qtype < MAXQUOTAS; qtype++) {
|
||||
if (quota_enable[qtype] == QOPT_ENABLE)
|
||||
qtype_bits |= 1 << qtype;
|
||||
|
Loading…
Reference in New Issue
Block a user