Re: [PATCH 12/12] Btrfs: Fix file clone when source offset is not 0

2012-02-01 Thread Yan, Zheng
On Thu, Feb 2, 2012 at 1:31 PM, Li Zefan wrote: > Yan, Zheng wrote: >> On Thu, Jan 27, 2011 at 4:46 PM, Li Zefan wrote: >>> Suppose: >>> - the source extent is: [0, 100] >>> - the src offset is 10 >>> - the clone length is 90 >>> - the dest offset is 0 >>> >>> This statement: >>> >>>        new_k

Re: [PATCH 12/12] Btrfs: Fix file clone when source offset is not 0

2012-02-01 Thread Li Zefan
Yan, Zheng wrote: > On Thu, Jan 27, 2011 at 4:46 PM, Li Zefan wrote: >> Suppose: >> - the source extent is: [0, 100] >> - the src offset is 10 >> - the clone length is 90 >> - the dest offset is 0 >> >> This statement: >> >>new_key.offset = key.offset + destoff - off >> >> will produce suc

Re: [PATCH 12/12] Btrfs: Fix file clone when source offset is not 0

2012-02-01 Thread Yan, Zheng
On Mon, Jan 30, 2012 at 6:03 PM, Jan Schmidt wrote: > On 30.01.2012 07:33, Li Zefan wrote: >> Jan Schmidt wrote: >>> I was looking at the clone range ioctl and have some remarks: >>> >>> On 27.01.2011 09:46, Li Zefan wrote: diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index f87552a..

Re: [PATCH 12/12] Btrfs: Fix file clone when source offset is not 0

2012-02-01 Thread Yan, Zheng
On Thu, Jan 27, 2011 at 4:46 PM, Li Zefan wrote: > Suppose: > - the source extent is: [0, 100] > - the src offset is 10 > - the clone length is 90 > - the dest offset is 0 > > This statement: > >        new_key.offset = key.offset + destoff - off > > will produce such an extent for the dest file:

Re: [3.2.1] BUG at fs/btrfs/inode.c:1588

2012-02-01 Thread Kai Krakow
Kai Krakow schrieb: > Interestingly, the filesystem was not unmountable - system hung. After > reisub and checking again with "btrfs scrub" no errors where reported and > it just rsync'ed fine this time. This does not make sense to me. btrfsck still shows a lot of errors, while scrubbing says ev

Re: brtfs on top of dmcrypt with SSD. No corruption iff write cache off?

2012-02-01 Thread Marc MERLIN
On Wed, Feb 01, 2012 at 12:56:24PM -0500, Chris Mason wrote: > > Second, I was wondering if anyone is running btrfs over dmcrypt on an SSD > > and what the performance is like with write cache turned off (I'm actually > > not too sure what the impact is for SSDs considering that writing to flash >

Re: [3.2.1] BUG at fs/btrfs/inode.c:1588

2012-02-01 Thread Kai Krakow
Interestingly, the filesystem was not unmountable - system hung. After reisub and checking again with "btrfs scrub" no errors where reported and it just rsync'ed fine this time. This does not make sense to me. In any case here's my backup script although I see nothing special with it: #!/bin/ba

Re: btrfs bug

2012-02-01 Thread Mitch Harder
On Tue, Jan 31, 2012 at 11:20 PM, Thomas Weber wrote: > Hello Mitch, > > I have good news for you. I looked through all log files and found in the > everything.log the following: > > Regards, > Thomas > > > Jan 31 05:12:24 localhost kernel: [87276.968049] btrfs memmove bogus > src_offset 1870 move

Re: brtfs on top of dmcrypt with SSD. No corruption iff write cache off?

2012-02-01 Thread Chris Mason
On Sun, Jan 29, 2012 at 04:37:54PM -0800, Marc MERLIN wrote: > Howdy, > > I'm considering using brtfs for my new laptop install. > > Encryption is however a requirement, and ecryptfs doesn't quite cut it for > me, so that leaves me with dmcrypt which is what I've been using with > ext3/ext4 for y

Re: [PATCH 12/12] Btrfs: Fix file clone when source offset is not 0

2012-02-01 Thread Li Zefan
Jan Schmidt wrote: > On 30.01.2012 07:33, Li Zefan wrote: >> Jan Schmidt wrote: >>> I was looking at the clone range ioctl and have some remarks: >>> >>> On 27.01.2011 09:46, Li Zefan wrote: diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index f87552a..1b61dab 100644 --- a/fs/btrfs

Re: [PATCH] Btrfs: allow cloning ranges within the same file

2012-02-01 Thread Li Zefan
>> It's safe and easy to do so, provided the ranges don't overlap. >> >> Signed-off-by: Li Zefan >> --- >> fs/btrfs/ioctl.c | 23 --- >> 1 files changed, 16 insertions(+), 7 deletions(-) >> >> diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c >> index 0b06a5c..8fcd671 100644