md.c (5d4ca75e5688a565acf34ac318eecd9105207536) | md.c (121230a40d493c631338118c4ba7b694746313ca) |
---|---|
1/* 2 * ---------------------------------------------------------------------------- 3 * "THE BEER-WARE LICENSE" (Revision 42): 4 * <phk@FreeBSD.ORG> wrote this file. As long as you retain this notice you 5 * can do whatever you want with this stuff. If we meet some day, and you think 6 * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp 7 * ---------------------------------------------------------------------------- 8 * --- 532 unchanged lines hidden (view full) --- 541 VM_OBJECT_LOCK(sc->object); 542 vm_object_pip_add(sc->object, 1); 543 for (i = bp->bio_offset / PAGE_SIZE; i <= lastp; i++) { 544 len = ((i == lastp) ? lastend : PAGE_SIZE) - offs; 545 546 m = vm_page_grab(sc->object, i, 547 VM_ALLOC_NORMAL|VM_ALLOC_RETRY); 548 VM_OBJECT_UNLOCK(sc->object); | 1/* 2 * ---------------------------------------------------------------------------- 3 * "THE BEER-WARE LICENSE" (Revision 42): 4 * <phk@FreeBSD.ORG> wrote this file. As long as you retain this notice you 5 * can do whatever you want with this stuff. If we meet some day, and you think 6 * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp 7 * ---------------------------------------------------------------------------- 8 * --- 532 unchanged lines hidden (view full) --- 541 VM_OBJECT_LOCK(sc->object); 542 vm_object_pip_add(sc->object, 1); 543 for (i = bp->bio_offset / PAGE_SIZE; i <= lastp; i++) { 544 len = ((i == lastp) ? lastend : PAGE_SIZE) - offs; 545 546 m = vm_page_grab(sc->object, i, 547 VM_ALLOC_NORMAL|VM_ALLOC_RETRY); 548 VM_OBJECT_UNLOCK(sc->object); |
549 sf = sf_buf_alloc(m); | 549 sf = sf_buf_alloc(m, 0); |
550 VM_OBJECT_LOCK(sc->object); 551 if (bp->bio_cmd == BIO_READ) { 552 if (m->valid != VM_PAGE_BITS_ALL) 553 rv = vm_pager_get_pages(sc->object, &m, 1, 0); 554 bcopy((void *)(sf_buf_kva(sf) + offs), p, len); 555 } else if (bp->bio_cmd == BIO_WRITE) { 556 if (len != PAGE_SIZE && m->valid != VM_PAGE_BITS_ALL) 557 rv = vm_pager_get_pages(sc->object, &m, 1, 0); --- 699 unchanged lines hidden --- | 550 VM_OBJECT_LOCK(sc->object); 551 if (bp->bio_cmd == BIO_READ) { 552 if (m->valid != VM_PAGE_BITS_ALL) 553 rv = vm_pager_get_pages(sc->object, &m, 1, 0); 554 bcopy((void *)(sf_buf_kva(sf) + offs), p, len); 555 } else if (bp->bio_cmd == BIO_WRITE) { 556 if (len != PAGE_SIZE && m->valid != VM_PAGE_BITS_ALL) 557 rv = vm_pager_get_pages(sc->object, &m, 1, 0); --- 699 unchanged lines hidden --- |