freebsd-src/sbin/newfs_msdos
Stefan Eßer 077f757d72 newfs_msdos: align data area to VM page boundary by default
Without alignment, the data area will not be aligned with the buffer
cache, leading to overhead, higher write multiplication on SSD devices
and issues with very large cluster sizes (see PR 277414).

The -A option used to align the start of the root directory to a
multiple of the cluster size, which happens to align the start of the
data area with a buffer page boundary in case of large clusters and
the default number of directory entries (512 entries requiring 16 KB
for FAT12 or FAT16, FAT32 puts the root directory into the data area).

This commit aligns the start of the data area with the page size, if
neither -A nor -r is used. It changes -A to align the start of the
data area (end of the root directory) to a multiple of the cluster
size, since this is the alignment that prevents write multiplication
due to clusters crossing erase block boundaries of a SSD device.
The -r option is unchanged and will prevent any automatic alignment
from occuring.

Approved by:	kib
MFC after:	1 week
Differential Revision:	https://reviews.freebsd.org/D45436
2024-06-02 14:07:52 +02:00
..
tests
Makefile Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
Makefile.depend Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
mkfs_msdos.c newfs_msdos: align data area to VM page boundary by default 2024-06-02 14:07:52 +02:00
mkfs_msdos.h
newfs_msdos.8 newfs_msdos: align data area to VM page boundary by default 2024-06-02 14:07:52 +02:00
newfs_msdos.c Purge more stray embedded $FreeBSD$ strings 2023-09-25 07:54:56 -07:00