[PATCH] swap: show span of swap extents

The "Adding %dk swap" message shows the number of swap extents, as a guide to
how fragmented the swapfile may be.  But a useful further guide is what total
extent they span across (sometimes scarily large).

And there's no need to keep nr_extents in swap_info: it's unused after the
initial message, so save a little space by keeping it on stack.

Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Hugh Dickins
2005-09-03 15:54:34 -07:00
committed by Linus Torvalds
parent 11d31886db
commit 53092a7402
2 changed files with 30 additions and 15 deletions

View File

@ -123,7 +123,6 @@ struct swap_info_struct {
struct file *swap_file;
struct block_device *bdev;
struct list_head extent_list;
int nr_extents;
struct swap_extent *curr_swap_extent;
unsigned old_block_size;
unsigned short * swap_map;