Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp167605iog; Tue, 14 Jun 2022 22:52:27 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uyvaBHPyvepL2JlqghKh102DmjTabCXECMSD1fNZ5LV03F9UDLTZnzyGQwy32rzh6QXaJ/ X-Received: by 2002:a17:90b:1d08:b0:1e4:dad9:64e5 with SMTP id on8-20020a17090b1d0800b001e4dad964e5mr8297226pjb.200.1655272347052; Tue, 14 Jun 2022 22:52:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655272347; cv=none; d=google.com; s=arc-20160816; b=GqUssoFn20SdQEvKU2qWOTQajd5ROR2g7innSxVao82VowjDRsIY1JBGEnN62y5znJ iz7UAhKI1RawZVnQsr7rg/3HyFbBKzIeAqHf/8/smuewG9luyoPyuH6oU+lJ85OmCwCl 53zPS57nC0mrduq/7l1WV2EUFsklzMJri+JjZdp3c8gySqakD4dGAwETffoUfTP0MswJ B4Q3bBnzdFoslWiV5a2az2YXq+mvZw+8r9MmkCOX0UolgKoV69Xqs+VfQ1O4ZoOKEAIN I0+v4/CGYR5N4wRq3XtPuTYRYVhw/SMmzyeGW8FHaSusFJfqIPky9r3N82zdAMVaTwX5 rU3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=JIWkiD2gp+DIgZxu8gKOEwEpgQ5/8fbIKpBeO6X4A6Y=; b=kWbvtUkbO1AexBRsPpNMHyOBMEzSW4ywq1s6Lyqxv6e0mVls+Xm7UeISBVtHCbVb0J SYgzsMNWIMcKjk0P2LUasHYw55Qe5Ufj/TMzaZDnQw69z+8giMjt6zgpsx0E2/yEkEiE SV7LCOemeWPwIMIvrG17+vUc45FUJe4jPfWLETYRwRf0ZgecQSeCoUX7Wbmb2ykjHeDS flKq2j+gLGn6wJEiijc2dDhAQfJVTZ6+qAUrTEg/JrVxUWxRLIOKBqqiCCS7dHKyPeuo K7Un32kaKvliF+zrCPIUGXik8jyIBcPTGjfAqk6uSaRbgTep46zqbFLjK5vMkQHPXZC1 bxuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=hwECM+53; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 7-20020a630207000000b003fe24364064si15645533pgc.822.2022.06.14.22.52.15; Tue, 14 Jun 2022 22:52:27 -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=@gmail.com header.s=20210112 header.b=hwECM+53; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235982AbiFOFaD (ORCPT + 99 others); Wed, 15 Jun 2022 01:30:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52338 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229595AbiFOFaA (ORCPT ); Wed, 15 Jun 2022 01:30:00 -0400 Received: from mail-ej1-x636.google.com (mail-ej1-x636.google.com [IPv6:2a00:1450:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4931A49937; Tue, 14 Jun 2022 22:29:59 -0700 (PDT) Received: by mail-ej1-x636.google.com with SMTP id u12so20965843eja.8; Tue, 14 Jun 2022 22:29:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=JIWkiD2gp+DIgZxu8gKOEwEpgQ5/8fbIKpBeO6X4A6Y=; b=hwECM+53CVSf51IQ6pQMNyVuwW269uKlYHDfaAtqb/U8PafUKk+ORP/TmMgQsgYmoF 0PUSzwNQuXGCiSlf27SiPK6C08J6W85qbr6VfOBOc8bZ8inlYzp0faqG8DXQ/WUTfcdi 1pRq8aglD/nu4d6+kAzx/oYYjHOdBP++YBYv1ua0BdLRvj93XgbZxX5HVECeBSb4MdBv ubegmtRNBVhfT3icGdh+OkmQEd/9epG6UQejAsD590cQrpXaNG+zHDXaPcJizstK0cec TbFwZP0dEAHXnXS+yv1t60CD3anvCsakpJImS4WCYl9179sN7cC2M4eBAqE6u0l9xqXn swYw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=JIWkiD2gp+DIgZxu8gKOEwEpgQ5/8fbIKpBeO6X4A6Y=; b=flCeLDfcMDiooZ3pgjgvzEIABgIX9C2vYi65YfYtYmCF7nmywVrSRDWdjo1Qs25Lig nZ1Dsh5P1vzC9mPGrj/uW+LoOoobrvPRGUo6K74OcG1tx7W1Z9QMR/8ApTWM+/H0YX1q nroL9LOyUIIBJ3XOnpaaTxZ2355LullXZodc8Owqr2NdSdkUb9iSoZu5rjccR36TobV6 L85eKsS+Gc9vGl4nMw8OpZ/YwprNF/1aq+wZzcYKU34e7cqwRYoRO9nMc3vJxkP8+hvh ysaJmlEoNVNf7eBz2PJJOya7CSd8BPlt7xbsPjZd2llCxCkNNg20mvelAiwQtruYudBD 9rGg== X-Gm-Message-State: AJIora9RW8Kndak8mL+MEbE2AWByo5WDqo+TmKINGM8tbKqBZIveGZz1 iFk7MUZf8W6yI//ZXZfEEYo= X-Received: by 2002:a17:907:9605:b0:6f5:c66:7c13 with SMTP id gb5-20020a170907960500b006f50c667c13mr7101498ejc.66.1655270997850; Tue, 14 Jun 2022 22:29:57 -0700 (PDT) Received: from opensuse.localnet (host-87-16-96-199.retail.telecomitalia.it. [87.16.96.199]) by smtp.gmail.com with ESMTPSA id i2-20020a170906444200b006fed8dfcf78sm5832838ejp.225.2022.06.14.22.29.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 14 Jun 2022 22:29:56 -0700 (PDT) From: "Fabio M. De Francesco" To: David Sterba , Andrew Morton Cc: Ira Weiny , dsterba@suse.cz, Chris Mason , Josef Bacik , Nick Terrell , linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org, Filipe Manana Subject: Re: [PATCH] btrfs: Replace kmap() with kmap_local_page() in zstd.c Date: Wed, 15 Jun 2022 07:29:55 +0200 Message-ID: <3619537.MHq7AAxBmi@opensuse> In-Reply-To: References: <20220611135203.27992-1-fmdefrancesco@gmail.com> <8952566.CDJkKcVGEf@opensuse> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 marted=C3=AC 14 giugno 2022 19:07:34 CEST Ira Weiny wrote: > On Tue, Jun 14, 2022 at 06:28:48PM +0200, Fabio M. De Francesco wrote: > > On marted=C3=AC 14 giugno 2022 16:25:21 CEST David Sterba wrote: > > > On Tue, Jun 14, 2022 at 01:22:50AM +0200, Fabio M. De Francesco=20 wrote: > > > > On luned=C3=AC 13 giugno 2022 20:39:13 CEST David Sterba wrote: > > > > > On Sat, Jun 11, 2022 at 03:52:03PM +0200, Fabio M. De Francesco=20 > > >=20 >=20 > [snip] >=20 > > > > A better solution is changing the prototype of __kunmap_local(); I > > > > suppose that Andrew won't object, but who knows? > > > >=20 > > > > (+Cc Andrew Morton). > > > >=20 > > > > I was waiting for your comments. At now I've done about 15=20 conversions=20 > > > > across the kernel but it's the first time I had to pass a pointer=20 to=20 > > const=20 > > > > void to kunmap_local(). Therefore, I was not sure if changing the=20 API=20 > > were=20 > > > > better suited (however I have already discussed this with Ira). > > >=20 > > > IMHO it should be fixed in the API. > > >=20 > > I agree with you in full. > >=20 > > At the same time when you sent this email I submitted a patch to change= =20 > > kunmap_local() and kunmap_atomic(). > >=20 > > After Andrew takes them I'll send v2 of this patch to zstd.c without=20 those=20 > > unnecessary casts. >=20 > David, >=20 > Would you be willing to take this through your tree as a pre-patch to the= =20 kmap > changes in btrfs? >=20 > That would be easier for Fabio and probably you and Andrew in the long=20 run. >=20 > Ira David, Please drop the first version of the changes[1] to the API and instead take= =20 my second version.[2] I've only reworked the commit message (and subject,=20 but this was involuntary) to make explicit that the fundamental reason=20 behind these changes are semantic correctness. Thanks, =46abio [1] https://lore.kernel.org/lkml/20220614142531.16478-1-fmdefrancesco@gmail= =2Ecom/ [2] https://lore.kernel.org/lkml/20220615051256.31466-1-fmdefrancesco@gmail= =2Ecom/