Re: [PATCH 05/43] FS-Cache: Release page->private after failed readahead [ver #46]

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

 



Nick Piggin <nickpiggin@xxxxxxxxxxxx> wrote:

> This does not release the page for which the filler function fails.

That's a good point.  That page is attached to the pagecache and the LRU by
that point.  I suppose the page could be removed (but someone else may be
trying to reference it by this point), or I could amend the patch text to:

	The attached patch causes read_cache_pages() to release page-private
	data on a page for which add_to_page_cache() fails.  If the filler
	function fails, then the problematic page is left attached to the
	pagecache (with appropriate flags set, one presumes) and the remaining
	to-be-attached pages are invalidated and discarded.  This permits
	pages with caching references associated with them to be cleaned up.

	The invalidatepage() address space op is called (indirectly) to do the
	honours.

How about that?

> I don't have a problem with this if it is significantly easier to do here
> than the caller -- it should be a slowpath.

It could be done in the caller - every caller of read_cache_pages() that might
have the pages pre-annotated.  But the changes are all in the error handling
path.  If read_cache_pages() doesn't see an error, these changes are not
activated.

David
--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux