文件打开方式O_DSYNC、O_RSYNC、O_SYNC
O_DSYNC:
每次write都等待物理I/O完成,但是如果写操作不影响读取刚写入的数据,则不等待文件属性更新
O_RSYNC:
每个以文件描述符作为参数的read操作等待,直到所有对文件同一部分的未决写操作完成
O_SYNC:
每次write都等到物理I/O完成,包括write引起的文件属性的更新
- O_SYNC: requires that any write operations block until all data and all metadata have been written to persistent storage.
- O_DSYNC: like O_SYNC, except that there is no requirement to wait for any metadata changes which are not necessary to read the just-written data. In practice, O_DSYNC means that the application does not need to wait until ancillary information (the file modification time, for example) has been written to disk. Using O_DSYNC instead of O_SYNC can often eliminate the need to flush the file inode on a write.
- O_RSYNC: this flag, which only affects read operations, must be used in combination with either O_SYNC or O_DSYNC. It will cause aread() call to block until the data (and maybe metadata) being read has been flushed to disk (if necessary). This flag thus gives the kernel the option of delaying the flushing of data to disk; any number of writes can happen, but data need not be flushed until the application reads it back.
文件打开方式O_DSYNC、O_RSYNC、O_SYNC的更多相关文章
- 转载:python文件打开方式详解——a、a+、r+、w+区别
第一步 排除文件打开方式错误: r只读,r+读写,不创建 ###f.readline()是读取第一行,f.readlines()是读取全部并返回一个列表 w新建只写,w+新建读写,会将文件内 ...
- python文件打开方式详解——a、a+、r+、w+区别
出处: http://blog.csdn.net/ztf312/ 第一步 排除文件打开方式错误: r只读,r+读写,不创建 w新建只写,w+新建读写,二者都会将文件内容清零 (以w方式打开,不能读出. ...
- Python的with语句(文件打开方式)
Python文件打开方式(with语句) python编程中对于文件的打开方式主要有以下两种: 1.利用直接性的open("","")函数:(举例说明) try ...
- 【转】python文件打开方式详解——a、a+、r+、w+区别
原文地址:http://blog.csdn.net/ztf312/article/details/47259805 第一步 排除文件打开方式错误: r只读,r+读写,不创建 w新建只写,w+新建读写, ...
- 万恶技术系列笔记-jupyter工作路径和源文件打开方式
万恶技术系列笔记-jupyter工作路径和源文件打开方式 脚本文件,ipynb的正确打开姿势: ipynb不能直接打开,需要复制到工作路径.例如 10_monkeys_model_1.ipynb ...
- .jnlp 文件打开方式
.jnlp 文件打开方式 jnlp文件打开需要安装jre ,java环境,通过java环境运行即可,下面介绍详细步骤 1.下载.安装最新版jre环境,直接下一步即可 2 java配置 打开控制面板,查 ...
- windows中LNK文件打开方式恢复(每日一修(1))
相信有些用户曾试过错误地把LNK文件的打开方式更改其他文件,导致系统所有的快捷方式都失效.在vista与Windows7系统还不普遍使用的时候,相信大家会有点惊慌失措,不要紧,下面只要大家进行如下操作 ...
- Python文件处理之文件打开方式(一)
Python中打开一个文件是同过open函数来打开的,并返回一个文件对象,以下为open函数的参数: open(name[, mode[buf]]) name:文件路径 mode:打开方式 buf:缓 ...
- Linux 中改变默认文件打开方式的位置
全局的打开方式, /etc/gnome/defaults.list 个人的打开方式, -/.local/share/applications/mimeapps.list 当这两个文件不一致时,优先采用 ...
随机推荐
- HW5.4
import java.util.Scanner; public class Solution { public static void main(String[] args) { Scanner i ...
- AJAX中的dataType(数据格式)-text、json
因为经常使用数据格式,所以将它封装成类,J这样就不会用到时就写了,直接调用写好的类就可以了 (1)dataType数据格式为:TEXT格式的数据是字符串的数据,在"ajax对数据进行删除和查 ...
- Java- Jdbc学习
java jdbc test jsbc: package cn.honji.sqlserver; import java.sql.Connection; import java.sql.ResultS ...
- 从CR线下活动学到的:如何组织一个小的线下活动
作者:朱克锋 邮箱:zhukefeng@iboxpay.com 转载请注明出处:http://blog.csdn.net/linux_zkf 周末在腾讯组织了GR,活动达到了预期的收获,从这次活动我主 ...
- spring tranaction 事务入门
一.事务四个属性 原子性(atomicity).一个事务是一个不可分割的工作单位,事务中包括的诸操作要么都做,要么都不做. 一致性(consistency).事务必须是使数据库从一个一致性状态变到另一 ...
- Redis_基本类型介绍和指令___2
1.hash Redis hash 是一个string类型的field和value的映射表,hash特别适合用于存储对象. Redis 中每个 hash 可以存储 232 - 1 键值对(40多亿). ...
- hdu 1050 Moving Tables
http://acm.hdu.edu.cn/showproblem.php?pid=1050 这个题我首先直接用的常规贪心,用的和那个尽可能看更多完整节目那种思路.但是.......一直WA....T ...
- Fastjson反序列化泛型类型时候的一个问题
import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import java.u ...
- PHP扩展开发01:第一个扩展【转】
我们先假设业务场景,是需要有这么一个扩展,提供一个叫ccvita_string的函数,他的主要作用是返回一段字符.(这个业务场景实在太假,大家就这么看看吧)对应的PHP代码可能是这样: functio ...
- JSON数据的中文乱码问题
问题描述: 在firefox中返回的JSON数据没有出现乱码,但在GridPanel中显示乱码,而jsp页面和xml文件都是utf-8类型. 解决方案: 在 PrintWriter out = res ...