gjournal & async
Eric Anderson
anderson at freebsd.org
Sun Apr 22 03:30:45 UTC 2007
On 04/21/07 19:43, Ivan Voras wrote:
> How does gjournal guarantee corectness if UFS is mounted async? AFAIK
> the "async" handling of IO requests is done by the UFS, the writes are
> not rescheduled at the GEOM layer?
>
I'm slightly guessing here that it can guarantee consistency because
async writes may not have made it to the disk (the journal), and when
gjournal replays the journal, it syncs the file system (flushing all the
writes to disk first), then writes the journaled data to the consistent
file system image. So, a write that is claimed as 'completed' to the
process by the kernel, may still be in memory, and only partially
written to the journal, or not at all. Either way, if an unclean
unmount of the filesystem occurs, it's either lost completely, a partial
journal write (so should be tossed anyway), or a complete journal entry
synced down just before journal switch.
Eric
More information about the freebsd-geom
mailing list