{"action":"created","issue":{"url":"https://api.github.com/repos/zfsonlinux/zfs/issues/4042","labels_url":"https://api.github.com/repos/zfsonlinux/zfs/issues/4042/labels{/name}","comments_url":"https://api.github.com/repos/zfsonlinux/zfs/issues/4042/comments","events_url":"https://api.github.com/repos/zfsonlinux/zfs/issues/4042/events","html_url":"https://github.com/zfsonlinux/zfs/issues/4042","id":118620575,"number":4042,"title":"SCSI interface support for zvols","user":{"login":"zielony360","id":9479684,"avatar_url":"https://avatars.githubusercontent.com/u/9479684?v=3","gravatar_id":"","url":"https://api.github.com/users/zielony360","html_url":"https://github.com/zielony360","followers_url":"https://api.github.com/users/zielony360/followers","following_url":"https://api.github.com/users/zielony360/following{/other_user}","gists_url":"https://api.github.com/users/zielony360/gists{/gist_id}","starred_url":"https://api.github.com/users/zielony360/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/zielony360/subscriptions","organizations_url":"https://api.github.com/users/zielony360/orgs","repos_url":"https://api.github.com/users/zielony360/repos","events_url":"https://api.github.com/users/zielony360/events{/privacy}","received_events_url":"https://api.github.com/users/zielony360/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-11-24T14:30:23Z","updated_at":"2015-11-24T16:23:55Z","closed_at":null,"body":"Hello,\r\n\r\ndo you plan to introduce SCSI interface support in zvols? It would be very useful, when sharing the zvol through SCSI target (FC, FCoE, iSCSI).\r\n\r\nLooking in the context of VAAI, in addition to move the load to a storage server (with ZFS on it) from ESXi hosts, which can be already simulated by target, we can also save space by some kind of ZFS deduplication. I am talking about XCOPY and WRITE_SAME SCSI operations. If you use them on one zvol (or even maybe a pool?), you can just clone data using metadata pointer as Pure Storage does, similiar to snapshot clones. We would also benefit in a context of performance.\r\n\r\nI found recent thread about lack of SCSI interface, which can be referenced: https://github.com/zfsonlinux/zfs/issues/4012"},"comment":{"url":"https://api.github.com/repos/zfsonlinux/zfs/issues/comments/159321483","html_url":"https://github.com/zfsonlinux/zfs/issues/4042#issuecomment-159321483","issue_url":"https://api.github.com/repos/zfsonlinux/zfs/issues/4042","id":159321483,"user":{"login":"ryao","id":1386373,"avatar_url":"https://avatars.githubusercontent.com/u/1386373?v=3","gravatar_id":"","url":"https://api.github.com/users/ryao","html_url":"https://github.com/ryao","followers_url":"https://api.github.com/users/ryao/followers","following_url":"https://api.github.com/users/ryao/following{/other_user}","gists_url":"https://api.github.com/users/ryao/gists{/gist_id}","starred_url":"https://api.github.com/users/ryao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryao/subscriptions","organizations_url":"https://api.github.com/users/ryao/orgs","repos_url":"https://api.github.com/users/ryao/repos","events_url":"https://api.github.com/users/ryao/events{/privacy}","received_events_url":"https://api.github.com/users/ryao/received_events","type":"User","site_admin":false},"created_at":"2015-11-24T16:23:55Z","updated_at":"2015-11-24T16:23:55Z","body":"I agree that the XCOPY and WRITE_SAME SCSI operations are useful and there might be some overlap with data deduplication when things are aligned. Right now, zvols are implemented as a shim over a ZFS file through the Linux block device API. Prior to 0.6.5.0, this was done using the request_queue interface as if the zvols were real hardware that needed a top-half/bottom-half handler. That is similar to how scsi devices are implemented (which are another layer on top of that), but that added unnecessary overhead (spin locks, double dispatch, etcetera) that increased latencies and hurt throughput in tests. Reimplementing the zvols as SCSI devices would be a step in the opposite direction.\r\n\r\nThat said, it turns out that the Linux block device layer recently gained XCOPY-like support through REQ_COPY, so we can implement something like XCOPY without emulating SCSI devices:\r\n\r\nhttps://git.kernel.org/cgit/linux/kernel/git/mkp/linux.git/commit/?h=xcopy&id=0bdeed274e16b3038a851552188512071974eea8\r\n\r\nAt a glance, it looks like the functionality that @sempervictus found to be broken in #4012 could start working when REQ_COPY is implemented, but I have not confirmed that."}}