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]
Date:	Mon, 25 Apr 2016 22:32:17 +0200
From:	Lars Ellenberg <lars.ellenberg@...bit.com>
To:	Bart Van Assche <bart.vanassche@...disk.com>
Cc:	Philipp Reisner <philipp.reisner@...bit.com>,
	Jens Axboe <axboe@...com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"drbd-dev@...ts.linbit.com" <drbd-dev@...ts.linbit.com>
Subject: [PATCH 11/30] drbd: when receiving P_TRIM, zero-out partial
 unaligned chunks

On Mon, Apr 25, 2016 at 09:37:28AM -0700, Bart Van Assche wrote:
> On 04/25/2016 05:13 AM, Philipp Reisner wrote:
> >+	while (nr_sectors >= granularity) {
> >+		nr = min_t(sector_t, nr_sectors, max_discard_sectors);
> >+		err |= blkdev_issue_discard(bdev, start, nr, GFP_NOIO, 0);
> >+		nr_sectors -= nr;
> >+		start += nr;
> >+	}
> 
> Hello Phil,
> 
> In blk_bio_discard_split() the following statement protects against
> block drivers for which max_discard_sectors is not a multiple of the
> discard granularity:
> 
> 	max_discard_sectors -= max_discard_sectors % granularity;
> 
> Do we need something similar in the above loop?

Right. Did not realize that was "legal".

> To Jens: should the drbd_issue_discard_or_zero_out() function go
> upstream or should rather what this function does be integrated in
> blkdev_issue_zeroout() as is done by the patch series
> "[PATCH v2 0/6] Make blkdev_issue_discard() submit aligned discard requests"
> (http://thread.gmane.org/gmane.linux.kernel.device-mapper.devel/23801)?

Thanks,
    Lars


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ