aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block
diff options
context:
space:
mode:
authorLukas Czerner <lczerner@redhat.com>2011-12-02 08:47:03 -0500
committerJens Axboe <axboe@kernel.dk>2011-12-02 08:47:03 -0500
commitdfaf3c036cd46a73f4ef3e4b75c1f647e503d4e1 (patch)
tree4a4d37e3560e358c83e4f763cf90db0b22444cb7 /drivers/block
parent5eb46851de3904cd1be9192fdacb8d34deadc1fc (diff)
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>
Diffstat (limited to 'drivers/block')
-rw-r--r--drivers/block/loop.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index 5579fda279b4..1e888c9e85b3 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -797,7 +797,7 @@ static void loop_config_discard(struct loop_device *lo)
797 } 797 }
798 798
799 q->limits.discard_granularity = inode->i_sb->s_blocksize; 799 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;
801 q->limits.max_discard_sectors = UINT_MAX >> 9; 801 q->limits.max_discard_sectors = UINT_MAX >> 9;
802 q->limits.discard_zeroes_data = 1; 802 q->limits.discard_zeroes_data = 1;
803 queue_flag_set_unlocked(QUEUE_FLAG_DISCARD, q); 803 queue_flag_set_unlocked(QUEUE_FLAG_DISCARD, q);