[zfs-discuss] recovered state after system crash

2007-05-04 Thread kyusun Chang
If system crashes some time after last commit of transaction group (TxG), what
happens to the file system transactions since the last commit of TxG
(I presume last commit of TxG represents the last on-disk consistency)?
Does ZFS recover all file system transactions which it returned with success
since the last commit of TxG, which implis that ZIL must flush log records for 
each successful file system transaction before it returns to caller so that it 
can replay
the filesystem transactions?

Blogs on ZIL states (I hope I read it right) that log records are maintained
in-memory and flushed to disk only when 
1) at synchronous write request (does that mean they free in-memory
log after that),
2) when TxG is committed (and free in-memory log).

Thank you for your time.
 
 
This message posted from opensolaris.org
___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss


Re: [zfs-discuss] recovered state after system crash

2007-05-04 Thread Neil Perrin

kyusun Chang wrote On 05/04/07 19:34,:

If system crashes some time after last commit of transaction group (TxG), what
happens to the file system transactions since the last commit of TxG


They are lost, unless they were synchronous (see below).


(I presume last commit of TxG represents the last on-disk consistency)?


Correct.


Does ZFS recover all file system transactions which it returned with success
since the last commit of TxG, which implis that ZIL must flush log records for
 each successful file system transaction before it returns to caller so that 
it can replay

the filesystem transactions?


Only synchronous transactions (those forced by O_DSYNC or fsync()) are
written to the intent log.


Blogs on ZIL states (I hope I read it right) that log records are maintained
in-memory and flushed to disk only when 
1) at synchronous write request (does that mean they free in-memory

log after that),


Yes they are then freed in memory


2) when TxG is committed (and free in-memory log).

Thank you for your time.
 
 
This message posted from opensolaris.org

___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss

___
zfs-discuss mailing list
zfs-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/zfs-discuss