From: Lukas Czerner <lczerner@redhat.com>
To: linux-fsdevel <linux-fsdevel@vger.kernel.org>
Cc: Jens Axboe <jaxboe@fusionio.com>, Milan Broz <mbroz@redhat.com>,
Lukas Czerner <lczerner@redhat.com>
Subject: [PATCH] loop: Fix discard_alignment default setting
Date: Thu, 1 Dec 2011 15:59:06 +0100 [thread overview]
Message-ID: <1322751546-20098-1-git-send-email-lczerner@redhat.com> (raw)
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
next reply other threads:[~2011-12-01 14:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-01 14:59 Lukas Czerner [this message]
2011-12-02 13:46 ` [PATCH] loop: Fix discard_alignment default setting Jens Axboe
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1322751546-20098-1-git-send-email-lczerner@redhat.com \
--to=lczerner@redhat.com \
--cc=jaxboe@fusionio.com \
--cc=linux-fsdevel@vger.kernel.org \
--cc=mbroz@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).