All, I need help. I am using ftp.kernel.org's linux-2.6.10 on a Fedora Core 3 system. I eventually want my code to work on a 'clean' Fedora Core system, but I have put the ftp.kernel.org's kernel up so I can cross-test the same devices with /dev/sgX. I have a problem when I use /dev/sdX as opposed to /dev/sgX (eg /dev/sda compared to /dev/sg0). I am setting up SCSI write commands of arbitrary size, in an sg_io_hdr_t and sending the command to the device with a SG_IO ioctl call. I am using a LSI Logic LSIFC929 as the HBA in a Dual Xeon server and a raid as the target. I can issue writes up to 2048 blocks in size to /dev/sg0 but when I write this many to /dev/sda (with the same code), it fails. The failure has something to do with the __bio_add_page() routine in fs/bio.c. I am sailing in totally uncharted waters in this code, hence my call for help. Firstly, SHOULD an SG_IO ioctl() call sent to a /dev/sg device work fine and NOT work when the same SG_IO ioctl() call be sent to /dev/sda. I realise that the ioctl() calls execute different code, but conceptually should they both generate the same command to the device? If they should, then I include some debug output below of a simple program that set's the SG_RESERVED_SIZE to: 4194304, allocates paged aligned memory and then forms a 512 block write to location 1 on the target. Directly after a reboot of the kernel, the ioctl() write to /dev/sda works, but the next time it fails with an EINVAL result. The following occurs when my write of say 512 blocks is sent to /dev/sda. drivers/block/scsi_ioctl.c:scsi_cmd_ioctl() gets called which in the switch calls drivers/block/scsi_ioctl.c:sg_io(). Everything in sg_io() is fine until the call to blk_rq_map_user() which returns -22 (EINVAL). In the test of q->max_sectors is ok as is the length and buffer existance. rq = blk_get_request(q, rw, __GFP_WAIT); is fine but bio = bio_map_user(q, NULL, uaddr, len, rw == READ); returns an error status. We get into fs/bio.c:bio_map_user() which calls __bio_map_user() which is the problem. For a 512 block write, we require 64 * PAGE_SIZE (it's 4K) so the code in fs/bio.c:__bio_map_user() looks like ... /* * transfer and buffer must be aligned to at least hardsector * size for now, in the future we can relax this restriction */ if ((uaddr & queue_dma_alignment(q)) || (len & queue_dma_alignment (q))) { printk("Q %p bad alignment\n", q); return ERR_PTR(-EINVAL); } bio = bio_alloc(GFP_KERNEL, nr_pages); if (!bio) { printk("Q %p - no bio_alloc\n", q); return ERR_PTR(-ENOMEM); } ret = -ENOMEM; pages = kmalloc(nr_pages * sizeof(struct page *), GFP_KERNEL); if (!pages) { printk("Q %p - no kmalloc\n", q); goto out; } down_read(¤t->mm->mmap_sem); ret = get_user_pages(current, current->mm, uaddr, nr_pages, write_to_vm, 0, pages, NULL); up_read(¤t->mm->mmap_sem); if (ret < nr_pages) { printk("ret %d < nr_pages %d\n", ret, nr_pages); goto out; } bio->bi_bdev = bdev; offset = uaddr & ~PAGE_MASK; printk("ret = %d offset = %d, nr_pages = %d, len = %u\n", ret, offset, nr_pages, len); for (i = 0; i < nr_pages; i++) { unsigned int bytes = PAGE_SIZE - offset; printk("i = %2d bytes %u len %u\n", i, bytes, len); if (len <= 0) break; if (bytes > len) bytes = len; /* * sorry... */ k = __bio_add_page(q, bio, pages[i], bytes, offset); printk("__bio_add_page() returns = %d and bytes is %d\n", k, bytes); if (k < bytes) break; len -= bytes; offset = 0; } printk("i = %d, nr_pages = %d, PAGE_SIZE %lu\n", i, nr_pages, PAGE_SIZE); /* * release the pages we didn't map into the bio, if any */ while (i < nr_pages) page_cache_release(pages[i++]); kfree(pages); /* * set data direction, and check if mapped pages need bouncing */ if (!write_to_vm) bio->bi_rw |= (1 << BIO_RW); bio->bi_flags |= (1 << BIO_USER_MAPPED); return bio; out: kfree(pages); bio_put(bio); printk("returns bad q %p\n", q); return ERR_PTR(ret); and the printk's show (for two successive 512 block writes - the first works, but the second fails) ... Jan 26 00:49:17 swtf2 kernel: ret = 64 offset = 0, nr_pages = 64, len = 262144 Jan 26 00:49:17 swtf2 kernel: i = 0 bytes 4096 len 262144 Jan 26 00:49:17 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:17 swtf2 kernel: i = 1 bytes 4096 len 258048 Jan 26 00:49:17 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:17 swtf2 kernel: i = 2 bytes 4096 len 253952 Jan 26 00:49:17 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:17 swtf2 kernel: i = 3 bytes 4096 len 249856 Jan 26 00:49:17 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:17 swtf2 kernel: i = 4 bytes 4096 len 245760 Jan 26 00:49:17 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:17 swtf2 kernel: i = 5 bytes 4096 len 241664 Jan 26 00:49:17 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:17 swtf2 kernel: i = 6 bytes 4096 len 237568 Jan 26 00:49:17 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:17 swtf2 kernel: i = 7 bytes 4096 len 233472 Jan 26 00:49:17 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:17 swtf2 kernel: i = 8 bytes 4096 len 229376 Jan 26 00:49:17 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:17 swtf2 kernel: i = 9 bytes 4096 len 225280 Jan 26 00:49:17 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:17 swtf2 kernel: i = 10 bytes 4096 len 221184 Jan 26 00:49:17 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:17 swtf2 kernel: i = 11 bytes 4096 len 217088 Jan 26 00:49:17 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:17 swtf2 kernel: i = 12 bytes 4096 len 212992 Jan 26 00:49:17 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:17 swtf2 kernel: i = 13 bytes 4096 len 208896 Jan 26 00:49:17 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:17 swtf2 kernel: i = 14 bytes 4096 len 204800 Jan 26 00:49:17 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:17 swtf2 kernel: i = 15 bytes 4096 len 200704 Jan 26 00:49:17 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:17 swtf2 kernel: i = 16 bytes 4096 len 196608 Jan 26 00:49:17 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:17 swtf2 kernel: i = 17 bytes 4096 len 192512 Jan 26 00:49:17 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:17 swtf2 kernel: i = 18 bytes 4096 len 188416 Jan 26 00:49:17 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:17 swtf2 kernel: i = 19 bytes 4096 len 184320 Jan 26 00:49:17 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:17 swtf2 kernel: i = 20 bytes 4096 len 180224 Jan 26 00:49:17 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:17 swtf2 kernel: i = 21 bytes 4096 len 176128 Jan 26 00:49:17 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:17 swtf2 kernel: i = 22 bytes 4096 len 172032 Jan 26 00:49:17 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:17 swtf2 kernel: i = 23 bytes 4096 len 167936 Jan 26 00:49:17 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:17 swtf2 kernel: i = 24 bytes 4096 len 163840 Jan 26 00:49:17 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:17 swtf2 kernel: i = 25 bytes 4096 len 159744 Jan 26 00:49:17 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:17 swtf2 kernel: i = 26 bytes 4096 len 155648 Jan 26 00:49:17 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:17 swtf2 kernel: i = 27 bytes 4096 len 151552 Jan 26 00:49:17 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:17 swtf2 kernel: i = 28 bytes 4096 len 147456 Jan 26 00:49:17 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:17 swtf2 kernel: i = 29 bytes 4096 len 143360 Jan 26 00:49:17 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:17 swtf2 kernel: i = 30 bytes 4096 len 139264 Jan 26 00:49:17 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:17 swtf2 kernel: i = 31 bytes 4096 len 135168 Jan 26 00:49:17 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:17 swtf2 kernel: i = 32 bytes 4096 len 131072 Jan 26 00:49:17 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:17 swtf2 kernel: i = 33 bytes 4096 len 126976 Jan 26 00:49:17 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:17 swtf2 kernel: i = 34 bytes 4096 len 122880 Jan 26 00:49:17 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:17 swtf2 kernel: i = 35 bytes 4096 len 118784 Jan 26 00:49:17 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:17 swtf2 kernel: i = 36 bytes 4096 len 114688 Jan 26 00:49:17 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:17 swtf2 kernel: i = 37 bytes 4096 len 110592 Jan 26 00:49:17 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:17 swtf2 kernel: i = 38 bytes 4096 len 106496 Jan 26 00:49:17 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:17 swtf2 kernel: i = 39 bytes 4096 len 102400 Jan 26 00:49:18 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:18 swtf2 kernel: i = 40 bytes 4096 len 98304 Jan 26 00:49:18 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:18 swtf2 kernel: i = 41 bytes 4096 len 94208 Jan 26 00:49:18 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:18 swtf2 kernel: i = 42 bytes 4096 len 90112 Jan 26 00:49:18 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:18 swtf2 kernel: i = 43 bytes 4096 len 86016 Jan 26 00:49:18 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:18 swtf2 kernel: i = 44 bytes 4096 len 81920 Jan 26 00:49:18 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:18 swtf2 kernel: i = 45 bytes 4096 len 77824 Jan 26 00:49:18 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:18 swtf2 kernel: i = 46 bytes 4096 len 73728 Jan 26 00:49:18 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:18 swtf2 kernel: i = 47 bytes 4096 len 69632 Jan 26 00:49:18 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:18 swtf2 kernel: i = 48 bytes 4096 len 65536 Jan 26 00:49:18 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:18 swtf2 kernel: i = 49 bytes 4096 len 61440 Jan 26 00:49:18 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:18 swtf2 kernel: i = 50 bytes 4096 len 57344 Jan 26 00:49:18 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:18 swtf2 kernel: i = 51 bytes 4096 len 53248 Jan 26 00:49:18 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:18 swtf2 kernel: i = 52 bytes 4096 len 49152 Jan 26 00:49:18 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:18 swtf2 kernel: i = 53 bytes 4096 len 45056 Jan 26 00:49:18 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:18 swtf2 kernel: i = 54 bytes 4096 len 40960 Jan 26 00:49:18 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:18 swtf2 kernel: i = 55 bytes 4096 len 36864 Jan 26 00:49:18 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:18 swtf2 kernel: i = 56 bytes 4096 len 32768 Jan 26 00:49:18 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:18 swtf2 kernel: i = 57 bytes 4096 len 28672 Jan 26 00:49:18 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:18 swtf2 kernel: i = 58 bytes 4096 len 24576 Jan 26 00:49:18 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:18 swtf2 kernel: i = 59 bytes 4096 len 20480 Jan 26 00:49:18 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:18 swtf2 kernel: i = 60 bytes 4096 len 16384 Jan 26 00:49:18 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:18 swtf2 kernel: i = 61 bytes 4096 len 12288 Jan 26 00:49:18 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:18 swtf2 kernel: i = 62 bytes 4096 len 8192 Jan 26 00:49:18 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:18 swtf2 kernel: i = 63 bytes 4096 len 4096 Jan 26 00:49:18 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:18 swtf2 kernel: i = 64, nr_pages = 64, PAGE_SIZE 4096 Jan 26 00:49:21 swtf2 kernel: ret = 64 offset = 0, nr_pages = 64, len = 262144 Jan 26 00:49:21 swtf2 kernel: i = 0 bytes 4096 len 262144 Jan 26 00:49:21 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:21 swtf2 kernel: i = 1 bytes 4096 len 258048 Jan 26 00:49:21 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:21 swtf2 kernel: i = 2 bytes 4096 len 253952 Jan 26 00:49:21 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:21 swtf2 kernel: i = 3 bytes 4096 len 249856 Jan 26 00:49:21 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:21 swtf2 kernel: i = 4 bytes 4096 len 245760 Jan 26 00:49:21 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:21 swtf2 kernel: i = 5 bytes 4096 len 241664 Jan 26 00:49:21 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:21 swtf2 kernel: i = 6 bytes 4096 len 237568 Jan 26 00:49:21 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:21 swtf2 kernel: i = 7 bytes 4096 len 233472 Jan 26 00:49:21 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:21 swtf2 kernel: i = 8 bytes 4096 len 229376 Jan 26 00:49:21 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:21 swtf2 kernel: i = 9 bytes 4096 len 225280 Jan 26 00:49:21 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:21 swtf2 kernel: i = 10 bytes 4096 len 221184 Jan 26 00:49:21 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:21 swtf2 kernel: i = 11 bytes 4096 len 217088 Jan 26 00:49:21 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:21 swtf2 kernel: i = 12 bytes 4096 len 212992 Jan 26 00:49:21 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:21 swtf2 kernel: i = 13 bytes 4096 len 208896 Jan 26 00:49:21 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:21 swtf2 kernel: i = 14 bytes 4096 len 204800 Jan 26 00:49:21 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:21 swtf2 kernel: i = 15 bytes 4096 len 200704 Jan 26 00:49:21 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:21 swtf2 kernel: i = 16 bytes 4096 len 196608 Jan 26 00:49:21 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:21 swtf2 kernel: i = 17 bytes 4096 len 192512 Jan 26 00:49:21 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:21 swtf2 kernel: i = 18 bytes 4096 len 188416 Jan 26 00:49:21 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:21 swtf2 kernel: i = 19 bytes 4096 len 184320 Jan 26 00:49:21 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:21 swtf2 kernel: i = 20 bytes 4096 len 180224 Jan 26 00:49:21 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:21 swtf2 kernel: i = 21 bytes 4096 len 176128 Jan 26 00:49:21 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:21 swtf2 kernel: i = 22 bytes 4096 len 172032 Jan 26 00:49:21 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:21 swtf2 kernel: i = 23 bytes 4096 len 167936 Jan 26 00:49:21 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:21 swtf2 kernel: i = 24 bytes 4096 len 163840 Jan 26 00:49:21 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:21 swtf2 kernel: i = 25 bytes 4096 len 159744 Jan 26 00:49:21 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:21 swtf2 kernel: i = 26 bytes 4096 len 155648 Jan 26 00:49:21 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:21 swtf2 kernel: i = 27 bytes 4096 len 151552 Jan 26 00:49:21 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:21 swtf2 kernel: i = 28 bytes 4096 len 147456 Jan 26 00:49:21 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:21 swtf2 kernel: i = 29 bytes 4096 len 143360 Jan 26 00:49:21 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:21 swtf2 kernel: i = 30 bytes 4096 len 139264 Jan 26 00:49:21 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:21 swtf2 kernel: i = 31 bytes 4096 len 135168 Jan 26 00:49:21 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:21 swtf2 kernel: i = 32 bytes 4096 len 131072 Jan 26 00:49:21 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:21 swtf2 kernel: i = 33 bytes 4096 len 126976 Jan 26 00:49:21 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:21 swtf2 kernel: i = 34 bytes 4096 len 122880 Jan 26 00:49:21 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:21 swtf2 kernel: i = 35 bytes 4096 len 118784 Jan 26 00:49:21 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:21 swtf2 kernel: i = 36 bytes 4096 len 114688 Jan 26 00:49:21 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:21 swtf2 kernel: i = 37 bytes 4096 len 110592 Jan 26 00:49:21 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:21 swtf2 kernel: i = 38 bytes 4096 len 106496 Jan 26 00:49:21 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:21 swtf2 kernel: i = 39 bytes 4096 len 102400 Jan 26 00:49:21 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:21 swtf2 kernel: i = 40 bytes 4096 len 98304 Jan 26 00:49:21 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:21 swtf2 kernel: i = 41 bytes 4096 len 94208 Jan 26 00:49:21 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:21 swtf2 kernel: i = 42 bytes 4096 len 90112 Jan 26 00:49:21 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:21 swtf2 kernel: i = 43 bytes 4096 len 86016 Jan 26 00:49:21 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:21 swtf2 kernel: i = 44 bytes 4096 len 81920 Jan 26 00:49:21 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:21 swtf2 kernel: i = 45 bytes 4096 len 77824 Jan 26 00:49:21 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:21 swtf2 kernel: i = 46 bytes 4096 len 73728 Jan 26 00:49:21 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:21 swtf2 kernel: i = 47 bytes 4096 len 69632 Jan 26 00:49:21 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:21 swtf2 kernel: i = 48 bytes 4096 len 65536 Jan 26 00:49:21 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:21 swtf2 kernel: i = 49 bytes 4096 len 61440 Jan 26 00:49:21 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:21 swtf2 kernel: i = 50 bytes 4096 len 57344 Jan 26 00:49:21 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:21 swtf2 kernel: i = 51 bytes 4096 len 53248 Jan 26 00:49:21 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:21 swtf2 kernel: i = 52 bytes 4096 len 49152 Jan 26 00:49:21 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:21 swtf2 kernel: i = 53 bytes 4096 len 45056 Jan 26 00:49:21 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:21 swtf2 kernel: i = 54 bytes 4096 len 40960 Jan 26 00:49:21 swtf2 kernel: __bio_add_page() returns = 4096 and bytes is 4096 Jan 26 00:49:21 swtf2 kernel: i = 55 bytes 4096 len 36864 Jan 26 00:49:21 swtf2 kernel: __bio_add_page() returns = 0 and bytes is 4096 Jan 26 00:49:21 swtf2 kernel: i = 55, nr_pages = 64, PAGE_SIZE 4096 Jan 26 00:49:21 swtf2 kernel: bio->bi_size = 225280 and len = 262144 Jan 26 00:49:21 swtf2 kernel: bio_map_user 2 q f7d5864c Jan 26 00:49:21 swtf2 kernel: bio is the error Jan 26 00:49:21 swtf2 kernel: blk_rq_map_user(Q f7d5864c) returns -22 Is anything more needed? Can anyone help? Regards Burn Alting burn@xxxxxxxxxxxxxx