From: Alexander Turenko <alexander.turenko@tarantool.org> To: Cyrill Gorcunov <gorcunov@gmail.com> Cc: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>, tml <tarantool-patches@dev.tarantool.org> Subject: Re: [Tarantool-patches] [PATCH] fio/coio: handle partial writes Date: Wed, 6 May 2020 20:08:18 +0300 [thread overview] Message-ID: <20200506170818.xhs2yda3oz6426az@tkn_work_nb> (raw) In-Reply-To: <20200421213930.28713-1-gorcunov@gmail.com> > issue https://github.com/tarantool/tarantool/issues/4651 > branch gorcunov/gh-4651-partial-write > diff --git a/src/lib/core/coio_file.c b/src/lib/core/coio_file.c > index e2345567c..e290214bc 100644 > --- a/src/lib/core/coio_file.c > +++ b/src/lib/core/coio_file.c > @@ -164,10 +164,30 @@ coio_file_close(int fd) > ssize_t > coio_pwrite(int fd, const void *buf, size_t count, off_t offset) > { In Febrary ([1]) we start discussing whether the loop should be in fio or in coio. coio_p?write() returns amount of written bytes, so it seems logical to keep it performing one write and move the loop to src/lua/fio.c. To be honest, I don't sure here. If you have a reason to keep the logic here, please, explain it. I'll CC Vlad, maybe he has more strong vision here. [1]: https://lists.tarantool.org/pipermail/tarantool-patches/2020-February/014403.html > @@ -201,6 +221,11 @@ static void > coio_do_write(eio_req *req) > { > struct coio_file_task *eio = (struct coio_file_task *)req->data; > + > + ERROR_INJECT(ERRINJ_COIO_WRITE_CHUNK, { > + eio->write.count = 1; > + }); Why not set it right in coio_write() to don't spread the logic? > diff --git a/test/app/fio.result b/test/app/fio.result > index 783fa4fab..73fbd29e5 100644 > --- a/test/app/fio.result > +++ b/test/app/fio.result > @@ -776,6 +776,12 @@ file5 = fio.pathjoin(tree, 'file.5') > file6 = fio.pathjoin(tree, 'file.6') > --- > ... > +file7 = fio.pathjoin(tree, 'file.7') > +--- > +... > +file8 = fio.pathjoin(tree, 'file.8') > +--- > +... Nit: SOP now requires to add a test file with gh-... name when fixing a bug.
next prev parent reply other threads:[~2020-05-06 17:08 UTC|newest] Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-04-21 21:39 Cyrill Gorcunov 2020-05-06 17:08 ` Alexander Turenko [this message] 2020-05-15 9:00 ` Cyrill Gorcunov 2020-06-09 16:55 ` Alexander Turenko 2020-06-09 22:55 ` Vladislav Shpilevoy 2020-06-09 22:55 ` Vladislav Shpilevoy 2020-06-10 7:52 ` Cyrill Gorcunov 2020-06-11 19:36 ` Vladislav Shpilevoy 2020-06-11 19:43 ` Cyrill Gorcunov 2020-06-11 19:56 ` Vladislav Shpilevoy 2020-06-11 20:12 ` Cyrill Gorcunov 2020-06-11 19:56 ` Vladislav Shpilevoy -- strict thread matches above, loose matches on Subject: below -- 2019-11-26 18:05 [Tarantool-patches] [PATCH] fio/coio: Handle " Cyrill Gorcunov 2019-12-04 9:44 ` 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=20200506170818.xhs2yda3oz6426az@tkn_work_nb \ --to=alexander.turenko@tarantool.org \ --cc=gorcunov@gmail.com \ --cc=tarantool-patches@dev.tarantool.org \ --cc=v.shpilevoy@tarantool.org \ --subject='Re: [Tarantool-patches] [PATCH] fio/coio: handle partial writes' \ /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