Yes, its the same in Solaris. Its probably more correct to always to
do the dmu_write() as this keeps the page and file in sync.
-Mark
Pawel Jakub Dawidek wrote:
> Hi.
>
> I'm pondering this piece of mappedwrite():
>
> if (pp = page_lookup(vp, start, SE_SHARED)) {
> caddr_t va;
>
> rw_exit(&zp->z_map_lock);
> va = ppmapin(pp, PROT_READ | PROT_WRITE, (caddr_t)-1L);
> error = uiomove(va+off, bytes, UIO_WRITE, uio);
> if (error == 0) {
> dmu_write(zfsvfs->z_os, zp->z_id,
> woff, bytes, va+off, tx);
> }
> ppmapout(va);
> page_unlock(pp);
> [...]
>
> In FreeBSD I call dmu_write() unconditionally, because if uiomove()
> partially succeeds, we will lose the change. If uiomove() fails
> entirely, well, we just write what we got before one more time.
> Is it also the case for OpenSolaris?
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> zfs-code mailing list
> zfs-code at opensolaris.org
> http://opensolaris.org/mailman/listinfo/zfs-code