From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mout.kundenserver.de ([212.227.17.24]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Y1YxW-00056X-Fv for linux-mtd@lists.infradead.org; Thu, 18 Dec 2014 11:09:31 +0000 MIME-Version: 1.0 Message-ID: From: "markus.heininger@online.de" To: hujianyang Subject: Aw: Re: UBIFS: Is it possible to get the compressed size of a file? Content-Type: text/plain; charset=UTF-8 Date: Thu, 18 Dec 2014 12:08:54 +0100 In-Reply-To: <54912109.50505@huawei.com> References: , <54912109.50505@huawei.com> Content-Transfer-Encoding: quoted-printable Cc: linux-mtd@lists.infradead.org, Artem Bityutskiy List-Id: Linux MTD discussion mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Hello, in our system we=C2=B4re using ring buffers where it is necessary to remove old files from certain directories when the physical usage of each directory is above a certain level which is different for each=20 folder. Evaluating the output of "df" after write access might be difficult since there are several concurrent writing processes. But many thanks for your answer, it seems that there is no easy way to get the information needed and we must investigate further on our own. With best regards, Markus Gesendet:=C2=A0Mittwoch, 17. Dezember 2014 um 07:22 Uhr Von:=C2=A0hujianyang An:=C2=A0"markus.heininger@online.de" Cc:=C2=A0linux-mtd@lists.infradead.org, "Artem Bityutskiy" Betreff:=C2=A0Re: UBIFS: Is it possible to get the compressed size of a fi= le? On 2014/12/12 16:10, markus.heininger@online.de wrote: > Hello, > > when using compression along with UBIfs, fstat reports the uncompressed = file size > (as it should do). Is there a simple way to get the compressed file size= , thus the real space > a single file needs on the flash memory? Why you need this? I know *df* shows the space of a partition. Run *sync* after a file created or appended, the space change of this partition maybe could show you the compressed size of this file. Is that enough for you? > > Many thanks, > Markus > =C2=A0