All of lore.kernel.org
 help / color / mirror / Atom feed
From: alex chen <alex.chen@huawei.com>
To: device-mapper development <dm-devel@redhat.com>
Cc: Kiyoshi Ueda <k-ueda@ct.jp.nec.com>, Milan Broz <asi@seznam.cz>,
	Mike Anderson <andmike@linux.vnet.ibm.com>,
	Jun'ichi Nomura <j-nomura@ce.jp.nec.com>,
	Joseph Qi <joseph.qi@huawei.com>,
	Alasdair Kergon <agk@redhat.com>
Subject: Re: dm: disable WRITE SAME if it fails
Date: Thu, 5 Jun 2014 09:52:37 +0800	[thread overview]
Message-ID: <538FCD65.8080201@huawei.com> (raw)
In-Reply-To: <20140604135214.GB14235@redhat.com>

On 2014/6/4 21:52, Mike Snitzer wrote:
> On Wed, Jun 04 2014 at 12:03am -0400,
> alex chen <alex.chen@huawei.com> wrote:
> 
>> On 2014/6/3 2:36, Mike Snitzer wrote:
>>> On Sat, May 31 2014 at 11:05am -0400,
>>> Alasdair G Kergon <agk@redhat.com> wrote:
>>>
>>>> On Sat, May 31, 2014 at 04:51:30PM +0800, alex chen wrote:
>>>>> The original commit f84cb8a46a771f36a04a02c61ea635c968ed5f6a("dm mpath:
>>>>> disable WRITE SAME if it fails") disables WRITE SAME in the DM multipath
>>>>> device if it fails, but when the DM linear device stacks ontop of the
>>>>> multipath device it doesn't help.
>>>>> this patch adds DM linear end_io method to catch WRITE SAME errors and
>>>>> disables WRITE SAME in the DM linear device's queue_limits if an
>>>>> underlying device disables it.
>>>>
>>>> How does your patch address striped targets?
>>>>  
>>>> Shouldn't this code be taken out of mpath and moved to dm.c and applied to all
>>>> targets (both bio and rq-based, at least where WRITE SAME is supported)?
>>>
>>> Alex,
>>>
>>> I've implemented what Alasdair and I have been suggesting.
>>> Can you please test this untested patch?
>>>
>>> Thanks,
>>> Mike
>>>
>>
>> I tested this patch, it is OK.
>> Test cases is as follow:
>> CASE 1:
>> dm linear device(dm-23): ocfs2-fs;
>> multipath device(dm-9);
>> scsi device(sdr,sdv);
>>
>> After WRITE SAME IO fails:
>> linux-MOLybD:~ # cat /sys/block/dm-23/queue/write_same_max_bytes
>> 0
>> linux-MOLybD:~ # cat /sys/block/dm-9/queue/write_same_max_bytes
>> 0
>> linux-MOLybD:~ # cat /sys/block/sdr/queue/write_same_max_bytes
>> 0
>> linux-MOLybD:~ # cat /sys/block/sdv/queue/write_same_max_bytes
>> 0
>>
>> Result: pass
>>
>> Tested-by: Alex Chen <alex.chen@huawei.com>
> 
> OK, thanks.. FYI, as I sahred before: I updated it slightly to check for
> the specific -EREMOTEIO error code that SCSI returns for this case, see:
> 
> https://git.kernel.org/cgit/linux/kernel/git/device-mapper/linux-dm.git/commit/?h=for-next&id=7eee4ae2dbb2be0a15a4406718806e48b18ba831
> 

OK,I've tested the new patch, the result was also pass.

> --
> dm-devel mailing list
> dm-devel@redhat.com
> https://www.redhat.com/mailman/listinfo/dm-devel
> 
> .
> 

--
dm-devel mailing list
dm-devel@redhat.com
https://www.redhat.com/mailman/listinfo/dm-devel

  reply	other threads:[~2014-06-05  1:52 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-19  4:14 [PATCH] dm linear: disable WRITE SAME if it fails alex chen
2014-03-05  7:30 ` alex chen
2014-03-05 14:23   ` Mike Snitzer
2014-05-31  8:51 ` [PATCH] " alex chen
2014-05-31 14:43   ` Alasdair G Kergon
2014-05-31 15:05   ` Alasdair G Kergon
2014-06-02 18:36     ` dm: " Mike Snitzer
2014-06-03 16:58       ` Mike Snitzer
2014-06-03 22:59         ` Martin K. Petersen
2014-06-04  0:06           ` Mike Snitzer
2014-06-04  4:03       ` alex chen
2014-06-04 13:52         ` Mike Snitzer
2014-06-05  1:52           ` alex chen [this message]
2014-06-05 13:07             ` Mike Snitzer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=538FCD65.8080201@huawei.com \
    --to=alex.chen@huawei.com \
    --cc=agk@redhat.com \
    --cc=andmike@linux.vnet.ibm.com \
    --cc=asi@seznam.cz \
    --cc=dm-devel@redhat.com \
    --cc=j-nomura@ce.jp.nec.com \
    --cc=joseph.qi@huawei.com \
    --cc=k-ueda@ct.jp.nec.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.