lkml.org 
[lkml]   [2016]   [Apr]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [Drbd-dev] [PATCH 11/30] drbd: when receiving P_TRIM, zero-out partial unaligned chunks
From
Date
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?

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,

Bart.

\
 
 \ /
  Last update: 2016-04-25 18:41    [W:0.228 / U:0.304 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site