On Fri, Mar 26, 2010 at 11:40:51AM +0800, Yan, Zheng wrote:
> On Thu, Mar 25, 2010 at 9:06 PM, Kirill A. Shutemov
> wrote:
> > On lastest Linus' git.
> >
> > [ 4005.426805] BUG: unable to handle kernel NULL pointer dereference at
> > 0021
> > [ 4005.426818] IP: [] page_cache_sync_readahead+0
On Thu, Mar 25, 2010 at 9:06 PM, Kirill A. Shutemov
wrote:
> On lastest Linus' git.
>
> [ 4005.426805] BUG: unable to handle kernel NULL pointer dereference at
> 0021
> [ 4005.426818] IP: [] page_cache_sync_readahead+0x18/0x3e
> [ 4005.426837] *pde =
> [ 4005.426844] Oops: [#1]
Andi Kleen wrote:
> On Wed, Mar 24, 2010 at 11:08:07PM -0400, jim owens wrote:
>> Agree, so the write design needs to prevent bad checksums.
>
> How? Do you have a plan for that?
Yes... have Josef do it. ;)
The options I considered are:
1 - buffer always for uncompressed, the same as compressed.
fs/btrfs/ioctl.c: ctree.h is included more than once.
Signed-off-by: Andrea Gelmini
---
fs/btrfs/ioctl.c |1 -
1 files changed, 0 insertions(+), 1 deletions(-)
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index 2845c6c..5c9f8b3 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -48
On lastest Linus' git.
[ 4005.426805] BUG: unable to handle kernel NULL pointer dereference at 0021
[ 4005.426818] IP: [] page_cache_sync_readahead+0x18/0x3e
[ 4005.426837] *pde =
[ 4005.426844] Oops: [#1] PREEMPT SMP
[ 4005.426854] last sysfs file:
/sys/devices/LNXSYSTM:00/LNXSY
On Thu, Mar 25, 2010 at 08:27:26PM +0800, Miao Xie wrote:
> From: Zhao Lei
>
> We don't need to convert PAGE_CACHE_SIZE to u64 in bit operation.
For code like this:
u64 size = (some number that doesn't fit in 32 bits)
if (size & (PAGE_CACHE_SIZE - 1)) {
}
The answer should be the same either
From: Miao Xie
btrfsctl returns 1 if it does something successfully. this patch fixes this
problem.
Signed-off-by: Miao Xie
---
btrfsctl.c |4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/btrfsctl.c b/btrfsctl.c
index be6bf25..e2aae17 100644
--- a/btrfsctl.c
+++ b/bt
From: Zhao Lei
When we compile btrfs-progs in RHEL5(with default gcc version 4.1.2 20070626),
we can get following error:
cc1: warnings being treated as errors
btrfs-list.c: In function 'find_updated_files':
btrfs-list.c:668: warning: 'disk_offset' may be used uninitialized in this
function
btr
From: Zhao Lei
When we compile btrfs-progs in RHEL5(with default gcc 4.1.2 and glibc-2.5-18),
we can get following error:
cc1: warnings being treated as errors
btrfs-list.c: In function 'ino_resolve':
btrfs-list.c:511: warning: implicit declaration of function 'strndup'
btrfs-list.c:511: warning
From: Miao Xie
try_release_extent_buffer() releases the first page of extent buffer early, and
it may cause oops, because extent_buffer_page() gets the other pages by the
first page's ->mapping. So we must release the first page at the end.
This patch fixes this problem. And In order to avoid ma
From: Miao Xie
if passing NULL to btrfs_free_path(),oops will happen. so we must check the
pointer passed to it.
Signed-off-by: Miao Xie
---
fs/btrfs/relocation.c |6 --
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c
index 0
From: Miao Xie
btrfs_find_create_tree_block() may return NULL, so we must check the returned
value, or we will access a NULL pointer.
Signed-off-by: Miao Xie
---
fs/btrfs/extent-tree.c |5 -
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/fs/btrfs/extent-tree.c b/fs/btrf
From: Miao Xie
ret in btrfs_search_forward() has been set to 1, so it is unnecessary to
set it to 1 again when some error happens.
Cleanup these redundant code.
Signed-off-by: Miao Xie
---
fs/btrfs/ctree.c | 12
1 files changed, 4 insertions(+), 8 deletions(-)
diff --git a/fs/
From: Zhao Lei
Remove a useless local variant and return it directly.
Signed-off-by: Zhao Lei
Signed-off-by: Miao Xie
---
fs/btrfs/disk-io.c |5 +
1 files changed, 1 insertions(+), 4 deletions(-)
diff --git a/fs/btrfs/disk-io.c b/fs/btrfs/disk-io.c
index 79d9196..731270f 100644
--- a
From: Zhao Lei
We only need to call finish_wait() after wait loop.
By the way, this patch makes code of waiting loop similar to
example in wait.h(no functional change)
Signed-off-by: Zhao Lei
Signed-off-by: Miao Xie
---
fs/btrfs/transaction.c | 15 +--
1 files changed, 5 insert
From: Zhao Lei
We need to check return value of btrfs_search_slot() in
btrfs_read_chunk_tree() and do corresponding error handing.
Signed-off-by: Zhao Lei
Signed-off-by: Miao Xie
---
fs/btrfs/volumes.c |2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/fs/btrfs/volumes.
From: Zhao Lei
This patch include following modify:
1: It isn't necessary to use following type of goto statement:
if (cow) {
if (!should_cow_block(trans, root, b))
goto cow_done;
...
}
cow_done:
...
2: Updating of p->nodes[level] is only necessa
From: Zhao Lei
start and end are never used in this function,
we don't need to declare them and calculate these value.
Signed-off-by: Zhao Lei
Signed-off-by: Miao Xie
---
fs/btrfs/extent_io.c |5 -
1 files changed, 0 insertions(+), 5 deletions(-)
diff --git a/fs/btrfs/extent_io.c b/f
From: Zhao Lei
read_extent_buffer_pages() should return error value instead of 0 when
lock page failed, we fix this problem.
Signed-off-by: Zhao Lei
Signed-off-by: Miao Xie
---
fs/btrfs/extent_io.c |4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/fs/btrfs/extent_io.
From: Zhao Lei
We can use this simple method to make source more readable.
Signed-off-by: Zhao Lei
Signed-off-by: Miao Xie
---
fs/btrfs/volumes.c |4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/fs/btrfs/volumes.c b/fs/btrfs/volumes.c
index 844c393..3ae1f42 100644
-
From: Zhao Lei
logical's value should be [em->start, em->start + em->len),
so we need to use
BUG_ON(em->start > logical || em->start + em->len <= logical);
instead of
BUG_ON(em->start > logical || em->start + em->len < logical);
Signed-off-by: Zhao Lei
Signed-off-by: Miao Xie
---
fs/btrfs
From: Zhao Lei
"prev_entry"'s value is same as "entry" in reference.
We can use "entry" only in these function without readability impact.
Signed-off-by: Zhao Lei
Signed-off-by: Miao Xie
---
fs/btrfs/extent_map.c | 14 ++
fs/btrfs/ordered-data.c | 16 +++-
2 file
From: Zhao Lei
num_copies's value is not changed in this function,
and it is not necessary to calculate its value multi-times.
Signed-off-by: Zhao Lei
Signed-off-by: Miao Xie
---
fs/btrfs/disk-io.c |5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/fs/btrfs/disk-io.c
From: Zhao Lei
btrfs_item_ptr is just a type_cast wrapper of btrfs_item_ptr_offset().
We can use btrfs_item_ptr_offset() in btrfs_item_ptr() to avoid code
duplication.
Signed-off-by: Zhao Lei
Signed-off-by: Miao Xie
---
fs/btrfs/ctree.h |6 ++
1 files changed, 2 insertions(+), 4 dele
From: Zhao Lei
It can decrease a additional address calculation and increase little speed.
Signed-off-by: Zhao Lei
Signed-off-by: Miao Xie
---
fs/btrfs/struct-funcs.c | 10 +-
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/fs/btrfs/struct-funcs.c b/fs/btrfs/struct-fu
From: Zhao Lei
It can decrease a additional address calculation and increase little speed.
Signed-off-by: Zhao Lei
Signed-off-by: Miao Xie
---
fs/btrfs/struct-funcs.c | 10 +-
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/fs/btrfs/struct-funcs.c b/fs/btrfs/struct-fu
From: Zhao Lei
We don't need to convert PAGE_CACHE_SIZE to u64 in bit operation.
Signed-off-by: Zhao Lei
Signed-off-by: Miao Xie
---
fs/btrfs/compression.c |2 +-
fs/btrfs/extent_io.c | 16
2 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/fs/btrfs/compre
On Wed, Mar 24, 2010 at 11:08:07PM -0400, jim owens wrote:
> Andi Kleen wrote:
> > > On Tue, Mar 23, 2010 at 05:40:00PM -0400, jim owens wrote:
> >> >> Andi Kleen wrote:
> >> >>
> >> >> With checksums enabled, uncompressed reads aligned on the 4k block
> >> >> are classic direct IO to user memory e
28 matches
Mail list logo