nanddev_target_size(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… nanddev_target_size β€” bestie's guide to the Kernel API Manual ✨

okay so like, the manual we're living in is the Kernel API Manual, and today's main character is a little function called nanddev_target_size. she's short, she's sweet, she tells you how much space one single target/die gives you. that's it. that's the whole vibe. let's get into it πŸŽ€


✨ NAME ✨

nanddev_target_size β€” get the total size provided by a single target/die πŸ¦‹

like, one die. one target. how many bytes is she serving. that's the question.


🌸 SYNOPSIS 🌸

u64 nanddev_target_size (const struct nand_device *nand );

that's the whole signature bestie, she takes exactly one thing and returns a u64. no cap. πŸ’œ


🫢 ARGUMENTS 🫢

  • nand β€” the NAND device. yes that's it. that's the parameter. she just wants the device, she handles the rest πŸ‘‘

⭐ RETURN ⭐

the total size exposed by a single target/die in bytes. so like, a number. a u64 number. in BYTES, don't forget the units, that's how they get you 😭


🌈 SEE ALSO 🌈

okay this section is giving extended universe and honestly? iconic. the whole NAND lore drops here, starting with the actual kernel file:

Kernel file ./include/linux/mtd/nand.h struct

then the whole friend group, no one left out, fr fr:

nand_memory_organization(9), struct nand_row_converter(9), struct nand_pos(9), enum nand_page_io_req_type(9), struct nand_page_io_req(9), enum nand_ecc_engine_type(9), enum nand_ecc_placement(9), enum nand_ecc_algo(9), struct nand_ecc_props(9), struct nand_bbt(9), struct nand_ops(9), struct nand_ecc_context(9), struct nand_ecc_engine_ops(9), enum nand_ecc_engine_integration(9), struct nand_ecc_engine(9), struct nand_ecc_req_tweak_ctx(9), struct nand_ecc(9), struct nand_device(9), struct nand_io_iter(9), mtd_to_nanddev(9), nanddev_to_mtd(9), nanddev_page_size(9), nanddev_per_page_oobsize(9), nanddev_pages_per_eraseblock(9), nanddev_pages_per_target(9), nanddev_eraseblocks_per_lun(9), nanddev_eraseblocks_per_target(9), nanddev_neraseblocks(9), nanddev_size(9), nanddev_get_memorg(9), nanddev_get_ecc_conf(9), nanddev_get_ecc_nsteps(9), nanddev_get_ecc_bytes_per_step(9), nanddev_get_ecc_requirements(9), nanddev_set_ecc_requirements(9), nanddev_register(9), nanddev_unregister(9), nanddev_set_of_node(9), nanddev_get_of_node(9), nanddev_offs_to_pos(9), nanddev_pos_cmp(9), nanddev_pos_to_offs(9), nanddev_pos_to_row(9), nanddev_pos_next_target(9), nanddev_pos_next_lun(9), nanddev_pos_next_eraseblock(9), nanddev_pos_next_page(9), nanddev_bbt_pos_to_entry(9), nanddev_bbt_is_initialized(9)

like I said. the whole extended universe. go read them, iykyk πŸ’€


ngl this page is short but she ate. one arg, one return, one very long SEE ALSO list. main character energy tbh πŸ’…

and that's the tea bestie πŸ“ β€” this serves you from ./include/linux/mtd, dated October 2026, and the page itself is nanddev_target_size(9) in the Kernel API Manual. mwah, go forth and size those targets πŸ’–βœ¨

πŸ“¦ where this page comes from