Message ID | 20181120102037.4536-1-yehs2007@zoho.com (mailing list archive) |
---|---|
Headers | show
Return-Path: <linux-nvdimm-bounces@lists.01.org> Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3CB2614E2 for <patchwork-linux-nvdimm@patchwork.kernel.org>; Tue, 20 Nov 2018 10:21:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2A5C52A859 for <patchwork-linux-nvdimm@patchwork.kernel.org>; Tue, 20 Nov 2018 10:21:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1C88D2A873; Tue, 20 Nov 2018 10:21:06 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 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.wl.linuxfoundation.org (Postfix) with ESMTPS id 847602A859 for <patchwork-linux-nvdimm@patchwork.kernel.org>; Tue, 20 Nov 2018 10:21:05 +0000 (UTC) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id C44B221A02937; Tue, 20 Nov 2018 02:21:04 -0800 (PST) X-Original-To: linux-nvdimm@lists.01.org Delivered-To: linux-nvdimm@lists.01.org Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=135.84.80.237; helo=sender-pp-092.zoho.com; envelope-from=yehs2007@zoho.com; receiver=linux-nvdimm@lists.01.org Received: from sender-pp-092.zoho.com (sender-pp-092.zoho.com [135.84.80.237]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id E898C21190716 for <linux-nvdimm@lists.01.org>; Tue, 20 Nov 2018 02:21:03 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542709259; cv=none; d=zoho.com; s=zohoarc; b=A4/3JXjFBgKSG+/THysbzxIcSf1AlpnnEYDRsPhIWbeclDkxMJsoVYvaFzM2v0eTiwoi24EoWxfRAvfXr52pVyNyj9fjbkLmx+Tzo7iXsb9bX5cDQOOThXB4W74b+zHcrGYTR11QGAfewCLxwSfv/qP5pI59Xs8edQIwRBtHISY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1542709259; h=Cc:Date:From:Message-ID:Subject:To:ARC-Authentication-Results; bh=2+AqlYcK2jf9y0MPV2ufX/R2b3j/DgTZOx4LGarM5NY=; b=Vn2xE9WGmoRFW7VbJd3m5MVuQHSF3VwV1RM/AWms4vy49kg5v8AW/oXcgKPBdyr0GNbRIrAr3G92WtJ850oa7fbhuc9g+oDxdp9EeyNPKyXCMB7i7OuWhHRwAutuxNLu6JWtIdb8mwlZkRvsZxFY5AEWlkh/NBWr8icrvPZPAEo= ARC-Authentication-Results: i=1; mx.zoho.com; dkim=pass header.i=zoho.com; spf=pass smtp.mailfrom=yehs2007@zoho.com; dmarc=pass header.from=<yehs2007@zoho.com> header.from=<yehs2007@zoho.com> DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=zapps768; d=zoho.com; h=from:to:cc:subject:date:message-id; b=HPJSDxLFDqKl/qIxSLQgoZvdPx690BDxwSLnIjrbwnedVx71leTqwKKQQNAZt6GFq1dhyruLx+KO bUw53y2UqJ6OEWxzcM1N3BPqyoixQmgu96pmJcGTEz45QI9l/D4C DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1542709259; s=default; d=zoho.com; i=yehs2007@zoho.com; h=From:To:Cc:Subject:Date:Message-Id; l=1811; bh=2+AqlYcK2jf9y0MPV2ufX/R2b3j/DgTZOx4LGarM5NY=; b=esGdAidZsOkjRiUp2xmsItu7Rnvq6QO27p7gn32qr4yo9dU8hRpXCcfa9WE3xuO6 T+n/z1y3KRDEPRMhZoEm/PCw4/iJHq+NFZWwpss/LW/r5GLrbHseuyJClr61dCuWFul 4o+C+bzc6TnHsQVGA87KXHjkSqhoQoY3Jj6SIbhU= Received: from YEHS1XR956R00D1.lenovo.com (58.243.153.247 [58.243.153.247]) by mx.zohomail.com with SMTPS id 1542709257503801.448427061454; Tue, 20 Nov 2018 02:20:57 -0800 (PST) From: Huaisheng Ye <yehs2007@zoho.com> To: linux-nvdimm@lists.01.org, agk@redhat.com, snitzer@redhat.com, dm-devel@redhat.com, dan.j.williams@intel.com, willy@infradead.org, zwisler@kernel.org, jack@suse.cz, dave.jiang@intel.com, vishal.l.verma@intel.com Subject: [RFC PATCH 0/3] realize dax_operations for dm-snapshot Date: Tue, 20 Nov 2018 18:20:34 +0800 Message-Id: <20181120102037.4536-1-yehs2007@zoho.com> X-Mailer: git-send-email 2.17.0.windows.1 X-ZohoMailClient: External X-BeenThere: linux-nvdimm@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Linux-nvdimm developer list." <linux-nvdimm.lists.01.org> List-Unsubscribe: <https://lists.01.org/mailman/options/linux-nvdimm>, <mailto:linux-nvdimm-request@lists.01.org?subject=unsubscribe> List-Archive: <http://lists.01.org/pipermail/linux-nvdimm/> List-Post: <mailto:linux-nvdimm@lists.01.org> List-Help: <mailto:linux-nvdimm-request@lists.01.org?subject=help> List-Subscribe: <https://lists.01.org/mailman/listinfo/linux-nvdimm>, <mailto:linux-nvdimm-request@lists.01.org?subject=subscribe> Cc: linux-fsdevel@vger.kernel.org, chengnt@lenovo.com, linux-kernel@vger.kernel.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-nvdimm-bounces@lists.01.org Sender: "Linux-nvdimm" <linux-nvdimm-bounces@lists.01.org> X-Virus-Scanned: ClamAV using ClamSMTP |
Series |
realize dax_operations for dm-snapshot
|
expand
|
From: Huaisheng Ye <yehs1@lenovo.com> This series patches are used to realize the dax_operations for dm-snapshot with persistent memory device. Here are the steps about how to verify the function. 1. Configure the persistent memory to fs-dax mode and create namespace with ndctl; 2. find them in /dev; # ndctl list { "dev":"namespace0.0", "mode":"fsdax", "map":"dev", "size":132118478848, "sector_size":512, "blockdev":"pmem0", "name":"yhs_pmem0", "numa_node":0 }, 3. create lv_pmem (here is 4G size) for testing; # pvcreate /dev/pmem0 # vgcreate vg_pmem /dev/pmem0 # lvcreate -L 4G -n lv_pmem vg_pmem 4. create filesystem (ext2 or ext4) to /dev/pmem0 # mkfs.ext2 -b 4096 /dev/vg_pmem/lv_pmem 5. mount pmem with DAX way; # mkdir /mnt/lv_pmem # mount -o dax /dev/vg_pmem/lv_pmem /mnt/lv_pmem/ 6. cp some files to /mnt/lv_pmem; # cp linear_table03.log /mnt/lv_pmem/ # cp test0.log /mnt/lv_pmem/ 7. create snapshot for test (here I limit it to 1G size); # lvcreate -L 1G -n snap_pmem -s /dev/vg_pmem/lv_pmem 8. modify the files copied with vim or copy more other new files; # vim /mnt/lv_pmem/test0.log 9. umount the pmem device; # umount /mnt/lv_pmem/ 10.merge the snapshot back to origin; # lvconvert --merge /dev/vg_pmem/snap_pmem 11.mount pmem device again for checking the content of files; # mount -o dax /dev/vg_pmem/lv_pmem /mnt/lv_pmem/ Huaisheng Ye (3): dm: enable dax_operations for dm-snapshot dm: expand hc_map in mapped_device for lack of map dm: expand valid types for dm-ioctl drivers/md/dm-core.h | 1 + drivers/md/dm-ioctl.c | 4 +++- drivers/md/dm-snap.c | 44 ++++++++++++++++++++++++++++++++++++++++++-- drivers/md/dm.c | 15 +++++++++++++++ 4 files changed, 61 insertions(+), 3 deletions(-)