linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] loop: Fix discard_alignment default setting
@ 2011-12-01 14:59 Lukas Czerner
  2011-12-02 13:46 ` Jens Axboe
  0 siblings, 1 reply; 2+ messages in thread
From: Lukas Czerner @ 2011-12-01 14:59 UTC (permalink / raw)
  To: linux-fsdevel; +Cc: Jens Axboe, Milan Broz, Lukas Czerner

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>
---
 drivers/block/loop.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/block/loop.c b/drivers/block/loop.c
index 68b205a..3d6dc86 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);
-- 
1.7.4.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-12-02 14:01 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-01 14:59 [PATCH] loop: Fix discard_alignment default setting Lukas Czerner
2011-12-02 13:46 ` Jens Axboe

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).