Lines Matching full:volume

11  * This file includes volume table manipulation code. The volume table is an
12 * on-flash table containing volume meta-data like name, number of reserved
13 * physical eraseblocks, type, etc. The volume table is stored in the so-called
14 * "layout volume".
16 * The layout volume is an internal volume which is organized as follows. It
18 * eraseblock stores one volume table copy, i.e. LEB 0 and LEB 1 duplicate each
19 * other. This redundancy guarantees robustness to unclean reboots. The volume
20 * table is basically an array of volume table records. Each record contains
21 * full information about the volume and protected by a CRC checksum. Note,
22 * nowadays we use the atomic LEB change operation when updating the volume
26 * When the volume table is changed, it is first changed in RAM. Then LEB 0 is
27 * erased, and the updated volume table is written back to LEB 0. Then same for
30 * In this UBI implementation the on-flash volume table does not contain any
33 * But it would still be beneficial to store this information in the volume
34 * table. For example, suppose we have a static volume X, and all its physical
37 * corresponding to the volume X. According to the volume table volume X does
41 * The volume table also stores so-called "update marker", which is used for
42 * volume updates. Before updating the volume, the update marker is set, and
45 * update marker is still there and we know that the volume's contents is
63 /* Empty volume table record */
87 * ubi_change_vtbl_record - change volume table record.
90 * @vtbl_rec: new volume table record
92 * This function changes volume table record @idx. If @vtbl_rec is %NULL, empty
93 * volume table record is written. The caller does not have to calculate CRC of
120 * ubi_vtbl_rename_volumes - rename UBI volumes in the volume table.
124 * This function re-names multiple volumes specified in @req in the volume
157 * vtbl_check - check if volume table is not corrupted and sensible.
159 * @vtbl: volume table
281 ubi_err(ubi, "volume table check failed: record %d, error %d", i, err);
287 * create_vtbl - create a copy of volume table.
290 * @copy: number of the volume table copy
291 * @vtbl: contents of the volume table
303 dbg_gen("create volume table (copy #%d)", copy + 1);
329 /* Write the layout volume contents */
360 * process_lvol - process the layout volume.
363 * @av: layout volume attaching information
365 * This function is responsible for reading the layout volume, ensuring it is
366 * not corrupted, and recovering from corruptions if needed. Returns volume
381 * volume:
404 dbg_gen("check layout volume");
445 ubi_warn(ubi, "volume table copy #2 is corrupted");
449 ubi_msg(ubi, "volume table was restored");
464 ubi_err(ubi, "both volume tables are corrupted");
468 ubi_warn(ubi, "volume table copy #1 is corrupted");
472 ubi_msg(ubi, "volume table was restored");
485 * create_empty_lvol - create empty layout volume.
489 * This function returns volume table contents in case of success and a
519 * init_volumes - initialize volume information for existing volumes.
522 * @vtbl: volume table
524 * This function allocates volume description objects for existing volumes.
559 /* Auto re-size flag may be set only for one volume */
561 ubi_err(ubi, "more than one auto-resize volume (%d and %d)",
577 * In case of dynamic volume UBI knows nothing about how many
578 * data is stored there. So assume the whole volume is used.
592 * No eraseblocks belonging to this volume found. We
593 * don't actually know whether this static volume is
596 * stored on flash. So we just assume the volume is
604 * We found a static volume which misses several
607 ubi_warn(ubi, "static volume %d misses %d LEBs - corrupted",
620 /* And add the layout volume */
658 * check_av - check volume attaching information.
659 * @vol: UBI volume description object
660 * @av: volume attaching information
662 * This function returns zero if the volume attaching information is consistent
663 * to the data read from the volume tabla, and %-EINVAL if not.
706 * the information read from the volume table. Returns zero if the attaching
724 ubi_err(ubi, "too large volume ID %d found",
747 * During attaching we found a volume which does not
748 * exist according to the information in the volume
750 * reboot while the volume was being removed. Discard
753 ubi_msg(ubi, "finish volume %d removal", av->vol_id);
766 * ubi_read_volume_table - read the volume table.
770 * This function reads volume table, checks it, recover from errors if needed,
795 * No logical eraseblocks belonging to the layout volume were
797 * this case we create empty layout volume.
807 ubi_err(ubi, "the layout volume was not found");
813 ubi_err(ubi, "too many LEBs (%d) in layout volume",
826 * The layout volume is OK, initialize the corresponding in-RAM data
835 * information stored in the volume table.
853 * self_vtbl_check - check volume table.