lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Wed, 17 Jul 2013 11:48:39 +1000
From:	NeilBrown <neilb@...e.de>
To:	CoolCold <coolthecold@...il.com>
Cc:	Justin Piszcz <jpiszcz@...idpixels.com>,
	Linux kernel <linux-kernel@...r.kernel.org>,
	Linux RAID <linux-raid@...r.kernel.org>
Subject: Re: 3.10: discard/trim support on md-raid1?

On Wed, 17 Jul 2013 00:44:15 +0400 CoolCold <coolthecold@...il.com> wrote:

> Neil, I've tryed to look around commit logs but failed to find commit
> where discard/trim were added.
> I was looking via
> http://git.kernel.org/cgit/linux/kernel/git/stable/linux-stable.git/log/drivers/md?id=9f2a940965286754f3a34d5737c3097c05db8725&qt=grep&q=discard+support
> , tryed just "discard" without support - found commits about dm, not
> md, though.
> 
> Can you shed some light here? Thanks in advance.
> 
> (resent in plaintext mode, please reply to this one)

Did you try:
    grep -i discard drivers/md/raid1.c
??

commit 2ff8cc2c6d4e323de71a42affeb3041fa17d5b10
Author: Shaohua Li <shli@...ionio.com>
Date:   Thu Oct 11 13:28:54 2012 +1100

    md: raid 1 supports TRIM

is the commit that introduced discard support for md/raid1.c

NeilBrown


> 
> 
> On Tue, Jul 16, 2013 at 11:15 AM, NeilBrown <neilb@...e.de> wrote:
> > On Sat, 13 Jul 2013 06:34:19 -0400 "Justin Piszcz" <jpiszcz@...idpixels.com>
> > wrote:
> >
> >> Hello,
> >>
> >> Running 3.10 and I see the following for an md-raid1 of two SSDs:
> >>
> >> Checking /sys/block/md1/queue:
> >> add_random: 0
> >> discard_granularity: 512
> >> discard_max_bytes: 2147450880
> >> discard_zeroes_data: 0
> >> hw_sector_size: 512
> >> iostats: 0
> >> logical_block_size: 512
> >> max_hw_sectors_kb: 32767
> >> max_integrity_segments: 0
> >> max_sectors_kb: 512
> >> max_segment_size: 65536
> >> max_segments: 168
> >> minimum_io_size: 512
> >> nomerges: 0
> >> nr_requests: 128
> >> optimal_io_size: 0
> >> physical_block_size: 512
> >> read_ahead_kb: 8192
> >> rotational: 1
> >> rq_affinity: 0
> >> scheduler: none
> >> write_same_max_bytes: 0
> >>
> >> What should be seen:
> >> rotational: 0
> >
> > What has "rotational" got to do with "supports discard"?
> > There may be some correlation, but it isn't causal.
> >
> >> And possibly:
> >> discard_zeroes_data: 1
> >
> > This should be set as the 'or' of the same value from component devices.  And
> > does not enable or disable the use of discard.
> >
> > I don't think that "does this device support discard" appears in sysfs.
> >
> > I believe trim does work on md/raid1 if the underlying devices all support it.
> >
> > NeilBrown
> >
> >
> >
> >>
> >> Can anyone confirm if there is a workaround to allow TRIM when using
> >> md-raid1?
> >>
> >> Some related discussion here:
> >> http://us.generation-nt.com/answer/md-rotational-attribute-help-206571222.ht
> >> ml
> >> http://www.progtown.com/topic343938-ssd-strange-itself-conducts.html
> >>
> >>
> >> Justin.
> >>
> >>
> >> --
> >> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> >> the body of a message to majordomo@...r.kernel.org
> >> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> >
> 
> 
> 


Download attachment "signature.asc" of type "application/pgp-signature" (829 bytes)

Powered by blists - more mailing lists