diff options
author | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2012-05-14 12:49:35 -0400 |
---|---|---|
committer | Artem Bityutskiy <artem.bityutskiy@linux.intel.com> | 2012-05-20 13:25:59 -0400 |
commit | 4415626732defb5a4567a0a757c7c5baae7ca846 (patch) | |
tree | 31b02e4a1882d243f5fbc8599dae8fac66d917fb | |
parent | a65a0eb6d198e058687a9214683bd1c418f20d39 (diff) |
UBI: amend commentaries WRT dtype
Richard removed the "dtype" hint, but few commentaries were left and this patch
removes them. I've also added a better description about the "dtype" field in
the ubi-user.h for people who may ever wonder what was that dtype thing about.
This patch also adds an important note that it is better to use value "3" for
the "dtype" field.
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
-rw-r--r-- | drivers/mtd/ubi/wl.c | 9 | ||||
-rw-r--r-- | fs/ubifs/super.c | 5 | ||||
-rw-r--r-- | include/mtd/ubi-user.h | 11 |
3 files changed, 14 insertions, 11 deletions
diff --git a/drivers/mtd/ubi/wl.c b/drivers/mtd/ubi/wl.c index f0bc10743bc0..64ce9930dacb 100644 --- a/drivers/mtd/ubi/wl.c +++ b/drivers/mtd/ubi/wl.c | |||
@@ -41,12 +41,6 @@ | |||
41 | * physical eraseblocks with low erase counter to free physical eraseblocks | 41 | * physical eraseblocks with low erase counter to free physical eraseblocks |
42 | * with high erase counter. | 42 | * with high erase counter. |
43 | * | 43 | * |
44 | * The 'ubi_wl_get_peb()' function accepts data type hints which help to pick | ||
45 | * an "optimal" physical eraseblock. For example, when it is known that the | ||
46 | * physical eraseblock will be "put" soon because it contains short-term data, | ||
47 | * the WL sub-system may pick a free physical eraseblock with low erase | ||
48 | * counter, and so forth. | ||
49 | * | ||
50 | * If the WL sub-system fails to erase a physical eraseblock, it marks it as | 44 | * If the WL sub-system fails to erase a physical eraseblock, it marks it as |
51 | * bad. | 45 | * bad. |
52 | * | 46 | * |
@@ -70,8 +64,7 @@ | |||
70 | * to the user; instead, we first want to let users fill them up with data; | 64 | * to the user; instead, we first want to let users fill them up with data; |
71 | * | 65 | * |
72 | * o there is a chance that the user will put the physical eraseblock very | 66 | * o there is a chance that the user will put the physical eraseblock very |
73 | * soon, so it makes sense not to move it for some time, but wait; this is | 67 | * soon, so it makes sense not to move it for some time, but wait. |
74 | * especially important in case of "short term" physical eraseblocks. | ||
75 | * | 68 | * |
76 | * Physical eraseblocks stay protected only for limited time. But the "time" is | 69 | * Physical eraseblocks stay protected only for limited time. But the "time" is |
77 | * measured in erase cycles in this case. This is implemented with help of the | 70 | * measured in erase cycles in this case. This is implemented with help of the |
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c index d7cbf7aabdb7..001acccac0d6 100644 --- a/fs/ubifs/super.c +++ b/fs/ubifs/super.c | |||
@@ -814,9 +814,8 @@ static int alloc_wbufs(struct ubifs_info *c) | |||
814 | } | 814 | } |
815 | 815 | ||
816 | /* | 816 | /* |
817 | * Garbage Collector head likely contains long-term data and | 817 | * Garbage Collector head does not need to be synchronized by timer. |
818 | * does not need to be synchronized by timer. Also GC head nodes are | 818 | * Also GC head nodes are not grouped. |
819 | * not grouped. | ||
820 | */ | 819 | */ |
821 | c->jheads[GCHD].wbuf.no_timer = 1; | 820 | c->jheads[GCHD].wbuf.no_timer = 1; |
822 | c->jheads[GCHD].grouped = 0; | 821 | c->jheads[GCHD].grouped = 0; |
diff --git a/include/mtd/ubi-user.h b/include/mtd/ubi-user.h index 370c750115ce..8787349fbafe 100644 --- a/include/mtd/ubi-user.h +++ b/include/mtd/ubi-user.h | |||
@@ -358,7 +358,17 @@ struct ubi_rnvol_req { | |||
358 | * requests. | 358 | * requests. |
359 | * @lnum: logical eraseblock number to change | 359 | * @lnum: logical eraseblock number to change |
360 | * @bytes: how many bytes will be written to the logical eraseblock | 360 | * @bytes: how many bytes will be written to the logical eraseblock |
361 | * @dtype: pass "3" for better compatibility with old kernels | ||
361 | * @padding: reserved for future, not used, has to be zeroed | 362 | * @padding: reserved for future, not used, has to be zeroed |
363 | * | ||
364 | * The @dtype field used to inform UBI about what kind of data will be written | ||
365 | * to the LEB: long term (value 1), short term (value 2), unknown (value 3). | ||
366 | * UBI tried to pick a PEB with lower erase counter for short term data and a | ||
367 | * PEB with higher erase counter for long term data. But this was not really | ||
368 | * used because users usually do not know this and could easily mislead UBI. We | ||
369 | * removed this feature in May 2012. UBI currently just ignores the @dtype | ||
370 | * field. But for better compatibility with older kernels it is recommended to | ||
371 | * set @dtype to 3 (unknown). | ||
362 | */ | 372 | */ |
363 | struct ubi_leb_change_req { | 373 | struct ubi_leb_change_req { |
364 | __s32 lnum; | 374 | __s32 lnum; |
@@ -369,6 +379,7 @@ struct ubi_leb_change_req { | |||
369 | 379 | ||
370 | /** | 380 | /** |
371 | * struct ubi_map_req - a data structure used in map LEB requests. | 381 | * struct ubi_map_req - a data structure used in map LEB requests. |
382 | * @dtype: pass "3" for better compatibility with old kernels | ||
372 | * @lnum: logical eraseblock number to unmap | 383 | * @lnum: logical eraseblock number to unmap |
373 | * @padding: reserved for future, not used, has to be zeroed | 384 | * @padding: reserved for future, not used, has to be zeroed |
374 | */ | 385 | */ |