Skip to the content.

kernfs

struct kernfs_ops {
	/*
	 * Optional open/release methods.  Both are called with
	 * @of->seq_file populated.
	 */
	int (*open)(struct kernfs_open_file *of);
	void (*release)(struct kernfs_open_file *of);

	/*
	 * Read is handled by either seq_file or raw_read().
	 *
	 * If seq_show() is present, seq_file path is active.  Other seq
	 * operations are optional and if not implemented, the behavior is
	 * equivalent to single_open().  @sf->private points to the
	 * associated kernfs_open_file.
	 *
	 * read() is bounced through kernel buffer and a read larger than
	 * PAGE_SIZE results in partial operation of PAGE_SIZE.
	 */
	int (*seq_show)(struct seq_file *sf, void *v);

	void *(*seq_start)(struct seq_file *sf, loff_t *ppos);
	void *(*seq_next)(struct seq_file *sf, void *v, loff_t *ppos);
	void (*seq_stop)(struct seq_file *sf, void *v);

补充资料

https://en.wikipedia.org/wiki/NVM_Express

https://nvmexpress.org/education/drivers/linux-driver-information/

M.2 is a physical standard that defines the shape, dimensions, and the physical connector itself.

nvme-cli 使用的教程: https://www.nvmedeveloperdays.com/English/Collaterals/Proceedings/2018/20181204_PRECON2_Hands.pdf

http://blog.coderhuo.tech/2020/07/18/flash_basics/ : 讲解的不错

https://www.youtube.com/watch?v=NtkKHhXf3V4

sysfs 和 procfs 是使用的 kernfs 吗?

本站所有文章转发 CSDN 将按侵权追究法律责任,其它情况随意。