Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1326000

Re: [dm-devel] [PATCH] block: do not return -EOPNOTSUPP only when issue a discard request

From "Martin K. Petersen" <martin.petersen@oracle.com>
Newsgroups linux.kernel
Subject Re: [dm-devel] [PATCH] block: do not return -EOPNOTSUPP only when issue a discard request
Date 2016-02-03 23:10 +0100
Message-ID <qYdMC-7MT-33@gated-at.bofh.it> (permalink)
References <qY2o9-hJ-1@gated-at.bofh.it>
Organization Oracle Corporation

Show all headers | View raw


>>>>> "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

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[dm-devel] [PATCH] block: do not return -EOPNOTSUPP only when issue a  discard request jiangyiwen <jiangyiwen@huawei.com> - 2016-02-03 11:00 +0100
  Re: [dm-devel] [PATCH] block: do not return -EOPNOTSUPP only when  issue a discard request Lukáš Czerner <lczerner@redhat.com> - 2016-02-03 17:20 +0100
  Re: [dm-devel] [PATCH] block: do not return -EOPNOTSUPP only when issue a discard request "Martin K. Petersen" <martin.petersen@oracle.com> - 2016-02-03 23:10 +0100

csiph-web