From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from albireo.enyo.de (albireo.enyo.de [37.24.231.21]) by sourceware.org (Postfix) with ESMTPS id 802C53893661 for ; Fri, 24 Apr 2020 13:08:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 802C53893661 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=deneb.enyo.de Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=fw@deneb.enyo.de Received: from [172.17.203.2] (helo=deneb.enyo.de) by albireo.enyo.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) id 1jRy45-00075m-1v; Fri, 24 Apr 2020 13:08:21 +0000 Received: from fw by deneb.enyo.de with local (Exim 4.92) (envelope-from ) id 1jRy44-0000KT-SW; Fri, 24 Apr 2020 15:08:20 +0200 From: Florian Weimer To: Adhemerval Zanella Cc: Adhemerval Zanella via Libc-alpha Subject: Re: [PATCH 02/10] linux: Simplify opendir buffer allocation References: <20200417132209.22065-1-adhemerval.zanella@linaro.org> <20200417132209.22065-2-adhemerval.zanella@linaro.org> <875zdtuo8g.fsf@mid.deneb.enyo.de> <87zhb1b3bp.fsf@mid.deneb.enyo.de> Date: Fri, 24 Apr 2020 15:08:20 +0200 In-Reply-To: (Adhemerval Zanella's message of "Fri, 24 Apr 2020 09:08:49 -0300") Message-ID: <87lfml9gl7.fsf@mid.deneb.enyo.de> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-8.8 required=5.0 tests=BAYES_00, KAM_DMARC_STATUS, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Apr 2020 13:08:24 -0000 * Adhemerval Zanella: > On 24/04/2020 07:11, Florian Weimer wrote: >> * Adhemerval Zanella via Libc-alpha: >> >>>> This looks okay to me. I wonder if we should just use 32 KiB >>>> uncodintionally, though? >>> >>> Do you mean instead of '4 * BUFSIZ'? >> >> Yes. I assumed BUFSIZ was 8192. >> > > Alright, I can make this change. Any opinion whether we should keep > 32 KiB or increase/decrease it? Sorry, I think it should be a separate change. Lowering the buffer size will unfortunately expose application bugs when applications modify the directory while iterating through it using readdir. (musl sees more such bugs due to its smaller buffer size.)