Chinaunix首页 | 论坛 | 博客
  • 博客访问: 922794
  • 博文数量: 63
  • 博客积分: 568
  • 博客等级: 中士
  • 技术积分: 3435
  • 用 户 组: 普通用户
  • 注册时间: 2012-10-05 11:44
文章分类
文章存档

2016年(4)

2015年(6)

2014年(3)

2013年(27)

2012年(23)

发布时间:2013-12-22 23:05:36

add_disk的主要功能总结如下1、将一个磁盘对象gendisk加到bdev_map中Blk_register_region这个函数会操作类型为 struct kobj_map的全局变量bdev_map,它将gendisk对象加入到bdev_map中  2、在/dev目录下生成一个设备节点3、生成一个block_device对象和一个隶属于bdev文件.........【阅读全文】

阅读(24428) | 评论(0) | 转发(4)

发布时间:2013-12-15 14:31:23

Linux系统中将数据写入到一个文件是一个很复杂的过程。如果我们只对这个过程做一个理论和概要的理解,可以总结为下面处理过程。1、首先,用户态程序需要将数据所在地址、写入文件位置、写入长度传递给内核空间。2、然后,内核需要检查用户态程序传入的参数,一部分要检查用户态空间那段存储数据的地址是.........【阅读全文】

阅读(8598) | 评论(0) | 转发(2)

发布时间:2013-12-09 22:20:07

 static int __make_request(struct request_queue *q, struct bio *bio) {     struct request *req;     int el_ret, nr_sectors;     const&n.........【阅读全文】

阅读(5084) | 评论(0) | 转发(1)

发布时间:2013-12-09 20:28:06

 /**  * do_generic_file_read - generic file read routine  * @filp:    the file to read  * @ppos:    current file position  *&.........【阅读全文】

阅读(6915) | 评论(0) | 转发(0)

发布时间:2013-12-08 17:58:22

 /*  * This is the worker routine which does all the work of mapping the disk  * blocks and constructs largest possible bios, submits them&nbs.........【阅读全文】

阅读(7752) | 评论(1) | 转发(0)
给主人留下些什么吧!~~
留言热议
请登录后留言。

登录 注册