From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 71465C2D0A3 for ; Mon, 9 Nov 2020 18:12:27 +0000 (UTC) Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id BDF022068D for ; Mon, 9 Nov 2020 18:12:26 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sourceforge.net header.i=@sourceforge.net header.b="aYcyHhaU"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=sf.net header.i=@sf.net header.b="N7N4rJ7u"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="Wk08W6kN" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org BDF022068D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linux-f2fs-devel-bounces@lists.sourceforge.net Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1kcBeT-0001Yk-BI; Mon, 09 Nov 2020 18:12:25 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kcBeR-0001YX-Iu for linux-f2fs-devel@lists.sourceforge.net; Mon, 09 Nov 2020 18:12:23 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=In-Reply-To:Content-Type:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=R96JuBMLrFTBQG/c0iLhS/HZJQT+Dg307Dz2jWPuHus=; b=aYcyHhaUnt+t3eoOvmVWfjMcNw K9NWP/IkoLrcnMVQHbYBjtK4itOxOqZvEmVBDN1Za4EyUc8KH4bRse9ZG2djW4JE5tK33uld07PZ5 rxGuk6JC2G1NIzcftz1veH6BehS9Uwdso7MizhZ9fjQbTOFx6xWBFERJTPEx4yJrhSsI=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To :From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=R96JuBMLrFTBQG/c0iLhS/HZJQT+Dg307Dz2jWPuHus=; b=N7N4rJ7uHj+HVrL9fEykxXEHUS YFORJc8CESoqRbfOOLjQBbMkXQKCAkrBnww4pID5GLjlwkoaM54rHmP+sxDRynL8htULpLM+3VejD 7EaRjrDeUrVYbhSi88HiZ40iQTrKJVYLvLA7dYSKZpzBivztmZO/Bmr14L0DK9PjwkqE=; Received: from mail.kernel.org ([198.145.29.99]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.2) id 1kcBeL-00EY3O-K4 for linux-f2fs-devel@lists.sourceforge.net; Mon, 09 Nov 2020 18:12:23 +0000 Received: from gmail.com (unknown [104.132.1.84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1BDC320644; Mon, 9 Nov 2020 18:12:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604945526; bh=tsjnf5mmTj0EScyRB7zrXWKWdSc7EtXrjBjYMukdyA4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Wk08W6kNcA29qf+RsYjb2LrGwZhhwDSeAhmCxNJn4RCzUGW5OUYPn655TQLeJMlVe ZndxtRZ8w2JIvhUauqKK0mf7xb4MpXDIYPENdxJcNOVmX1OfStAU92kXQ3F0UA+zDA 0wFNS0tflmZ2otx2JfzzijCE/b9ciaSYQmuy5HsA= Date: Mon, 9 Nov 2020 10:12:04 -0800 From: Eric Biggers To: Chao Yu Message-ID: <20201109181204.GA1232946@gmail.com> References: <20201106065331.76236-1-yuchao0@huawei.com> <20201106180324.GA78548@sol.localdomain> <20201107171635.GA841@sol.localdomain> <63efaa5c-bc19-4b16-653d-840bc6a6d9d1@huawei.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <63efaa5c-bc19-4b16-653d-840bc6a6d9d1@huawei.com> X-Headers-End: 1kcBeL-00EY3O-K4 Subject: Re: [f2fs-dev] [PATCH v4 2/2] f2fs: fix compat F2FS_IOC_{MOVE, GARBAGE_COLLECT}_RANGE X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: jaegeuk@kernel.org, linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net On Mon, Nov 09, 2020 at 10:29:25AM +0800, Chao Yu wrote: > > Oh I see, the cp-related checks are at the beginning of f2fs_ioctl() too. > > > > In that case a much better approach would be to add __f2fs_ioctl() which is > > called by f2fs_ioctl() and f2fs_compat_ioctl(), and have f2fs_ioctl() and > > f2fs_compat_ioctl() do the cp-related checks but not __f2fs_ioctl(). > > Will this cleanup make sense to you? I think it would be better to do it the way I suggested. - Eric _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4F973C388F7 for ; Mon, 9 Nov 2020 18:12:08 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E651D2068D for ; Mon, 9 Nov 2020 18:12:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="Wk08W6kN" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730574AbgKISMH (ORCPT ); Mon, 9 Nov 2020 13:12:07 -0500 Received: from mail.kernel.org ([198.145.29.99]:51564 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729807AbgKISMG (ORCPT ); Mon, 9 Nov 2020 13:12:06 -0500 Received: from gmail.com (unknown [104.132.1.84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 1BDC320644; Mon, 9 Nov 2020 18:12:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604945526; bh=tsjnf5mmTj0EScyRB7zrXWKWdSc7EtXrjBjYMukdyA4=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Wk08W6kNcA29qf+RsYjb2LrGwZhhwDSeAhmCxNJn4RCzUGW5OUYPn655TQLeJMlVe ZndxtRZ8w2JIvhUauqKK0mf7xb4MpXDIYPENdxJcNOVmX1OfStAU92kXQ3F0UA+zDA 0wFNS0tflmZ2otx2JfzzijCE/b9ciaSYQmuy5HsA= Date: Mon, 9 Nov 2020 10:12:04 -0800 From: Eric Biggers To: Chao Yu Cc: Chao Yu , jaegeuk@kernel.org, linux-kernel@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net Subject: Re: [f2fs-dev] [PATCH v4 2/2] f2fs: fix compat F2FS_IOC_{MOVE, GARBAGE_COLLECT}_RANGE Message-ID: <20201109181204.GA1232946@gmail.com> References: <20201106065331.76236-1-yuchao0@huawei.com> <20201106180324.GA78548@sol.localdomain> <20201107171635.GA841@sol.localdomain> <63efaa5c-bc19-4b16-653d-840bc6a6d9d1@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <63efaa5c-bc19-4b16-653d-840bc6a6d9d1@huawei.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Nov 09, 2020 at 10:29:25AM +0800, Chao Yu wrote: > > Oh I see, the cp-related checks are at the beginning of f2fs_ioctl() too. > > > > In that case a much better approach would be to add __f2fs_ioctl() which is > > called by f2fs_ioctl() and f2fs_compat_ioctl(), and have f2fs_ioctl() and > > f2fs_compat_ioctl() do the cp-related checks but not __f2fs_ioctl(). > > Will this cleanup make sense to you? I think it would be better to do it the way I suggested. - Eric