From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpng2.m.smailru.net (smtpng2.m.smailru.net [94.100.179.3]) (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 7329B43040C for ; Thu, 27 Aug 2020 17:07:00 +0300 (MSK) Date: Thu, 27 Aug 2020 17:06:58 +0300 From: "Alexander V. Tikhonov" Message-ID: <20200827140658.GA16950@hpalx> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [Tarantool-patches] [PATCH v1] vinyl: fix check vinyl_dir existence at bootstrap List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Aleksandr Lyapunov Cc: tarantool-patches@dev.tarantool.org Hi Alexander, thanks for the review. I've made all changes as you suggested, please check the new version of the patch. On Thu, Aug 27, 2020 at 03:28:39PM +0300, Aleksandr Lyapunov wrote: > Hi! Thanks for the patch! See 2 minor comments below. > > On 21.08.2020 07:56, Alexander V. Tikhonov wrote: > > As mentioned above xdir_scan() function is not system call and can be > > changed in any possible way and it can return any result value without > > need to setup errno. So check outside of this function on errno could > > be broken. > > > > To avoid of it we must avoid of errno checks outside of the function. > I would say "To avoid that we must not check errno after call of the > function." > > diff --git a/src/box/xlog.c b/src/box/xlog.c > > index 6ccd3d68d..74f761994 100644 > > --- a/src/box/xlog.c > > +++ b/src/box/xlog.c > > @@ -511,13 +511,15 @@ xdir_open_cursor(struct xdir *dir, int64_t signature, > > * @return nothing. > > */ > > int > > -xdir_scan(struct xdir *dir) > > +xdir_scan(struct xdir *dir, bool is_dir_required) > The function comment also needs fixing. > The new argument must have a description. > The comment was already wrong though, it doesn't describe return value. > Another problem is that the comment should be near function > declaration (in xlog.h file) rather than definition. > I would be glad if you fixed it. >