aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/ubi/ubi-media.h
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2008-07-18 06:53:39 -0400
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2008-07-24 06:36:09 -0400
commit9869cd801c107bbae91663c3f4edbb6b5715919f (patch)
tree1e3b8bb14e4895a425de05a0547d733c8fbf2007 /drivers/mtd/ubi/ubi-media.h
parentebaaf1af3e9ef05c4fb7c61e4530c15e1ad10e3b (diff)
UBI: remove pre-sqnum images support
Before UBI got into mainline, there was a slight flash format change - we did not have sequence number support, then added it. We have carried full support of those ancient images till this moment. Now the support is removed, well, not fully removed. Now UBI will support only _clean_ old images, which were cleanly detached last time (just before kernel upgrade). This is most likely the case. But we will not support unclean ancient images. Surprisingly, this allows us to remove a big chunk of legacy code. And the same should be true for downgrading: clean images should downgrade fine, but unclean ones will not. Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'drivers/mtd/ubi/ubi-media.h')
-rw-r--r--drivers/mtd/ubi/ubi-media.h17
1 files changed, 6 insertions, 11 deletions
diff --git a/drivers/mtd/ubi/ubi-media.h b/drivers/mtd/ubi/ubi-media.h
index 26bb7af9787a..2ad940409053 100644
--- a/drivers/mtd/ubi/ubi-media.h
+++ b/drivers/mtd/ubi/ubi-media.h
@@ -168,16 +168,15 @@ struct ubi_ec_hdr {
168 * %UBI_COMPAT_IGNORE, %UBI_COMPAT_PRESERVE, or %UBI_COMPAT_REJECT) 168 * %UBI_COMPAT_IGNORE, %UBI_COMPAT_PRESERVE, or %UBI_COMPAT_REJECT)
169 * @vol_id: ID of this volume 169 * @vol_id: ID of this volume
170 * @lnum: logical eraseblock number 170 * @lnum: logical eraseblock number
171 * @leb_ver: version of this logical eraseblock (IMPORTANT: obsolete, to be 171 * @padding1: reserved for future, zeroes
172 * removed, kept only for not breaking older UBI users)
173 * @data_size: how many bytes of data this logical eraseblock contains 172 * @data_size: how many bytes of data this logical eraseblock contains
174 * @used_ebs: total number of used logical eraseblocks in this volume 173 * @used_ebs: total number of used logical eraseblocks in this volume
175 * @data_pad: how many bytes at the end of this physical eraseblock are not 174 * @data_pad: how many bytes at the end of this physical eraseblock are not
176 * used 175 * used
177 * @data_crc: CRC checksum of the data stored in this logical eraseblock 176 * @data_crc: CRC checksum of the data stored in this logical eraseblock
178 * @padding1: reserved for future, zeroes
179 * @sqnum: sequence number
180 * @padding2: reserved for future, zeroes 177 * @padding2: reserved for future, zeroes
178 * @sqnum: sequence number
179 * @padding3: reserved for future, zeroes
181 * @hdr_crc: volume identifier header CRC checksum 180 * @hdr_crc: volume identifier header CRC checksum
182 * 181 *
183 * The @sqnum is the value of the global sequence counter at the time when this 182 * The @sqnum is the value of the global sequence counter at the time when this
@@ -225,10 +224,6 @@ struct ubi_ec_hdr {
225 * checksum is correct, this physical eraseblock is selected (P1). Otherwise 224 * checksum is correct, this physical eraseblock is selected (P1). Otherwise
226 * the older one (P) is selected. 225 * the older one (P) is selected.
227 * 226 *
228 * Note, there is an obsolete @leb_ver field which was used instead of @sqnum
229 * in the past. But it is not used anymore and we keep it in order to be able
230 * to deal with old UBI images. It will be removed at some point.
231 *
232 * There are 2 sorts of volumes in UBI: user volumes and internal volumes. 227 * There are 2 sorts of volumes in UBI: user volumes and internal volumes.
233 * Internal volumes are not seen from outside and are used for various internal 228 * Internal volumes are not seen from outside and are used for various internal
234 * UBI purposes. In this implementation there is only one internal volume - the 229 * UBI purposes. In this implementation there is only one internal volume - the
@@ -278,14 +273,14 @@ struct ubi_vid_hdr {
278 __u8 compat; 273 __u8 compat;
279 __be32 vol_id; 274 __be32 vol_id;
280 __be32 lnum; 275 __be32 lnum;
281 __be32 leb_ver; /* obsolete, to be removed, don't use */ 276 __u8 padding1[4];
282 __be32 data_size; 277 __be32 data_size;
283 __be32 used_ebs; 278 __be32 used_ebs;
284 __be32 data_pad; 279 __be32 data_pad;
285 __be32 data_crc; 280 __be32 data_crc;
286 __u8 padding1[4]; 281 __u8 padding2[4];
287 __be64 sqnum; 282 __be64 sqnum;
288 __u8 padding2[12]; 283 __u8 padding3[12];
289 __be32 hdr_crc; 284 __be32 hdr_crc;
290} __attribute__ ((packed)); 285} __attribute__ ((packed));
291 286