Android 文件系统日志
ext3 有 3 个日志选项:日志、有序和写回。根据维基百科条目,这些范围从崩溃恢复风险最小到风险最大。由于某种原因,Android版本的Linux仅支持后两个选项,并且默认为writeback。 (我正在运行 Froyo)
有没有办法添加对日志模式的支持?我想在 /data 分区上执行此操作,该分区是 ext3,也是大多数文件写入发生的地方。我的设备没有电池,因此我需要确保它在有人断开电源时不会崩溃。
如果有人感兴趣,Linux 选项在 kernel/fs/ext3/Kconfig 中定义。具体选项是EXT3_DEFAULTS_TO_ORDERED。
ext3 has 3 journaling options: journal, ordered, and writeback. According to the wikipedia entry, these range from least risky to most risky for crash recovery. For some reason, Android's version of Linux only supports the latter two options, and defaults to writeback. (I'm running Froyo)
Is there a way to add support for journal mode? I'd like to do this on the /data partition, which is ext3, and also where most of the file writes happen. My device doesn't have a battery, so I need to make sure it's crash proof when someone disconnects power.
In case anyone is interested, the Linux options are defined in kernel/fs/ext3/Kconfig. The specific option is EXT3_DEFAULTS_TO_ORDERED.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
解决方案是将以下内容添加到 kernel/fs/ext3/Kconfig 中,并使用 EXT3_DEFAULTS_TO_JOURNAL 重建内核。
The solution was to add the following to kernel/fs/ext3/Kconfig, and rebuild the kernel with EXT3_DEFAULTS_TO_JOURNAL.