From owner-freebsd-stable@FreeBSD.ORG Tue Jul 7 07:10:28 2009 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 87E3A1065670 for ; Tue, 7 Jul 2009 07:10:28 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-fx0-f218.google.com (mail-fx0-f218.google.com [209.85.220.218]) by mx1.freebsd.org (Postfix) with ESMTP id 13D408FC15 for ; Tue, 7 Jul 2009 07:10:27 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: by fxm18 with SMTP id 18so3963961fxm.43 for ; Tue, 07 Jul 2009 00:10:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=o6kMaB53p+0MW8lic0F/vnOoCeu7goQdQ6hCsQ5NUuk=; b=ZPZZ3R/qAmbr84R7Ekg8jMjhwtoIYTvqKf9u/iOBH73CKem74FGHxWKOedhCpthpbL cdeJzxu4WLz93VHb/Txm1A4gMgUa8+PVwhtDuMhokU107dzeaYVxp18dKfBLSpK1ljhi kMugLIveeyrQVgK1KRjmz76+2Zq2YlZgHSXxg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=hPW9gSqvMfciIWjAiqZFav3yIFHNs27TcSap5joWyqbv011jx3JURNvSYv3cnRsQVJ 7QRzpwcvQfnCaJkUtu0Qsm4C/PfXl6MREPD37BYz85nKOBEvsE63PXGh6dg0DJWRIVdl b9O3TGNxFXWkicT2KqtHzg42vOzgQQ5RkuRA0= MIME-Version: 1.0 Received: by 10.204.58.79 with SMTP id f15mr5396522bkh.202.1246950626824; Tue, 07 Jul 2009 00:10:26 -0700 (PDT) In-Reply-To: <4A5275C0.50607@ksu.ru> References: <4A50E947.9020608@ksu.ru> <4A523518.7050008@gmx.de> <4A523849.1070001@ksu.ru> <20090706193653.GU2884@deviant.kiev.zoral.com.ua> <4A525B72.1010808@ksu.ru> <20090706203427.GZ2884@deviant.kiev.zoral.com.ua> <4A5275C0.50607@ksu.ru> Date: Tue, 7 Jul 2009 11:10:26 +0400 Message-ID: From: pluknet To: "Marat N.Afanasyev" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Kostik Belousov , FreeBSD-STABLE Mailing List Subject: Re: bug in ufs? X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Jul 2009 07:10:28 -0000 2009/7/7 Marat N.Afanasyev : > Kostik Belousov wrote: >> >> On Tue, Jul 07, 2009 at 12:15:46AM +0400, Marat N.Afanasyev wrote: >>> >>> Kostik Belousov wrote: >>>> >>>> On Mon, Jul 06, 2009 at 09:45:45PM +0400, Marat N.Afanasyev wrote: >>>>> >>>>> i have a huge amount of small files on the source systems, as you can >>>>> see they have about 20 million files and almost each of them is jpeg or gif. >>>>> afaik, there are no sparse files at all. >>>>> >>>>> i still cannot figure out what is it: a free space leak in ufs2+su or >>>>> bug in statfs(3), that is used in df, or something else. >>>> >>>> My guess that it is due to fragmentation. >>>> As an experiment, try to create 1-byte file. Does it work on the >>>> filesystem >>>> in described state ? >>> >>> I can create small files, as many as i have patience, maximum size of >>> such "small file" is 14336, so. it seems that if file is no greater than >>> (block_size-2048) it can be created. larger file cannot be created. >>> >>> imho, fragmentation on filesystem should be very low, there were no >>> deletions on it, just creations. >> >> The fragmentation on UFS usually means using fragments for the file tails, >> not having file sequential blocks allocated in the non-sequential disk >> blocks. >> >> You experiment confirms my hypothesis. > > i cannot create a slightly larger > file joining two unallocated parts of different blocks even if no fully free > block exists? ;) You can't. As far as I remember, ffs_alloc() tries to populate a number of whole blocks and then only packs a remain data tail into a partially allocated block (one, two, .. seven fragments), thus creating a block fragmentation. In other words, it's impossible to partially allocate several blocks for a one file. Can you show your dumpfs output (superblock part)? -- wbr, pluknet