Lines Matching refs:dd
90 struct blk_desc *dd; in dev_stor_get() local
131 dd = (struct blk_desc *)di->cookie; in dev_stor_get()
132 if (dd->type == DEV_TYPE_UNKNOWN) { in dev_stor_get()
136 di->di_stor.block_count = dd->lba; in dev_stor_get()
137 di->di_stor.block_size = dd->blksz; in dev_stor_get()
148 static int dev_stor_type(struct blk_desc *dd) in dev_stor_type() argument
154 if (dd == blk_get_dev(specs[i].name, j)) in dev_stor_type()
280 static int dev_stor_is_valid(int type, struct blk_desc *dd) in dev_stor_is_valid() argument
285 if (dd == blk_get_dev(specs[type].name, i)) in dev_stor_is_valid()
286 if (dd->type != DEV_TYPE_UNKNOWN) in dev_stor_is_valid()
317 struct blk_desc *dd = (struct blk_desc *)cookie; in dev_read_stor() local
319 if ((type = dev_stor_type(dd)) == ENUM_MAX) in dev_read_stor()
322 if (!dev_stor_is_valid(type, dd)) in dev_read_stor()
326 return blk_dread(dd, start, len, buf); in dev_read_stor()
328 if ((dd->block_read) == NULL) { in dev_read_stor()
333 return dd->block_read(dd, start, len, buf); in dev_read_stor()
339 struct blk_desc *dd = (struct blk_desc *)cookie; in dev_write_stor() local
340 int type = dev_stor_type(dd); in dev_write_stor()
345 if (!dev_stor_is_valid(type, dd)) in dev_write_stor()
349 return blk_dwrite(dd, start, len, buf); in dev_write_stor()
351 if (dd->block_write == NULL) { in dev_write_stor()
356 return dd->block_write(dd, start, len, buf); in dev_write_stor()