Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp18121103rwd; Tue, 27 Jun 2023 11:59:09 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ77qdLoydyMJc4Jn5rt92t1R3Swwd0mKSjcrmMmDpEojtT/xACtKr0lDTev9uuBUp1JvXQx X-Received: by 2002:a9d:7457:0:b0:6b7:4e26:6732 with SMTP id p23-20020a9d7457000000b006b74e266732mr5355191otk.10.1687892348994; Tue, 27 Jun 2023 11:59:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687892348; cv=none; d=google.com; s=arc-20160816; b=alYPfMv+rPc37Rb0CDAaPh5j037M7A4D81UG6uUHxuuqbqdvSsLjMkGJkrkXIiNKvD tUlEwCkLca+mfl7XXE89hlbvMvzajx2J9o97yafrOGvET3SMnAark7WVGncjelTa3Y8Y XXbcc8amURe4tbT4bnkxCNcSCXZCpVl8MMRlSscwGbjFC6KWRQXNWVeqfHT/+WPW7f4x YjwYKe1Eomcy+Qm0JmkkLoz4khJ1ua4yWw1ZulphAY4AfbMYOW6x9Ny5IduSYD39ObCO fzjLxrQfTwSoek5QaI+YGSQPHHaNcd7rBrsSkuJjX73jTqCH0UrwmJ7vIcVUfCXyoqpZ VARw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=SNWjDtbaNNqP8y2G6wASmQqrj1efzQChp45+zn86JxU=; fh=LrLjuViBvwQOcqcOslPC5cRGbgISfkZkK78Dw5eKz4k=; b=kms2MxvUsZObWwQKCFU7SBqsxrfFl85doMxUxO6t4SSzneiWROb/mewoOZ5Ar44ILD VzI0kOe9CV87RqPhuOWSMLJYEQ49yqhfiucx9npD1jWd88aXRbE7Gnhm7SZTAU1ZeeIg tWCLLAE33GxOYnK9fLvZ4SZMtfTjEvn8dGxxNMrs4/l4QF5/ety8Pt0PrESAAvUwOpPE x9N7mqB6+WYhwVznHE8BCd1W2IPaX4LNg6wjayXFDmz5ZY4uYxGXBsFLuSXlIPBt1IsT g4BSl2O7iPeo/WRDVnokcV2EsjAeeMhyqQ8vJGADLJJ6Wne+cnlvylTBVoCIH5cB5b0d 4klg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@mailo.com header.s=mailo header.b=d3NSY15O; 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=fail (p=NONE sp=NONE dis=NONE) header.from=mailo.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w184-20020a6382c1000000b0054fb9698c4csi7965539pgd.13.2023.06.27.11.58.54; Tue, 27 Jun 2023 11:59:08 -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=fail header.i=@mailo.com header.s=mailo header.b=d3NSY15O; 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=fail (p=NONE sp=NONE dis=NONE) header.from=mailo.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231137AbjF0S0S (ORCPT + 99 others); Tue, 27 Jun 2023 14:26:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53186 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229886AbjF0S0Q (ORCPT ); Tue, 27 Jun 2023 14:26:16 -0400 Received: from msg-2.mailo.com (msg-2.mailo.com [213.182.54.12]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC40B1700 for ; Tue, 27 Jun 2023 11:26:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mailo.com; s=mailo; t=1687890362; bh=kHHAfYHgwP/dgzjiS72xnT+VmChITKgsJ5UUW7bIOtQ=; h=X-EA-Auth:Date:From:To:Cc:Subject:Message-ID:References: MIME-Version:Content-Type:In-Reply-To; b=d3NSY15OuwAtB595Yd141LrxkHdcjRN8qpbjex6nvBkfMCixJavVB7Lt/+3uRCL3S gj9OEsluH9NVW7NtrF9VHnUEU8qwhr2lqrfN6rJhsjb2tl7iFukv+r4s02Vbj1tYHN /PPT2lFhL2ihPB/V+IJLt1ATRKKb0LdBau8TnwoY= Received: by b221-4.in.mailobj.net [192.168.90.24] with ESMTP via ip-20.mailobj.net [213.182.54.20] Tue, 27 Jun 2023 20:26:02 +0200 (CEST) X-EA-Auth: 9efLsvJKcKvnhci5w9xFlXD2LS7yzv66pA/KXBJc08NWD2BoLncs6YY+6AbJzknFlyRZiv5v7VwiHMG0h0i/wJa2qg8sZ7u+ Date: Tue, 27 Jun 2023 23:55:57 +0530 From: Deepak R Varma To: "Fabio M. De Francesco" Cc: Bob Peterson , Andreas Gruenbacher , cluster-devel@redhat.com, linux-kernel@vger.kernel.org, Ira Weiny , Sumitra Sharma Subject: Re: [PATCH] gfs2: Replace deprecated kmap_atomic() by kmap_local_page() Message-ID: References: <1905283.taCxCBeP46@suse> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1905283.taCxCBeP46@suse> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 Tue, Jun 27, 2023 at 01:11:46PM +0200, Fabio M. De Francesco wrote: > On domenica 25 giugno 2023 21:23:21 CEST Deepak R Varma wrote: > > kmap_atomic() is deprecated in favor of kmap_local_{folio,page}(). > > > > } > > - p = kmap_atomic(page); > > + p = kmap_local_page(page); > > amt = size - copied; > > if (offset + size > PAGE_SIZE) > > amt = PAGE_SIZE - offset; > > memcpy(buf + copied, p + offset, amt); > > How about using memcpy_from_page()? We can do that. I will include that in v3. Deepak. > > Fabio > > > - kunmap_atomic(p); > > + kunmap_local(p); > > put_page(page); > > copied += amt; > > index++; > > -- > > 2.34.1 > > > >