Page MenuHomeFreeBSD

zfs: enable vn_io_fault support
ClosedPublic

Authored by avg on Jun 12 2015, 12:55 PM.

Details

Summary

Note that now we have to account for possible partial writes
in dmu_write_uio_dbuf().
It seems that on illumos either all or none of the data are
expected to be written.
But the partial writes are quite expected when vn_io_fault support
is enabled.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

avg retitled this revision from to zfs: enable vn_io_fault support.
avg updated this object.
avg edited the test plan for this revision. (Show Details)
avg added a reviewer: kib.

I cannot be an authorative reviewer for the patch, since I do not know ZFS code. Indeed, partial moves must be handled, this is a fundamental principle for the vn_io_fault. On the other hand, I am not quite sure about interaction of the mechanism with ZFS transactions. Is it fine for the single write to be split among several journaled operations ?

That said, the replace of the uiomove() with vn_io_fault_uimove() is all what required for the fs which does not use unmapped cache.

In D2790#53589, @kib wrote:

On the other hand, I am not quite sure about interaction of the mechanism with ZFS transactions. Is it fine for the single write to be split among several journaled operations ?

Yes, that's perfectly fine. There is no guarantee that a write is atomic in the event of a system crash or a snapshot being taken or an I/O error, etc.

sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
1169 ↗(On Diff #6135)

@kib as you can see here a write operation already can be split into multiple ZFS transactions and intent log writes.

sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c
1169–1181 ↗(On Diff #6135)

@kib as you can see here a write operation already can be split into multiple ZFS transactions and intent log writes.

avg edited edge metadata.

Rebase to the most recent head.

kib edited edge metadata.
This revision is now accepted and ready to land.Mar 28 2016, 5:50 PM
This revision was automatically updated to reflect the committed changes.