Skip to content

Commit dfaf3c0

Browse files
Lukas Czerneraxboe
authored andcommitted
loop: Fix discard_alignment default setting
discard_alignment is not relevant to the loop driver since it is supposed to be set as a workaround for the old sector 63 alignments. So set it to zero rather than block size. Signed-off-by: Lukas Czerner <lczerner@redhat.com> Reported-by: Milan Broz <mbroz@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
1 parent 5eb4685 commit dfaf3c0

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎drivers/block/loop.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -797,7 +797,7 @@ static void loop_config_discard(struct loop_device *lo)
797797
}
798798

799799
q->limits.discard_granularity = inode->i_sb->s_blocksize;
800-
q->limits.discard_alignment = inode->i_sb->s_blocksize;
800+
q->limits.discard_alignment = 0;
801801
q->limits.max_discard_sectors = UINT_MAX >> 9;
802802
q->limits.discard_zeroes_data = 1;
803803
queue_flag_set_unlocked(QUEUE_FLAG_DISCARD, q);

0 commit comments

Comments
 (0)