Tarantool development patches archive
 help / color / mirror / Atom feed
From: Cyrill Gorcunov <gorcunov@gmail.com>
To: Vladimir Davydov <vdavydov.dev@gmail.com>
Cc: tml <tarantool-patches@freelists.org>
Subject: Re: [PATCH 1/3] core/coio_file: Use eio_sendfile_sync instead of a chunk mode
Date: Thu, 18 Apr 2019 21:50:22 +0300	[thread overview]
Message-ID: <20190418185022.GK3040@uranus.lan> (raw)
In-Reply-To: <20190418184155.2junklpawlvucyjh@esperanza>

On Thu, Apr 18, 2019 at 09:41:55PM +0300, Vladimir Davydov wrote:
> 
> The patch looks fine, but we typically don't split tests from the code
> when submitting a patch, i.e. I'd squash all the three patches in one.

ok

> Also, after having added a new error injection, you have to update
> box/errinj.result. Please do.

Ah, will do, tahnks!

> Also, please check that app/fio.test.lua works fine when Tarantool is
> built in Release mode. The thing is we typically disable tests using
> error injections for Release builds, because they don't work there
> (see suite.ini:release_disabled). I assume the test case you submitted
> should pass even without the error injection, nevertheless better check
> that.

Sure, thanks!

> > diff --git a/src/lib/core/coio_file.c b/src/lib/core/coio_file.c
> > index c5b2db781..20053558e 100644
> > --- a/src/lib/core/coio_file.c
> > +++ b/src/lib/core/coio_file.c
> > @@ -571,7 +571,7 @@ static void
> >  coio_do_copyfile(eio_req *req)
> >  {
> >  	struct coio_file_task *eio = (struct coio_file_task *)req->data;
> > -
> > +	off_t pos, ret, left;
> 
> Nit: We don't have a requirement to define all variables in the
> beginning of a code block. I'd define these variables right before
> the 'for' loop where they are used.

Yes, I noticed that, though personally I prefer to declare them early
(after all compiler highly likely will sub stack space at the
 procedure's start). Actually "define right before use" has a caveat:
implicit vars shadowing which is not always warned. Thus if this is
a code style violation I will change it of course, hmm?

	Cyrill

  reply	other threads:[~2019-04-18 18:50 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-16 20:08 [PATCH v3 0/3] core/coio_file: Use eio_sendfile_sync for file copying Cyrill Gorcunov
2019-04-16 20:08 ` [PATCH 1/3] core/coio_file: Use eio_sendfile_sync instead of a chunk mode Cyrill Gorcunov
2019-04-18 18:41   ` Vladimir Davydov
2019-04-18 18:50     ` Cyrill Gorcunov [this message]
2019-04-16 20:08 ` [PATCH 2/3] core/coio_file: Add ERRINJ_COIO_SENDFILE_CHUNK error injection Cyrill Gorcunov
2019-04-16 20:08 ` [PATCH 3/3] test: app/fio -- Add ERRINJ_COIO_SENDFILE_CHUNK Cyrill Gorcunov
2019-04-16 21:40   ` [PATCH v4 " Cyrill Gorcunov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190418185022.GK3040@uranus.lan \
    --to=gorcunov@gmail.com \
    --cc=tarantool-patches@freelists.org \
    --cc=vdavydov.dev@gmail.com \
    --subject='Re: [PATCH 1/3] core/coio_file: Use eio_sendfile_sync instead of a chunk mode' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox