[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <yq1egctlahz.fsf@sermon.lab.mkp.net>
Date: Wed, 03 Feb 2016 17:00:56 -0500
From: "Martin K. Petersen" <martin.petersen@...cle.com>
To: jiangyiwen <jiangyiwen@...wei.com>
Cc: <axboe@...nel.dk>, <linux-kernel@...r.kernel.org>,
<dm-devel@...hat.com>, <martin.petersen@...cle.com>,
Lukáš Czerner
<lczerner@...hat.com>, <xuejiufei@...wei.com>,
"Qijiang \(Joseph\, Euler\)" <joseph.qi@...wei.com>
Subject: Re: [dm-devel] [PATCH] block: do not return -EOPNOTSUPP only when issue a discard request
>>>>> "Yiwen" == jiangyiwen <jiangyiwen@...wei.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@...cle.com>
--
Martin K. Petersen Oracle Linux Engineering
Powered by blists - more mailing lists