Back in the lk 2.4 series it was possible with the sgm_dd utility to do a zero copy transfer between two disks (or 2 locations on the same disk). That was done by doing mmap-ed IO on the read and direct IO on the write with the sg driver. Well that no longer works in the lk 2.6 series because the sg (and st) driver uses get_user_pages() for direct IO and that returns -EFAULT when VM_IO is set on any of the user pages it is trying use. Pages that are mmap-ed have VM_IO set. I can live with that: dio and mmap-ed IO work separately and dio can work on both sides of a transfer. This was brought to my attention by Ahmed Teirelbar with lk 2.6.5 . Worse, when tested in lk 2.6.12 and lk 2.6.13, attempting dio/mmap caused the sg driver to oops (due to empty entries in a scatter gather list). Ahmed proposed the following patch which both of us have tested. I have alerted Kai M. as the same fix is needed in the st driver IMO. Changelog: - check error return (a negative integer) properly after the get_user_pages() call that sets up direct IO Signed-off-by: Douglas Gilbert Doug Gilbert