Re: [PATCH] Btrfs: fix off-by-one in lseek

2013-04-30 Thread David Sterba
On Wed, Jan 09, 2013 at 12:34:45PM +0800, Liu Bo wrote: Thanks for coding this up, I've checked the code, these messages can be fixed by the following, please check if it works on your side :) diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 1b319df..1688669 100644 ---

Re: [PATCH] Btrfs: fix off-by-one in lseek

2013-01-10 Thread Liu Bo
On Thu, Jan 10, 2013 at 12:04:58PM +0100, David Sterba wrote: On Thu, Jan 10, 2013 at 10:17:49AM +0800, Liu Bo wrote: Thanks for the report, could you please show me what options you're using? Default mkfs, mount options 'space_cache,noatime', 40G test partition, 10G scratch partition

Re: [PATCH] Btrfs: fix off-by-one in lseek

2013-01-09 Thread David Sterba
On Wed, Jan 09, 2013 at 12:34:45PM +0800, Liu Bo wrote: [20191.948060] D: __set_extent_bit isize = 0 odd range [774144,7384799041917984768) [20191.956581] D: clear_extent_bit isize = 0 odd range [774144,7384799041917984768) so I'm not sending it as a separate patch yet until the

Re: [PATCH] Btrfs: fix off-by-one in lseek

2013-01-09 Thread David Sterba
On Wed, Jan 09, 2013 at 12:50:25PM +0100, David Sterba wrote: I've added only the 2 fixes from you, no other change. I'll do another test based on current btrfs-next. reproduced on linus/master + btrfs-next + debugging patch + your fixes with test 068 [ 1285.152973] [ cut here

Re: [PATCH] Btrfs: fix off-by-one in lseek

2013-01-09 Thread Liu Bo
On Wed, Jan 09, 2013 at 12:50:25PM +0100, David Sterba wrote: On Wed, Jan 09, 2013 at 12:34:45PM +0800, Liu Bo wrote: [20191.948060] D: __set_extent_bit isize = 0 odd range [774144,7384799041917984768) [20191.956581] D: clear_extent_bit isize = 0 odd range

Re: [PATCH] Btrfs: fix off-by-one in lseek

2013-01-08 Thread David Sterba
On Tue, Jan 08, 2013 at 10:46:38AM +0800, Liu Bo wrote: On Mon, Jan 07, 2013 at 05:20:50PM +0100, David Sterba wrote: On Mon, Jan 07, 2013 at 11:53:08AM +0800, Liu Bo wrote: Fix looks ok. I think this should be caught at runtime as well, the number of ways how the lock start and end are

Re: [PATCH] Btrfs: fix off-by-one in lseek

2013-01-08 Thread David Sterba
On Tue, Jan 08, 2013 at 09:30:54AM +0100, David Sterba wrote: On Tue, Jan 08, 2013 at 10:46:38AM +0800, Liu Bo wrote: Hmm, not always here, lockend = inode-i_size - 1, so lockend % 2 == 1 may not be true. Yeah, that's the case that must be handled, But this check can worked in those

Re: [PATCH] Btrfs: fix off-by-one in lseek

2013-01-08 Thread Liu Bo
On Tue, Jan 08, 2013 at 06:26:27PM +0100, David Sterba wrote: On Tue, Jan 08, 2013 at 09:30:54AM +0100, David Sterba wrote: On Tue, Jan 08, 2013 at 10:46:38AM +0800, Liu Bo wrote: Hmm, not always here, lockend = inode-i_size - 1, so lockend % 2 == 1 may not be true. Yeah, that's

Re: [PATCH] Btrfs: fix off-by-one in lseek

2013-01-07 Thread David Sterba
On Mon, Jan 07, 2013 at 11:53:08AM +0800, Liu Bo wrote: Lock end is inclusive. Signed-off-by: Liu Bo bo.li@oracle.com --- fs/btrfs/file.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 77061bf..1e16b6d 100644 ---

Re: [PATCH] Btrfs: fix off-by-one in lseek

2013-01-07 Thread Liu Bo
On Mon, Jan 07, 2013 at 05:20:50PM +0100, David Sterba wrote: On Mon, Jan 07, 2013 at 11:53:08AM +0800, Liu Bo wrote: Lock end is inclusive. Signed-off-by: Liu Bo bo.li@oracle.com --- fs/btrfs/file.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git

[PATCH] Btrfs: fix off-by-one in lseek

2013-01-06 Thread Liu Bo
Lock end is inclusive. Signed-off-by: Liu Bo bo.li@oracle.com --- fs/btrfs/file.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/fs/btrfs/file.c b/fs/btrfs/file.c index 77061bf..1e16b6d 100644 --- a/fs/btrfs/file.c +++ b/fs/btrfs/file.c @@ -2241,6 +2241,7 @@ static