| 23cd7dfe | 15-Nov-2023 |
John Baldwin <[email protected]> |
makefs: Quiet a -Wdangling-pointer warning in cd9660_generate_path_table
This function temporarily stores a pointer to an on-stack variable (a TAILQ_HEAD of a temporary list) into a global variable
makefs: Quiet a -Wdangling-pointer warning in cd9660_generate_path_table
This function temporarily stores a pointer to an on-stack variable (a TAILQ_HEAD of a temporary list) into a global variable (*n).
Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D42581
(cherry picked from commit 5fc8ed9313609fbafe505deaea253e6bde5ac165)
show more ...
|
| 8ec7d748 | 30-Sep-2023 |
Dimitry Andric <[email protected]> |
makefs/zfs: fix build with gcc 12 after b5a2bf512dbe
Due to integer promotion rules, dn_nlevels (uint8_t) gets promoted to a plain int, resulting in -Werror warnings with gcc 12:
In file included
makefs/zfs: fix build with gcc 12 after b5a2bf512dbe
Due to integer promotion rules, dn_nlevels (uint8_t) gets promoted to a plain int, resulting in -Werror warnings with gcc 12:
In file included from /workspace/src/usr.sbin/makefs/zfs.c:35: /workspace/src/usr.sbin/makefs/zfs.c: In function '_dnode_cursor_flush': /workspace/src/usr.sbin/makefs/zfs.c:684:23: error: comparison of integer expressions of different signedness: 'unsigned int' and 'int' [-Werror=sign-compare] 684 | assert(levels <= c->dnode->dn_nlevels - 1); | ^~ /workspace/src/usr.sbin/makefs/zfs.c:691:27: error: comparison of integer expressions of different signedness: 'unsigned int' and 'int' [-Werror=sign-compare] 691 | if (level == c->dnode->dn_nlevels - 1) { | ^~ /workspace/src/usr.sbin/makefs/zfs.c: In function 'dnode_cursor_next': /workspace/src/usr.sbin/makefs/zfs.c:739:41: error: comparison of integer expressions of different signedness: 'unsigned int' and 'int' [-Werror=sign-compare] 739 | for (levels = 0; levels < c->dnode->dn_nlevels - 1; levels++) { | ^
Fix it by subtracting 1U instead of 1.
Fixes: b5a2bf512dbe MFC after: 3 days
(cherry picked from commit 8a77bc5e1be1a999f2f8d9df0c01fe01fb5a0787)
show more ...
|
| 2fe5f406 | 27-Sep-2023 |
Mark Johnston <[email protected]> |
makefs/zfs: Use unsigned integers for indirect block level counts
No functional change intended.
MFC after: 1 week Sponsored by: The FreeBSD Foundation
(cherry picked from commit b5a2bf512dbe5bc85
makefs/zfs: Use unsigned integers for indirect block level counts
No functional change intended.
MFC after: 1 week Sponsored by: The FreeBSD Foundation
(cherry picked from commit b5a2bf512dbe5bc8535e28e9f584a08444965426)
show more ...
|
| 5175923e | 28-Sep-2023 |
Mark Johnston <[email protected]> |
makefs/zfs: Ensure that the last block of a file has the right size
When copying a file's contents into the pool, a loop copies blocks of the maximum size (128KB), allocating space from the vdev for
makefs/zfs: Ensure that the last block of a file has the right size
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)
show more ...
|
| 0074d055 | 27-Sep-2023 |
Mark Johnston <[email protected]> |
makefs/zfs: Remove a nonsensical comment
When populating files, makefs needs to copy their contents into userspace in order to compute a checksum, so copy_file_range(2) is out of the question. Thou
makefs/zfs: Remove a nonsensical comment
When populating files, makefs needs to copy their contents into userspace in order to compute a checksum, so copy_file_range(2) is out of the question. Though, it could possibly be used when building other types of filesystems.
MFC after: 1 week Sponsored by: The FreeBSD Foundation
(cherry picked from commit 60c95af88f6a63fb7c2c86c6ff9c18743f6bbf0d)
show more ...
|
| ea5173e5 | 27-Sep-2023 |
Mark Johnston <[email protected]> |
makefs/zfs: Set the objset block pointer fill field correctly
It is supposed to contain the number of objects allocated from the set, excluding the meta dnode.
Reported by: mav MFC after: 1 week Sp
makefs/zfs: Set the objset block pointer fill field correctly
It is supposed to contain the number of objects allocated from the set, excluding the meta dnode.
Reported by: mav MFC after: 1 week Sponsored by: The FreeBSD Foundation
(cherry picked from commit 46402fd21631b7d4686f8c341d92db6bcb190e5d)
show more ...
|