Page MenuHomeFreeBSD

zfs: enable vn_io_fault support
ClosedPublic

Authored by avg on Jun 12 2015, 12:55 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, May 31, 7:12 AM
Unknown Object (File)
Fri, May 30, 8:23 AM
Unknown Object (File)
Tue, May 13, 12:35 AM
Unknown Object (File)
Wed, May 7, 2:39 PM
Unknown Object (File)
Apr 28 2025, 6:41 AM
Unknown Object (File)
Apr 24 2025, 4:17 PM
Unknown Object (File)
Apr 24 2025, 12:02 AM
Unknown Object (File)
Apr 20 2025, 2:51 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
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 3047
Build 3079: arc lint + arc unit

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
1219

@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
1219–1231

@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.