mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@osdl.org>
To: Anton Altaparmakov <aia21@cam.ac.uk>
Cc: Al Viro <viro@parcelfarce.linux.theplanet.co.uk>,
	vandrove@vc.cvut.cz, Andrew Morton <akpm@osdl.org>,
	linware@sh.cvut.cz, fsdevel <linux-fsdevel@vger.kernel.org>,
	lkml <linux-kernel@vger.kernel.org>
Subject: Re: Kernel bug: Bad page state: related to generic symlink code and mmap
Date: Fri, 19 Aug 2005 09:07:35 -0700 (PDT)	[thread overview]
Message-ID: <Pine.LNX.4.58.0508190855350.3412@g5.osdl.org> (raw)
In-Reply-To: <1124466246.2294.65.camel@imp.csi.cam.ac.uk>



On Fri, 19 Aug 2005, Anton Altaparmakov wrote:
>
> 		struct page *page;
> 		page = find_get_page(dentry->d_inode->i_mapping, 0);
> 		if (!page)
> ---->			BUG();

Something has truncated the mapping. 

My guess is that you had a cache invalidate event that removed the page
from the mapping while it was being used. That might also explain why this
only happens for ncpfs. I bet that in the other cases, the mapping was 
also invalidated, but re-filled immediately, and your strace slowed the 
other process down enough that it didn't get to re-fill the cache it 
invalidated or something like that.

The fact that it happens only for cross-volume things might also be 
explained that way - is there something ncpfs does when switching volumes 
that might trigger a cache invalidate for another volume (either on the 
client side or the server side - maybe the server tends to try to break 
the connection for the old volume when you start traversing a new one?)

The generic "page cache for symlinks" code does _not_ support invalidating 
the cache while it's being used. A local filesystem will obviously never 
invalidate the cache at all. 

Hmm.. NFS _does_ use the page cache for symlinks, but uses it slightly 
differently: instead of relying on the page cache entry being the same 
when freeing the page, it just caches the page it looked up in the page 
cache (ie "nfs_follow_link()" does look up the page cache, but then hides 
the page pointer inside the page data itself (uglee), and thus does not 
depend on the mapping staying the same (nfs_put_link() just takes the page 
from the symlink data).

		Linus

  parent reply	other threads:[~2005-08-19 16:08 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-19 11:14 Anton Altaparmakov
2005-08-19 14:20 ` Al Viro
2005-08-19 15:44   ` Anton Altaparmakov
2005-08-19 15:58     ` Al Viro
2005-08-19 16:07     ` Linus Torvalds [this message]
2005-08-19 16:21       ` Al Viro
2005-08-19 16:21       ` Linus Torvalds
2005-08-19 16:43         ` Linus Torvalds
2005-08-19 16:53           ` Al Viro
2005-08-19 18:02             ` Al Viro
2005-08-19 18:00               ` Christoph Hellwig
2005-08-19 19:38                 ` Al Viro
2005-08-19 19:41                   ` Matthew Wilcox
2005-08-19 19:43                     ` Al Viro
2005-08-19 21:19                       ` Christoph Hellwig
2005-08-19 20:35                   ` Linus Torvalds
2005-08-19 21:20                     ` Anton Altaparmakov
2005-08-19 21:35                       ` Linus Torvalds
2005-08-19 21:42                     ` Al Viro
2005-08-19 19:16               ` Mika Penttilä
2005-08-19 19:40                 ` Al Viro
2005-08-19 19:50                   ` Mika Penttilä
2005-08-19 20:46           ` Anton Altaparmakov
2005-08-19 20:55             ` Linus Torvalds
2005-08-19 21:39               ` Anton Altaparmakov
2005-08-19 22:04                 ` Linus Torvalds
2005-08-19 23:15                   ` Al Viro
2005-08-19 23:17                     ` Al Viro
2005-08-20  1:08                     ` Linus Torvalds
2005-08-20  1:15                       ` Al Viro
2005-08-20 12:49                   ` Anton Altaparmakov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.58.0508190855350.3412@g5.osdl.org \
    --to=torvalds@osdl.org \
    --cc=aia21@cam.ac.uk \
    --cc=akpm@osdl.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linware@sh.cvut.cz \
    --cc=vandrove@vc.cvut.cz \
    --cc=viro@parcelfarce.linux.theplanet.co.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®