Skip to contentSkip to conversation

Quota-tools support for ext4

PATCH In review Mingming Cao 2 participants 2 messages Oct 30, 2008 – Dec 17, 2008 VFS

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Quota-tools support for ext4

quota-tools has support for ext4dev filesystem already (at least in v3.16) . But it seems still missing the ext4 filesystem support which prevent quotacheck recognizes the ext4 filesystem. The following patch fixed it for me.

mntopt.h +2 -1
Index: quota-tools/mntopt.h
===================================================================
@@ -6,7 +6,8 @@
 /* filesystem type */
 #define MNTTYPE_EXT2		"ext2"	/* 2nd Extended file system */
 #define MNTTYPE_EXT3		"ext3"	/* ext2 + journaling */
-#define MNTTYPE_EXT4		"ext4dev"	/* ext4 filesystem */
+#define MNTTYPE_EXT4		"ext4"	/* ext4 filesystem */
+#define MNTTYPE_EXT4DEV		"ext4dev"/* ext4dev filesystem */
 #define MNTTYPE_MINIX		"minix"	/* MINIX file system */
 #define MNTTYPE_UFS		"ufs"	/* UNIX file system */
 #define MNTTYPE_UDF		"udf"	/* OSTA UDF file system */
quotacheck.c +1 -0
Index: quota-tools/quotacheck.c
===================================================================
@@ -1064,6 +1064,7 @@ static void check_all(void)
 		    !hasmntopt(mnt, MNTOPT_GRPJQUOTA) && !warned &&
 		    (!strcmp(mnt->mnt_type, MNTTYPE_EXT3) ||
 		     !strcmp(mnt->mnt_type, MNTTYPE_EXT4) ||
+		     !strcmp(mnt->mnt_type, MNTTYPE_EXT4DEV) ||
 		     !strcmp(mnt->mnt_type, MNTTYPE_REISER))) {
 			struct utsname stats;
 
quotasys.c +1 -0
Index: quota-tools/quotasys.c
===================================================================
@@ -63,6 +63,7 @@ static int correct_fstype(char *type)
 		if (!strcmp(type, MNTTYPE_EXT2) ||
 		    !strcmp(type, MNTTYPE_EXT3) ||
 		    !strcmp(type, MNTTYPE_EXT4) ||
+		    !strcmp(type, MNTTYPE_EXT4DEV) ||
 		    !strcmp(type, MNTTYPE_JFS) ||
 		    !strcmp(type, MNTTYPE_MINIX) ||
 		    !strcmp(type, MNTTYPE_UFS) ||
reviewer
#1 lore raw

Hi Mingming,

Quoted 4 lines · Mingming Cao

quota-tools has support for ext4dev filesystem already (at least in v3.16) . But it seems still missing the ext4 filesystem support which prevent quotacheck recognizes the ext4 filesystem. The following patch fixed it for me.

Thanks for your patch. I've merged it. I plan next quota tools release
in the beginning of January.

Honza

Signature · 2 lines
Jan Kara <[email protected]>
SUSE Labs, CR