From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tomas Hruby Subject: readdir & bonnie++ Date: Fri, 2 Jun 2006 01:33:34 +0200 Message-ID: <20060601233334.GA506@fspc268> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from top.few.vu.nl ([130.37.20.4]:52684 "EHLO top.few.vu.nl") by vger.kernel.org with ESMTP id S1750950AbWFAX37 (ORCPT ); Thu, 1 Jun 2006 19:29:59 -0400 To: linux-fsdevel@vger.kernel.org Content-Disposition: inline Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org Hi all, I was testing our fs project using the bonnie++ tool and the following issue came up. Bonnie++ creates a directory with 16384 files. Then it calls readdir in a loop to read all the entries and calls stat for each. The test fails since only 16383 entries were returned (one is missing). According to my logs our readdir calls filldir on the last item as well. Also strace says that all entries were returned. But the last one is missing. Moreover if I use ls -l on the same directory, all 16384 entries are returned. I don't know what is the difference between the readdir loop in bonnie++ and in ls, but I expect a similar loop. Perhaps using getdents direcly? Thanks for any suggestions, cheers, Tomas