Lines Matching full:volume
9 * This file contains implementation of volume creation, deletion, updating and
46 * A. process 1 opens a sysfs file related to volume Y, say
48 * B. process 2 removes volume Y;
52 * out that the volume was removed from the @ubi->volumes array.
66 /* Take a reference to prevent volume removal */ in vol_attribute_show()
96 /* We've done the operation, drop volume and UBI device references */ in vol_attribute_show()
117 /* Release method for volume devices */
128 * ubi_create_volume - create volume.
130 * @req: volume creation request
132 * This function creates volume described by @req. If @req->vol_id id
133 * %UBI_VOL_NUM_AUTO, this function automatically assign ID to the new volume
163 /* Find unused volume ID */ in ubi_create_volume()
164 dbg_gen("search for vacant volume ID"); in ubi_create_volume()
172 ubi_err(ubi, "out of volume IDs"); in ubi_create_volume()
179 dbg_gen("create device %d, volume %d, %llu bytes, type %d, name %s", in ubi_create_volume()
183 /* Ensure that this volume does not exist */ in ubi_create_volume()
186 ubi_err(ubi, "volume %d already exists", vol_id); in ubi_create_volume()
195 ubi_err(ubi, "volume \"%s\" exists (ID %d)", in ubi_create_volume()
229 * to the same volume ID. in ubi_create_volume()
258 /* Make volume "available" before it becomes accessible via sysfs */ in ubi_create_volume()
264 /* Register character device for the volume */ in ubi_create_volume()
276 /* Fill volume table record */ in ubi_create_volume()
302 * We have registered our device, we should not free the volume in ubi_create_volume()
319 ubi_err(ubi, "cannot create volume %d, error %d", vol_id, err); in ubi_create_volume()
324 * ubi_remove_volume - remove volume.
325 * @desc: volume descriptor
326 * @no_vtbl: do not change volume table if not zero
328 * This function removes volume described by @desc. The volume has to be opened
339 dbg_gen("remove device %d, volume %d", ubi->ubi_num, vol_id); in ubi_remove_volume()
349 * The volume is busy, probably someone is reading one of its in ubi_remove_volume()
387 ubi_err(ubi, "cannot remove volume %d, error %d", vol_id, err); in ubi_remove_volume()
396 * ubi_resize_volume - re-size volume.
397 * @desc: volume descriptor
400 * This function re-sizes the volume and returns zero in case of success, and a
416 dbg_gen("re-size device %d, volume %d to from %d to %d PEBs", in ubi_resize_volume()
479 * When we shrink a volume we have to flush all pending (erase) work. in ubi_resize_volume()
489 /* Change volume table record */ in ubi_resize_volume()
562 * ubi_add_volume - add volume.
564 * @vol: volume description object
566 * This function adds an existing volume and initializes all its data
575 dbg_gen("add volume %d", vol_id); in ubi_add_volume()
577 /* Register character device for the volume */ in ubi_add_volume()
583 ubi_err(ubi, "cannot add character device for volume %d, error %d", in ubi_add_volume()
607 * ubi_free_volume - free volume.
609 * @vol: volume description object
611 * This function frees all resources for volume @vol but does not remove it.
616 dbg_gen("free volume %d", vol->vol_id); in ubi_free_volume()
624 * self_check_volume - check volume information.
626 * @vol_id: volume ID
628 * Returns zero if volume is all right and a negative error code if not.
644 ubi_err(ubi, "no volume info, but volume exists"); in self_check_volume()
696 ubi_err(ubi, "too long volume name, max is %d", in self_check_volume()
710 ubi_err(ubi, "corrupted dynamic volume"); in self_check_volume()
760 ubi_err(ubi, "volume info is different"); in self_check_volume()
768 ubi_err(ubi, "self-check failed for volume %d", vol_id); in self_check_volume()