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=-10.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 476FAC47083 for ; Fri, 4 Jun 2021 08:33:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 2B8096138C for ; Fri, 4 Jun 2021 08:33:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230090AbhFDIe5 (ORCPT ); Fri, 4 Jun 2021 04:34:57 -0400 Received: from wnew1-smtp.messagingengine.com ([64.147.123.26]:34537 "EHLO wnew1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229900AbhFDIez (ORCPT ); Fri, 4 Jun 2021 04:34:55 -0400 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailnew.west.internal (Postfix) with ESMTP id 2FB4B10FD; Fri, 4 Jun 2021 04:33:08 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Fri, 04 Jun 2021 04:33:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kroah.com; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm1; bh=0QaX15AhSJWfHsnr5gihB3yVDuh 8b9trAJVDVBkiUD4=; b=CnkrDlNGkGa4MOf2Cy06uaBzfIbQe7fGKLCuRMAGOi1 n/iQBiw/FoYn/spSiV5q01C4jk+qfBhD8KvHHfvAlczcbcOgnddxWwrJTf02tbBf F1o+LC7edEtdOAjDfxL2sbObcArkCRl4O67uYtFkwmNULRCKbbV7VX9q3zyzqU4N oHzG14bnUgMPMJJ7acQqP70B4y/hHDZs80UvKbB2e4K2AXdZJF0qBW55A4VLyZjT oH7/8XZwc8FSXKU3CdxFt+J3yLWfi23B1XdWTPPXhXdGTinu+gJakGFiF53uBLLi 02OlyFztYOsWt7G6aZdzBDoOf3oGft5z9nkp+KZl2HQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=0QaX15 AhSJWfHsnr5gihB3yVDuh8b9trAJVDVBkiUD4=; b=G2rVdkeh8vMSGKkpyvbRJt 5g3hydXtZI85c0lsB9xcDuc1M1HPQQ6F1EmAww/hE8x0nDodsLDrYl5bR+KIp2Ht h3TOTJdqCEuz3A2lR711pWzw10nEcRSvEh0D7nOKZz0sSaqb8f3qObGU/Gyx/g9k eJpcIIALi9p4nMm/AnoNP8pAfj+1fhJ9JrpM0iQn+zCvKxTCKInURsDhCDxkkscK vRue5NBD5qkOFVBD+1FBlqUBhTHAWjhJZD1M1Y2LiuMFPkLrQVQ6gsYgK1BpPDCI 3aDTPQ1KYQD/pCaAwZYl2JYhTC+xRXPjiieHEDoB94dOqxZWPCJqQYkgXNMllnfQ == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrfedtuddgtdegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpefirhgvghcu mffjuceoghhrvghgsehkrhhorghhrdgtohhmqeenucggtffrrghtthgvrhhnpeevueehje fgfffgiedvudekvdektdelleelgefhleejieeugeegveeuuddukedvteenucevlhhushht vghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehgrhgvgheskhhrohgrhh drtghomh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 4 Jun 2021 04:33:06 -0400 (EDT) Date: Fri, 4 Jun 2021 10:33:03 +0200 From: Greg KH To: David Laight Cc: 'Jaegeuk Kim' , Eric Biggers , Daniel Rosenberg , Chao Yu , "linux-f2fs-devel@lists.sourceforge.net" , "linux-kernel@vger.kernel.org" , "linux-fsdevel@vger.kernel.org" , Gabriel Krisman Bertazi , "kernel-team@android.com" , "stable@vger.kernel.org" Subject: Re: [PATCH v2 2/2] f2fs: Advertise encrypted casefolding in sysfs Message-ID: References: <20210603095038.314949-1-drosen@google.com> <20210603095038.314949-3-drosen@google.com> <4f56f2781fac4b8bac1a78b0fecc318d@AcuMS.aculab.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4f56f2781fac4b8bac1a78b0fecc318d@AcuMS.aculab.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 04, 2021 at 08:27:32AM +0000, David Laight wrote: > From: Jaegeuk Kim > > Sent: 04 June 2021 05:45 > ... > > > > @@ -161,6 +161,9 @@ static ssize_t features_show(struct f2fs_attr *a, > > > > if (f2fs_sb_has_compression(sbi)) > > > > len += scnprintf(buf + len, PAGE_SIZE - len, "%s%s", > > > > len ? ", " : "", "compression"); > > > > + if (f2fs_sb_has_casefold(sbi) && f2fs_sb_has_encrypt(sbi)) > > > > + len += scnprintf(buf + len, PAGE_SIZE - len, "%s%s", > > > > + len ? ", " : "", "encrypted_casefold"); > > > > len += scnprintf(buf + len, PAGE_SIZE - len, "%s%s", > > > > len ? ", " : "", "pin_file"); > > > > len += scnprintf(buf + len, PAGE_SIZE - len, "\n"); > > Looking at that pattern, why don't you just append "tag, " > each time and then replace the final ", " with "\n" at the end. Again PLEASE NO! This is not how sysfs is supposed to work and do not perpetuate this mess in any way. greg k-h 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=-8.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 5F9FBC07E94 for ; Fri, 4 Jun 2021 08:51:29 +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 124E461208 for ; Fri, 4 Jun 2021 08:51:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 124E461208 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=kroah.com 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-1.v29.lw.sourceforge.com) by sfs-ml-1.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1lp5Y7-0005O4-1X; Fri, 04 Jun 2021 08:51:27 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-1.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lp5Y1-0005NG-SI for linux-f2fs-devel@lists.sourceforge.net; Fri, 04 Jun 2021 08:51:21 +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=0QaX15AhSJWfHsnr5gihB3yVDuh8b9trAJVDVBkiUD4=; b=lj0YXl9Nf7og7ASUThHql1Ga75 XNdPmI91zEP401563ntO6N6AKSa1jHqgmdNbujff1G9j2UxUB30JJAzwXmegSXAYiL9dXd2zdRSUe J6m+Y4zEjNGUxP+ylptaz+lNrAoaPrNwCosjGiQz+Vzfygi8RRD6sdE0QQsJbSQ3h+HA=; 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=0QaX15AhSJWfHsnr5gihB3yVDuh8b9trAJVDVBkiUD4=; b=Pw+VXFoiv3Efvl8xKcce6r6UN2 44DXqwudTCr1zN8FF7F10h2UuX5RdkDRFpOG38IS+vVLrIMKhshAmaP9/WpmClzOd1P5KLZDVr941 WPBTtei9C/xcdfj6bKeYHEXXENYDtiJ3MMZXjUMVqt/Kc9VWJnWyKCCoApRpUCQ/4ElY=; Received: from wnew1-smtp.messagingengine.com ([64.147.123.26]) by sfi-mx-1.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.3) id 1lp5Xt-00A3yV-6a for linux-f2fs-devel@lists.sourceforge.net; Fri, 04 Jun 2021 08:51:22 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailnew.west.internal (Postfix) with ESMTP id 2FB4B10FD; Fri, 4 Jun 2021 04:33:08 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Fri, 04 Jun 2021 04:33:09 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kroah.com; h= date:from:to:cc:subject:message-id:references:mime-version :content-type:in-reply-to; s=fm1; bh=0QaX15AhSJWfHsnr5gihB3yVDuh 8b9trAJVDVBkiUD4=; b=CnkrDlNGkGa4MOf2Cy06uaBzfIbQe7fGKLCuRMAGOi1 n/iQBiw/FoYn/spSiV5q01C4jk+qfBhD8KvHHfvAlczcbcOgnddxWwrJTf02tbBf F1o+LC7edEtdOAjDfxL2sbObcArkCRl4O67uYtFkwmNULRCKbbV7VX9q3zyzqU4N oHzG14bnUgMPMJJ7acQqP70B4y/hHDZs80UvKbB2e4K2AXdZJF0qBW55A4VLyZjT oH7/8XZwc8FSXKU3CdxFt+J3yLWfi23B1XdWTPPXhXdGTinu+gJakGFiF53uBLLi 02OlyFztYOsWt7G6aZdzBDoOf3oGft5z9nkp+KZl2HQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; bh=0QaX15 AhSJWfHsnr5gihB3yVDuh8b9trAJVDVBkiUD4=; b=G2rVdkeh8vMSGKkpyvbRJt 5g3hydXtZI85c0lsB9xcDuc1M1HPQQ6F1EmAww/hE8x0nDodsLDrYl5bR+KIp2Ht h3TOTJdqCEuz3A2lR711pWzw10nEcRSvEh0D7nOKZz0sSaqb8f3qObGU/Gyx/g9k eJpcIIALi9p4nMm/AnoNP8pAfj+1fhJ9JrpM0iQn+zCvKxTCKInURsDhCDxkkscK vRue5NBD5qkOFVBD+1FBlqUBhTHAWjhJZD1M1Y2LiuMFPkLrQVQ6gsYgK1BpPDCI 3aDTPQ1KYQD/pCaAwZYl2JYhTC+xRXPjiieHEDoB94dOqxZWPCJqQYkgXNMllnfQ == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduledrfedtuddgtdegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvffukfhfgggtuggjsehttdertddttddvnecuhfhrohhmpefirhgvghcu mffjuceoghhrvghgsehkrhhorghhrdgtohhmqeenucggtffrrghtthgvrhhnpeevueehje fgfffgiedvudekvdektdelleelgefhleejieeugeegveeuuddukedvteenucevlhhushht vghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehgrhgvgheskhhrohgrhh drtghomh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 4 Jun 2021 04:33:06 -0400 (EDT) Date: Fri, 4 Jun 2021 10:33:03 +0200 From: Greg KH To: David Laight Message-ID: References: <20210603095038.314949-1-drosen@google.com> <20210603095038.314949-3-drosen@google.com> <4f56f2781fac4b8bac1a78b0fecc318d@AcuMS.aculab.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <4f56f2781fac4b8bac1a78b0fecc318d@AcuMS.aculab.com> X-Headers-End: 1lp5Xt-00A3yV-6a Subject: Re: [f2fs-dev] [PATCH v2 2/2] f2fs: Advertise encrypted casefolding in sysfs 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: Daniel Rosenberg , "kernel-team@android.com" , "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" , "linux-f2fs-devel@lists.sourceforge.net" , Eric Biggers , "linux-fsdevel@vger.kernel.org" , 'Jaegeuk Kim' , Gabriel Krisman Bertazi Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net On Fri, Jun 04, 2021 at 08:27:32AM +0000, David Laight wrote: > From: Jaegeuk Kim > > Sent: 04 June 2021 05:45 > ... > > > > @@ -161,6 +161,9 @@ static ssize_t features_show(struct f2fs_attr *a, > > > > if (f2fs_sb_has_compression(sbi)) > > > > len += scnprintf(buf + len, PAGE_SIZE - len, "%s%s", > > > > len ? ", " : "", "compression"); > > > > + if (f2fs_sb_has_casefold(sbi) && f2fs_sb_has_encrypt(sbi)) > > > > + len += scnprintf(buf + len, PAGE_SIZE - len, "%s%s", > > > > + len ? ", " : "", "encrypted_casefold"); > > > > len += scnprintf(buf + len, PAGE_SIZE - len, "%s%s", > > > > len ? ", " : "", "pin_file"); > > > > len += scnprintf(buf + len, PAGE_SIZE - len, "\n"); > > Looking at that pattern, why don't you just append "tag, " > each time and then replace the final ", " with "\n" at the end. Again PLEASE NO! This is not how sysfs is supposed to work and do not perpetuate this mess in any way. greg k-h _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel