Lines Matching full:re
13 * manipulate whole volumes: create, remove, and re-size them. Volume character
651 * verify_rsvol_req - verify volume re-size request.
672 * @req: volumes re-name request
674 * This is a helper function for the volume re-name IOCTL which validates the
684 struct ubi_rename_entry *re, *re1; in rename_volumes() local
723 /* Create the re-name list */ in rename_volumes()
730 re = kzalloc(sizeof(struct ubi_rename_entry), GFP_KERNEL); in rename_volumes()
731 if (!re) { in rename_volumes()
736 re->desc = ubi_open_volume(ubi->ubi_num, vol_id, UBI_METAONLY); in rename_volumes()
737 if (IS_ERR(re->desc)) { in rename_volumes()
738 err = PTR_ERR(re->desc); in rename_volumes()
741 kfree(re); in rename_volumes()
745 /* Skip this re-naming if the name does not really change */ in rename_volumes()
746 if (re->desc->vol->name_len == name_len && in rename_volumes()
747 !memcmp(re->desc->vol->name, name, name_len)) { in rename_volumes()
748 ubi_close_volume(re->desc); in rename_volumes()
749 kfree(re); in rename_volumes()
753 re->new_name_len = name_len; in rename_volumes()
754 memcpy(re->new_name, name, name_len); in rename_volumes()
755 list_add_tail(&re->list, &rename_list); in rename_volumes()
757 vol_id, re->desc->vol->name, name); in rename_volumes()
764 list_for_each_entry(re, &rename_list, list) { in rename_volumes()
769 * Volume @re->vol_id is going to be re-named to in rename_volumes()
770 * @re->new_name, while its current name is @name. If a volume in rename_volumes()
771 * with name @re->new_name currently exists, it has to be in rename_volumes()
772 * removed, unless it is also re-named in the request (@req). in rename_volumes()
775 if (re->new_name_len == re1->desc->vol->name_len && in rename_volumes()
776 !memcmp(re->new_name, re1->desc->vol->name, in rename_volumes()
787 * It seems we need to remove volume with name @re->new_name, in rename_volumes()
790 desc = ubi_open_volume_nm(ubi->ubi_num, re->new_name, in rename_volumes()
795 /* Re-naming into a non-existing volume name */ in rename_volumes()
800 re->new_name, err); in rename_volumes()
823 list_for_each_entry_safe(re, re1, &rename_list, list) { in rename_volumes()
824 ubi_close_volume(re->desc); in rename_volumes()
825 list_del(&re->list); in rename_volumes()
826 kfree(re); in rename_volumes()
907 /* Re-size volume command */ in ubi_cdev_ioctl()
913 dbg_gen("re-size volume"); in ubi_cdev_ioctl()
940 /* Re-name volumes command */ in ubi_cdev_ioctl()
945 dbg_gen("re-name volumes"); in ubi_cdev_ioctl()