linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Martin K. Petersen" <martin.petersen@oracle.com>
To: jiangyiwen <jiangyiwen@huawei.com>
Cc: axboe@kernel.dk, linux-kernel@vger.kernel.org,
	dm-devel@redhat.com, martin.petersen@oracle.com,
	"Lukáš Czerner" <lczerner@redhat.com>,
	xuejiufei@huawei.com, "Qijiang (Joseph,
	Euler)" <joseph.qi@huawei.com>
Subject: Re: [dm-devel] [PATCH] block: do not return -EOPNOTSUPP only when issue a discard request
Date: Wed, 03 Feb 2016 17:00:56 -0500	[thread overview]
Message-ID: <yq1egctlahz.fsf@sermon.lab.mkp.net> (raw)
In-Reply-To: <56B1CE5C.10201@huawei.com> (jiangyiwen@huawei.com's message of "Wed, 3 Feb 2016 17:54:36 +0800")

>>>>> "Yiwen" == jiangyiwen  <jiangyiwen@huawei.com> writes:

Yiwen> commit 8af1954d172a("blkdev: Do not return -EOPNOTSUPP if discard
Yiwen> is supported") only solve the situation of discard, because When
Yiwen> applications issue a discard request to device, they can't expect
Yiwen> deterministic behaviour. However, WRITE SAME should not ignore
Yiwen> error with EOPNOTSUPP, because if applications issue WRITE SAME
Yiwen> requests to device, it should return deterministic results to
Yiwen> applications according to the T10 standard, or else it will cause
Yiwen> an inconsistent state between upper layer and bottom layer.

Yiwen> So ignoring error with EOPNOTSUPP only in discard situation.

If an underlying device fails a WRITE SAME request, SCSI will not return
EOPNOTSUPP. Instead we will mark 0 bytes of the request as complete and
disable WRITE SAME support on the device. So any EOPNOTSUPP error in
this case would be coming from MD/DM.

That said, I agree with the patch.

Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>

-- 
Martin K. Petersen	Oracle Linux Engineering

      parent reply	other threads:[~2016-02-03 22:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-03  9:54 [dm-devel] [PATCH] block: do not return -EOPNOTSUPP only when issue a discard request jiangyiwen
2016-02-03 16:19 ` Lukáš Czerner
2016-02-03 22:00 ` Martin K. Petersen [this message]

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=yq1egctlahz.fsf@sermon.lab.mkp.net \
    --to=martin.petersen@oracle.com \
    --cc=axboe@kernel.dk \
    --cc=dm-devel@redhat.com \
    --cc=jiangyiwen@huawei.com \
    --cc=joseph.qi@huawei.com \
    --cc=lczerner@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xuejiufei@huawei.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 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).