Print this page
XXXX give me a better summary
@@ -2024,13 +2024,14 @@
/*
* Only reason putapage is going to give us SE_NOSWAP as error
* is when we ask a page to be written to physical backing store
* and there is none. Ignore this because we might be dealing
* with a swap page which does not have any backing store
- * on disk. In any other case we won't get this error over here.
+ * on disk, though the newer SE_NODEV error should cover that.
+ * In any other case we won't get this error over here.
*/
- if (err == SE_NOSWAP)
+ if (err == SE_NOSWAP || err == SE_NODEV)
err = 0;
return (err);
}
long tmp_putpagecnt, tmp_pagespushed;
@@ -2089,19 +2090,19 @@
io_off = pp_off;
io_len = pp_len;
err = swap_newphysname(vp, offset, &io_off, &io_len, &pvp, &pstart);
ASSERT(err != SE_NOANON); /* anon slot must have been filled */
if (err) {
- pvn_write_done(pplist, B_ERROR | B_WRITE | flags);
+ ASSERT(err == SE_NOSWAP || err == SE_NODEV);
+ pvn_write_done(pplist, (err == SE_NODEV ? 0 : B_ERROR) |
+ B_WRITE | flags);
/*
* If this routine is called as a result of segvn_sync
* operation and we have no physical swap then we can get an
* error here. In such case we would return SE_NOSWAP as error.
- * At this point, we expect only SE_NOSWAP.
*/
- ASSERT(err == SE_NOSWAP);
- if (flags & B_INVAL)
+ if ((flags & B_INVAL) && err == SE_NOSWAP)
err = ENOMEM;
goto out;
}
ASSERT(pp_off <= io_off && io_off + io_len <= pp_off + pp_len);
ASSERT(io_off <= offset && offset < io_off + io_len);
@@ -2141,11 +2142,11 @@
if (lenp)
*lenp = io_len;
tmp_putpagecnt++;
tmp_pagespushed += btop(io_len);
}
- if (err && err != ENOMEM && err != SE_NOSWAP)
+ if (err && err != ENOMEM && err != SE_NOSWAP && err != SE_NODEV)
cmn_err(CE_WARN, "tmp_putapage: err %d\n", err);
return (err);
}
/* ARGSUSED */