Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: psshfs atf regression tests are broken?



Paul Goyette <paul%whooppee.com@localhost> wrote:

> Seems that something has recently caused some breakage in the psshfs. 
> The test case itself seems to be succeeding (?) but post-test clean-up 
> fails?

Here is a patch that should fix it. I cannot test right now because my testbed
is already running another long test. I am rebuilding the world in another VM to
check it fixes the test, but anyone feel free to beat me at it.

Index: sys/fs/puffs/puffs_msgif.c
===================================================================
RCS file: /cvsroot/src/sys/fs/puffs/puffs_msgif.c,v
retrieving revision 1.90
diff -U4 -r1.90 puffs_msgif.c
--- sys/fs/puffs/puffs_msgif.c  21 Jul 2012 05:17:10 -0000      1.90
+++ sys/fs/puffs/puffs_msgif.c  22 Jul 2012 07:25:20 -0000
@@ -985,9 +985,8 @@
                KASSERT(curlwp != uvm.pagedaemon_lwp);
                psopr = kmem_alloc(sizeof(*psopr), KM_SLEEP);
                memcpy(&psopr->psopr_pf, pf, sizeof(*pf));
                psopr->psopr_sopreq = PUFFS_SOPREQ_FLUSH;
-               psopr->psopr_at = hardclock_ticks;
 
                mutex_enter(&pmp->pmp_sopmtx);
                if (pmp->pmp_sopthrcount == 0) {
                        mutex_exit(&pmp->pmp_sopmtx);
@@ -1010,9 +1009,8 @@
                KASSERT(curlwp != uvm.pagedaemon_lwp);
                psopr = kmem_alloc(sizeof(*psopr), KM_SLEEP);
                psopr->psopr_preq = *preq;
                psopr->psopr_sopreq = PUFFS_SOPREQ_UNMOUNT;
-               psopr->psopr_at = hardclock_ticks;
 
                mutex_enter(&pmp->pmp_sopmtx);
                if (pmp->pmp_sopthrcount == 0) {
                        mutex_exit(&pmp->pmp_sopmtx);
@@ -1060,15 +1058,16 @@
        mutex_enter(&pmp->pmp_sopmtx);
        for (keeprunning = true; keeprunning; ) {
                /*
                 * We have a higher priority queue for flush and umount
-                * and a lower priority queue for reclaims. Request are
-                * not honoured before clock reaches psopr_at. This code
-                * assumes that requests are ordered by psopr_at in queues.
+                * and a lower priority queue for reclaims. Request on
+                * slower queue are not honoured before clock reaches 
+                * psopr_at. This code assumes that requests are ordered 
+                * by psopr_at in queues.
                 */
                do {
                        psopr = TAILQ_FIRST(&pmp->pmp_sopfastreqs);
-                       if ((psopr != NULL) && TIMED_OUT(psopr->psopr_at)) {
+                       if (psopr != NULL) {
                                TAILQ_REMOVE(&pmp->pmp_sopfastreqs,
                                             psopr, psopr_entries);
                                break;
                        }
Index: sys/fs/puffs/puffs_vfsops.c
===================================================================
RCS file: /cvsroot/src/sys/fs/puffs/puffs_vfsops.c,v
retrieving revision 1.102
diff -U4 -r1.102 puffs_vfsops.c
--- sys/fs/puffs/puffs_vfsops.c 21 Jul 2012 05:17:11 -0000      1.102
+++ sys/fs/puffs/puffs_vfsops.c 22 Jul 2012 07:25:20 -0000
@@ -421,9 +421,8 @@
                 */
                KASSERT(curlwp != uvm.pagedaemon_lwp);
                psopr = kmem_alloc(sizeof(*psopr), KM_SLEEP);
                psopr->psopr_sopreq = PUFFS_SOPREQSYS_EXIT;
-               psopr->psopr_at = hardclock_ticks;
                mutex_enter(&pmp->pmp_sopmtx);
                if (pmp->pmp_sopthrcount == 0) {
                        mutex_exit(&pmp->pmp_sopmtx);
                        kmem_free(psopr, sizeof(*psopr));

-- 
Emmanuel Dreyfus
http://hcpnet.free.fr/pubz
manu%netbsd.org@localhost


Home | Main Index | Thread Index | Old Index