summaryrefslogtreecommitdiffstats
path: root/drivers/block/loop.c
diff options
context:
space:
mode:
authorLukas Czerner <lczerner@redhat.com>2011-12-02 14:47:03 +0100
committerJens Axboe <axboe@kernel.dk>2011-12-02 14:47:03 +0100
commitdfaf3c036cd46a73f4ef3e4b75c1f647e503d4e1 (patch)
tree4a4d37e3560e358c83e4f763cf90db0b22444cb7 /drivers/block/loop.c
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/loop.c')
-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 5579fda279b..1e888c9e85b 100644
--- a/drivers/block/loop.c
+++ b/drivers/block/loop.c
@@ -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_alignment = inode->i_sb->s_blocksize;
+ q->limits.discard_alignment = 0;
q->limits.max_discard_sectors = UINT_MAX >> 9;
q->limits.discard_zeroes_data = 1;
queue_flag_set_unlocked(QUEUE_FLAG_DISCARD, q);