All of lore.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/3] realize dax_operations for dm-snapshot
@ 2018-11-20 10:20 ` Huaisheng Ye
  0 siblings, 0 replies; 8+ messages in thread
From: Huaisheng Ye @ 2018-11-20 10:20 UTC (permalink / raw)
  To: linux-nvdimm, agk, snitzer, dm-devel, dan.j.williams, willy,
	zwisler, jack, dave.jiang, vishal.l.verma
  Cc: linux-fsdevel, linux-kernel, chengnt, Huaisheng Ye

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(-)

-- 
1.8.3.1

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-11-20 10:20 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-20 10:20 [RFC PATCH 0/3] realize dax_operations for dm-snapshot Huaisheng Ye
2018-11-20 10:20 ` Huaisheng Ye
2018-11-20 10:20 ` [RFC PATCH 1/3] dm: enable " Huaisheng Ye
2018-11-20 10:20   ` Huaisheng Ye
2018-11-20 10:20 ` [RFC PATCH 2/3] dm: expand hc_map in mapped_device for lack of map Huaisheng Ye
2018-11-20 10:20   ` Huaisheng Ye
2018-11-20 10:20 ` [RFC PATCH 3/3] dm: expand valid types for dm-ioctl Huaisheng Ye
2018-11-20 10:20   ` Huaisheng Ye

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.