[DragonFlyBSD - Submit #2851] (Closed) [PATCH v1] sys/dev/disk/dm: Add dm-flakey target

bugtracker-admin at leaf.dragonflybsd.org bugtracker-admin at leaf.dragonflybsd.org
Thu Nov 19 05:53:17 PST 2015


Issue #2851 has been updated by tkusumi.

Status changed from New to Closed

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/b9790952d463c74d2706f84a3b2b5e035eb3059b


----------------------------------------
Submit #2851: [PATCH v1] sys/dev/disk/dm: Add dm-flakey target
http://bugs.dragonflybsd.org/issues/2851#change-12733

* Author: tkusumi
* Status: Closed
* Priority: Normal
* Assignee: 
* Category: 
* Target version: 
----------------------------------------
    This patch is the initial version of dm-flakey target from Linux kernel.
    https://www.dragonflybsd.org/~tkusumi/diff/0001-sys-dev-disk-dm-Add-dm-flakey-target.patch


      ===== Example1 - Error write I/Os
      # kldload dm_target_flakey
      # dmsetup create flakey1 --table "0 234436482 flakey /dev/da3 0 1 1"
      # newfs_hammer -L TEST /dev/mapper/flakey1
      Volume 0 DEVICE /dev/mapper/flakey1 size 111.79GB
      initialize freemap volume 0
      initializing the undo map (504 MB)
      newfs_hammer: Write volume 0 (/dev/mapper/flakey1): Input/output error
      # dmsetup remove /dev/mapper/flakey1

      ===== Example2 - Silently drop write I/Os
      # newfs_hammer -L TEST /dev/da3 > /dev/null
      # mount_hammer /dev/da3 /HAMMER
      # cd /HAMMER
      # git clone /usr/local/src/dragonfly
      Cloning into 'dragonfly'...
      done.
      Checking out files: 100% (34434/34434), done.
      # cd
      # umount /HAMMER
      # dmsetup create flakey2 --table "0 234436482 flakey /dev/da3 0 1 1 1 drop_writes"
      # mount_hammer /dev/mapper/flakey2 /HAMMER
      # dmesg | tail -3
      HAMMER() Critical error inode=-1 error=5 while flushing meta-data
      HAMMER() Forcing read-only mode
      HAMMER(TEST) mounted clean, no recovery needed
      # mount | grep "/HAMMER"
      TEST on /HAMMER (hammer, local, read-only)
      # cd /HAMMER/dragonfly
      # git log -p > /dev/null; echo $?
      0
      # cd
      # umount /HAMMER
      # dmsetup remove /dev/mapper/flakey2

      ===== Example3 - Corrupt read I/Os
      # dd if=/dev/zero of=/dev/da3 bs=1024 count=10000 >/dev/null 2>&1
      # dmsetup create flakey3 --table "0 234436482 flakey /dev/da3 0 1 1 5 corrupt_bio_byte 1 r 65 0"
      # od -tx1 /dev/mapper/flakey3 | head -10
      0000000    41  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00
      0000020    00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00
      *
      0010000    41  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00
      0010020    00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00
      *
      0020000    41  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00
      0020020    00  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00
      *
      0030000    41  00  00  00  00  00  00  00  00  00  00  00  00  00  00  00
      # dmsetup remove /dev/mapper/flakey3
      # kldunload dm_target_flakey




-- 
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account



More information about the Submit mailing list