Lines Matching full:mtd
2 /* MTD-based superblock management
11 #include <linux/mtd/super.h>
24 * - they are if the underlying MTD device is the same
28 struct mtd_info *mtd = fc->sget_key; in mtd_test_super() local
32 mtd->index, mtd->name); in mtd_test_super()
37 sb->s_mtd->index, sb->s_mtd->name, mtd->index, mtd->name); in mtd_test_super()
42 * mark the superblock by the MTD device it is using
43 * - set the device number to be the correct MTD block device for pesuperstence
55 * get a superblock on an MTD-backed filesystem
58 struct mtd_info *mtd, in mtd_get_sb() argument
65 fc->sget_key = mtd; in mtd_get_sb()
73 mtd->index, mtd->name); in mtd_get_sb()
74 put_mtd_device(mtd); in mtd_get_sb()
78 mtd->index, mtd->name); in mtd_get_sb()
97 * get a superblock on an MTD-backed filesystem by MTD device number
103 struct mtd_info *mtd; in mtd_get_sb_by_nr() local
105 mtd = get_mtd_device(NULL, mtdnr); in mtd_get_sb_by_nr()
106 if (IS_ERR(mtd)) { in mtd_get_sb_by_nr()
108 return PTR_ERR(mtd); in mtd_get_sb_by_nr()
111 return mtd_get_sb(fc, mtd, fill_super); in mtd_get_sb_by_nr()
115 * get_tree_mtd - Get a superblock based on a single MTD device
135 * CONFIG_BLOCK=n - we specify the underlying MTD device by number or in get_tree_mtd()
143 struct mtd_info *mtd; in get_tree_mtd() local
145 /* mount by MTD device name */ in get_tree_mtd()
146 pr_debug("MTDSB: mtd:%%s, name \"%s\"\n", in get_tree_mtd()
149 mtd = get_mtd_device_nm(fc->source + 4); in get_tree_mtd()
150 if (!IS_ERR(mtd)) in get_tree_mtd()
151 return mtd_get_sb(fc, mtd, fill_super); in get_tree_mtd()
153 errorf(fc, "MTD: MTD device with name \"%s\" not found", in get_tree_mtd()
157 /* mount by MTD device number name */ in get_tree_mtd()
163 pr_debug("MTDSB: mtd%%d, mtdnr %d\n", mtdnr); in get_tree_mtd()
175 errorf(fc, "MTD: Couldn't look up '%s': %d", fc->source, ret); in get_tree_mtd()
186 errorf(fc, "MTD: Attempt to mount non-MTD device \"%s\"", in get_tree_mtd()
193 * destroy an MTD-based superblock