lkml.org 
[lkml]   [2023]   [Aug]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Date
SubjectRe: [PATCH] block: fix unexpected split in bio_discard_limit
On Thu, Aug 17, 2023 at 3:42 PM Li Feng <fengli@smartx.com> wrote:
>
> bio_discard_limit() enforces discard boundaries within the range of 32-bit
> unsigned integers, resulting in unexpected discard cut boundaries.

Any bio size can't be bigger than UINT_MAX, see bio definition.

>
> For example, max discard size = 1MiB, discard_granularity = 512B, then the
> discard lengths sent in the range [0,4G) are 1MiB, 1MiB... (1MiB-512).
> The next discard offset from 4G is [4G-512, 4G-512+1MiB).
> The discard of the 4G offset boundary does not comply with the optimal 1MiB
> size.

As mentioned, max bio size is 4GB, so there shouldn't be such issue.

Thanks,

\
 
 \ /
  Last update: 2023-08-22 15:09    [W:0.271 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site