On Sun, Dec 6, 2009 at 8:11 PM, Anurag Agarwal <anurag at kqinfotech.com> wrote:
> Hi,
>
> My reading of write code of ZFS (zfs_write in zfs_vnops.c), is that all the
> writes in zfs are logged in the ZIL. And if that indeed is the case, then

IIRC, there is some upper limit (1MB?) on writes that go to ZIL, with
larger ones executed directly. Yet again, this is an outsider's
impression, not the architect's () statement.

Regards,
Andrey

> yes, ZFS does guarantee the sequential consistency, even when there are
> power outage or server crash. You might loose some writes if ZIL has not
> committed to disk. But that would not change the sequential consistency
> guarantee.
>
> There is no need to do a fsync or open the file with O_SYNC. It should work
> as it is.
>
> I have not done any experiments to verify this, so please take my
> observation with pinch of salt.
> Any ZFS developers to verify or refute this.
>
> Regards,
> Anurag.
>
> On Sun, Dec 6, 2009 at 8:12 AM, nxyyt <schumi.han at gmail.com> wrote:
>>
>> This question is forwarded from ZFS-discussion. Hope any developer can
>> throw some light on it.
>>
>> I'm a newbie to ZFS. I have a special question against the COW transaction
>> of ZFS.
>>
>> Does ZFS keeps the sequential consistency of the same file ?when it meets
>> power outage or server crash?
>>
>> Assume following scenario:
>>
>> My application has only a single thread and it appends the data to the
>> file continuously. Suppose at time t1, it append a buf named A to the file.
>> At time t2, which is later than t1, it appends a buf named B to the file. If
>> the server crashes after t2, is it possible the buf B is flushed back to the
>> disk but buf A is not?
>>
>> My application appends the file only without truncation or overwrite.Does
>> ZFS keep the consistency that the data written to a file in sequential order
>> or casual order be flushed to disk in the same order?
>>
>> ?If the uncommitted writer operation to a single file always binding with
>> the same opening transaction group and all transaction group is committed in
>> sequential order, I think the answer should be YES. In other words,
>> [b]whether there is only one opening transaction group at any time and ?the
>> transaction group is committed in order for a single pool?[/b]
>>
>>
>> Hope anybody can help me clarify it. Thank you very much!
>> --
>> This message posted from opensolaris.org
>> _______________________________________________
>> zfs-code mailing list
>> zfs-code at opensolaris.org
>> http://mail.opensolaris.org/mailman/listinfo/zfs-code
>
>
>
> --
> Anurag Agarwal
> CEO, Founder
> KQ Infotech, Pune
> www.kqinfotech.com
> 9881254401
> Coordinator Akshar Bharati
> www.aksharbharati.org
> Spreading joy through reading
>
> _______________________________________________
> zfs-code mailing list
> zfs-code at opensolaris.org
> http://mail.opensolaris.org/mailman/listinfo/zfs-code
>
>

Reply via email to