From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Linus Torvalds <torvalds@linux-foundation.org>,
dm-devel@redhat.com, linux-kernel@vger.kernel.org,
Heinz Mauelshagen <heinzm@redhat.com>,
Joe Thornber <ejt@redhat.com>, Mike Snitzer <snitzer@redhat.com>,
Mikulas Patocka <mpatocka@redhat.com>,
Paul Taysom <taysom@chromium.org>,
Randy Dunlap <rdunlap@infradead.org>,
stable@vger.kernel.org
Subject: Re: [dm-devel] [git pull] device-mapper fixes for 3.9
Date: Fri, 22 Mar 2013 13:14:32 -0700 [thread overview]
Message-ID: <20130322201432.GC5357@blackbox.djwong.org> (raw)
In-Reply-To: <20130322185326.GA5357@blackbox.djwong.org>
On Fri, Mar 22, 2013 at 11:53:26AM -0700, Darrick J. Wong wrote:
> On Thu, Mar 21, 2013 at 02:26:26AM +0000, Alasdair G Kergon wrote:
> > Please pull from:
> >
> > git://git.kernel.org/pub/scm/linux/kernel/git/agk/linux-dm tags/dm-3.9-fixes
> >
> > to get the following device-mapper fixes for 3.9.
> >
> > Thanks,
> > Alasdair
> >
> > ----------------------------------------------------------------
> > A set of device-mapper fixes for 3.9.
> >
> > Fix reported data loss with discards and thin snapshots; avoid a
> > deadlock observed in dm verity; fix a race in the new dm cache code
> > along with some other minor bugs; store the cache policy version on disk
> > to make the stored hints format future-proof.
> >
> > ----------------------------------------------------------------
> > Heinz Mauelshagen (2):
> > dm cache: detect cache_create failure
> > dm cache: avoid calling policy destructor twice on error
> >
> > Joe Thornber (5):
> > dm thin: fix discard corruption
> > dm thin: fix non power of two discard granularity calc
> > dm cache: avoid 64 bit division on 32 bit
> > dm cache: metadata clear dirty bits on clean shutdown
> > dm cache: fix race in writethrough implementation
>
> I think I've found a bug in this new WT implementation. /dev/sdb is an SSD,
> /dev/sda is a spinny disk, and both have been zeroed prior to running the
> following:
>
> # pvcreate /dev/sdb
> # vgcreate -s 256K moocache /dev/sdb
> # lvcreate -n metadata moocache -l 17
> # lvcreate -n blocks moocache -l 2030
> # echo '0 67108864 cache /dev/mapper/moocache-metadata /dev/mapper/moocache-blocks /dev/sda 512 1 writethrough default 4 random_threshold 4 sequential_threshold 32768' | dmsetup create moocache
> # mkfs.ext4 /dev/mapper/moocache -U deadbeef-cafe-dead-beef-cafedeadbeef
>
> If I then run blkid, I only see this:
> /dev/sdb: UUID="jlKkqi-L3W1-QQqf-7HKR-jmjU-GL79-qDOdvP" TYPE="LVM2_member"
> /dev/sda: UUID="deadbeef-cafe-dead-beef-cafedeadbeef" TYPE="ext4"
>
> Curious -- it didn't find anything on /dev/mapper/moocache. e2fsck/mount also
> see nothing, and dumping the first 256K shows zeroes. Sometimes it finds no
> ext4 at all.
>
> If I create the cache in WB mode, I see that blkid finds the deadbeef fs on
> /dev/sda and /dev/mapper/moocache, like I'd expect:
>
> /dev/sdb: UUID="9hYUEh-OOKT-KuqF-6eDy-2cEZ-2eEa-y17lhN" TYPE="LVM2_member"
> /dev/mapper/moocache-blocks: UUID="deadbeef-cafe-dead-beef-cafedeadbeef" TYPE="ext4"
> /dev/mapper/moocache: UUID="deadbeef-cafe-dead-beef-cafedeadbeef" TYPE="ext4"
It looks like dm-cache issues the bio first to the origin device with bi_sector
== N and bi_size == S, but then fails to reset these values when reissuing the
bio to the cache device. Therefore, the second issue of the bio goes out with
bi_size == 0 and bi_sector == N + (S >> 512), which is incorrect. I'll send a
patch.
--D
>
> --D
>
> >
> > Mike Snitzer (2):
> > dm cache: policy change version from string to integer set
> > dm cache: policy ignore hints if generated by different version
> >
> > Mikulas Patocka (1):
> > dm verity: avoid deadlock
> >
> > drivers/md/dm-bufio.c | 2 +
> > drivers/md/dm-cache-metadata.c | 64 ++++++++--
> > drivers/md/dm-cache-metadata.h | 2 +-
> > drivers/md/dm-cache-policy-cleaner.c | 7 +-
> > drivers/md/dm-cache-policy-internal.h | 2 +
> > drivers/md/dm-cache-policy-mq.c | 8 +-
> > drivers/md/dm-cache-policy.c | 8 ++
> > drivers/md/dm-cache-policy.h | 2 +
> > drivers/md/dm-cache-target.c | 169 +++++++++++++++++---------
> > drivers/md/dm-thin.c | 11 +-
> > drivers/md/dm-verity.c | 39 +++++-
> > drivers/md/persistent-data/dm-btree-remove.c | 46 +++----
> > 12 files changed, 252 insertions(+), 108 deletions(-)
> >
>
> --
> dm-devel mailing list
> dm-devel@redhat.com
> https://www.redhat.com/mailman/listinfo/dm-devel
next prev parent reply other threads:[~2013-03-22 20:14 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-21 2:26 Alasdair G Kergon
2013-03-22 18:53 ` Darrick J. Wong
2013-03-22 20:14 ` Darrick J. Wong [this message]
2013-04-06 1:47 ` [git pull] device-mapper fixes for 3.9-rc6 Alasdair G Kergon
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=20130322201432.GC5357@blackbox.djwong.org \
--to=darrick.wong@oracle.com \
--cc=dm-devel@redhat.com \
--cc=ejt@redhat.com \
--cc=heinzm@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mpatocka@redhat.com \
--cc=rdunlap@infradead.org \
--cc=snitzer@redhat.com \
--cc=stable@vger.kernel.org \
--cc=taysom@chromium.org \
--cc=torvalds@linux-foundation.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®