mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 12:54:27 +00:00
Improve error reporting when the swap pager runs out of memory.
Reviewed by: kib MFC after: 2 weeks Sponsored by: Klara Inc. Differential Revision: https://reviews.freebsd.org/D19699
This commit is contained in:
parent
b25ce41e33
commit
0b208315f4
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=345551
|
@ -1510,9 +1510,10 @@ swp_pager_async_iodone(struct buf *bp)
|
|||
vm_object_t object = NULL;
|
||||
|
||||
/*
|
||||
* report error
|
||||
* Report error - unless we ran out of memory, in which case
|
||||
* we've already logged it in swapgeom_strategy().
|
||||
*/
|
||||
if (bp->b_ioflags & BIO_ERROR) {
|
||||
if (bp->b_ioflags & BIO_ERROR && bp->b_error != ENOMEM) {
|
||||
printf(
|
||||
"swap_pager: I/O error - %s failed; blkno %ld,"
|
||||
"size %ld, error %d\n",
|
||||
|
@ -2692,6 +2693,7 @@ swapgeom_strategy(struct buf *bp, struct swdevt *sp)
|
|||
mtx_unlock(&sw_dev_mtx);
|
||||
bp->b_error = ENOMEM;
|
||||
bp->b_ioflags |= BIO_ERROR;
|
||||
printf("swap_pager: cannot allocate bio\n");
|
||||
bufdone(bp);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue