From patchwork Thu Mar 5 11:56:36 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boaz Harrosh X-Patchwork-Id: 5945071 Return-Path: X-Original-To: patchwork-linux-nvdimm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 9B5EABF440 for ; Thu, 5 Mar 2015 11:56:43 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id D7B1C2038A for ; Thu, 5 Mar 2015 11:56:42 +0000 (UTC) Received: from ml01.01.org (ml01.01.org [198.145.21.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 01C0720386 for ; Thu, 5 Mar 2015 11:56:42 +0000 (UTC) Received: from ml01.vlan14.01.org (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id EC5F18118D; Thu, 5 Mar 2015 03:56:41 -0800 (PST) X-Original-To: linux-nvdimm@lists.01.org Delivered-To: linux-nvdimm@lists.01.org Received: from mail-wg0-f53.google.com (mail-wg0-f53.google.com [74.125.82.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id A7B908118D for ; Thu, 5 Mar 2015 03:56:40 -0800 (PST) Received: by wggz12 with SMTP id z12so15733792wgg.9 for ; Thu, 05 Mar 2015 03:56:39 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=Yo4uBcIsorLUTYYaFi9uokyGdzB+86eyk6NX1/cVsrs=; b=ShgwAy9fZ/gHFFEv9KGpIhMqM7jvPqJ2JmwIA7HT7U/HAAiVf+4acRJCxufdE3Cz7v mdIk1yZsKCg+oTKfLlo2QoAvJfE6o0ztXOUW8nDl+nWPGINzWY4jd/KFS3s2TieCn4eO RtJ7p2if9btER5WIHw4j3BUGo1T1POp0J7R/mQ6sJLEbYjUhqTbOhYoT80r9n1U2Bu8Q sQOGOq5Cdn0y5lCZcWw00bV30yWSvWnoHFVlHjmAn5jkBfP+V/ZNhMTmxlqUtSNUOBBT kRK3dSuZyaiVrDwdahC1J5wO3bjZt9mTuFOjSUTD9poRp1CYA90IKUVk0wxaZKT0NB3a 3/KQ== X-Gm-Message-State: ALoCoQl8rBeBP+j0FxRDgQo7qIw6g8VgUNpkcauqKiUcQ6hinUxfE672lXt1FUabee8Cao7v1VvD X-Received: by 10.180.76.4 with SMTP id g4mr64942923wiw.43.1425556599008; Thu, 05 Mar 2015 03:56:39 -0800 (PST) Received: from [10.0.0.5] ([207.232.55.62]) by mx.google.com with ESMTPSA id v6sm11330232wix.8.2015.03.05.03.56.37 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 05 Mar 2015 03:56:38 -0800 (PST) Message-ID: <54F84474.6010507@plexistor.com> Date: Thu, 05 Mar 2015 13:56:36 +0200 From: Boaz Harrosh User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Ingo Molnar , x86@kernel.org, linux-kernel , "Roger C. Pao" , Dan Williams , Thomas Gleixner , linux-nvdimm , "H. Peter Anvin" , Matthew Wilcox , Andy Lutomirski , Christoph Hellwig References: <54F82CE0.4040502@plexistor.com> <54F830D4.7030205@plexistor.com> In-Reply-To: <54F830D4.7030205@plexistor.com> Subject: [Linux-nvdimm] [PATCH 3/8] pmem: Add support for rw_page() X-BeenThere: linux-nvdimm@lists.01.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Linux-nvdimm developer list." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Ross Zwisler Based on commit a72132c31d58 ("brd: add support for rw_page()") Signed-off-by: Ross Zwisler --- drivers/block/pmem.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/block/pmem.c b/drivers/block/pmem.c index bba53af..750ffdf 100644 --- a/drivers/block/pmem.c +++ b/drivers/block/pmem.c @@ -101,8 +101,19 @@ out: bio_endio(bio, err); } +static int pmem_rw_page(struct block_device *bdev, sector_t sector, + struct page *page, int rw) +{ + struct pmem_device *pmem = bdev->bd_disk->private_data; + + pmem_do_bvec(pmem, page, PAGE_CACHE_SIZE, 0, rw, sector); + page_endio(page, rw & WRITE, 0); + return 0; +} + static const struct block_device_operations pmem_fops = { .owner = THIS_MODULE, + .rw_page = pmem_rw_page, }; /* Kernel module stuff */