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]
Message-ID: <AANLkTilecMRKZy1ojkbUk-9oFVzRO_aMv5p3YY2WMnIw@mail.gmail.com>
Date:	Mon, 17 May 2010 17:57:01 -0700
From:	Jiaying Zhang <jiayingz@...gle.com>
To:	"Martin K. Petersen" <martin.petersen@...cle.com>
Cc:	hch@...radead.org, jens.axboe@...cle.com,
	linux-kernel@...r.kernel.org, mrubin@...gle.com
Subject: Re: [PATCH, RFC] addjust discard request to be aligned with hwsect 
	size to support SSDs with larger sector size

On Mon, May 17, 2010 at 1:00 PM, Martin K. Petersen
<martin.petersen@...cle.com> wrote:
>>>>>> "Jiaying" == Jiaying Zhang <jiayingz@...gle.com> writes:
>
> Jiaying> It is true that all of the block layer works on 512-byte sector
> Jiaying> size, but I think it is good to check for address alignment for
> Jiaying> discard request so we don't insert unnecessary discard requests
> Jiaying> into the request queue.
>
> Well, then what happens when you stripe or use DM on devices with
> different discard granularity?  Or what about a mirror?  Or multiple
> levels of stacking of heterogeneous devices.
>
> There are good reasons why we postpone the logical block scaling until
> we're preparing the request for the actual physical device.
>
Good point.

I am now open to either changing the patch to use discard_granularity
alignment or simply dropping the patch and leave the alignment checking
for disk drivers to deal with. Either way, disk driver needs to be changed.
Please let me know if you think using discard_granularity is the right
way to go. I will post a new patch in that case.

Jiaying

>
> Jiaying> There are also certain disk drivers that assume a discard
> Jiaying> request passed from the block layer is already properly
> Jiaying> aligned. We could argue that those disk drivers need to fix
> Jiaying> that
>
> Which is what I'm arguing :)
>
>
> Jiaying> 512 bytes and 4KB seem to be the most common sizes but I
> Jiaying> wouldn't be surprised to see other logical block size.
>
> That's the reason I'm asking.  If you have a different lbs then let's by
> all means add support for it.  Or make the ULD scaling generic.
>
> I'm open to aligning to the reported discard granularity in the ULD, for
> instance.
>
> --
> Martin K. Petersen      Oracle Linux Engineering
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ