Previous thread: [PATCH 1/2] ntfs : Clean up ntfs_attr_extend_initialized by Minchan Kim on Monday, April 5, 2010 - 8:45 am. (1 message)

Next thread: Re: [PATCH] drivers:staging: sources for ST core by Pavan Savoy on Monday, April 5, 2010 - 9:18 am. (1 message)
From: Minchan Kim
Date: Monday, April 5, 2010 - 8:46 am

While I discuss exportable add_to_page_cache_lru, 
http://marc.info/?l=linux-mm&m=127047788612445&w=2
I found that 
http://www.mail-archive.com/linux-btrfs@vger.kernel.org/msg04472.html.

Let's change to use it in ntfs.

== CUT_HERE ==

Quote from Nick piggin's about btrfs patch
- http://www.mail-archive.com/linux-btrfs@vger.kernel.org/msg04472.html.

"add_to_page_cache_lru is exported, so it should be used. Benefits over
using a private pagevec: neater code, 128 bytes fewer stack used, percpu
lru ordering is preserved, and finally don't need to flush pagevec
before returning so batching may be shared with other LRU insertions."

Let's use it instead of private pagevec in ntfs, too.

Signed-off-by: Minchan Kim <minchan.kim@gmail.com>
---
 fs/ntfs/file.c |   19 ++++---------------
 1 files changed, 4 insertions(+), 15 deletions(-)

diff --git a/fs/ntfs/file.c b/fs/ntfs/file.c
index 41ffdcc..f05b650 100644
--- a/fs/ntfs/file.c
+++ b/fs/ntfs/file.c
@@ -398,18 +398,13 @@ static inline void ntfs_fault_in_pages_readable_iovec(const struct iovec *iov,
  * Obtain @nr_pages locked page cache pages from the mapping @mapping and
  * starting at index @index.
  *
- * If a page is newly created, increment its refcount and add it to the
- * caller's lru-buffering pagevec @lru_pvec.
- *
- * This is the same as mm/filemap.c::__grab_cache_page(), except that @nr_pages
- * are obtained at once instead of just one page and that 0 is returned on
- * success and -errno on error.
+ * If a page is newly created, add it to lru list
  *
  * Note, the page locks are obtained in ascending page index order.
  */
 static inline int __ntfs_grab_cache_pages(struct address_space *mapping,
 		pgoff_t index, const unsigned nr_pages, struct page **pages,
-		struct page **cached_page, struct pagevec *lru_pvec)
+		struct page **cached_page)
 {
 	int err, nr;
 
@@ -425,7 +420,7 @@ static inline int __ntfs_grab_cache_pages(struct address_space *mapping,
 					goto err_out;
 				}
 			}
-			err ...
From: Nick Piggin
Subject:
Date: Tuesday, April 6, 2010 - 8:47 am

Thanks, I went through most filesystems and changed it in those too,
including ntfs. Haven't had much feedback but I'll just send the
patches to Andrew if they haven't been merged by next release.

--

From: Minchan Kim
Subject:
Date: Tuesday, April 6, 2010 - 9:30 am

Hi, Nick.


Please, let me know it.
That's because actually I had a plan to change about some filesystem.
If you already did it, I don't need to do. :)

Thanks, Nick.



-- 
Kind regards,
Minchan Kim
--

From: Nick Piggin
Subject:
Date: Tuesday, April 6, 2010 - 10:11 am

I did most of them and cc'ed linux-fsdevel last month. btrfs, cifs,
nfs, ntfs. If you find any others, fix em up :)

--

Previous thread: [PATCH 1/2] ntfs : Clean up ntfs_attr_extend_initialized by Minchan Kim on Monday, April 5, 2010 - 8:45 am. (1 message)

Next thread: Re: [PATCH] drivers:staging: sources for ST core by Pavan Savoy on Monday, April 5, 2010 - 9:18 am. (1 message)