mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Pawel Baldysiak <pawel.baldysiak@intel.com>
To: neilb@suse.de
Cc: linux-raid@vger.kernel.org, shli@kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH] raid0: Set discard_granularity to correct value after reshape.
Date: Wed, 30 Oct 2013 13:20:22 +0100	[thread overview]
Message-ID: <20131030122022.20862.97997.stgit@gklab-154-222.igk.intel.com> (raw)

In case of reshape of raid0 through raid4 a value of discard_granularity
will be set to stripe size. MD driver should re-set this value to correct
one when migration will be finished. Otherwise array will be left with
wrong value and discard operations will not work properly.

Signed-off-by: Pawel Baldysiak <pawel.baldysiak@intel.com>
Cc: Shaohua Li <shli@kernel.org>
---
 drivers/md/raid0.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/md/raid0.c b/drivers/md/raid0.c
index c4d420b..807ca3a 100644
--- a/drivers/md/raid0.c
+++ b/drivers/md/raid0.c
@@ -266,6 +266,8 @@ static int create_strip_zones(struct mddev *mddev, struct r0conf **private_conf)
 	}
 	mddev->queue->backing_dev_info.congested_fn = raid0_congested;
 	mddev->queue->backing_dev_info.congested_data = mddev;
+	mddev->queue->limits.discard_granularity =
+			queue_logical_block_size(mddev->queue);
 
 	/*
 	 * now since we have the hard sector sizes, we can make sure


             reply	other threads:[~2013-10-30 12:20 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-30 12:20 Pawel Baldysiak [this message]
2013-10-31  0:16 ` NeilBrown
2013-11-05 14:25   ` Baldysiak, Pawel
2013-11-07  2:38     ` NeilBrown

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=20131030122022.20862.97997.stgit@gklab-154-222.igk.intel.com \
    --to=pawel.baldysiak@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-raid@vger.kernel.org \
    --cc=neilb@suse.de \
    --cc=shli@kernel.org \
    /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

all inboxes | Powered by JetHome®