From: Mike Snitzer <snitzer@redhat.com>
To: Lukas Czerner <lczerner@redhat.com>
Cc: "Martin K. Petersen" <martin.petersen@oracle.com>,
Christoph Hellwig <hch@infradead.org>,
device-mapper development <dm-devel@redhat.com>,
Alasdair G Kergon <agk@redhat.com>,
sandeen@redhat.com, DarkNovaNick@gmail.com, linux-lvm@redhat.com,
linux-ext4@vger.kernel.org
Subject: Re: do not disable ext4 discards on first discard failure? [was: Re: dm snapshot: ignore discards issued to the snapshot-origin target]
Date: Mon, 2 May 2011 10:58:11 -0400 [thread overview]
Message-ID: <20110502145807.GA32155@redhat.com> (raw)
In-Reply-To: <alpine.LFD.2.00.1105021631590.3778@dhcp-27-109.brq.redhat.com>
On Mon, May 02 2011 at 10:39am -0400,
Lukas Czerner <lczerner@redhat.com> wrote:
> On Mon, 2 May 2011, Martin K. Petersen wrote:
>
> > >>>>> "Lukas" == Lukas Czerner <lczerner@redhat.com> writes:
> >
> > Lukas> So I gave it a try. First of all the device composed of SSD and
> > Lukas> spinning disk does export discard_support information properly,
> > Lukas> however it also advertise discard_zeroes_data which is wrong and
> > Lukas> possibly dangerous and should be fixed!
> >
> > I can't reproduce this here. If I mix discard and non-discard devices
> > things work correctly. discard_zeroes_data also gets cleared if I mix
> > discard-capable drives where one zeroes and one doesn't.
> >
> >
>
> [root@trim ~]# hdparm -I /dev/sdb | grep -i trim
> [root@trim ~]# cat /sys/block/sdb/queue/discard_zeroes_data
> 0
> [root@trim ~]# hdparm -I /dev/sdd | grep -i trim
> * Data Set Management TRIM supported
> * Deterministic read after TRIM
> [root@trim ~]# cat /sys/block/sdd/queue/discard_zeroes_data
> 1
> [root@trim ~]# pvcreate /dev/sdd1
> Physical volume "/dev/sdd1" successfully created
> [root@trim ~]# pvcreate /dev/sdb3
> Physical volume "/dev/sdb3" successfully created
> [root@trim ~]# vgcreate vg_test /dev/sdd1 /dev/sdb3
> Volume group "vg_test" successfully created
> [root@trim ~]# lvcreate -L 3500M vg_test
> Logical volume "lvol0" created
> [root@trim ~]# ls -lah /dev/mapper/vg_test-lvol0
> lrwxrwxrwx. 1 root root 7 2. kvě 10.30 /dev/mapper/vg_test-lvol0 -> ../dm-0
> [root@trim ~]# cat /sys/block/dm-0/queue/discard_zeroes_data
> 1
Hmm, Strange considering DM just uses blk_stack_limits().
As Martin said, current blk_stack_limits() code is fine:
t->discard_zeroes_data &= b->discard_zeroes_data;
> So I assume it got fixes just recently ?. I'll give it a try with the
> up-to-date kernel.
Hasn't changed at all since it was introduced:
98262f2 v2.6.33-rc1 block: Allow devices to indicate whether discarded blocks are zeroed
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
next prev parent reply other threads:[~2011-05-02 14:58 UTC|newest]
Thread overview: 44+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20110412234706.GA11244@redhat.com>
[not found] ` <20cf301cbef67d323104a0c2ff52@google.com>
[not found] ` <20110413224025.GA18589@redhat.com>
[not found] ` <20110413234854.GA19793@redhat.com>
[not found] ` <20110426173213.GA19604@redhat.com>
[not found] ` <20110428001912.GA14659@redhat.com>
[not found] ` <20110428075355.GA2190@infradead.org>
2011-04-28 20:59 ` do not disable ext4 discards on first discard failure? [was: Re: dm snapshot: ignore discards issued to the snapshot-origin target] Mike Snitzer
2011-04-28 21:28 ` Eric Sandeen
2011-04-28 22:59 ` [linux-lvm] " Alasdair G Kergon
2011-04-28 23:01 ` Eric Sandeen
2011-04-28 23:11 ` Alasdair G Kergon
2011-04-29 1:12 ` Andreas Dilger
2011-04-29 9:30 ` Lukas Czerner
2011-04-29 12:24 ` [dm-devel] " Alasdair G Kergon
2011-04-29 12:29 ` Christoph Hellwig
2011-04-29 14:28 ` Eric Sandeen
2011-04-29 15:13 ` [linux-lvm] " Ray Morris
2011-05-04 16:33 ` Ted Ts'o
2011-05-04 16:51 ` Eric Sandeen
2011-05-04 16:57 ` Lukas Czerner
2011-05-04 17:02 ` Lukas Czerner
2011-05-02 7:16 ` Lukas Czerner
2011-05-02 8:13 ` Alasdair G Kergon
2011-05-02 8:19 ` Christoph Hellwig
2011-05-02 10:24 ` Lukas Czerner
2011-05-02 12:48 ` Mike Snitzer
2011-05-02 13:05 ` Lukas Czerner
2011-05-02 14:47 ` Eric Sandeen
2011-05-02 14:48 ` Christoph Hellwig
2011-05-02 14:58 ` Lukas Czerner
2011-05-02 13:48 ` [dm-devel] " Martin K. Petersen
2011-05-02 14:20 ` Martin K. Petersen
2011-05-02 14:39 ` [dm-devel] " Lukas Czerner
2011-05-02 14:50 ` Martin K. Petersen
2011-05-02 14:58 ` Mike Snitzer [this message]
2011-05-02 16:58 ` Martin K. Petersen
2011-05-03 8:57 ` Lukas Czerner
2011-05-04 15:10 ` Martin K. Petersen
2011-05-04 16:02 ` Mike Snitzer
2011-05-04 16:50 ` Martin K. Petersen
2011-05-04 18:03 ` Mike Snitzer
2011-05-04 17:10 ` [dm-devel] " Lukas Czerner
2011-05-04 17:32 ` Martin K. Petersen
2011-05-04 17:35 ` Lukas Czerner
2011-05-18 12:16 ` Mike Snitzer
2011-05-18 12:52 ` Mike Snitzer
2011-05-04 15:16 ` [dm-devel] " Martin K. Petersen
2011-05-04 16:12 ` Lukas Czerner
2011-05-05 8:33 ` Karel Zak
2011-05-05 10:48 ` Lukas Czerner
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=20110502145807.GA32155@redhat.com \
--to=snitzer@redhat.com \
--cc=DarkNovaNick@gmail.com \
--cc=agk@redhat.com \
--cc=dm-devel@redhat.com \
--cc=hch@infradead.org \
--cc=lczerner@redhat.com \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-lvm@redhat.com \
--cc=martin.petersen@oracle.com \
--cc=sandeen@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).