mirror of
https://github.com/opnsense/src.git
synced 2026-04-25 16:18:54 -04:00
When copying a file's contents into the pool, a loop copies blocks of the maximum size (128KB), allocating space from the vdev for each block. The space allocator rounds up to the nearest block size, but for files larger than the maximum size, this can result in the last block having a smaller logical size than the rest of the blocks belonging to that dnode. This violates some ZFS invariants when appending to that file. Modify fs_populate_file() to use the same block size for the final block. Reported by: cperciva MFC after: 1 week Sponsored by: The FreeBSD Foundation (cherry picked from commit ef20cd33d3287ebead0d30f2e177fc57a97dc2d5) |
||
|---|---|---|
| .. | ||
| dsl.c | ||
| fs.c | ||
| Makefile.inc | ||
| objset.c | ||
| vdev.c | ||
| zap.c | ||
| zfs.h | ||