Give the bufobj a private __bo_vnode for now to keep the syncer floating [1]
At some point later the syncer will unlearn about vnodes and the filesystems method called by the syncer will know enough about what's in bo_private to do the right thing. [1] Ok, I know, but I couldn't resist the pun.
This commit is contained in:
parent
269b7a298a
commit
12ca46b3fc
@ -832,6 +832,7 @@ getnewvnode(tag, mp, vops, vpp)
|
||||
vp->v_dd = vp;
|
||||
bo = &vp->v_bufobj;
|
||||
bo->bo_private = vp;
|
||||
bo->__bo_vnode = vp;
|
||||
bo->bo_mtx = &vp->v_interlock;
|
||||
vp->v_vnlock = &vp->v_lock;
|
||||
lockinit(vp->v_vnlock, PVFS, tag, VLKTIMEOUT, LK_NOPAUSE);
|
||||
@ -1552,7 +1553,7 @@ sched_sync(void)
|
||||
if (net_worklist_len > 0 && syncer_state == SYNCER_FINAL_DELAY)
|
||||
syncer_state = SYNCER_SHUTTING_DOWN;
|
||||
while ((bo = LIST_FIRST(slp)) != NULL) {
|
||||
vp = bo->bo_private; /* XXX */
|
||||
vp = bo->__bo_vnode; /* XXX */
|
||||
if (VOP_ISLOCKED(vp, NULL) != 0 ||
|
||||
vn_start_write(vp, &mp, V_NOWAIT) != 0) {
|
||||
LIST_REMOVE(bo, bo_synclist);
|
||||
|
@ -87,6 +87,11 @@ struct bufobj {
|
||||
struct vm_object *bo_object; /* v Place to store VM object */
|
||||
LIST_ENTRY(bufobj) bo_synclist; /* S dirty vnode list */
|
||||
void *bo_private; /* private pointer */
|
||||
struct vnode *__bo_vnode; /*
|
||||
* XXX: This vnode pointer is here
|
||||
* XXX: only to keep the syncer working
|
||||
* XXX: for now.
|
||||
*/
|
||||
};
|
||||
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user