Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 28 Feb 1998 23:53:45 +0000 (GMT)
From:      Terry Lambert <tlambert@primenet.com>
To:        dmaddox@scsn.net
Cc:        FreeBSD-current@FreeBSD.ORG
Subject:   Re: VM: Process hangs sleeping on vmpfw
Message-ID:  <199802282353.QAA11825@usr08.primenet.com>
In-Reply-To: <19980228102154.10781@scsn.net> from "Donald J. Maddox" at Feb 28, 98 10:21:54 am

next in thread | previous in thread | raw e-mail | index | archive | help
> > Check your dmesg/messages log for the following message:
> > 
> > 	vnode_pager: *** WARNING *** stale FS code in system.
> > 
> > If you have gotten this message, it means that you are trying to page
> > out to an FS that has stale code (ie: a local media FS that does not
> > support VOP_PUTPAGES).  The FS needs corrected, so if you can identify
> > which one it is, I can do a patch for you

[ ... ]

> I'm getting this when accessing ext2fs filesystems...  It looks like ext2fs
> is broken in more ways than one, but I thought you might like to know about
> this one :-)

Here is a patch that updates ext2fs.  This should probably be committed.
I will need to update my sources to get a patch that cleanly applies
against MSDOSFS (there are some changes I havent checked out, but I have
been working on a security related patch, so my tree is in a bit of
disarray as I move it over).  If someone wants to do *exactly* this
for MSDOSFS and NFS and gets to it before I do... all the better; this
is low-hanging fruit and a chance to familiarize yourself with some
of the workings of the VFS without much chance of shooting your foot
off.

Patch follows signature (it's small and pretty obvious in light of my
previous post)...

					Terry Lambert
					terry@lambert.org
---
Any opinions in this posting are my own and not those of my present
or previous employers.
===========================================================================
Index: gnu/ext2fs/ext2_vnops.c
===================================================================
RCS file: /b/cvstree/ncvs/src/sys/gnu/ext2fs/ext2_vnops.c,v
retrieving revision 1.33
diff -c -r1.33 ext2_vnops.c
*** 1.33	1998/02/06 12:13:03
--- ext2_vnops.c	1998/02/28 23:47:14
***************
*** 63,68 ****
--- 63,69 ----
  #include <vm/vm.h>
  #include <vm/vm_extern.h>
  #include <vm/vm_zone.h>
+ #include <vm/vnode_pager.h>
  
  #include <sys/signalvar.h>
  #include <ufs/ufs/dir.h>
***************
*** 88,93 ****
--- 89,96 ----
  static int ext2_create __P((struct vop_create_args *));
  static int ext2_mknod __P((struct vop_mknod_args *));
  static int ext2_symlink __P((struct vop_symlink_args *));
+ static int ext2_getpages __P((struct vop_getpages_args *));
+ static int ext2_putpages __P((struct vop_putpages_args *));
  
  /* Global vfs data structures for ufs. */
  vop_t **ext2_vnodeop_p;
***************
*** 109,114 ****
--- 112,119 ----
  	{ &vop_create_desc,		(vop_t *) ext2_create },
  	{ &vop_mknod_desc,		(vop_t *) ext2_mknod },
  	{ &vop_symlink_desc,		(vop_t *) ext2_symlink },
+ 	{ &vop_getpages_desc,		(vop_t *) ext2_getpages },
+ 	{ &vop_putpages_desc,		(vop_t *) ext2_putpages },
  	{ NULL, NULL }
  };
  static struct vnodeopv_desc ext2fs_vnodeop_opv_desc =
***************
*** 1198,1201 ****
--- 1203,1234 ----
  	ip->i_flag |= IN_CHANGE;
  	vput(tvp);
  	return (error);
+ }
+ 
+ /*
+  * get page routine
+  *
+  * XXX By default, wimp out... note that a_offset is ignored (and always
+  * XXX has been).
+  */
+ int
+ ext2_getpages(ap)
+ 	struct vop_getpages_args *ap;
+ {
+ 	return vnode_pager_generic_getpages(ap->a_vp, ap->a_m, ap->a_count,
+ 		ap->a_reqpage);
+ }
+ 
+ /*
+  * put page routine
+  *
+  * XXX By default, wimp out... note that a_offset is ignored (and always
+  * XXX has been).
+  */
+ int
+ ext2_putpages(ap)
+ 	struct vop_putpages_args *ap;
+ {
+ 	return vnode_pager_generic_putpages(ap->a_vp, ap->a_m, ap->a_count,
+ 		ap->a_sync, ap->a_rtvals);
  }
===========================================================================

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199802282353.QAA11825>