Lines Matching full:physical
12 * physical eraseblocks and erase counters and knows nothing about logical
13 * eraseblocks, volumes, etc. From this sub-system's perspective all physical
14 * eraseblocks are of two types - used and free. Used physical eraseblocks are
15 * those that were "get" by the 'ubi_wl_get_peb()' function, and free physical
18 * Physical eraseblocks returned by 'ubi_wl_get_peb()' have only erase counter
19 * header. The rest of the physical eraseblock contains only %0xFF bytes.
21 * When physical eraseblocks are returned to the WL sub-system by means of the
27 * physical eraseblocks with low erase counter to free physical eraseblocks
30 * If the WL sub-system fails to erase a physical eraseblock, it marks it as
34 * in a physical eraseblock, it has to be moved. Technically this is the same
37 * As it was said, for the UBI sub-system all physical eraseblocks are either
42 * When the WL sub-system returns a physical eraseblock, the physical
44 * the physical eraseblock is not directly moved from the @wl->free tree to the
46 * physical eraseblock is temporarily stored (@wl->pq).
49 * o we don't want to move physical eraseblocks just after we have given them
52 * o there is a chance that the user will put the physical eraseblock very
55 * Physical eraseblocks stay protected only for limited time. But the "time" is
62 * To put it differently, each physical eraseblock has 2 main states: free and
71 * Depending on the sub-state, wear-leveling entries of the used physical
74 * Note, in this implementation, we keep a small in-RAM object for each physical
100 /* Number of physical eraseblocks reserved for wear-leveling purposes */
105 * exceeded, the WL sub-system starts moving data from used physical
106 * eraseblocks with low erase counter to free physical eraseblocks with high
112 * When a physical eraseblock is moved, the WL sub-system has to pick the target
113 * physical eraseblock to move to. The simplest way would be just to pick the
115 * to an unlimited wear of one or few physical eraseblock. Indeed, imagine a
116 * situation when the picked physical eraseblock is constantly erased after the
118 * counter of the free physical eraseblock to pick. Namely, the WL sub-system
141 * Note, we use (erase counter, physical eraseblock number) pairs as keys in
273 * prot_queue_add - add physical eraseblock to the protection queue.
275 * @e: the physical eraseblock to add
387 * Move the physical eraseblock to the protection queue where it will in wl_get_wle()
398 * prot_queue_del - remove a physical eraseblock from the protection queue.
400 * @pnum: the physical eraseblock to remove
422 * sync_erase - synchronously erase a physical eraseblock.
424 * @e: the the physical eraseblock to erase
425 * @torture: if the physical eraseblock has to be tortured
496 * There may be several protected physical eraseblock to remove, in serve_prot_queue()
595 * @e: the WL entry of the physical eraseblock to erase
598 * @torture: if the physical eraseblock has to be tortured
634 * @e: the WL entry of the physical eraseblock to erase
637 * @torture: if the physical eraseblock has to be tortured
666 * This function copies a more worn out physical eraseblock to a less worn out
697 * No free physical eraseblocks? Well, they must be waiting in
699 * triggered again when a free physical eraseblock appears.
701 * No used physical eraseblocks? They must be temporarily
732 * Now pick the least worn-out used physical eraseblock and a
733 * highly worn-out free physical eraseblock. If the erase
772 * Now we are going to copy physical eraseblock @e1->pnum to @e2->pnum.
773 * We so far do not know which logical eraseblock our physical
998 /* No physical eraseblocks - no deal */
1003 * lowest erase counter of used physical eraseblocks and a high
1004 * erase counter of free physical eraseblocks is greater than
1049 * erase_worker - physical eraseblock erase worker function.
1055 * This function erases a physical eraseblock and perform torture testing if
1056 * needed. It also takes care about marking the physical eraseblock bad if
1091 * protected physical eraseblocks.
1120 * this physical eraseblock for erasure again would cause
1128 ubi_err(ubi, "bad physical eraseblock %d detected", pnum);
1136 ubi_err(ubi, "no reserved/available physical eraseblocks");
1190 * @pnum: physical eraseblock to return
1191 * @torture: if this physical eraseblock has to be tortured
1193 * This function is called to return physical eraseblock @pnum to the pool of
1194 * free physical eraseblocks. The @torture flag has to be set if an I/O error
1215 * User is putting the physical eraseblock which was selected to
1228 * User is putting the physical eraseblock which was selected
1281 * ubi_wl_scrub_peb - schedule a physical eraseblock for scrubbing.
1283 * @pnum: the physical eraseblock to schedule
1285 * If a bit-flip in a physical eraseblock is detected, this physical eraseblock
1286 * needs scrubbing. This function schedules a physical eraseblock for
1307 * This physical eraseblock was used to move data to. The data
1635 ubi_err(ubi, "no enough physical eraseblocks (%d, need %d)",
1698 * @pnum: the physical eraseblock number to check
1701 * This function returns zero if the erase counter of physical eraseblock @pnum
1805 * produce_free_peb - produce a free physical eraseblock.
1832 * ubi_wl_get_peb - get a physical eraseblock.
1835 * This function returns a physical eraseblock in case of success and a