Re: zero-length files in snapshots

2010-02-12 Thread Josef Bacik
On Thu, Feb 11, 2010 at 08:50:48PM -0800, Mike Fedyk wrote: On Thu, Feb 11, 2010 at 7:11 PM, Chris Ball c...@laptop.org wrote:   echo x1 /mnt/x/d/foo.txt || exit 2   btrfsctl -s /mnt/x/snap /mnt/x/d You're just missing a sync/fsync() between these two lines. We argued on IRC a

Re: zero-length files in snapshots

2010-02-12 Thread Mike Fedyk
On Fri, Feb 12, 2010 at 7:19 AM, Josef Bacik jo...@redhat.com wrote: On Thu, Feb 11, 2010 at 08:50:48PM -0800, Mike Fedyk wrote: On Thu, Feb 11, 2010 at 7:11 PM, Chris Ball c...@laptop.org wrote:   echo x1 /mnt/x/d/foo.txt || exit 2   btrfsctl -s /mnt/x/snap /mnt/x/d You're just

Re: zero-length files in snapshots

2010-02-12 Thread Josef Bacik
On Fri, Feb 12, 2010 at 08:18:01AM -0800, Mike Fedyk wrote: On Fri, Feb 12, 2010 at 7:19 AM, Josef Bacik jo...@redhat.com wrote: On Thu, Feb 11, 2010 at 08:50:48PM -0800, Mike Fedyk wrote: On Thu, Feb 11, 2010 at 7:11 PM, Chris Ball c...@laptop.org wrote:   echo x1 /mnt/x/d/foo.txt ||

Re: zero-length files in snapshots

2010-02-12 Thread Mike Fedyk
On Fri, Feb 12, 2010 at 8:22 AM, Josef Bacik jo...@redhat.com wrote: On Fri, Feb 12, 2010 at 08:18:01AM -0800, Mike Fedyk wrote: On Fri, Feb 12, 2010 at 7:19 AM, Josef Bacik jo...@redhat.com wrote: On Thu, Feb 11, 2010 at 08:50:48PM -0800, Mike Fedyk wrote: On Thu, Feb 11, 2010 at 7:11 PM,

Re: zero-length files in snapshots

2010-02-12 Thread Josef Bacik
On Fri, Feb 12, 2010 at 08:27:00AM -0800, Mike Fedyk wrote: On Fri, Feb 12, 2010 at 8:22 AM, Josef Bacik jo...@redhat.com wrote: On Fri, Feb 12, 2010 at 08:18:01AM -0800, Mike Fedyk wrote: On Fri, Feb 12, 2010 at 7:19 AM, Josef Bacik jo...@redhat.com wrote: On Thu, Feb 11, 2010 at

Re: zero-length files in snapshots

2010-02-12 Thread Josef Bacik
On Fri, Feb 12, 2010 at 12:22:12PM -0600, Ravi Pinjala wrote: On 02/12/10 09:19, Josef Bacik wrote: On Thu, Feb 11, 2010 at 08:50:48PM -0800, Mike Fedyk wrote: On Thu, Feb 11, 2010 at 7:11 PM, Chris Ballc...@laptop.org wrote: echo x1 /mnt/x/d/foo.txt || exit 2 btrfsctl -s

[PATCH 2/2] btrfs: a new tool to manage a btrfs filesystem - man page

2010-02-12 Thread Goffredo Baroncelli
This is the man page of the btrfs command. diff --git a/man/Makefile b/man/Makefile index 4e8893b..4a90b75 100644 --- a/man/Makefile +++ b/man/Makefile @@ -7,13 +7,16 @@ mandir = $(prefix)/man man8dir = $(mandir)/man8 MANPAGES = mkfs.btrfs.8.gz btrfsctl.8.gz btrfsck.8.gz btrfs-image.8.gz \ -

Re: zero-length files in snapshots

2010-02-12 Thread Chris Ball
Hi, Is there a race in there? It seems like if a process starts modifying a file between the sync and the snapshot, data could still be lost. Is there something else going on here that I'm missing that would prevent this race? AIUI, you're correct that a writer process concurrent

Re: zero-length files in snapshots

2010-02-12 Thread Christoph Hellwig
On Fri, Feb 12, 2010 at 10:19:40AM -0500, Josef Bacik wrote: 3) sync - this is not as obvious. sync doesn't mean anything than start writing back dirty data to the fs, and returns before it's done. For btrfs what that means is we run through _every_ inode that has delalloc pages associated

Re: [PATCH 0/2] btrfs: a new tool to manage a btrfs filesystem

2010-02-12 Thread Mike Fedyk
On Fri, Feb 12, 2010 at 11:01 AM, Goffredo Baroncelli kreij...@gmail.com wrote: Usage:        btrfs delete|-D subvolume                Delete the subvolume subvolume.        btrfs defrag|-d file|dir [file|dir...]                Defragment a file or a directory. I think the short options

Re: btrfs-vol -b endless loop

2010-02-12 Thread Pär Andersson
Yan, Zheng yanzh...@21cn.com writes: The loop is due to fragments of free space. I'm working on make 'btrfs-vol -b' return -ENOSPC in this case. If I remember correctly the filesystem had 3G free space according to df, which I know is not reliable on btrfs. After removing one 540M file

Re: Kernel BUG on mounting BtrFS / after reboot

2010-02-12 Thread Mike Fedyk
On Fri, Feb 12, 2010 at 1:04 PM, Alex Elsayed eternal...@gmail.com wrote: I'm getting a rather nasty BUG when I try to mount this filesystem, _including_ when I specify -o ro. I'm unsure what caused it, but the problem manifested after my computer hardlocked while reading my RSS feeds, complete