syncfs会等到光盘写入完成吗? [英] Does syncfs wait until disc write finished?

查看:70
本文介绍了syncfs会等到光盘写入完成吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

新的syncfs系统调用是否像fsync一样在返回之前等待光盘写入完成? 另外,如果在修改文件后,是否为此文件描述符调用syncfs也更新了包含的directoy条目?

Does the new syncfs system call wait for disc write completion before returning, like in case of fsync? Also, if after modifying file, is calling syncfs for this file descriptor also update the containing directoy entry?

推荐答案

syncfs向下写入超级块中的所有脏页.磁盘可能具有写缓存,因此不能保证已保存所有数据.例如,您可以关闭电源而又不叫关机.

syncfs writes out all dirty pages from the superblock on down. Disks may have write caching, so this does not guarantee that all data has been saved. You could, for example, turn off power without still calling shutdown.

这篇关于syncfs会等到光盘写入完成吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆