From patchwork Fri Feb 28 16:34:50 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vivek Goyal X-Patchwork-Id: 11412779 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id D4E3714B7 for ; Fri, 28 Feb 2020 16:35:25 +0000 (UTC) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 5EB6E246BB for ; Fri, 28 Feb 2020 16:35:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="OAx8vz+M" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5EB6E246BB Authentication-Results: mail.kernel.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dm-devel-bounces@redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1582907724; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=ina/NA3YD98SZYDRpgDOkWUbmfhb9SObYL3YFvvIF40=; b=OAx8vz+MkWo+9fDsDO6nmcrg+DuBR2ifXiFG/nFDqZUNqcqn3/sP+qJay1N4lhMshE2raO GHnG+eFn3EaQ9C0MF+pLkGSXG4guIGHuDAVyokFr6Qf0z5meF49E76MfH65oVfu25PCTRS pZxWWqbrjBscwpNM4MM8nTPyrXd0TSA= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-281-SSOmdTemNlKTXyyyGxTGKQ-1; Fri, 28 Feb 2020 11:35:22 -0500 X-MC-Unique: SSOmdTemNlKTXyyyGxTGKQ-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 198668010E7; Fri, 28 Feb 2020 16:35:16 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E4E188D542; Fri, 28 Feb 2020 16:35:15 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 2608784491; Fri, 28 Feb 2020 16:35:15 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 01SGZEsB005207 for ; Fri, 28 Feb 2020 11:35:14 -0500 Received: by smtp.corp.redhat.com (Postfix) id 105FA9299B; Fri, 28 Feb 2020 16:35:14 +0000 (UTC) Delivered-To: dm-devel@redhat.com Received: from horse.redhat.com (unknown [10.18.25.35]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2B48A90F5B; Fri, 28 Feb 2020 16:35:11 +0000 (UTC) Received: by horse.redhat.com (Postfix, from userid 10451) id BED052257D2; Fri, 28 Feb 2020 11:35:10 -0500 (EST) From: Vivek Goyal To: linux-fsdevel@vger.kernel.org, linux-nvdimm@lists.01.org, hch@infradead.org, dan.j.williams@intel.com Date: Fri, 28 Feb 2020 11:34:50 -0500 Message-Id: <20200228163456.1587-1-vgoyal@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: dm-devel@redhat.com Cc: jmoyer@redhat.com, david@fromorbit.com, dm-devel@redhat.com, vgoyal@redhat.com Subject: [dm-devel] [PATCH v6 0/6] dax/pmem: Provide a dax operation to zero page range X-BeenThere: dm-devel@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: device-mapper development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dm-devel-bounces@redhat.com Errors-To: dm-devel-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Hi, This is V6 of patches. These patches are also available at. Changes since V5: - Dan Williams preferred ->zero_page_range() to only accept PAGE_SIZE aligned request and clear poison only on page size aligned zeroing. So I changed it accordingly. - Dropped all the modifications which were required to support arbitrary range zeroing with-in a page. - This patch series also fixes the issue where "truncate -s 512 foo.txt" will fail if first sector of file is poisoned. Currently it succeeds and filesystem expectes whole of the filesystem block to be free of poison at the end of the operation. Christoph, I have dropped your Reviewed-by tag on 1-2 patches because these patches changed substantially. Especially signature of of dax zero_page_range() helper. Thanks Vivek Vivek Goyal (6): pmem: Add functions for reading/writing page to/from pmem dax, pmem: Add a dax operation zero_page_range s390,dcssblk,dax: Add dax zero_page_range operation to dcssblk driver dm,dax: Add dax zero_page_range operation dax: Use new dax zero page method for zeroing a page dax,iomap: Add helper dax_iomap_zero() to zero a range drivers/dax/super.c | 20 ++++++++ drivers/md/dm-linear.c | 18 +++++++ drivers/md/dm-log-writes.c | 17 ++++++ drivers/md/dm-stripe.c | 23 +++++++++ drivers/md/dm.c | 30 +++++++++++ drivers/nvdimm/pmem.c | 97 ++++++++++++++++++++++------------- drivers/s390/block/dcssblk.c | 15 ++++++ fs/dax.c | 59 ++++++++++----------- fs/iomap/buffered-io.c | 9 +--- include/linux/dax.h | 21 +++----- include/linux/device-mapper.h | 3 ++ 11 files changed, 221 insertions(+), 91 deletions(-)