[dm-devel] Why don't return -EOPNOTSUPP?

jiangyiwen jiangyiwen at huawei.com
Tue Feb 2 11:57:37 UTC 2016


Hi Lukas,
I have a question about commit 8af1954d172a("blkdev: Do not return
-EOPNOTSUPP if discard is supported"). That is we issue a
WRITE SAME request to device and return failed with EOPNOTSUPP,
but blkdev_issue_write_same ignore this error and return
success to caller. In this way, this will cause an inconsistent state
between upper layer and bottom layer.

I don't know why don't return EOPNOTSUPP if part of devices support
discard, because I think that blkdev_issue_discard should return
EOPNOTSUPP to caller even if some of devices support discard.

Thanks,
Yiwen Jiang.




More information about the dm-devel mailing list