| 1439 | } |
| 1440 | |
| 1441 | int |
| 1442 | vnode_pager_putpages_ioflags(int pager_flags) |
| 1443 | { |
| 1444 | int ioflags; |
| 1445 | |
| 1446 | /* |
| 1447 | * Pageouts are already clustered, use IO_ASYNC to force a |
| 1448 | * bawrite() rather then a bdwrite() to prevent paging I/O |
| 1449 | * from saturating the buffer cache. Dummy-up the sequential |
| 1450 | * heuristic to cause large ranges to cluster. If neither |
| 1451 | * IO_SYNC or IO_ASYNC is set, the system decides how to |
| 1452 | * cluster. |
| 1453 | */ |
| 1454 | ioflags = IO_VMIO; |
| 1455 | if ((pager_flags & (VM_PAGER_PUT_SYNC | VM_PAGER_PUT_INVAL)) != 0) |
| 1456 | ioflags |= IO_SYNC; |
| 1457 | else if ((pager_flags & VM_PAGER_CLUSTER_OK) == 0) |
| 1458 | ioflags |= IO_ASYNC; |
| 1459 | ioflags |= (pager_flags & VM_PAGER_PUT_INVAL) != 0 ? IO_INVAL: 0; |
| 1460 | ioflags |= (pager_flags & VM_PAGER_PUT_NOREUSE) != 0 ? IO_NOREUSE : 0; |
| 1461 | ioflags |= IO_SEQMAX << IO_SEQSHIFT; |
| 1462 | return (ioflags); |
| 1463 | } |
| 1464 | |
| 1465 | /* |
| 1466 | * vnode_pager_undirty_pages(). |
no outgoing calls
no test coverage detected