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] [thread-next>] [day] [month] [year] [list]
Message-ID:
 <DU2PR04MB85672571C145478700238C21EDABA@DU2PR04MB8567.eurprd04.prod.outlook.com>
Date: Wed, 17 Dec 2025 03:30:49 +0000
From: Luke Wang <ziniu.wang_1@....com>
To: Christoph Hellwig <hch@...radead.org>
CC: "axboe@...nel.dk" <axboe@...nel.dk>, "ulf.hansson@...aro.org"
	<ulf.hansson@...aro.org>, "linux-block@...r.kernel.org"
	<linux-block@...r.kernel.org>, "linux-mmc@...r.kernel.org"
	<linux-mmc@...r.kernel.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>, "imx@...ts.linux.dev" <imx@...ts.linux.dev>
Subject: RE: [EXT] Re: [PATCH v2 1/2] block: decouple secure erase size limit
 from discard size limit



> -----Original Message-----
> From: Christoph Hellwig <hch@...radead.org>
> Sent: Monday, December 15, 2025 11:43 PM
> To: Luke Wang <ziniu.wang_1@....com>
> Cc: axboe@...nel.dk; ulf.hansson@...aro.org; linux-block@...r.kernel.org;
> linux-mmc@...r.kernel.org; linux-kernel@...r.kernel.org; imx@...ts.linux.dev
> Subject: [EXT] Re: [PATCH v2 1/2] block: decouple secure erase size limit from
> discard size limit
> 
> Caution: This is an external email. Please take care when clicking links or
> opening attachments. When in doubt, report the message using the 'Report this
> email' button
> 
> 
> > --- a/block/blk-merge.c
> > +++ b/block/blk-merge.c
> > @@ -169,8 +169,13 @@ struct bio *bio_split_discard(struct bio *bio, const
> struct queue_limits *lim,
> >
> >       granularity = max(lim->discard_granularity >> 9, 1U);
> >
> > -     max_discard_sectors =
> > -             min(lim->max_discard_sectors, bio_allowed_max_sectors(lim));
> > +     if (bio_op(bio) == REQ_OP_SECURE_ERASE)
> > +             max_discard_sectors = min(lim->max_secure_erase_sectors,
> > +                                       bio_allowed_max_sectors(lim));
> > +     else
> > +             max_discard_sectors = min(lim->max_discard_sectors,
> > +                                       bio_allowed_max_sectors(lim));
> 
> Please factor our a low-level helper and pass the max_sectors
> as argument.

I'm not sure I get your point. Do you mean helper function like get_max_io_size()? 
Or do you mean something different?  Please explain in more detail.

Thanks,
Luke



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ