朴泊斋

Damocles的思想笔记
    <<  Erdős number | 首页 | 难道真有人和我同名?  >>
  • fix bug in JOS file system - [康朴塔散思]

    2009-08-30

    版权声明:转载时请以超链接形式标明文章原始出处和作者信息及本声明
    http://damocles.blogbus.com/logs/45423624.html

    After changing emulator to qemu, I find that the file flush in file system seems not work correctly. The data I wrote to disk lost after rebooting the machine. Finally I find that the dirty bit is not set in file_write because the address space of fs and user env is different. Copy the content of memory will only make the address of current env dirty. But the memory of fs is still clean. Add two lines after memmove in file_write

        for (i = 0; i < n; i += BLKSIZE)
            fsipc_dirty(fd->fd_file.id, offset + i);

    To send request to the file system server to mark the page dirty directly.

    Another thing to mention is that, it seems that *blk=*blk has no effect for the dirty bit. I Just map the page using syscall to modify its perm. Also please remember in the sys_map_page, you needs to modify the condition of returning invalid parameter. Add PTE_D to the reasonable parameter to perm.

     


    历史上的今天:

    怎么发现一个城市的美? 2008-08-30

    随机文章:

    Use virtual machine manager to run JOS 2009-09-22
    Interrupt-driven IDE disk access 2009-08-20
    Snapshot and restore env 2009-04-04
    Implement system call with sysenter/sysexit 2009-03-24
    Fix the bug related output redirection in JOS 2008-06-14

    收藏到:Del.icio.us




    Tag:JOS
    引用地址:
    Gu Zhongshu 发表于17:35:03 | 编辑 | 继续话题 | 转发 | 分享 0

搜索

最新日志

  • Wave Beijing
  • 美国公民中国签证收费标准
  • 看完之后,不禁内牛满面
  • 提高linux分辨率的方法
  • Universal Hashing
  • Fermat's little theorem
  • virtualized address translation
  • 请为我投票
  • 大庆
  • Use virtual machine manager to run JOS
全部日志>>

最新评论

  • Ceci:我觉得这很赞 哈哈 下大雨的那次是不是机场封了然后我改...
  • Ceci:认真你就输了。。。哈哈哈...
  • Ceci:你也知道的 就这么回事儿 何必放在心上。。。...
  • 山寨手机:学习了~~~
  • cheap uggs:路过~支持个~
  • sunglasses:踩
  • xuanxuan:恩,这纪录片的确不错~~什么来历?(xuanxuan)...
  • 囧:提前打飞机?强大。
  • Ceci:我觉得今天北京看上去空气质量很差。。。 尤其是坦克冒黑...
  • Guanqun:我刚开始准备把网络的给做掉。...
  • RSS 什么是RSS?
    用IM提醒我内容更新
    订阅到QQ邮箱
    订阅到鲜果阅读器
    订阅到Google阅读器
    订阅到抓虾阅读器
  • 《城客》第四期:创意之城
    博客大巴
    博客大巴使用指南
    博客大巴模板中心
    免费注册博客大巴
    一键博客搬家工具
    中文互动杂志城客
Copyright © 2002-2009 BlogBus.com, All Rights Reserved. 博客大巴 版权所有
博客大巴模板设计:乌镇·印象II | 作者: 饭团