Re: [PATCH] page cache readahead implemented?

Hugh Dickins (hugh@veritas.com)
Sun, 22 Jun 2003 23:29:20 +0100 (BST)


On Sun, 22 Jun 2003, Andrew Morton wrote:
> Hugh Dickins <hugh@veritas.com> wrote:
> >
> > do_mmap_pgoff's PROT_EXEC do_page_cache_readahead assumes that is
> > implemented for all mappings, but not all filesystems provide ->readpage.
>
> Which filesystems?

No prize for guessing it was tmpfs I found the problem with.
Which others? I don't know, and wouldn't trust any answer I came up with.
Plus we can't tell beyond what's in the kernel tree itself.

> For tmpfs and other memory-backed filesystems we could perhaps just
> rely on backing_dev_info.ra_pages being zero. For others, maybe
> we should just say "thou shalt implement readpage".

I've no great attachment to my "page_cache_readahead_implemented()",
and it would be just fine to say that anyone who implements readpages
must also implement readpage, drop that part of the test.

But what you suggest above sounds much too shaky (or draconian) to me -
particularly since disobedience shows up as a hang rather than an oops.

Am I reading alloc_inode correctly, that the default it gives is
an empty_aops with NULL readpage, but a backing_dev_info with non-0
ra_pages? How does your do_mmap_pgoff fare on a PROT_EXEC mapping
of one of those mmaping device drivers?

Hugh

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/