From: Nebojsa Trpkovic <trx.lists@gmail.com>
To: Eric Sandeen <sandeen@redhat.com>
Cc: linux-ext4@vger.kernel.org
Subject: Re: "data=writeback" and TRIM don't get along
Date: Thu, 08 Apr 2010 03:37:41 +0200 [thread overview]
Message-ID: <4BBD3365.90306@gmail.com> (raw)
In-Reply-To: <4BBD2FDF.4040407@redhat.com>
On 04/08/10 03:22, Eric Sandeen wrote:
> How does it fail?
>
> Surely a bug. :) If you can provide details we'll look into it.
> (perhaps it's obvious on first try but still worth saying exactly
> what problematic behavior you saw, when reporting a bug you
> encountered)
Well, I've done a simple test, described like:
"get the used sectors for a file
hdparm --fibmap filename
read a sector from the file eg. with
sudo hdparm --read-sector 66385920 /dev/sda
delete the file and sync
rm filename;sync
and read the sector a second time"
And I get something like this:
================================
# dd if=/dev/urandom of=tempfile count=100 bs=512k oflag=direct
100+0 records in
100+0 records out
52428800 bytes (52 MB) copied, 6.47137 s, 8.1 MB/s
# hdparm --fibmap tempfile
tempfile:
filesystem blocksize 4096, begins at LBA 0; assuming 512 byte sectors.
byte_offset begin_LBA end_LBA sectors
0 37094400 37196799 102400
# hdparm --read-sector 37094400 /dev/sdb
/dev/sdb:
reading sector 37094400: succeeded
b0e8 3ad7 d080 84e8 b4b2 7e60 21f1 eff3
0ef9 fa10 b172 89f8 186f 0194 4cb1 e190
d6b5 b2fe 2577 5dba e6f2 5ad7 34a0 f09f
ca5c 07ef 6e86 c3a8 9e77 77f3 78ff 672f
af71 dea7 ac23 a55d e31e ff83 164e bb76
8ea4 416d 343a 9f5e b41f b1d0 b6e9 6ed8
90c0 3cba ec07 1d96 fdd6 3940 1290 7cd2
c506 c3ee c120 3732 17eb 6e68 11aa 721c...
# rm tempfile
# sync
================================
Now, if I have "data=writeback" enable and I run
# hdparm --read-sector 37094400 /dev/sdb
again, I'll get the same random bytes.
Reboot doesn't help.
If I disable "data=writeback" and run
# hdparm --read-sector 37094400 /dev/sdb
I'll get all zeroes:
================================
# hdparm --read-sector 37094400 /dev/sdb
/dev/sdb:
reading sector 37094400: succeeded
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
...
================================
So, TRIM command works well, but not with "data=writeback" mount option.
Other info:
Intel X25-V 40GB (latest firmware)
Linux box 2.6.33-gentoo #4 SMP Sat Apr 3 05:02:04 CEST 2010 x86_64
Intel(R) Core(TM) i5 CPU 750 @ 2.67GHz GenuineIntel GNU/Linux
Nebojsa
next prev parent reply other threads:[~2010-04-08 1:37 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-08 0:50 "data=writeback" and TRIM don't get along Nebojsa Trpkovic
2010-04-08 1:22 ` Eric Sandeen
2010-04-08 1:37 ` Nebojsa Trpkovic [this message]
2010-04-08 4:10 ` Eric Sandeen
2010-04-08 4:37 ` Eric Sandeen
2010-04-08 4:47 ` Eric Sandeen
2010-04-08 11:48 ` Nebojsa Trpkovic
2010-04-08 15:32 ` Eric Sandeen
2010-04-08 16:21 ` Nebojsa Trpkovic
2010-04-08 16:34 ` Eric Sandeen
2010-04-08 7:17 ` Dmitry Monakhov
2010-04-08 11:47 ` Nebojsa Trpkovic
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=4BBD3365.90306@gmail.com \
--to=trx.lists@gmail.com \
--cc=linux-ext4@vger.kernel.org \
--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).