HomeFreeBSD

newfs_msdos: align to multiple of cluster size by default

Description

newfs_msdos: align to multiple of cluster size by default

A previous commit aligned the start of the data area to a multiple of
the VM page size, in order to prevent extra buffers to be allocated
(which failed for 64 KB cluster size without this alignment).

Since a dependency on PAGE_SIZE caused compatibility issues, the
alignment was made conditional on this macro being defined, in the
previous commit. This lead to different behavior of this program
when built on FreeBSD vs. Linux (which does not define PAGE_SIZE).

This commit removes any use of PAGE_SIZE and instead always aligns
the start of the data area to a multiple of the cluster size.

The -A option is now implied, unless overridden by a specific number
of reserved sectors with the -r option.

Approved by: kib
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D45436

Details

Provenance
seAuthored on Jun 6 2024, 10:28 AM
Differential Revision
D45436: Align FAT clusters to the cluster size
Parents
rGec69d230933f: linux: Allows writing to the vdso from the kernel
Branches
Unknown
Tags
Unknown