From patchwork Mon Jul 29 11:56:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chao Yu X-Patchwork-Id: 11063643 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5DF4F13A4 for ; Mon, 29 Jul 2019 11:56:51 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4E31020069 for ; Mon, 29 Jul 2019 11:56:51 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 426AC2867F; Mon, 29 Jul 2019 11:56:51 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C341D20069 for ; Mon, 29 Jul 2019 11:56:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387872AbfG2L4u (ORCPT ); Mon, 29 Jul 2019 07:56:50 -0400 Received: from szxga04-in.huawei.com ([45.249.212.190]:3198 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S2387858AbfG2L4u (ORCPT ); Mon, 29 Jul 2019 07:56:50 -0400 Received: from DGGEMS407-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 5425AAF51E8B2DCB8225; Mon, 29 Jul 2019 19:56:36 +0800 (CST) Received: from szvp000203569.huawei.com (10.120.216.130) by DGGEMS407-HUB.china.huawei.com (10.3.19.207) with Microsoft SMTP Server id 14.3.439.0; Mon, 29 Jul 2019 19:56:27 +0800 From: Chao Yu To: CC: , , , , Chao Yu Subject: [PATCH] common/quota: enable project quota correctly on f2fs Date: Mon, 29 Jul 2019 19:56:20 +0800 Message-ID: <20190729115620.127160-1-yuchao0@huawei.com> X-Mailer: git-send-email 2.18.0.rc1 MIME-Version: 1.0 X-Originating-IP: [10.120.216.130] X-CFilter-Loop: Reflected Sender: fstests-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: fstests@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add a case for f2fs on _scratch_enable_pquota() to enable dependent features of project quota by mkfs. Signed-off-by: Chao Yu --- common/quota | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/common/quota b/common/quota index 659c6219..38aa9470 100644 --- a/common/quota +++ b/common/quota @@ -111,12 +111,17 @@ _require_getnextquota() # prior to mount. This is a relatively new feature ... _scratch_enable_pquota() { - [[ "$FSTYP" != ext[234] ]] && return - + case $FSTYP in + ext2|ext3|ext4) tune2fs -O quota,project $SCRATCH_DEV >>$seqres.full 2>&1 _try_scratch_mount >/dev/null 2>&1 \ || _notrun "kernel doesn't support project feature on $FSTYP" _scratch_unmount + ;; + f2fs) + _scratch_mkfs "-O extra_attr -O quota -O project_quota" >> $seqres.full 2>&1 + ;; + esac } #