Lines Matching full:volume
23 * This file includes volume table manipulation code. The volume table is an
24 * on-flash table containing volume meta-data like name, number of reserved
25 * physical eraseblocks, type, etc. The volume table is stored in the so-called
26 * "layout volume".
28 * The layout volume is an internal volume which is organized as follows. It
30 * eraseblock stores one volume table copy, i.e. LEB 0 and LEB 1 duplicate each
31 * other. This redundancy guarantees robustness to unclean reboots. The volume
32 * table is basically an array of volume table records. Each record contains
33 * full information about the volume and protected by a CRC checksum. Note,
34 * nowadays we use the atomic LEB change operation when updating the volume
38 * When the volume table is changed, it is first changed in RAM. Then LEB 0 is
39 * erased, and the updated volume table is written back to LEB 0. Then same for
42 * In this UBI implementation the on-flash volume table does not contain any
45 * But it would still be beneficial to store this information in the volume
46 * table. For example, suppose we have a static volume X, and all its physical
49 * corresponding to the volume X. According to the volume table volume X does
53 * The volume table also stores so-called "update marker", which is used for
54 * volume updates. Before updating the volume, the update marker is set, and
57 * update marker is still there and we know that the volume's contents is
69 /* Empty volume table record */
93 * ubi_change_vtbl_record - change volume table record.
96 * @vtbl_rec: new volume table record
98 * This function changes volume table record @idx. If @vtbl_rec is %NULL, empty
99 * volume table record is written. The caller does not have to calculate CRC of
126 * ubi_vtbl_rename_volumes - rename UBI volumes in the volume table.
130 * This function re-names multiple volumes specified in @req in the volume
163 * vtbl_check - check if volume table is not corrupted and sensible.
165 * @vtbl: volume table
283 ubi_err(ubi, "volume table check failed: record %d, error %d", i, err); in vtbl_check()
289 * create_vtbl - create a copy of volume table.
292 * @copy: number of the volume table copy
293 * @vtbl: contents of the volume table
306 dbg_gen("create volume table (copy #%d)", copy + 1); in create_vtbl()
334 /* Write the layout volume contents */ in create_vtbl()
365 * process_lvol - process the layout volume.
368 * @av: layout volume attaching information
370 * This function is responsible for reading the layout volume, ensuring it is
371 * not corrupted, and recovering from corruptions if needed. Returns volume
386 * volume: in process_lvol()
409 dbg_gen("check layout volume"); in process_lvol()
450 ubi_warn(ubi, "volume table copy #2 is corrupted"); in process_lvol()
454 ubi_msg(ubi, "volume table was restored"); in process_lvol()
469 ubi_err(ubi, "both volume tables are corrupted"); in process_lvol()
473 ubi_warn(ubi, "volume table copy #1 is corrupted"); in process_lvol()
477 ubi_msg(ubi, "volume table was restored"); in process_lvol()
490 * create_empty_lvol - create empty layout volume.
494 * This function returns volume table contents in case of success and a
524 * init_volumes - initialize volume information for existing volumes.
527 * @vtbl: volume table
529 * This function allocates volume description objects for existing volumes.
567 /* Auto re-size flag may be set only for one volume */ in init_volumes()
569 ubi_err(ubi, "more than one auto-resize volume (%d and %d)", in init_volumes()
587 * resize/check the bitmap upon volume resize too. in init_volumes()
595 * In case of dynamic volume UBI knows nothing about how many in init_volumes()
596 * data is stored there. So assume the whole volume is used. in init_volumes()
610 * No eraseblocks belonging to this volume found. We in init_volumes()
611 * don't actually know whether this static volume is in init_volumes()
614 * stored on flash. So we just assume the volume is in init_volumes()
622 * We found a static volume which misses several in init_volumes()
625 ubi_warn(ubi, "static volume %d misses %d LEBs - corrupted", in init_volumes()
638 /* And add the layout volume */ in init_volumes()
680 * check_av - check volume attaching information.
681 * @vol: UBI volume description object
682 * @av: volume attaching information
684 * This function returns zero if the volume attaching information is consistent
685 * to the data read from the volume tabla, and %-EINVAL if not.
728 * the information read from the volume table. Returns zero if the attaching
746 ubi_err(ubi, "too large volume ID %d found", in check_attaching_info()
769 * During attaching we found a volume which does not in check_attaching_info()
770 * exist according to the information in the volume in check_attaching_info()
772 * reboot while the volume was being removed. Discard in check_attaching_info()
775 ubi_msg(ubi, "finish volume %d removal", av->vol_id); in check_attaching_info()
788 * ubi_read_volume_table - read the volume table.
792 * This function reads volume table, checks it, recover from errors if needed,
817 * No logical eraseblocks belonging to the layout volume were in ubi_read_volume_table()
819 * this case we create empty layout volume. in ubi_read_volume_table()
829 ubi_err(ubi, "the layout volume was not found"); in ubi_read_volume_table()
835 ubi_err(ubi, "too many LEBs (%d) in layout volume", in ubi_read_volume_table()
848 * The layout volume is OK, initialize the corresponding in-RAM data in ubi_read_volume_table()
857 * information stored in the volume table. in ubi_read_volume_table()
876 * self_vtbl_check - check volume table.