From: Oleg Drokin <green@linuxhacker.ru>
To: linux-kernel@vger.kernel.org
Subject: Request for export of truncate_complete_page
Date: Tue, 21 Feb 2006 00:38:10 +0200 [thread overview]
Message-ID: <20060220223810.GD5733@linuxhacker.ru> (raw)
Hello!
Can I ask for truncate_complete_page() to be exported?
For Lustre filesystem it is necessary to poke out pages in the middle of
a file, but truncate_inode_pages() is not very suitable, because we
poke those pages one at a time when locks on those pages are cancelled, but
we cannot kill entire set of pages as a group, because there might be some
other lock that covers a subset of those pages, so we still need to iterate
through all of them, and while we are at it, it is easier to kill pages
as we check them one by one.
--- linux-2.6.16-rc4/include/linux/mm.h.orig 2006-02-21 00:22:58.000000000 +0200
+++ linux-2.6.16-rc4/include/linux/mm.h 2006-02-21 00:23:37.000000000 +0200
@@ -941,6 +941,8 @@ extern unsigned long do_brk(unsigned lon
/* filemap.c */
extern unsigned long page_unuse(struct page *);
+extern void truncate_complete_page(struct address_space *mapping,
+ struct page *page);
extern void truncate_inode_pages(struct address_space *, loff_t);
extern void truncate_inode_pages_range(struct address_space *,
loff_t lstart, loff_t lend);
--- linux-2.6.16-rc4/mm/truncate.c.orig 2006-02-21 00:20:27.000000000 +0200
+++ linux-2.6.16-rc4/mm/truncate.c 2006-02-21 00:21:42.000000000 +0200
@@ -33,7 +33,7 @@ static inline void truncate_partial_page
* its lock, b) when a concurrent invalidate_inode_pages got there first and
* c) when tmpfs swizzles a page between a tmpfs inode and swapper_space.
*/
-static void
+void
truncate_complete_page(struct address_space *mapping, struct page *page)
{
if (page->mapping != mapping)
@@ -48,6 +48,7 @@ truncate_complete_page(struct address_sp
remove_from_page_cache(page);
page_cache_release(page); /* pagecache ref */
}
+EXPORT_SYMBOL(truncate_complete_page);
/*
* This is for invalidate_inode_pages(). That function can be called at
Bye,
Oleg
next reply other threads:[~2006-02-20 22:37 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-20 22:38 Oleg Drokin [this message]
2006-02-21 5:54 ` Request for export of truncate_complete_page Andrew Morton
2006-02-21 11:30 ` Oleg Drokin
2006-02-21 10:39 ` Christoph Hellwig
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=20060220223810.GD5733@linuxhacker.ru \
--to=green@linuxhacker.ru \
--cc=linux-kernel@vger.kernel.org \
/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