Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion block/blk-settings.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,14 @@ void blk_set_stacking_limits(struct queue_limits *lim)
lim->physical_block_size = SECTOR_SIZE;
lim->io_min = SECTOR_SIZE;
lim->discard_granularity = SECTOR_SIZE;
lim->dma_alignment = SECTOR_SIZE - 1;
/*
* No dma_alignment of its own: blk_stack_limits() keeps the strictest
* of the devices stacked under it, and blk_validate_limits() gives the
* sector-size default to a device left with none. A driver that looks
* at the data and needs it laid out by logical block says so in its
* own limits, as dm-crypt, dm-integrity, dm-verity and dm-log-writes
* do.
*/
lim->seg_boundary_mask = BLK_SEG_BOUNDARY_MASK;

/* Inherit limits from component devices */
Expand Down
Loading