Re: [RFC PATCH 3/4] Btrfs add readonly support for error handle

2010-11-25 Thread Miao Xie
On Thu, 25 Nov 2010 19:42:53 +0800, Wenyi Liu wrote: Hi Xie Miao: I cannot understand the btrfs_decode_error(). why you chose the three errnos? what about others? eager for Ur replay. Thanks!! I think liu chose these three errors is because these errors are familiar ones that are hard to b

Re: [patch] fs: fix deadlocks in writeback_if_idle

2010-11-25 Thread Andrew Morton
On Thu, 25 Nov 2010 11:41:50 +0200 Boaz Harrosh wrote: > On 11/25/2010 12:47 AM, Andrew Morton wrote: > > On Tue, 23 Nov 2010 07:34:07 -0500 > > Chris Mason wrote: > > > >> For btrfs there's only one bdi per SB, but for most everyone else a disk > >> with a bunch of partitions is going to have

Re: hard links across snapshots/subvolumes are actually a bad idea.

2010-11-25 Thread Tomasz Chmielewski
I'm just not certain whether bcp works across subvolumes or not. It doesn't seem to work across subvolumes. -- Tomasz Chmielewski http://wpkg.org -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info

Re: [RFC PATCH 3/4] Btrfs add readonly support for error handle

2010-11-25 Thread Wenyi Liu
Hi Xie Miao: I cannot understand the btrfs_decode_error(). why you chose the three errnos? what about others? eager for Ur replay. Thanks!! --- Best Regards, Liu Wenyi 2010/11/25, Miao Xie : > From: Liu Bo > > This patch provide a new error handle interface for those errors that > handled >

Re: [RFC PATCH 0/4] Add readonly support to replace BUG_ON phrase

2010-11-25 Thread Wenyi Liu
2010/11/25, Miao Xie : > Btrfs has a number of BUG_ON()s, which may lead btrfs to unpleasant panic. > Meanwhile, they are very ugly and should be handled more propriately. > > There are mainly two ways to deal with these BUG_ON()s. Yes, I agree. > > 1. For those errors which can be handled well by

Re: VFS support for fast copy on deduplicating FSes

2010-11-25 Thread Pádraig Brady
On 25/11/10 10:32, Tomasz Torcz wrote: > On Thu, Nov 25, 2010 at 04:19:17AM -0600, David Nicol wrote: >> unresearched question/suggestion: >> >> Is there general support for a "fast copy" ioctl in the VFS layer, >> which would be hooked by file systems that support COW or other forms >> of deduplic

Re: VFS support for fast copy on deduplicating FSes

2010-11-25 Thread Gordan Bobic
David Nicol wrote: unresearched question/suggestion: Is there general support for a "fast copy" ioctl in the VFS layer, which would be hooked by file systems that support COW or other forms of deduplication and can provide copy semantics by manipulating metadata only? What would be nice to hav

Re: VFS support for fast copy on deduplicating FSes

2010-11-25 Thread Tomasz Torcz
On Thu, Nov 25, 2010 at 04:19:17AM -0600, David Nicol wrote: > unresearched question/suggestion: > > Is there general support for a "fast copy" ioctl in the VFS layer, > which would be hooked by file systems that support COW or other forms > of deduplication and can provide copy semantics by manip

VFS support for fast copy on deduplicating FSes

2010-11-25 Thread David Nicol
unresearched question/suggestion: Is there general support for a "fast copy" ioctl in the VFS layer, which would be hooked by file systems that support COW or other forms of deduplication and can provide copy semantics by manipulating metadata only? -- "It is merely a matter of persistence." --

[RFC PATCH 1/4] Btrfs: add filesystem state for error handle

2010-11-25 Thread Miao Xie
From: Liu Bo Add filesystem state and two flags of it to tell if the filesystem is valid or insane now. Signed-off-by: Liu Bo Signed-off-by: Miao Xie --- fs/btrfs/ctree.h | 13 + 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/fs/btrfs/ctree.h b/fs/btrfs/ctree.h

[RFC PATCH 4/4] Btrfs: deal with filesystem state at mount, umount and remount

2010-11-25 Thread Miao Xie
From: Liu Bo Since there is a filesystem state, we should deal with it carefully at mount, umount and remount. - At mount, the FS state should be checked if there is error on these FS. If it does have, btrfsck is recommended. - At umount, the FS state should be saved into disk for consistency

[RFC PATCH 2/4] Btrfs: add MS_RDONLY to avoid backgroud writeback

2010-11-25 Thread Miao Xie
From: Liu Bo When the filesystem is readonly, commit transaction is forbiddened. Signed-off-by: Liu Bo Signed-off-by: Miao Xie --- fs/btrfs/transaction.c |7 +++ 1 files changed, 7 insertions(+), 0 deletions(-) diff --git a/fs/btrfs/transaction.c b/fs/btrfs/transaction.c index 1fffbc

[RFC PATCH 0/4] Add readonly support to replace BUG_ON phrase

2010-11-25 Thread Miao Xie
Btrfs has a number of BUG_ON()s, which may lead btrfs to unpleasant panic. Meanwhile, they are very ugly and should be handled more propriately. There are mainly two ways to deal with these BUG_ON()s. 1. For those errors which can be handled well by callers, we just return their error number to c

[RFC PATCH 3/4] Btrfs add readonly support for error handle

2010-11-25 Thread Miao Xie
From: Liu Bo This patch provide a new error handle interface for those errors that handled by current BUG_ONs. In order to protect btrfs from panic, when it comes to those BUG_ON errors, the interface forces btrfs readonly and saves the FS state to disk. And the filesystem can be umounted, alth

Re: [patch] fs: fix deadlocks in writeback_if_idle

2010-11-25 Thread Boaz Harrosh
On 11/25/2010 12:47 AM, Andrew Morton wrote: > On Tue, 23 Nov 2010 07:34:07 -0500 > Chris Mason wrote: > >> For btrfs there's only one bdi per SB, but for most everyone else a disk >> with a bunch of partitions is going to have multiple filesystems on the >> same bdi. > > um, please explain why

Re: hard links across snapshots/subvolumes are actually a bad idea.

2010-11-25 Thread David Nicol
>> "COW hardlinks" are ref-links (as far as I'm concerned).  I said >> partially implemented, because that's exactly what a snapshot is.  I'm >> just not certain whether bcp works across subvolumes or not.  An >> actual hardlink (i.e., all writes appear in all hardlinks) across any >> file-system-l

Re: hard links across snapshots/subvolumes are actually a bad idea.

2010-11-25 Thread Gordan Bobic
cwillu wrote: One thing I would like to see is copy-on-write hard-links. The hard-links that span snapshots should be possible, but they should be copy-on-write, i.e. as soon as hard-linked file that spans snapshots is written, the snapshot that wrote it should have it's own forked copy hencefort