Keep in mind that this coordination is largely happening above the
FileStore layer, so you are indeed not seeing any code within the
FileStore to support it. :) But operations within the OSD are ordered
on a per-PG basis, and while in-progress writes can overlap, a read
will be blocked until the writes are applied (and subsequent writes
will be blocked behind the read).
-Greg
Software Engineer #42 @ http://inktank.com | http://ceph.com


On Tue, Jul 22, 2014 at 8:58 PM, Haomai Wang <haomaiw...@gmail.com> wrote:
> Read will get the newest content. If the read arrives during the write
> interval, it will wait for the write applied.
>
> On Wed, Jul 23, 2014 at 10:22 AM, James Pan <dev...@yahoo.com> wrote:
>> Hi everyone,
>>
>> I am reading the FileStore source code and confused with the read() and 
>> write() process.
>>
>> If journal is enable, write() will be acknowledged after the changes are 
>> committed to the journal device but before they are applied to the file 
>> system. However read() is always satisfied from the OSD file on the file 
>> system, so if a read arrives during this interval. Will the read get the 
>> stale data? Does this behavior break the read-after-write posix semantics? 
>> Shouldn't the read go to the journal for the latest data?
>>
>> Please point me out if my understanding is incorrect, thanks very much.
>>
>> Best regards,
>> James Pan
>>
>> _______________________________________________
>> ceph-users mailing list
>> ceph-users@lists.ceph.com
>> http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
>
>
>
> --
> Best Regards,
>
> Wheat
> _______________________________________________
> ceph-users mailing list
> ceph-users@lists.ceph.com
> http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com
_______________________________________________
ceph-users mailing list
ceph-users@lists.ceph.com
http://lists.ceph.com/listinfo.cgi/ceph-users-ceph.com

Reply via email to