linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] [RFC] Introduce device state 'failed'
@ 2017-05-03 13:34 Anand Jain
  2017-05-03 13:34 ` [PATCH 1/2 v7] btrfs: introduce device dynamic state transition to offline or failed Anand Jain
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Anand Jain @ 2017-05-03 13:34 UTC (permalink / raw)
  To: linux-btrfs

As the below two patches are about managing the failed disk,
I have separated them from the spare disk and auto replace
support patch set which was sent before here [1]..

    [1] https://lwn.net/Articles/684195/

V7 changes are very limited in this individual patches. But adds
the mount option degrad without going through the remount. And is
for your comments, (RFC).

This set [1] was extensively tested, however as these two patches
are out of the set now, and with a minor change v6-v7, I have
removed the Tested-by: sorry.

The script which I have used to verify v7 is here [2], which
eventually will be part of fstests, once we confirm on the RFC.

[2]
----------------
create_err_dev_raid1()
{
        dm_backing_dev="/dev/sdd"
        blk_dev_size=`blockdev --getsz $dm_backing_dev`
        dmerror_dev="/dev/mapper/dm-sdd"
        dmlinear_table="0 $blk_dev_size linear $dm_backing_dev 0"
        dmerror_table="0 $blk_dev_size error $dm_backing_dev 0"

        echo -e dm_backing_dev'\t'= $dm_backing_dev
        echo -e blk_dev_size'\t'= $blk_dev_size
        [[ $blk_dev_size ]] || exit
        echo -e dmerror_dev'\t'= $dmerror_dev
        echo -e dmlinear_table'\t'= $dmlinear_table
        echo -e dmerror_table'\t'= $dmerror_table
        echo

        runnt "dmsetup remove dm-sdd > /dev/null 2>&1"
        run "dmsetup create dm-sdd --table '${dmlinear_table}'"

        run "mkfs.btrfs -f -draid1 -mraid1 /dev/sdc $dmerror_dev > /dev/null 2>&1"
        run mount /dev/sdc /btrfs
        run "dd if=/dev/zero of=/btrfs/tf1 bs=4096 count=100 > /dev/null 2>&1"

        run btrfs fi show -m /btrfs

        run dmsetup suspend dm-sdd
        run "dmsetup load dm-sdd --table '$dmerror_table'"
        run dmsetup resume dm-sdd
        run "dd if=/dev/zero of=/btrfs/tf1 bs=4096 count=100 > /dev/null 2>&1"

	run sleep 32
        run btrfs fi show -m /btrfs
	run cat /proc/self/mounts
}
---------------

Anand Jain (2):
  btrfs: introduce device dynamic state transition to offline or failed
  btrfs: check device for critical errors and mark failed

 fs/btrfs/ctree.h   |   2 +
 fs/btrfs/disk-io.c | 101 ++++++++++++++++++++++++++++++++++++++-
 fs/btrfs/volumes.c | 135 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 fs/btrfs/volumes.h |  18 +++++++
 4 files changed, 255 insertions(+), 1 deletion(-)

-- 
2.10.0


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

end of thread, other threads:[~2017-05-03 20:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-05-03 13:34 [PATCH 0/2] [RFC] Introduce device state 'failed' Anand Jain
2017-05-03 13:34 ` [PATCH 1/2 v7] btrfs: introduce device dynamic state transition to offline or failed Anand Jain
2017-05-03 13:34 ` [PATCH 2/2 v7] btrfs: check device for critical errors and mark failed Anand Jain
2017-05-03 15:31 ` [PATCH 0/2] [RFC] Introduce device state 'failed' Austin S. Hemmelgarn
2017-05-03 20:57   ` Anand Jain

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).