Neil Perrin wrote:


Under the hood in ZFS, writes are committed using either shadow paging or
logging, as I understand it. So I believe that I mean to ask whether a
write(2), pushed to ZPL, and pushed on down the stack, can be split into multiple transactions? Or, instead, is it guaranteed to be committed in a
single transaction, and so committed atomically?

A write made through the ZPL (zfs_write()) will be broken into transactions that contain at most 128KB user data. So a large write could well be split
across transaction groups, and thus committed separately.

So what happens if application is doing a synchronous write of lets say 512KB? The write will be splitted in at least 4 separate transactions and the write will be confirmed to the application only after all 512KB has been written. But is there a possibility that if after a first transaction was commited system crashed and although write was not confirmed to the application 128KB of it has been commited to the disk? Or will it be rolled back? Basically for synchronous writes of more than 128KB - is it guaranteed that all data under a given write is committed or nothing at all?

--
Robert Milkowski
http://milek.blogspot.com


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

Reply via email to