block: add sg list size limits

Signed-off-by: Michael Shaw <m@michaelsshaw.com>
This commit is contained in:
Michael Shaw 2026-07-15 00:15:30 -04:00
commit 86091c6acb
2 changed files with 7 additions and 0 deletions

View file

@ -358,8 +358,12 @@ static struct sata_device *init_sata_port(struct ahci_host *host, u32 port, int
bdev->block_size = sdev->sector_size;
bdev->ops = ahci_block_ops;
bdev->disk.is_disk = true;
strncpy(bdev->name, name, sizeof(bdev->name) - 1);
bdev->sg_max_len = 4 * MB;
bdev->sg_max_segments = 8;
if (!packet)
block_check_partitions(bdev);