From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp32.i.mail.ru (smtp32.i.mail.ru [94.100.177.92]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 4303D45C304 for ; Thu, 17 Dec 2020 02:18:15 +0300 (MSK) References: <09684330fa61f01381f05bbbc0e49e567a8a14a7.1607696813.git.lvasiliev@tarantool.org> <7cc08d39-0bb3-3ac5-f426-8d54d33c808b@tarantool.org> From: Leonid Vasiliev Message-ID: Date: Thu, 17 Dec 2020 02:17:13 +0300 MIME-Version: 1.0 In-Reply-To: <7cc08d39-0bb3-3ac5-f426-8d54d33c808b@tarantool.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Tarantool-patches] [PATCH v2 1/3] sql: add missing diag_set on failure when working with files inside SQL module List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Vladislav Shpilevoy , imeevma@tarantool.org, korablev@tarantool.org, sergos@tarantool.org, m.semkin@corp.mail.ru Cc: Mergen Imeev , tarantool-patches@dev.tarantool.org Hi! Thank you for the review. On 16.12.2020 01:12, Vladislav Shpilevoy wrote: > Thanks for the fixes! > > What about missing diag in robust_ftruncate()? > > In findInodeInfo() you can get -1 from fstat(). > > unixFileLock() can return -1 from fcntl(). > > seekAndRead() and seekAndWriteFd() can return -1 > from lseek() and read(). > > fcntlSizeHint() and unixMapfile() can return -1 > from fstat(). > > unixGetTempname() can return -1, but I don't see if > it even sets errno. errno can be set inside `unixTempFileDir()`. This will cause `unixGetTempname()` return -1. > > getFileMode() can return -1 from stat(). > > unixDelete() can return -1 from unlink(), fstat() > > I suggest to fix everything. It is all in one file and all > is related. Ok. Fix everything. I don't mind. See PATCH v3 >