- User Since
- Jan 13 2015, 10:58 PM (255 w, 5 d)
Sat, Dec 7
Fri, Dec 6
Wed, Dec 4
Mon, Dec 2
Thu, Nov 28
Mon, Nov 25
Fri, Nov 22
Sun, Nov 17
Sat, Nov 16
Add a check for nfsrv_nfsuserd == STARTSTOP to the wakeup(), to avoid extraneous
Also add a KASSERT() for nfsrv_userdupcalls.
Oops, I've realized there are other fields of nfsrv_nfsuserdsock that are
used by newnfs_request(), so holding a reference count on *nr_client isn't
Move the NFSUNLOCKNAMEID() up so that it only updates the nr_client field
before unlocking and add a comment related to this.
Updated my inline comment reply.
Replied to inline comments.
Fri, Nov 15
Sun, Nov 10
Nov 9 2019
Nov 8 2019
Nov 4 2019
Nov 3 2019
Oct 30 2019
Oct 28 2019
Oct 25 2019
Oct 24 2019
Oct 23 2019
Oct 20 2019
Oct 18 2019
Oct 17 2019
Oct 16 2019
Oct 13 2019
Thanks for the comment.
Oct 12 2019
The new revision makes changes in the vm part that I don't understand, so I am afraid I can't
Oct 6 2019
Added a reply to the inline comment.
Oct 5 2019
Other than the one inline comment, it looks good to me. However, I don't know enough about the locking/vm stuff
to say if nfs_lock() is correct?
Delaying doing the vnode_pager_setsize() until a lock operation on the vnode sounds reasonable to me.
Oct 4 2019
Oct 3 2019
Sep 30 2019
This version of the patch replaces nfscl_checksetsize() with vnode_pager_setsize_nonblock().
The latter is a macro which just calls vnode_pager_setsize_mightsleep() with can_sleep == false.
Sep 28 2019
As an alternative to creating a function called nfscl_checksetsize(), what about adding a "can_sleep"
flag argument to vnode_pager_setsize().
If can_sleep is "false", then it would return EWOULDBLOCK for the "shrinking" case.
(If can_sleep is "true" it would retain current behaviour.) Yes, the function would no
longer be void, but would return (0) except for this case.
Sep 27 2019
Sep 26 2019
Unfortunately testing found a deadlock problem.
- One of the iod threads is sleeping on "vmopar", so it is in vnode_pager_setsize() when the size is being reduced.
- The rest of the iod threads are waiting for the NFS node lock.
Sep 25 2019
This version of the patch changes the n_mtx lock to an sx lock (n_sx) and
the ncl_iod_mutex to ncl_iod_sx. The former is done so that it can safely be
locked while calling vnode_pager_setsize().
The latter is changed to an sx lock since it is held when n_sx is acquired.
All the msleep()s are changed to sx_sleep() calls.
Sep 24 2019
Sep 23 2019
So, do you think that just replacing n_mtx with n_solock makes more sense?
(I'll admit I was thinking it was a lot of editing, but so what.)
Sep 15 2019
Sep 13 2019
Sep 9 2019
Sep 8 2019
Sep 7 2019
Sep 6 2019
Sep 5 2019
Sep 4 2019
Sep 2 2019
Sep 1 2019
Aug 31 2019
Aug 27 2019
Aug 22 2019
Aug 21 2019
Updated the patch to only map ENOTTY to EINVAL, per Mark's comments.
Actually, I only mapped ENOTTY when I first did the patch. The only reason I changed it
is that any error returned by VOP_GETATTR() also gets returned to lseek(2). For NFS,
this could be EACCES, for example, since file permissions are checked for every operation
on NFS, nit just at open(2) time.
Aug 20 2019
Aug 19 2019
Aug 18 2019
This version of the patch has the changes suggested by kib@ incorporated in it.
The only semantic change is that it now returns whatever error VOP_GETATTR()
returns if VOP_GETATTR() fails. This is consistent with the behaviour of vn_bmap_seekhole().