How to understand dm-writecache/memory_entry

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Mikulas,

Sorry to trouble you again.

I'm reading the source code of dm-writecache, and noticed:
-----------------------------------------------------
static struct wc_memory_entry *memory_entry(struct dm_writecache *wc, struct wc_entry *e)
{
	if (is_power_of_2(sizeof(struct wc_entry)) && 0)    // why this?
		return &sb(wc)->entries[e - wc->entries];
	else
		return &sb(wc)->entries[e->index];
}

Seems there is something wrong with the if condition, right?

Thanks,
shenghui


--
dm-devel mailing list
dm-devel@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/dm-devel



[Index of Archives]     [DM Crypt]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Packaging]     [Fedora SELinux]     [Yosemite Discussion]     [KDE Users]     [Fedora Docs]

  Powered by Linux