Lines Matching defs:req
130 * @req: volume creation request
132 * This function creates volume described by @req. If @req->vol_id id
134 * and saves it in @req->vol_id. Returns zero in case of success and a negative
138 int ubi_create_volume(struct ubi_device *ubi, struct ubi_mkvol_req *req)
140 int i, err, vol_id = req->vol_id;
158 if (req->flags & UBI_VOL_SKIP_CRC_CHECK_FLG)
176 req->vol_id = vol_id;
180 ubi->ubi_num, vol_id, (unsigned long long)req->bytes,
181 (int)req->vol_type, req->name);
193 ubi->volumes[i]->name_len == req->name_len &&
194 !strcmp(ubi->volumes[i]->name, req->name)) {
196 req->name, i);
201 vol->usable_leb_size = ubi->leb_size - ubi->leb_size % req->alignment;
202 vol->reserved_pebs = div_u64(req->bytes + vol->usable_leb_size - 1,
220 vol->alignment = req->alignment;
222 vol->vol_type = req->vol_type;
223 vol->name_len = req->name_len;
224 memcpy(vol->name, req->name, vol->name_len);