From patchwork Thu Aug 10 16:00:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Weinberger X-Patchwork-Id: 712534 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7DC09C001B0 for ; Thu, 10 Aug 2023 16:00:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235349AbjHJQAo (ORCPT ); Thu, 10 Aug 2023 12:00:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58150 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235056AbjHJQAl (ORCPT ); Thu, 10 Aug 2023 12:00:41 -0400 Received: from lithops.sigma-star.at (lithops.sigma-star.at [195.201.40.130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 313E826B7; Thu, 10 Aug 2023 09:00:38 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id A9ED160ED81F; Thu, 10 Aug 2023 18:00:36 +0200 (CEST) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id NOlwUiZruBJ3; Thu, 10 Aug 2023 18:00:36 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by lithops.sigma-star.at (Postfix) with ESMTP id 4A1E8635D295; Thu, 10 Aug 2023 18:00:36 +0200 (CEST) Received: from lithops.sigma-star.at ([127.0.0.1]) by localhost (lithops.sigma-star.at [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id YnW_UZS0Pu1b; Thu, 10 Aug 2023 18:00:36 +0200 (CEST) Received: from foxxylove.corp.sigma-star.at (unknown [82.150.214.1]) by lithops.sigma-star.at (Postfix) with ESMTPSA id C7225635D290; Thu, 10 Aug 2023 18:00:35 +0200 (CEST) From: Richard Weinberger To: linux-mtd@lists.infradead.org Cc: Christoph Hellwig , Stephan Wurm , Richard Weinberger , Miquel Raynal , Vignesh Raghavendra , Oliver Neukum , Ali Akcaagac , Jamie Lenehan , "James E.J. Bottomley" , "Martin K. Petersen" , Ezequiel Garcia , linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org Subject: [PATCH 0/7] Fix UBI Block wrt. highmem Date: Thu, 10 Aug 2023 18:00:11 +0200 Message-Id: <20230810160019.16977-1-richard@nod.at> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org Patch 1 changes UBIblock to use a copy of scsi_kmap_atomic_sg() for sg list processing. This patch is meant for backporting to stable. It makes use of kmap_atomic() and a bounce buffer because MTD/UBI IO can sleep. Patches 2 to 7 move scsi_kmap_atomic_sg() into lib/scatterlist.c, convert it to kmap_local(), convert all users to it and remove the bounce buffer from UBIblock again. Richard Weinberger (7): ubi: block: Refactor sg list processing for highmem scatterlist: Add kmap helpers scsi: dc395x: Switch to kmap_sg scsi: esp_scsi: Switch to kmap_sg scsi: fdomain: Switch to kmap_sg ubi: block: Switch to kmap_sg scsi: core: Remove scsi_kmap_atomic_sg() drivers/mtd/ubi/block.c | 11 +++---- drivers/mtd/ubi/eba.c | 50 +++++++++++++------------------ drivers/scsi/dc395x.c | 12 ++++---- drivers/scsi/esp_scsi.c | 4 +-- drivers/scsi/fdomain.c | 10 +++---- drivers/scsi/scsi_lib.c | 60 ------------------------------------- include/linux/mtd/ubi.h | 12 ++++---- include/linux/scatterlist.h | 3 ++ include/scsi/scsi_cmnd.h | 4 --- lib/scatterlist.c | 55 ++++++++++++++++++++++++++++++++++ 10 files changed, 100 insertions(+), 121 deletions(-)