I'm looking at the following code: zvol_ioctl() ... case DKIOCFREE: ... /* * If the caller really wants synchronous writes, and * can't wait for them, don't return until the write * is done. */ if (df.df_flags & DF_WAIT_SYNC) { txg_wait_synced( dmu_objset_pool(zv->zv_objset), 0); }
Why does DF_WAIT_SYNC imply txg_wait_synced()? Why isn't zil_commit() sufficient here? I don't really understand the comment, does it mean that the caller wants writes to be committed when we do a DKIOCFREE? That's a little strange, but zil_commit(ZVOL_OBJ) would still do that. If so, I think the comment would be more clear if it said: If the caller wants previous asynchronous writes to be committed to disk, commit the ZIL. This will sync any previous uncommitted writes to the zvol object. --matt ------------------------------------------- openzfs-developer Archives: https://www.listbox.com/member/archive/274414/=now RSS Feed: https://www.listbox.com/member/archive/rss/274414/28015062-cce53afa Modify Your Subscription: https://www.listbox.com/member/?member_id=28015062&id_secret=28015062-f966d51c Powered by Listbox: http://www.listbox.com