mirror of
https://github.com/Mathewnd/Astral.git
synced 2026-11-01 15:08:21 +00:00
vmm: allow vmm_getphysical to return a page held
This commit is contained in:
@@ -517,11 +517,13 @@ static int rwblocks(nvmenamespace_t *namespace, void *buffer, uintmax_t lba, siz
|
||||
size_t docount = (done == 0) ? (PAGE_SIZE - pageoffset) / namespace->blocksize : PAGE_SIZE / namespace->blocksize;
|
||||
docount = min(docount, count - done);
|
||||
|
||||
prp[0] = (uint64_t)vmm_getphysical((void *)((uintptr_t)buffer + done * namespace->blocksize));
|
||||
prp[0] = (uint64_t)vmm_getphysical((void *)((uintptr_t)buffer + done * namespace->blocksize), true);
|
||||
__assert(prp[0]);
|
||||
|
||||
err = write ? iowrite(namespace, prp, lba + done, docount) : ioread(namespace, prp, lba + done, docount);
|
||||
|
||||
pmm_release((void *)prp[0]);
|
||||
|
||||
if (err)
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user