Commit dfaf3c03 authored by Lukas Czerner's avatar Lukas Czerner Committed by Jens Axboe

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: default avatarLukas Czerner <lczerner@redhat.com>
Reported-by: default avatarMilan Broz <mbroz@redhat.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 5eb46851
...@@ -797,7 +797,7 @@ static void loop_config_discard(struct loop_device *lo) ...@@ -797,7 +797,7 @@ static void loop_config_discard(struct loop_device *lo)
} }
q->limits.discard_granularity = inode->i_sb->s_blocksize; q->limits.discard_granularity = inode->i_sb->s_blocksize;
q->limits.discard_alignment = inode->i_sb->s_blocksize; q->limits.discard_alignment = 0;
q->limits.max_discard_sectors = UINT_MAX >> 9; q->limits.max_discard_sectors = UINT_MAX >> 9;
q->limits.discard_zeroes_data = 1; q->limits.discard_zeroes_data = 1;
queue_flag_set_unlocked(QUEUE_FLAG_DISCARD, q); queue_flag_set_unlocked(QUEUE_FLAG_DISCARD, q);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment