Diffs for NetBSD-current 3.99.11
Ty Sarna
tsarna at sarna.org
Fri Jan 20 20:42:02 CET 2006
In conjuntion with the previous patch, the following patch makes 0.41
compile and (seem to) work with NetBSD-current up 3.99.11 (through
2005-11-26).
.11 represents the merge of the yamt-vop branch. VOP_TRUNCATE and
VOP_UPDATE were removed. nnpfs used those internally. The patch is
based on my understanding of this as follows:
- if your filesystem called a obsolete VOP_XXX internally before, you
should simply replace this with a direct call to your foofs_xxx()
implementation directly.
- nnpfs does not provide nnpfs_truncate or nnpfs_update impelementations.
- thus the calls to VOP_TRUNCATE/UPDATE were calling the default function
- the default function is nnpfs_eopnotsupp, which just returns EOPNOTSUPP
- Thus the call to (void) VOP_TRUNCATE(...) is a no-op and can be
elided (I left it active for previous version of netbsd anyway)
- the call to error = VOP_UPDATE(...) is equivalent to
error = EOPNOTSUPP, which would disable the following code
that updates size/time/etc of nodes and dirties it, which seems
wrong. So, I have removed the call instead (for >= 3.99.11).
With this patch, from my limited (2 minutes) of testing, arla seems to
work on 3.99.11, but I am not confident it is TRT...
yamt & lha, I would appreciate if you would look this over and make sure
it seems correct to you...
Thanks.
--- arla-0.41/nnpfs/bsd/nnpfs_vnodeops-netbsd.c.orig 2005-11-14 19:15:43.000000000 -0500
+++ arla-0.41/nnpfs/bsd/nnpfs_vnodeops-netbsd.c 2006-01-20 10:56:42.000000000 -0500
@@ -355,12 +355,16 @@
}
if (error) {
+#if __NetBSD_Version__ < 399001100
(void) VOP_TRUNCATE(vp, osize, ioflag & IO_SYNC, ap->a_cred,
uio->uio_procp);
+#endif
nnpfs_uio_setoffset(uio, nnpfs_uio_offset(uio) - resid - uio->uio_resid);
uio->uio_resid = resid;
+#if __NetBSD_Version__ < 399001100
} else if (resid > uio->uio_resid && (ioflag & IO_SYNC) == IO_SYNC) {
error = VOP_UPDATE(vp, NULL, NULL, UPDATE_WAIT);
+#endif
}
if (!error) {
struct timespec ts;
More information about the Arla-drinkers
mailing list