* Redundant check in verify_parent_transid
@ 2009-06-30 5:24 TARUISI Hiroaki
0 siblings, 0 replies; only message in thread
From: TARUISI Hiroaki @ 2009-06-30 5:24 UTC (permalink / raw)
To: linux-btrfs
Hi,
In verify_parent_transid() of disk-io.c (btrfs-progs), I found
redundant check.
---
static int verify_parent_transid(struct extent_io_tree *io_tree,
struct extent_buffer *eb, u64 parent_transid)
{
int ret;
if (!parent_transid || btrfs_header_generation(eb) == parent_transid)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
---
If second check is true in this sentense, then the function return.
So the next if sentence is not estimated.
---
return 0;
if (extent_buffer_uptodate(eb) &&
btrfs_header_generation(eb) == parent_transid) {
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ret = 0;
goto out;
}
---
However, here has same check which looks redundant.
I guess here includes a bug, but I'm not sure.
Could someone tell me why?
---
printk("parent transid verify failed on %llu wanted %llu found %llu\n",
(unsigned long long)eb->start,
(unsigned long long)parent_transid,
(unsigned long long)btrfs_header_generation(eb));
ret = 1;
---(snip)---
--
taruisi
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2009-06-30 5:24 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-30 5:24 Redundant check in verify_parent_transid TARUISI Hiroaki
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.