lkml.org 
[lkml]   [2020]   [Aug]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 2/3] block: Add a new helper to attempt to merge a bio
On Thu, Aug 27, 2020 at 11:44:15AM +0200, Christoph Hellwig wrote:
> On Tue, Aug 18, 2020 at 01:45:29PM +0800, Baolin Wang wrote:
> > Meanwhile move the blk_mq_bio_list_merge() into blk-merge.c and
> > rename it as a generic name.
>
> That should probably a separate patch.

Sure.

>
> > + if (blk_attempt_bio_merge(q, rq, bio, nr_segs, false) == BIO_MERGE_OK)
> > + return true;
>
> This adds an overly long line.

The checkpatch.pl has increased the default limit to 100 characters, so
I did not get a long line warning. Anyway I will change a new line if
you concern about this.

> > - if (merged)
> > + switch (blk_attempt_bio_merge(q, rq, bio, nr_segs, true)) {
> > + default:
> > + case BIO_MERGE_NONE:
> > + continue;
> > + case BIO_MERGE_OK:
> > return true;
> > + case BIO_MERGE_FAILED:
> > + return false;
> > + }
>
> I don't think we need a default statement here as we handle all
> possible values of the enum.

OK. Will remove it in next version. Thanks.

\
 
 \ /
  Last update: 2020-08-27 16:35    [W:0.043 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site