From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 71D757030C; Fri, 5 Mar 2021 11:16:05 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 71D757030C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1614932165; bh=UHGGDxHftYCDm6LhFAVNLE59UZTjW9i+qqczVCl2g0g=; h=To:References:Date:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=o2aVmSHaeqKnC1pw+299tDZueYVw+JNtIZfktoLCgS69pPc2tbbTVzONPEnKCF5W+ f0M9rdmLwjS5Oei5Y87DWh/O63gHyOsgwYF4RXM3mA9LcFbDCG7WAaBO1qVN+OjGJc ORQlHVwudUfNATxwf3EIyKmKNbuNKXZoz9prElYc= Received: from smtpng1.m.smailru.net (smtpng1.m.smailru.net [94.100.181.251]) (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 83CD57030C for ; Fri, 5 Mar 2021 11:16:03 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 83CD57030C Received: by smtpng1.m.smailru.net with esmtpa (envelope-from ) id 1lI5cw-0006lh-72; Fri, 05 Mar 2021 11:16:02 +0300 To: Cyrill Gorcunov , tml References: <20210304142515.65862-1-gorcunov@gmail.com> Message-ID: Date: Fri, 5 Mar 2021 11:16:01 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 MIME-Version: 1.0 In-Reply-To: <20210304142515.65862-1-gorcunov@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD92A98208ECBDD29F53C67B51776BDF06B42C99BEA79D1033B182A05F5380850402FB86202ABFBBEC04573783B299FA6F478B6F723494842DB7A821D01538C31B8 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7C59BC9C499248573C2099A533E45F2D0395957E7521B51C2CFCAF695D4D8E9FCEA1F7E6F0F101C6778DA827A17800CE71EEA4C46C73542F4EA1F7E6F0F101C67CDEEF6D7F21E0D1D174C73DBBBFC7664849A9E1B1F87641719AC665B26411297A70A1EA83E94A1BD389733CBF5DBD5E913377AFFFEAFD269176DF2183F8FC7C0DEC8C2C8BCD2534D8941B15DA834481FCF19DD082D7633A0EF3E4896CB9E6436389733CBF5DBD5E9D5E8D9A59859A8B6BAA8CD687FCDB2EBCC7F00164DA146DA6F5DAA56C3B73B23C77107234E2CFBA567F23339F89546C55F5C1EE8F4F765FCE6442E3802DF3A9875ECD9A6C639B01BBD4B6F7A4D31EC0BC0CAF46E325F83A522CA9DD8327EE4937D44B9357DF42DBB5E1C53F199C2BB95B5C8C57E37DE458B4C7702A67D5C3316FA3894348FB808DB48C21F01D89DB561574AF45C6390F7469DAA53EE0834AAEE X-C1DE0DAB: 0D63561A33F958A5B58591FD5B5CAA194D2047D2DB0DC13B4D3D815F70ADAF7FD59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA75448CF9D3A7B2C848410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34F7CC4EA888783AE022EB06A7E33308055BD6E5C7553EA9E3CF45AEB2B22B93F6C0425D4AF3E66D8D1D7E09C32AA3244C41D335FA99ACA5BF766D81048F950D6F97FE24653F78E668927AC6DF5659F194 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojXmjzTEesUQEuYFNyNOzcrw== X-Mailru-Sender: 689FA8AB762F73936BC43F508A063822DBF383A9FCBC2155BDD733226586D90D768B24048D282DA2530DB6A6B741C87FFB559BB5D741EB9687DA18E135A33682FD657A8799238ED567EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH] xlog: fix arguments processing in commit 8e429f4b7 X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Aleksandr Lyapunov via Tarantool-patches Reply-To: Aleksandr Lyapunov Cc: Alexander Turenko Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Hi! thanks for the patch! Actually we found the error an fixed it in #5823. You can see identical commit 733081f7042974f8fee9431e46cd45d2f1601438 . But again thanks for your cooperation! On 04.03.2021 17:25, Cyrill Gorcunov wrote: > The order of evaluation of arguments passed to a function > is not a part of language standart but compiler specifics. > Thus make sure we pass proper "errno" to xdir_say_gc. > > Note that this is not critical issue: in case of hit > we simply get wrong syserror message when file not > present on a storage device. > > Reported-by: Aleksandr Lyapunov > Signed-off-by: Cyrill Gorcunov > --- > Guys, I didn't create a branch for this fix since it is not > critical and there is no issue for it. Even if the problem > occurs it won't affect the workflow so it is rather a cosmetic > fix. > > src/box/xlog.c | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > > diff --git a/src/box/xlog.c b/src/box/xlog.c > index 974f460be..462245d27 100644 > --- a/src/box/xlog.c > +++ b/src/box/xlog.c > @@ -684,10 +684,13 @@ xdir_collect_garbage(struct xdir *dir, int64_t signature, unsigned flags) > vclock_sum(vclock) < signature) { > const char *filename = > xdir_format_filename(dir, vclock_sum(vclock), NONE); > - if (flags & XDIR_GC_ASYNC) > + if (flags & XDIR_GC_ASYNC) { > eio_unlink(filename, 0, xdir_complete_gc, NULL); > - else > - xdir_say_gc(unlink(filename), errno, filename); > + } else { > + int rc = unlink(filename); > + int _errno = rc != 0 ? errno : 0; > + xdir_say_gc(rc, _errno, filename); > + } > vclockset_remove(&dir->index, vclock); > free(vclock); >