Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1386911
| From | Lars Ellenberg <lars.ellenberg@linbit.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH 11/30] drbd: when receiving P_TRIM, zero-out partial unaligned chunks |
| Date | 2016-04-25 23:30 +0200 |
| Message-ID | <rrWeS-49v-19@gated-at.bofh.it> (permalink) |
| References | <rrVsv-3wP-25@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, Apr 25, 2016 at 02:07:38PM +0200, Philipp Reisner wrote:
> + max_discard_sectors = min(q->limits.max_discard_sectors, (1U << 22));
> + max_discard_sectors -= max_discard_sectors % granularity;
^^^^ there
On Mon, Apr 25, 2016 at 10:32:17PM +0200, Lars Ellenberg wrote:
> 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".
Wait. We already have that. see above.
Lars
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 00/30] DBRD updates Philipp Reisner <philipp.reisner@linbit.com> - 2016-04-25 14:30 +0200
[PATCH 04/30] drbd: Implement handling of thinly provisioned storage on resync target nodes Philipp Reisner <philipp.reisner@linbit.com> - 2016-04-25 14:30 +0200
Re: [Drbd-dev] [PATCH 04/30] drbd: Implement handling of thinly provisioned storage on resync target nodes Philipp Reisner <philipp.reisner@linbit.com> - 2016-04-25 18:50 +0200
[PATCH 15/30] drbd: finish resync on sync source only by notification from sync target Philipp Reisner <philipp.reisner@linbit.com> - 2016-04-25 14:30 +0200
[PATCH 17/30] drbd: don't forget error completion when "unsuspending" IO Philipp Reisner <philipp.reisner@linbit.com> - 2016-04-25 14:30 +0200
[PATCH 05/30] drbd: Introduce new disk config option rs-discard-granularity Philipp Reisner <philipp.reisner@linbit.com> - 2016-04-25 14:30 +0200
Re: [Drbd-dev] [PATCH 05/30] drbd: Introduce new disk config option rs-discard-granularity Philipp Reisner <philipp.reisner@linbit.com> - 2016-04-25 18:50 +0200
Re: [Drbd-dev] [PATCH 05/30] drbd: Introduce new disk config option rs-discard-granularity Philipp Reisner <philipp.reisner@linbit.com> - 2016-04-25 21:50 +0200
[PATCH 05/30] drbd: Introduce new disk config option rs-discard-granularity Lars Ellenberg <lars.ellenberg@linbit.com> - 2016-04-25 22:40 +0200
[PATCH 28/30] drbd: finally report ms, not jiffies, in log message Philipp Reisner <philipp.reisner@linbit.com> - 2016-04-25 14:30 +0200
[PATCH 11/30] drbd: when receiving P_TRIM, zero-out partial unaligned chunks Philipp Reisner <philipp.reisner@linbit.com> - 2016-04-25 14:30 +0200
[PATCH 11/30] drbd: when receiving P_TRIM, zero-out partial unaligned chunks Lars Ellenberg <lars.ellenberg@linbit.com> - 2016-04-25 22:40 +0200
Re: [PATCH 11/30] drbd: when receiving P_TRIM, zero-out partial unaligned chunks Lars Ellenberg <lars.ellenberg@linbit.com> - 2016-04-25 23:30 +0200
[PATCH 24/30] drbd: disallow promotion during resync handshake, avoid deadlock and hard reset Philipp Reisner <philipp.reisner@linbit.com> - 2016-04-25 14:30 +0200
[PATCH 29/30] drbd: al_write_transaction: skip re-scanning of bitmap page pointer array Philipp Reisner <philipp.reisner@linbit.com> - 2016-04-25 14:30 +0200
[PATCH 10/30] drbd: allow parallel flushes for multi-volume resources Philipp Reisner <philipp.reisner@linbit.com> - 2016-04-25 14:30 +0200
csiph-web