Lines Matching refs:btt_sb
247 bool nd_btt_arena_is_valid(struct nd_btt *nd_btt, struct btt_sb *super) in nd_btt_arena_is_valid()
276 struct btt_sb *btt_sb) in nd_btt_version() argument
283 if (nvdimm_read_bytes(ndns, 0, btt_sb, sizeof(*btt_sb), 0)) in nd_btt_version()
285 if (!nd_btt_arena_is_valid(nd_btt, btt_sb)) in nd_btt_version()
287 if ((le16_to_cpu(btt_sb->version_major) != 2) || in nd_btt_version()
288 (le16_to_cpu(btt_sb->version_minor) != 0)) in nd_btt_version()
298 if (nvdimm_read_bytes(ndns, SZ_4K, btt_sb, sizeof(*btt_sb), 0)) in nd_btt_version()
300 if (!nd_btt_arena_is_valid(nd_btt, btt_sb)) in nd_btt_version()
302 if ((le16_to_cpu(btt_sb->version_major) != 1) || in nd_btt_version()
303 (le16_to_cpu(btt_sb->version_minor) != 1)) in nd_btt_version()
311 struct nd_namespace_common *ndns, struct btt_sb *btt_sb) in __nd_btt_probe() argument
315 if (!btt_sb || !ndns || !nd_btt) in __nd_btt_probe()
321 rc = nd_btt_version(nd_btt, ndns, btt_sb); in __nd_btt_probe()
325 nd_btt->lbasize = le32_to_cpu(btt_sb->external_lbasize); in __nd_btt_probe()
326 nd_btt->uuid = kmemdup(&btt_sb->uuid, sizeof(uuid_t), GFP_KERNEL); in __nd_btt_probe()
339 struct btt_sb *btt_sb; in nd_btt_probe() local
359 btt_sb = devm_kzalloc(dev, sizeof(*btt_sb), GFP_KERNEL); in nd_btt_probe()
360 rc = __nd_btt_probe(to_nd_btt(btt_dev), ndns, btt_sb); in nd_btt_probe()