From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mingming Cao Subject: [PATCH] Quota-tools support for ext4 Date: Wed, 29 Oct 2008 17:35:14 -0700 Message-ID: <1225326914.6405.25.camel@mingming-laptop> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Cc: linux-fsdevel@vger.kernel.org, Eric Sandeen To: Jan Kara Return-path: Received: from e38.co.us.ibm.com ([32.97.110.159]:51951 "EHLO e38.co.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754625AbYJ3AfP (ORCPT ); Wed, 29 Oct 2008 20:35:15 -0400 Received: from d03relay02.boulder.ibm.com (d03relay02.boulder.ibm.com [9.17.195.227]) by e38.co.us.ibm.com (8.13.1/8.13.1) with ESMTP id m9U0YU8Y001484 for ; Wed, 29 Oct 2008 18:34:30 -0600 Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by d03relay02.boulder.ibm.com (8.13.8/8.13.8/NCO v9.1) with ESMTP id m9U0ZEWP105928 for ; Wed, 29 Oct 2008 18:35:14 -0600 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.12.11.20060308/8.13.3) with ESMTP id m9U0YiNN031231 for ; Wed, 29 Oct 2008 18:34:45 -0600 Sender: linux-fsdevel-owner@vger.kernel.org List-ID: 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. Signed-off-by: Mingming Cao Index: quota-tools/mntopt.h =================================================================== --- quota-tools.orig/mntopt.h 2007-08-22 04:26:55.000000000 -0700 +++ quota-tools/mntopt.h 2008-10-29 16:37:57.000000000 -0700 @@ -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 */ Index: quota-tools/quotacheck.c =================================================================== --- quota-tools.orig/quotacheck.c 2008-10-29 16:38:50.000000000 -0700 +++ quota-tools/quotacheck.c 2008-10-29 16:39:09.000000000 -0700 @@ -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; Index: quota-tools/quotasys.c =================================================================== --- quota-tools.orig/quotasys.c 2008-10-29 16:39:45.000000000 -0700 +++ quota-tools/quotasys.c 2008-10-29 16:40:01.000000000 -0700 @@ -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) ||