[PATCH v2] Btrfs: optimize function btrfs_read_chunk_tree

2013-07-29 Thread Filipe David Borba Manana
After reading all device items from the chunk tree, don't exit the loop and then navigate down the tree again to find the chunk items. Instead just read all device items and chunk items with a single tree search. This is possible because all device items are found before any chunk item in the

Re: [PATCH v2] Btrfs: optimize function btrfs_read_chunk_tree

2013-07-29 Thread Miao Xie
On mon, 29 Jul 2013 19:22:34 +0100, Filipe David Borba Manana wrote: After reading all device items from the chunk tree, don't exit the loop and then navigate down the tree again to find the chunk items. Instead just read all device items and chunk items with a single tree search. This is