[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-tar] --sparse is broken on filesystems where small files may ha
From: |
Pavel Raiskup |
Subject: |
Re: [Bug-tar] --sparse is broken on filesystems where small files may have zero blocks |
Date: |
Tue, 29 Oct 2013 16:27:02 +0100 |
User-agent: |
KMail/4.11.2 (Linux/3.11.6-200.fc19.x86_64; KDE/4.11.2; x86_64; ; ) |
On Tuesday, October 29, 2013 09:59:56 Pavel Raiskup wrote:
> > #define ST_IS_SPARSE(st) \
> > (ST_NBLOCKS (st) \
> > - < ((st).st_size / ST_NBLOCKSIZE + ((st).st_size % ST_NBLOCKSIZE != 0)))
> > + < ((st).st_size / ST_NBLOCKSIZE \
> > + + ((st).st_size % ST_NBLOCKSIZE != 0 \
> > + && (st).st_size / ST_NBLOCKSIZE != 0)))
>
> May the st.st_size / ST_NBLOCKSIZE be greater than 1 and data still stored
> in inode directly? Seems like on ext4 filesystem it is not possible [1]
> but does anybody know about exception?
>
> [1] https://ext4.wiki.kernel.org/index.php/Ext4_Disk_Layout#Inline_Data
Well, I now recalled somehow relevant Red Hat bug, sorry I have not
mentioned it before:
https://bugzilla.redhat.com/show_bug.cgi?id=757557
CC'ing fs-devel: The question is whether that ^^^^ is not a bug in
filesystem — whether filesystem should not _always_ return to fstat()
block count at least 1 if there are at least some data (even if these data
are inlined in inode)? Just for catching the context, this thread starts
here: http://lists.gnu.org/archive/html/bug-tar/2013-10/msg00030.html
If that is not a bug in fs, is there possible to detect that particular
file is completely sparse?
Pavel
- [Bug-tar] --sparse is broken on filesystems where small files may have zero blocks, Andrew J. Schorr, 2013/10/28
- Re: [Bug-tar] --sparse is broken on filesystems where small files may have zero blocks, Paul Eggert, 2013/10/29
- Re: [Bug-tar] --sparse is broken on filesystems where small files may have zero blocks, Pavel Raiskup, 2013/10/29
- Re: [Bug-tar] --sparse is broken on filesystems where small files may have zero blocks,
Pavel Raiskup <=
- Re: [Bug-tar] --sparse is broken on filesystems where small files may have zero blocks, Joerg Schilling, 2013/10/29
- Re: [Bug-tar] --sparse is broken on filesystems where small files may have zero blocks, Christoph Hellwig, 2013/10/30
- Re: [Bug-tar] --sparse is broken on filesystems where small files may have zero blocks, Jan Kara, 2013/10/30
- Re: [Bug-tar] --sparse is broken on filesystems where small files may have zero blocks, Andreas Dilger, 2013/10/29
- Re: [Bug-tar] --sparse is broken on filesystems where small files may have zero blocks, Carlos Maiolino, 2013/10/31
Re: [Bug-tar] --sparse is broken on filesystems where small files may have zero blocks, Andrew J. Schorr, 2013/10/29