PERFORCE change 196725 for review
Ilya Putsikau
ilya at FreeBSD.org
Tue Jul 26 06:07:17 UTC 2011
http://p4web.freebsd.org/@@196725?ac=10
Change 196725 by ilya at ilya_triton2011 on 2011/07/26 06:06:22
Remove ticket_mtx. Replace last use case during file system
initializtion with global fuse mutex.
Remove debug sysctl reclaim_inactive
Remove unused size argument from fuse_vnode_get
Affected files ...
.. //depot/projects/soc2011/ilya_fuse/fuse_module/fuse_internal.c#19 edit
.. //depot/projects/soc2011/ilya_fuse/fuse_module/fuse_ipc.c#14 edit
.. //depot/projects/soc2011/ilya_fuse/fuse_module/fuse_ipc.h#15 edit
.. //depot/projects/soc2011/ilya_fuse/fuse_module/fuse_node.c#20 edit
.. //depot/projects/soc2011/ilya_fuse/fuse_module/fuse_node.h#19 edit
.. //depot/projects/soc2011/ilya_fuse/fuse_module/fuse_vfsops.c#23 edit
.. //depot/projects/soc2011/ilya_fuse/fuse_module/fuse_vnops.c#43 edit
Differences ...
==== //depot/projects/soc2011/ilya_fuse/fuse_module/fuse_internal.c#19 (text+ko) ====
@@ -486,7 +486,7 @@
return err;
}
- err = fuse_vnode_get(mp, feo->nodeid, dvp, vpp, cnp, vtyp, 0);
+ err = fuse_vnode_get(mp, feo->nodeid, dvp, vpp, cnp, vtyp);
if (err) {
fuse_internal_forget_send(mp, cnp->cn_thread, cnp->cn_cred,
feo->nodeid, 1);
@@ -617,10 +617,10 @@
fdata_set_dead(data);
}
- fuse_lck_mtx_lock(data->ticket_mtx);
+ FUSE_LOCK();
data->dataflags |= FSESS_INITED;
wakeup(&data->ticketer);
- fuse_lck_mtx_unlock(data->ticket_mtx);
+ FUSE_UNLOCK();
return 0;
}
==== //depot/projects/soc2011/ilya_fuse/fuse_module/fuse_ipc.c#14 (text+ko) ====
@@ -346,8 +346,6 @@
data->dataflags = 0;
mtx_init(&data->ms_mtx, "fuse message list mutex", NULL, MTX_DEF);
STAILQ_INIT(&data->ms_head);
- mtx_init(&data->ticket_mtx, "fuse ticketer mutex", NULL, MTX_DEF);
- debug_printf("ALLOC_INIT data=%p ticket_mtx=%p\n", data, &data->ticket_mtx);
mtx_init(&data->aw_mtx, "fuse answer list mutex", NULL, MTX_DEF);
TAILQ_INIT(&data->aw_head);
data->ticketer = 0;
@@ -369,7 +367,6 @@
/* Driving off stage all that stuff thrown at device... */
mtx_destroy(&data->ms_mtx);
mtx_destroy(&data->aw_mtx);
- mtx_destroy(&data->ticket_mtx);
#ifdef FUSE_EXPLICIT_RENAME_LOCK
sx_destroy(&data->rename_lock);
#endif
@@ -395,9 +392,9 @@
selwakeuppri(&data->ks_rsel, PZERO + 1);
fuse_lck_mtx_unlock(data->ms_mtx);
- fuse_lck_mtx_lock(data->ticket_mtx);
+ FUSE_LOCK();
wakeup(&data->ticketer);
- fuse_lck_mtx_unlock(data->ticket_mtx);
+ FUSE_UNLOCK();
}
struct fuse_ticket *
@@ -412,9 +409,9 @@
if (!(data->dataflags & FSESS_INITED) && data->ticketer > 2) {
/* Sleep until get answer for INIT messsage */
- fuse_lck_mtx_lock(data->ticket_mtx);
+ FUSE_LOCK();
if (!(data->dataflags & FSESS_INITED) && data->ticketer > 2) {
- err = msleep(&data->ticketer, &data->ticket_mtx, PCATCH | PDROP,
+ err = msleep(&data->ticketer, &fuse_mtx, PCATCH | PDROP,
"fu_ini", 0);
}
}
==== //depot/projects/soc2011/ilya_fuse/fuse_module/fuse_ipc.h#15 (text+ko) ====
@@ -138,7 +138,6 @@
struct mtx aw_mtx;
TAILQ_HEAD(, fuse_ticket) aw_head;
- struct mtx ticket_mtx;
u_long ticketer;
#ifdef FUSE_EXPLICIT_RENAME_LOCK
==== //depot/projects/soc2011/ilya_fuse/fuse_module/fuse_node.c#20 (text+ko) ====
@@ -170,8 +170,7 @@
struct vnode *dvp,
struct vnode **vpp,
struct componentname *cnp,
- enum vtype vtyp,
- uint64_t size)
+ enum vtype vtyp)
{
struct thread *td = (cnp != NULL ? cnp->cn_thread : curthread);
int err = 0;
==== //depot/projects/soc2011/ilya_fuse/fuse_module/fuse_node.h#19 (text+ko) ====
@@ -88,8 +88,7 @@
struct vnode *dvp,
struct vnode **vpp,
struct componentname *cnp,
- enum vtype vtyp,
- uint64_t size);
+ enum vtype vtyp);
void fuse_vnode_open(struct vnode *vp,
int32_t fuse_open_flags,
==== //depot/projects/soc2011/ilya_fuse/fuse_module/fuse_vfsops.c#23 (text+ko) ====
@@ -360,7 +360,7 @@
if (err == 0)
*vpp = data->vroot;
} else {
- err = fuse_vnode_get(mp, FUSE_ROOT_ID, NULL, vpp, NULL, VDIR, 0);
+ err = fuse_vnode_get(mp, FUSE_ROOT_ID, NULL, vpp, NULL, VDIR);
if (err == 0) {
FUSE_LOCK();
MPASS(data->vroot == NULL || data->vroot == *vpp);
==== //depot/projects/soc2011/ilya_fuse/fuse_module/fuse_vnops.c#43 (text+ko) ====
@@ -124,10 +124,6 @@
SYSCTL_INT(_vfs_fuse, OID_AUTO, lookup_cache_enable, CTLFLAG_RW,
&fuse_lookup_cache_enable, 0, "");
-static int fuse_reclaim_inactive = 0;
-SYSCTL_INT(_vfs_fuse, OID_AUTO, reclaim_inactive, CTLFLAG_RW,
- &fuse_reclaim_inactive, 0, "");
-
int fuse_pbuf_freecnt = -1;
#if __FreeBSD_version >= 900011
@@ -338,7 +334,7 @@
goto out;
}
- err = fuse_vnode_get(mp, feo->nodeid, dvp, vpp, cnp, VREG, /*size*/0);
+ err = fuse_vnode_get(mp, feo->nodeid, dvp, vpp, cnp, VREG);
if (err) {
if (gone_good_old) {
fuse_internal_forget_send(mp, td, cred, feo->nodeid, 1);
@@ -555,8 +551,7 @@
}
}
- if ((fvdat->flag & FN_REVOKED) != 0 ||
- (fuse_reclaim_inactive && vnode_vtype(vp) != VDIR)) {
+ if ((fvdat->flag & FN_REVOKED) != 0) {
vrecycle(vp, td);
}
@@ -649,7 +644,6 @@
int err = 0;
int lookup_err = 0;
struct vnode *vp = NULL;
- uint64_t size = 0;
struct fuse_dispatcher fdi;
enum fuse_opcode op;
@@ -735,7 +729,6 @@
if ((op == FUSE_LOOKUP) && !lookup_err) { /* lookup call succeeded */
nid = ((struct fuse_entry_out *)fdi.answ)->nodeid;
- size = ((struct fuse_entry_out *)fdi.answ)->attr.size;
if (!nid) {
/*
* zero nodeid is the same as "not found",
@@ -849,8 +842,7 @@
dvp,
&vp,
cnp,
- IFTOVT(fattr->mode),
- size);
+ IFTOVT(fattr->mode));
if (err) {
goto out;
}
@@ -888,8 +880,7 @@
dvp,
&vp,
cnp,
- IFTOVT(fattr->mode),
- size);
+ IFTOVT(fattr->mode));
if (err) {
goto out;
}
@@ -913,8 +904,7 @@
NULL,
&vp,
cnp,
- IFTOVT(fattr->mode),
- 0);
+ IFTOVT(fattr->mode));
vn_lock(dvp, ltype | LK_RETRY);
vref(vp);
*vpp = vp;
@@ -927,8 +917,7 @@
dvp,
&vp,
cnp,
- IFTOVT(fattr->mode),
- size);
+ IFTOVT(fattr->mode));
if (err) {
goto out;
}
More information about the p4-projects
mailing list