From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Return-Path: Date: Tue, 16 Apr 2019 20:51:33 +0300 From: Cyrill Gorcunov Subject: Re: [PATCH v2] core/coio_file: Use eio_sendfile_sync instead of a chunk mode Message-ID: <20190416175133.GK13702@uranus.lan> References: <20190415211410.20562-1-gorcunov@gmail.com> <20190416173510.4nxxdsqg7drrlnhe@esperanza> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190416173510.4nxxdsqg7drrlnhe@esperanza> To: Vladimir Davydov Cc: tml List-ID: On Tue, Apr 16, 2019 at 08:35:10PM +0300, Vladimir Davydov wrote: > > - Proper testing of large files remains opened: current CI engine > > is hardly capable of managing it. I tested 200M files with manual > > splitting (to make sure the offsets do really work) but for longterm > > we still might need to invent something > > We could use an error injection to reduce the size of data fed to > sendfile in one go. I don't remember if I already asked -- mind to point me where our error injection examples are? > > - Another question which remains -- what to do with partially copied > > files, neither code before the patch or after do not clean up parts > > of copied data. Should not we clean it up on error path? If yes then > > I'll prepare another patch on top. > > Nobody complained => I don't think we need to do anything about it. ok > > + for (left = st.st_size, pos = 0; left > 0;) { > > st.st_size has time off_t while left has type ssize_t. They differ on > 32-bit machines AFAIR. Well, not exactly. It depends on __USE_FILE_OFFSET64 definition but true, better to be on a safe side and use off_t type instead. Thanks, will update!