Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2997588rwl; Sat, 1 Apr 2023 20:49:56 -0700 (PDT) X-Google-Smtp-Source: AKy350ZZyzCniqSmsrlj5uQ0Qz77lZ8O0OxSAsaPyDdx7GWZPObO9Ar6+J0Jd5jIOqePvG3ENrdi X-Received: by 2002:a17:903:2905:b0:199:10d2:b9da with SMTP id lh5-20020a170903290500b0019910d2b9damr27326322plb.58.1680407396622; Sat, 01 Apr 2023 20:49:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680407396; cv=none; d=google.com; s=arc-20160816; b=gIJtiiDu8C1uk9tidjiq6rbH/b3Hemtb682yXRXM1VhxFQuSgBIQV24cjb0oqPjFiA MhJ0WZ0UmGr+ec4WoB527tsr/bd7V+ioRgM8n2lvt8Ni4A2vG6D5jXvil8zaxo6g4sfu kxXjIyc3O+h21tgzTjU0yh3yM8xaliAHlqLM6+fpOkkQP3kVf3MhrScGkz05pKzVdOCj w0xXOGSogtQb6fZuf/giP6nWnqtZ0/Ex0lXgmO5cW0992UoLWrx+Blq4PJITgWgCNf69 U4DCxTNyDLCRpwH8P5GGxGvHNFZcxnLZWm3ayEETwuGFQbZWpm9ITFDAIPJil7kqUrOe fZHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:subject :from:references:cc:to:content-language:user-agent:mime-version:date :message-id:dkim-signature; bh=it9i7riRn4hUTrjC7JuGovjns16iEfeGSbDXZ5SrGoo=; b=y5n2bB5el2ihahxD7SsU8YoSyW2ZvWjycjQo1yctrSE4W/1AgrX6OC6bVub7cRaWeV lkDuOGYWpxRwgswJAMgDRTtakYzhOg/fvkt5i+TFxw72e4lw9zg3Vd9Yv46k4bEiiS91 koAxTh7SLQM5GIDTF1mhM7gu6ei6HNLGEAERagqVYBFQZ6OjjCJnVznKo8Kc4pLgPS+Y yJBZwjTbKP09bLhP5ZRPc9xzjfEYtL6KkoWEYvSJm4b3DFnRaMkJEBzufC135HhMECqN nwoztIt37rjozWTQ7LsBtifeIWZOyiJGLI83zevadUscCCPMz0wsefp7F9HK9G+9+iIE /DoA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mYpRaUWp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x18-20020a17090300d200b001a198422033si5305751plc.21.2023.04.01.20.49.34; Sat, 01 Apr 2023 20:49:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=mYpRaUWp; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230175AbjDBDQi (ORCPT + 99 others); Sat, 1 Apr 2023 23:16:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58224 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229603AbjDBDQg (ORCPT ); Sat, 1 Apr 2023 23:16:36 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 148421B7EE for ; Sat, 1 Apr 2023 20:16:36 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 9624A61029 for ; Sun, 2 Apr 2023 03:16:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2E289C433D2; Sun, 2 Apr 2023 03:16:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1680405394; bh=qTfnW+hzUh0eokuwDPYcMC56YPJnM7DJQY7FXrup0kc=; h=Date:To:Cc:References:From:Subject:In-Reply-To:From; b=mYpRaUWp+vWs72+6eTZ4LS9+AE68dgqikTQhVbo8EzInQAXjS0MeQU3E/A9qYh+hY 26RY4GbvkgjRqZPCfG2glURFROv4V8S3RKu+wFTmp9gZk/Kx6W5Mc+dgpz0DuD0K1/ jzz7WHqMyyVs0Dr5eJcdbnbsWQcJmQrzN4c++mgdNwV9UudEcIbjdFJxedEJvwutqu 1Wkgz+Dcj0icmieG4lsUX5MRRtYH6QX3DZPv46LQiNpcqsozJsinYBynx2D1tuCPjI Rjm5ekZE2XBbT1ECVfFDzOT/IjWGSkuMf9zeqfqTcw4GadOvJTUNRf4O2Fvqgw/Vcj AJ3sxDHyAvyzg== Message-ID: Date: Sun, 2 Apr 2023 11:16:31 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.8.0 Content-Language: en-US To: Jaegeuk Kim , Yangtao Li Cc: linux-f2fs-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org References: <20230223073222.81702-1-frank.li@vivo.com> From: Chao Yu Subject: Re: [PATCH] f2fs: fix to check quota inums In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-5.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2023/3/7 4:59, Jaegeuk Kim wrote: > On 02/23, Yangtao Li wrote: >> +static inline bool f2fs_check_quota_inum(int type, unsigned long qf_inum) >> +{ >> + switch (type) { >> + case USRQUOTA: >> + return qf_inum == 4; >> + case GRPQUOTA: >> + return qf_inum == 5; >> + case PRJQUOTA: >> + return qf_inum == 6; > > I don't want to make this dependency of the inode numbers. Actually, mkfs.f2fs allocates qf_inum dynamically, above sanity check may fail mount()... Thanks,