From: <gregkh@linuxfoundation.org>
To: snitzer@redhat.com, gregkh@linuxfoundation.org
Cc: <stable@vger.kernel.org>, <stable-commits@vger.kernel.org>
Subject: Patch "dm thin: disable discard support for thin devices if pool's is disabled" has been added to the 4.2-stable tree
Date: Sat, 17 Oct 2015 12:37:39 -0700 [thread overview]
Message-ID: <1445110659225246@kroah.com> (raw)
This is a note to let you know that I've just added the patch titled
dm thin: disable discard support for thin devices if pool's is disabled
to the 4.2-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
dm-thin-disable-discard-support-for-thin-devices-if-pool-s-is-disabled.patch
and it can be found in the queue-4.2 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From 216076705d6ac291d42e0f8dd85e6a0da98c0fa3 Mon Sep 17 00:00:00 2001
From: Mike Snitzer <snitzer@redhat.com>
Date: Tue, 8 Sep 2015 08:56:13 -0400
Subject: dm thin: disable discard support for thin devices if pool's is disabled
From: Mike Snitzer <snitzer@redhat.com>
commit 216076705d6ac291d42e0f8dd85e6a0da98c0fa3 upstream.
If the pool is configured with 'ignore_discard' its discard support is
disabled. The pool's thin devices should also have queue_limits that
reflect discards are disabled.
Fixes: 34fbcf62 ("dm thin: range discard support")
Signed-off-by: Mike Snitzer <snitzer@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/md/dm-thin.c | 4 ++++
1 file changed, 4 insertions(+)
--- a/drivers/md/dm-thin.c
+++ b/drivers/md/dm-thin.c
@@ -4333,6 +4333,10 @@ static void thin_io_hints(struct dm_targ
{
struct thin_c *tc = ti->private;
struct pool *pool = tc->pool;
+ struct queue_limits *pool_limits = dm_get_queue_limits(pool->pool_md);
+
+ if (!pool_limits->discard_granularity)
+ return; /* pool's discard support is disabled */
limits->discard_granularity = pool->sectors_per_block << SECTOR_SHIFT;
limits->max_discard_sectors = 2048 * 1024 * 16; /* 16G */
Patches currently in stable-queue which might be from snitzer@redhat.com are
queue-4.2/dm-crypt-constrain-crypt-device-s-max_segment_size-to-page_size.patch
queue-4.2/dm-thin-disable-discard-support-for-thin-devices-if-pool-s-is-disabled.patch
queue-4.2/dm-raid-fix-round-up-of-default-region-size.patch
reply other threads:[~2015-10-17 19:37 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1445110659225246@kroah.com \
--to=gregkh@linuxfoundation.org \
--cc=snitzer@redhat.com \
--cc=stable-commits@vger.kernel.org \
--cc=stable@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.