diff options
author | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2010-10-19 15:00:11 -0400 |
---|---|---|
committer | Artem Bityutskiy <Artem.Bityutskiy@nokia.com> | 2010-10-21 04:20:36 -0400 |
commit | fb22b59b2c38054cc847f6acc5c46daa26dc6dd3 (patch) | |
tree | 76025e34f0934b8e7186972e43849dc4a8f19606 /drivers/mtd/ubi/scan.h | |
parent | 5fc01ab6934c43b42c41bc753fe1123c16d7f38f (diff) |
UBI: remember copy_flag while scanning
While scanning the flash we read all VID headers and store some important
information in 'struct ubi_scan_leb'. Store also the 'copy_flag' value there
as it is needed when comparing LEBs. We do not increase memory consumption
because this is just one bit and we have plenty of spare bits in
'struct ubi_scan_leb' (sizeof(struct ubi_scan_leb) is 48 both with and
without this patch).
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'drivers/mtd/ubi/scan.h')
-rw-r--r-- | drivers/mtd/ubi/scan.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/mtd/ubi/scan.h b/drivers/mtd/ubi/scan.h index 12ac852c993b..a3264f0bef2b 100644 --- a/drivers/mtd/ubi/scan.h +++ b/drivers/mtd/ubi/scan.h | |||
@@ -30,6 +30,7 @@ | |||
30 | * @pnum: physical eraseblock number | 30 | * @pnum: physical eraseblock number |
31 | * @lnum: logical eraseblock number | 31 | * @lnum: logical eraseblock number |
32 | * @scrub: if this physical eraseblock needs scrubbing | 32 | * @scrub: if this physical eraseblock needs scrubbing |
33 | * @copy_flag: this LEB is a copy (@copy_flag is set in VID header of this LEB) | ||
33 | * @sqnum: sequence number | 34 | * @sqnum: sequence number |
34 | * @u: unions RB-tree or @list links | 35 | * @u: unions RB-tree or @list links |
35 | * @u.rb: link in the per-volume RB-tree of &struct ubi_scan_leb objects | 36 | * @u.rb: link in the per-volume RB-tree of &struct ubi_scan_leb objects |
@@ -42,7 +43,8 @@ struct ubi_scan_leb { | |||
42 | int ec; | 43 | int ec; |
43 | int pnum; | 44 | int pnum; |
44 | int lnum; | 45 | int lnum; |
45 | int scrub; | 46 | unsigned int scrub:1; |
47 | unsigned int copy_flag:1; | ||
46 | unsigned long long sqnum; | 48 | unsigned long long sqnum; |
47 | union { | 49 | union { |
48 | struct rb_node rb; | 50 | struct rb_node rb; |