- if (io_size & (devblocksize - 1)) {
- if (flags & IO_ENCRYPTED) {
- /*
- * Normally, we'd round down to the previous page boundary to
- * let the UBC manage the zero-filling of the file past the EOF.
- * But if we're doing encrypted IO, we can't let any of
- * the data hit the UBC. This means we have to do the full
- * IO to the upper block boundary of the device block that
- * contains the EOF. The user will be responsible for not
- * interpreting data PAST the EOF in its buffer.
- *
- * So just bump the IO back up to a multiple of devblocksize
- */
- io_size = ((io_size + devblocksize) & ~(devblocksize - 1));
- io_min = io_size;
- }
- else {
- /*
- * Clip the request to the previous page size boundary
- * since request does NOT end on a device block boundary
- */
- io_size &= ~PAGE_MASK;
- io_min = PAGE_SIZE;
- }
-
+ if (io_size & (devblocksize - 1)) {
+ assert(!(flags & IO_ENCRYPTED));
+ /*
+ * Clip the request to the previous page size boundary
+ * since request does NOT end on a device block boundary
+ */
+ io_size &= ~PAGE_MASK;
+ io_min = PAGE_SIZE;