Chinaunix首页 | 论坛 | 博客
  • 博客访问: 72860
  • 博文数量: 172
  • 博客积分: 2047
  • 博客等级: 大尉
  • 技术积分: 1745
  • 用 户 组: 普通用户
  • 注册时间: 2010-05-19 15:23
文章分类

全部博文(172)

文章存档

2011年(72)

2010年(100)

我的朋友

分类: C/C++

2011-03-25 15:28:19

write

15:25:20[INFO][2054733][130784112][       proxyfs_open],fi 160214272 file: /aa ,Size:73 oflags:0
15:25:20[INFO][2054734][122391408][       proxyfs_open],fi 78969040 file: /aa ,Size:73 oflags:0
15:25:20[INFO][2054780][159894384][      proxyfs_write],start fi->fh 78969040 /aa 73 4023
15:25:20[INFO][2054856][159894384][      proxyfs_write], initcfile
15:25:22[INFO][2056870][159894384][      proxyfs_write],end /aa 73 4023 file->Size:73
15:25:22[INFO][2056871][88820592][      proxyfs_write],start fi->fh 78969040 /aa 4096 4096
15:25:24[INFO][2058699][113998704][        real_update], Test update delete dir /
15:25:24[INFO][2058896][88820592][      proxyfs_write],end /aa 4096 4096 file->Size:4096
15:25:24[INFO][2058897][97213296][      proxyfs_write],start fi->fh 78969040 /aa 8192 4096
15:25:26[INFO][2060898][97213296][      proxyfs_write],end /aa 8192 4096 file->Size:8192
15:25:26[INFO][2060899][151501680][      proxyfs_write],start fi->fh 78969040 /aa 12288 4096
15:25:28[INFO][2062900][151501680][      proxyfs_write],end /aa 12288 4096 file->Size:12288
15:25:28[INFO][2062901][122391408][      proxyfs_write],start fi->fh 78969040 /aa 16384 413
15:25:30[INFO][2064902][122391408][      proxyfs_write],end /aa 16384 413 file->Size:16384
15:25:30[INFO][2064906][130784112][    proxyfs_release],start file: /aa,Size:16797
15:25:31[INFO][2065686][159894384][      proxyfs_write],start fi->fh 160214272 /aa 73 4023
15:25:31[INFO][2065702][159894384][      proxyfs_write], initcfile
15:25:32[INFO][2066597][130784112][      send_data_pre], get File md5 afba6545728a3f74dd1512c9e41886c0
15:25:32[INFO][2066807][130784112][    proxyfs_release],end file: md5 afba6545728a3f74dd1512c9e41886c0 ,Size:16797
 
15:25:33[INFO][2067704][159894384][      proxyfs_write],end /aa 73 4023 file->Size:73
15:25:33[INFO][2067705][88820592][      proxyfs_write],start fi->fh 160214272 /aa 4096 4096
15:25:34[INFO][2068705][113998704][        real_update], Test update delete dir /
15:25:35[INFO][2069706][88820592][      proxyfs_write],end /aa 4096 4096 file->Size:4096
15:25:35[INFO][2069707][97213296][      proxyfs_write],start fi->fh 160214272 /aa 8192 2217
15:25:37[INFO][2071708][97213296][      proxyfs_write],end /aa 8192 2217 file->Size:8192
15:25:37[INFO][2071709][151501680][    proxyfs_release],start file: /aa,Size:10409
15:25:37[INFO][2072036][151501680][      send_data_pre], get File md5 f17b506c2d6038a5e6ca44f38e5bd198
15:25:37[INFO][2072397][151501680][    proxyfs_release],end file: md5 f17b506c2d6038a5e6ca44f38e5bd198 ,Size:10409

两次写入是有先后顺序的。
虽然可以同时打开。但是写入的文件必须是等待另外一个文件写入完毕。
没有谁在哪里穿插的情况。
但是,第二次写入的位置是第一次写入的位置。

两次写同一个文件。实际上是两个过程。

15:47:46[INFO][71755 ][151501680][    proxyfs_release],start file: /aa,Size:185472
15:47:46[INFO][71756 ][122391408][      proxyfs_write],start fi->fh 165581696 /aa 185472 2944
实际上是在这里出现了问题。
在写入的时候,实际文件还没有被发送完毕。


两个文件同时修改,这在服务器也是不允许的。
必须等到一个传输完毕了才能传输另外一个。


在服务器端也会出现故障。
服务器也是对同一个文件的修改。


如果打开文件就把它插入缓存的map 中。但是当



17:19:17[INFO][1658011][159894384][               open],file /home/chentao/.proxyfs_cache/c01f39c828946b2a5902987a995a6bf5 is not existed
17:19:17[ERROR][1658013][159894384][      proxyfs_write],InitCfile fail


如果写入的文件cache 不存在 write 就会出错。
可以做处理,如果出错,那么就到服务器去要这个文件的内容。


保证数据的正确性。只有

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

上一篇:2011-03-25

下一篇:write 时间 消耗分析

给主人留下些什么吧!~~