reiserfs-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] reiser4: port for linux-4.6
       [not found] <S1755885AbcCaQ3L/20160331162911Z+322@vger.kernel.org>
@ 2016-03-31 16:44 ` Mathieu Belanger
  2016-03-31 20:18   ` Edward Shishkin
  2016-04-25 16:06   ` Mathieu Belanger
  0 siblings, 2 replies; 6+ messages in thread
From: Mathieu Belanger @ 2016-03-31 16:44 UTC (permalink / raw)
  To: reiserfs-devel

[-- Attachment #1: Type: text/plain, Size: 226 bytes --]

* New kernel use tmp_wb instead of wb for that part of generic_writeback_sb_inodes

* Migration doesn't clear page->mem_cgroup of live pages
anymore and so account_page_dirtied do not take a mem_cgroup third argument anymore.

[-- Attachment #2: reiser4-for-4.5.0-to-4.6.0.patch --]
[-- Type: application/octet-stream, Size: 1554 bytes --]

--- reiser4-for-4.5.0.patch	2016-03-31 10:36:02.196693785 -0600
+++ reiser4-for-4.6.0.patch	2016-03-31 10:35:29.650100674 -0600
@@ -220,8 +220,8 @@
  		spin_lock(&inode->i_lock);
  		if (!(inode->i_state & I_DIRTY_ALL))
  			wrote++;
--		requeue_inode(inode, wb, &wbc);
-+		requeue_inode(inode, wb, wbc);
+-		requeue_inode(inode, tmp_wb, &wbc);
++		requeue_inode(inode, tmp_wb, wbc);
  		inode_sync_complete(inode);
  		spin_unlock(&inode->i_lock);
  
@@ -81041,7 +81041,7 @@
 diff -urN linux-4.5.orig/mm/page-writeback.c linux-4.5/mm/page-writeback.c
 --- linux-4.5.orig/mm/page-writeback.c	2016-03-14 05:28:54.000000000 +0100
 +++ linux-4.5/mm/page-writeback.c	2016-03-24 16:58:16.396833377 +0100
-@@ -2526,6 +2526,36 @@
+@@ -2526,6 +2526,35 @@
  EXPORT_SYMBOL(account_page_redirty);
  
  /*
@@ -81055,21 +81055,20 @@
 + */
 +int set_page_dirty_notag(struct page *page)
 +{
-+	struct mem_cgroup *memcg;
 +	struct address_space *mapping = page->mapping;
 +
-+	memcg = mem_cgroup_begin_page_stat(page);
++	lock_page_memcg(page);
 +	if (!TestSetPageDirty(page)) {
 +		unsigned long flags;
 +		WARN_ON_ONCE(!PagePrivate(page) && !PageUptodate(page));
 +		local_irq_save(flags);
-+		account_page_dirtied(page, mapping, memcg);
++		account_page_dirtied(page, mapping);
 +		local_irq_restore(flags);
-+		mem_cgroup_end_page_stat(memcg);
++		unlock_page_memcg(page);
 +		__mark_inode_dirty(mapping->host, I_DIRTY_PAGES);
 +		return 1;
 +	}
-+	mem_cgroup_end_page_stat(memcg);
++	unlock_page_memcg(page);
 +	return 0;
 +}
 +EXPORT_SYMBOL(set_page_dirty_notag);

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] reiser4: port for linux-4.6
  2016-03-31 16:44 ` [PATCH] reiser4: port for linux-4.6 Mathieu Belanger
@ 2016-03-31 20:18   ` Edward Shishkin
  2016-04-25 16:06   ` Mathieu Belanger
  1 sibling, 0 replies; 6+ messages in thread
From: Edward Shishkin @ 2016-03-31 20:18 UTC (permalink / raw)
  To: Mathieu Belanger, reiserfs-devel

Thanks a lot!

Edward.

On 03/31/2016 06:44 PM, Mathieu Belanger wrote:
> * New kernel use tmp_wb instead of wb for that part of generic_writeback_sb_inodes
>
> * Migration doesn't clear page->mem_cgroup of live pages
> anymore and so account_page_dirtied do not take a mem_cgroup third argument anymore.


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] reiser4: port for linux-4.6
  2016-03-31 16:44 ` [PATCH] reiser4: port for linux-4.6 Mathieu Belanger
  2016-03-31 20:18   ` Edward Shishkin
@ 2016-04-25 16:06   ` Mathieu Belanger
  2016-04-25 16:21     ` Mathieu Belanger
  2016-04-25 17:14     ` Edward Shishkin
  1 sibling, 2 replies; 6+ messages in thread
From: Mathieu Belanger @ 2016-04-25 16:06 UTC (permalink / raw)
  To: Mathieu Belanger; +Cc: reiserfs-devel

[-- Attachment #1: Type: text/plain, Size: 809 bytes --]

I made the patch to support kernel 4.6-rc3+. They made change that was not in the initial rc.

kernel function rename:
page_cache_release -> put_page
page_cache_get -> get_page
PAGE_CACHE_* -> PAGE_*

The attached patch just contain these page_cache change. I will release a unified patch later today for ppl wanting to test it.

Note : this patch apply directly to the kernel, after you applied the initial reiser4 patch generated by my other patch.

On Thu, 31 Mar 2016 10:44:45 -0600
Mathieu Belanger <admin@korinar.com> wrote:

> * New kernel use tmp_wb instead of wb for that part of generic_writeback_sb_inodes
> 
> * Migration doesn't clear page->mem_cgroup of live pages
> anymore and so account_page_dirtied do not take a mem_cgroup third argument anymore.


-- 
Mathieu Belanger <admin@korinar.com>

[-- Attachment #2: reiser4-for-4.6-rc3-delta.patch --]
[-- Type: application/octet-stream, Size: 42965 bytes --]

diff -Naur linux-4.6-rc5/fs/reiser4/as_ops.c final/fs/reiser4/as_ops.c
--- linux-4.6-rc5/fs/reiser4/as_ops.c	2016-04-25 10:57:59.663322726 -0500
+++ final/fs/reiser4/as_ops.c	2016-04-25 01:41:59.272839399 -0500
@@ -94,7 +94,7 @@
 void reiser4_invalidatepage(struct page *page, unsigned int offset, unsigned int length)
 {
 	int ret = 0;
-	int partial_page = (offset || length < PAGE_CACHE_SIZE);
+	int partial_page = (offset || length < PAGE_SIZE);
 	reiser4_context *ctx;
 	struct inode *inode;
 	jnode *node;
diff -Naur linux-4.6-rc5/fs/reiser4/carry_ops.c final/fs/reiser4/carry_ops.c
--- linux-4.6-rc5/fs/reiser4/carry_ops.c	2016-04-25 10:57:59.666656059 -0500
+++ final/fs/reiser4/carry_ops.c	2016-04-25 01:37:10.566186452 -0500
@@ -1994,7 +1994,7 @@
 /* return number of pages required to store given number of bytes */
 static int bytes_to_pages(int bytes)
 {
-	return (bytes + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT;
+	return (bytes + PAGE_SIZE - 1) >> PAGE_SHIFT;
 }
 
 /* how many pages are required to allocate znodes during item insertion. */
diff -Naur linux-4.6-rc5/fs/reiser4/entd.c final/fs/reiser4/entd.c
--- linux-4.6-rc5/fs/reiser4/entd.c	2016-04-25 10:57:59.669989393 -0500
+++ final/fs/reiser4/entd.c	2016-04-25 01:42:24.502838200 -0500
@@ -233,7 +233,7 @@
 
 	rq->wbc->range_start = page_offset(rq->page);
 	rq->wbc->range_end = rq->wbc->range_start +
-		(ENTD_CAPTURE_APAGE_BURST << PAGE_CACHE_SHIFT);
+		(ENTD_CAPTURE_APAGE_BURST << PAGE_SHIFT);
 
 
 	rq->mapping->a_ops->writepages(rq->mapping, rq->wbc);
diff -Naur linux-4.6-rc5/fs/reiser4/flush_queue.c final/fs/reiser4/flush_queue.c
--- linux-4.6-rc5/fs/reiser4/flush_queue.c	2016-04-25 10:57:59.673322725 -0500
+++ final/fs/reiser4/flush_queue.c	2016-04-25 01:41:32.519507337 -0500
@@ -429,7 +429,7 @@
 		}
 
 		end_page_writeback(pg);
-		page_cache_release(pg);
+		put_page(pg);
 	}
 
 	if (fq) {
diff -Naur linux-4.6-rc5/fs/reiser4/init_super.c final/fs/reiser4/init_super.c
--- linux-4.6-rc5/fs/reiser4/init_super.c	2016-04-25 10:58:15.763321966 -0500
+++ final/fs/reiser4/init_super.c	2016-04-25 01:42:46.696170478 -0500
@@ -615,7 +615,7 @@
 		/* reiser4 master super block contains filesystem blocksize */
 		blocksize = le16_to_cpu(get_unaligned(&master_sb->blocksize));
 
-		if (blocksize != PAGE_CACHE_SIZE) {
+		if (blocksize != PAGE_SIZE) {
 			/*
 			 * currenly reiser4's blocksize must be equal to
 			 * pagesize
diff -Naur linux-4.6-rc5/fs/reiser4/jnode.c final/fs/reiser4/jnode.c
--- linux-4.6-rc5/fs/reiser4/jnode.c	2016-04-25 10:57:59.676656059 -0500
+++ final/fs/reiser4/jnode.c	2016-04-25 01:35:24.406191496 -0500
@@ -674,7 +674,7 @@
 	assert("nikita-2396", PageLocked(pg));
 	assert_spin_locked(&(node->guard));
 
-	page_cache_get(pg);
+	get_page(pg);
 	set_page_private(pg, (unsigned long)node);
 	node->pg = pg;
 	SetPagePrivate(pg);
@@ -695,7 +695,7 @@
 	set_page_private(page, 0ul);
 	ClearPagePrivate(page);
 	node->pg = NULL;
-	page_cache_release(page);
+	put_page(page);
 }
 
 #if 0
@@ -741,7 +741,7 @@
 		if (page == NULL)
 			break;
 
-		/* no need to page_cache_get( page ) here, because page cannot
+		/* no need to get_page( page ) here, because page cannot
 		   be evicted from memory without detaching it from jnode and
 		   this requires spin lock on jnode that we already hold.
 		 */
@@ -751,7 +751,7 @@
 		}
 
 		/* Page is locked by someone else. */
-		page_cache_get(page);
+		get_page(page);
 		spin_unlock_jnode(node);
 		wait_on_page_locked(page);
 		/* it is possible that page was detached from jnode and
@@ -759,7 +759,7 @@
 		   waiting on locked bit. This will be rechecked on the next
 		   loop iteration.
 		 */
-		page_cache_release(page);
+		put_page(page);
 
 		/* try again */
 	}
@@ -807,7 +807,7 @@
 			spin_unlock_jnode(node);
 			return page;
 		}
-		page_cache_get(page);
+		get_page(page);
 		spin_unlock_jnode(node);
 		lock_page(page);
 		assert("nikita-3134", page->mapping == jnode_get_mapping(node));
@@ -818,7 +818,7 @@
 		jnode_attach_page(node, page);
 	spin_unlock_jnode(node);
 
-	page_cache_release(page);
+	put_page(page);
 	assert("zam-894", jnode_page(node) == page);
 	return page;
 }
@@ -1038,10 +1038,10 @@
 	spin_lock_jnode(node);
 	page = jnode_page(node);
 	if (page != NULL) {
-		page_cache_get(page);
+		get_page(page);
 		spin_unlock_jnode(node);
 		wait_on_page_writeback(page);
-		page_cache_release(page);
+		put_page(page);
 	} else
 		spin_unlock_jnode(node);
 }
@@ -1255,7 +1255,7 @@
 	assert("nikita-3093", key != NULL);
 	assert("nikita-3094", jnode_is_unformatted(node));
 
-	off = ((loff_t) index_jnode(node)) << PAGE_CACHE_SHIFT;
+	off = ((loff_t) index_jnode(node)) << PAGE_SHIFT;
 	inode = mapping_jnode(node)->host;
 
 	if (node->parent_item_id != 0)
@@ -1753,14 +1753,14 @@
 void pin_jnode_data(jnode * node)
 {
 	assert("zam-671", jnode_page(node) != NULL);
-	page_cache_get(jnode_page(node));
+	get_page(jnode_page(node));
 }
 
 /* make jnode data free-able again */
 void unpin_jnode_data(jnode * node)
 {
 	assert("zam-672", jnode_page(node) != NULL);
-	page_cache_release(jnode_page(node));
+	put_page(jnode_page(node));
 }
 
 struct address_space *jnode_get_mapping(const jnode * node)
diff -Naur linux-4.6-rc5/fs/reiser4/page_cache.c final/fs/reiser4/page_cache.c
--- linux-4.6-rc5/fs/reiser4/page_cache.c	2016-04-25 10:57:59.679989392 -0500
+++ final/fs/reiser4/page_cache.c	2016-04-25 01:40:58.406175624 -0500
@@ -430,7 +430,7 @@
 		super = page->mapping->host->i_sb;
 		assert("nikita-2029", super != NULL);
 		blksz = super->s_blocksize;
-		assert("nikita-2028", blksz == (int)PAGE_CACHE_SIZE);
+		assert("nikita-2028", blksz == (int)PAGE_SIZE);
 
 		spin_lock_jnode(node);
 		blocknr = *jnode_get_io_block(node);
@@ -672,8 +672,8 @@
 
 	if (count == 0)
 		return;
-	from_bytes = ((loff_t) from) << PAGE_CACHE_SHIFT;
-	count_bytes = ((loff_t) count) << PAGE_CACHE_SHIFT;
+	from_bytes = ((loff_t) from) << PAGE_SHIFT;
+	count_bytes = ((loff_t) count) << PAGE_SHIFT;
 
 	unmap_mapping_range(mapping, from_bytes, count_bytes, even_cows);
 	truncate_inode_pages_range(mapping, from_bytes,
diff -Naur linux-4.6-rc5/fs/reiser4/plugin/cluster.h final/fs/reiser4/plugin/cluster.h
--- linux-4.6-rc5/fs/reiser4/plugin/cluster.h	2016-04-25 10:57:59.679989392 -0500
+++ final/fs/reiser4/plugin/cluster.h	2016-04-25 01:36:33.496188213 -0500
@@ -18,7 +18,7 @@
 
 static inline unsigned cluster_nrpages_shift(struct inode *inode)
 {
-	return inode_cluster_shift(inode) - PAGE_CACHE_SHIFT;
+	return inode_cluster_shift(inode) - PAGE_SHIFT;
 }
 
 /* cluster size in page units */
@@ -51,12 +51,12 @@
 
 static inline pgoff_t off_to_pg(loff_t off)
 {
-	return (off >> PAGE_CACHE_SHIFT);
+	return (off >> PAGE_SHIFT);
 }
 
 static inline loff_t pg_to_off(pgoff_t idx)
 {
-	return ((loff_t) (idx) << PAGE_CACHE_SHIFT);
+	return ((loff_t) (idx) << PAGE_SHIFT);
 }
 
 static inline cloff_t off_to_clust(loff_t off, struct inode *inode)
@@ -81,7 +81,7 @@
 
 static inline unsigned off_to_pgoff(loff_t off)
 {
-	return off & (PAGE_CACHE_SIZE - 1);
+	return off & (PAGE_SIZE - 1);
 }
 
 static inline unsigned off_to_cloff(loff_t off, struct inode *inode)
@@ -129,7 +129,7 @@
 /* size in pages */
 static inline pgoff_t size_in_pages(loff_t size)
 {
-	return size_in_blocks(size, PAGE_CACHE_SHIFT);
+	return size_in_blocks(size, PAGE_SHIFT);
 }
 
 /* size in logical clusters */
@@ -173,7 +173,7 @@
 /* the same as above, but block size is page size */
 static inline unsigned __mbp(loff_t size, pgoff_t pos)
 {
-	return __mbb(size, pos, PAGE_CACHE_SHIFT);
+	return __mbb(size, pos, PAGE_SHIFT);
 }
 
 /* number of file's bytes in the nominated logical cluster */
@@ -196,7 +196,7 @@
 static inline pgoff_t win_count_to_nrpages(struct reiser4_slide * win)
 {
 	return ((win->off + win->count +
-		 (1UL << PAGE_CACHE_SHIFT) - 1) >> PAGE_CACHE_SHIFT) -
+		 (1UL << PAGE_SHIFT) - 1) >> PAGE_SHIFT) -
 		off_to_pg(win->off);
 }
 
diff -Naur linux-4.6-rc5/fs/reiser4/plugin/disk_format/disk_format40.h final/fs/reiser4/plugin/disk_format/disk_format40.h
--- linux-4.6-rc5/fs/reiser4/plugin/disk_format/disk_format40.h	2016-04-25 10:57:59.683322725 -0500
+++ final/fs/reiser4/plugin/disk_format/disk_format40.h	2016-04-25 01:54:22.169470763 -0500
@@ -14,7 +14,7 @@
 
 /* magic for default reiser4 layout */
 #define FORMAT40_MAGIC "ReIsEr40FoRmAt"
-#define FORMAT40_OFFSET (REISER4_MASTER_OFFSET + PAGE_CACHE_SIZE)
+#define FORMAT40_OFFSET (REISER4_MASTER_OFFSET + PAGE_SIZE)
 
 #include "../../dformat.h"
 
@@ -73,13 +73,13 @@
 
 /* Defines for journal header and footer respectively. */
 #define FORMAT40_JOURNAL_HEADER_BLOCKNR \
-	((REISER4_MASTER_OFFSET / PAGE_CACHE_SIZE) + 3)
+	((REISER4_MASTER_OFFSET / PAGE_SIZE) + 3)
 
 #define FORMAT40_JOURNAL_FOOTER_BLOCKNR \
-	((REISER4_MASTER_OFFSET / PAGE_CACHE_SIZE) + 4)
+	((REISER4_MASTER_OFFSET / PAGE_SIZE) + 4)
 
 #define FORMAT40_STATUS_BLOCKNR \
-	((REISER4_MASTER_OFFSET / PAGE_CACHE_SIZE) + 5)
+	((REISER4_MASTER_OFFSET / PAGE_SIZE) + 5)
 
 /* Diskmap declarations */
 #define FORMAT40_PLUGIN_DISKMAP_ID ((REISER4_FORMAT_PLUGIN_TYPE<<16) | (FORMAT40_ID))
diff -Naur linux-4.6-rc5/fs/reiser4/plugin/file/cryptcompress.c final/fs/reiser4/plugin/file/cryptcompress.c
--- linux-4.6-rc5/fs/reiser4/plugin/file/cryptcompress.c	2016-04-25 10:57:59.686656058 -0500
+++ final/fs/reiser4/plugin/file/cryptcompress.c	2016-04-25 01:47:39.736156554 -0500
@@ -452,7 +452,7 @@
 {
 	assert("edward-696", object != NULL);
 
-	if (unlikely(inode_cluster_size(object) < PAGE_CACHE_SIZE)) {
+	if (unlikely(inode_cluster_size(object) < PAGE_SIZE)) {
 		warning("edward-1320", "Can not support '%s' "
 			"logical clusters (less then page size)",
 			inode_cluster_plugin(object)->h.label);
@@ -1951,7 +1951,7 @@
 
 		unlock_page(clust->pages[i]);
 
-		if (in_page < PAGE_CACHE_SIZE)
+		if (in_page < PAGE_SIZE)
 			/* end of the file */
 			break;
 	}
@@ -2113,7 +2113,7 @@
 
 		assert("edward-284", page != NULL);
 
-		to_pg = min((typeof(pg_off))PAGE_CACHE_SIZE - pg_off, cl_count);
+		to_pg = min((typeof(pg_off))PAGE_SIZE - pg_off, cl_count);
 		lock_page(page);
 		zero_user(page, pg_off, to_pg);
 		SetPageUptodate(page);
@@ -2354,7 +2354,7 @@
 			off = off_to_pgoff(win->off+win->count+win->delta);
 			if (off) {
 				lock_page(pg);
-				zero_user_segment(pg, off, PAGE_CACHE_SIZE);
+				zero_user_segment(pg, off, PAGE_SIZE);
 				unlock_page(pg);
 			}
 		}
@@ -2401,7 +2401,7 @@
 
 			offset =
 			    off_to_pgoff(win->off + win->count + win->delta);
-			zero_user_segment(pg, offset, PAGE_CACHE_SIZE);
+			zero_user_segment(pg, offset, PAGE_SIZE);
 			unlock_page(pg);
 			/* still not uptodate */
 			break;
@@ -2752,7 +2752,7 @@
 	assert("edward-154", buf != NULL);
 	assert("edward-161", reiser4_schedulable());
 	assert("edward-748", cryptcompress_inode_ok(inode));
-	assert("edward-159", current_blocksize == PAGE_CACHE_SIZE);
+	assert("edward-159", current_blocksize == PAGE_SIZE);
 	assert("edward-1274", get_current_context()->grabbed_blocks == 0);
 
 	hint = kmalloc(sizeof(*hint), reiser4_ctx_gfp_mask_get());
@@ -2825,7 +2825,7 @@
 		     i++, src += to_page) {
 			to_page = __mbp(win.off + win.count, i) - page_off;
 			assert("edward-1039",
-			       page_off + to_page <= PAGE_CACHE_SIZE);
+			       page_off + to_page <= PAGE_SIZE);
 			assert("edward-287", clust.pages[i] != NULL);
 
 			fault_in_pages_readable(src, to_page);
@@ -3148,7 +3148,7 @@
 	assert("edward-1133", inode->i_size < new_size);
 	assert("edward-1134", reiser4_schedulable());
 	assert("edward-1135", cryptcompress_inode_ok(inode));
-	assert("edward-1136", current_blocksize == PAGE_CACHE_SIZE);
+	assert("edward-1136", current_blocksize == PAGE_SIZE);
 	assert("edward-1333", off_to_cloff(inode->i_size, inode) != 0);
 
 	hint = kmalloc(sizeof(*hint), reiser4_ctx_gfp_mask_get());
@@ -3234,7 +3234,7 @@
 	assert("edward-1140", inode->i_size >= new_size);
 	assert("edward-1141", reiser4_schedulable());
 	assert("edward-1142", cryptcompress_inode_ok(inode));
-	assert("edward-1143", current_blocksize == PAGE_CACHE_SIZE);
+	assert("edward-1143", current_blocksize == PAGE_SIZE);
 
 	old_size = inode->i_size;
 
@@ -3292,7 +3292,7 @@
 
 	nr_zeros = off_to_pgoff(new_size);
 	if (nr_zeros)
-		nr_zeros = PAGE_CACHE_SIZE - nr_zeros;
+		nr_zeros = PAGE_SIZE - nr_zeros;
 
 	set_window(&clust, &win, inode, new_size, new_size + nr_zeros);
 	win.stat = HOLE_WINDOW;
@@ -3372,7 +3372,7 @@
 			break;
 
 		/* found */
-		page_cache_get(pages[i]);
+		get_page(pages[i]);
 		*index = pages[i]->index + 1;
 
 		radix_tree_tag_clear(&mapping->page_tree,
diff -Naur linux-4.6-rc5/fs/reiser4/plugin/file/cryptcompress.h final/fs/reiser4/plugin/file/cryptcompress.h
--- linux-4.6-rc5/fs/reiser4/plugin/file/cryptcompress.h	2016-04-25 10:57:59.686656058 -0500
+++ final/fs/reiser4/plugin/file/cryptcompress.h	2016-04-25 01:48:33.656153991 -0500
@@ -10,9 +10,9 @@
 
 #include <linux/pagemap.h>
 
-#define MIN_CLUSTER_SHIFT PAGE_CACHE_SHIFT
+#define MIN_CLUSTER_SHIFT PAGE_SHIFT
 #define MAX_CLUSTER_SHIFT 16
-#define MAX_CLUSTER_NRPAGES (1U << MAX_CLUSTER_SHIFT >> PAGE_CACHE_SHIFT)
+#define MAX_CLUSTER_NRPAGES (1U << MAX_CLUSTER_SHIFT >> PAGE_SHIFT)
 #define DC_CHECKSUM_SIZE 4
 
 #define MIN_LATTICE_FACTOR 1
@@ -602,7 +602,7 @@
 
 static inline void put_cluster_page(struct page * page)
 {
-	page_cache_release(page);
+	put_page(page);
 }
 
 #endif /* __FS_REISER4_CRYPTCOMPRESS_H__ */
diff -Naur linux-4.6-rc5/fs/reiser4/plugin/file/file.c final/fs/reiser4/plugin/file/file.c
--- linux-4.6-rc5/fs/reiser4/plugin/file/file.c	2016-04-25 10:57:59.689989391 -0500
+++ final/fs/reiser4/plugin/file/file.c	2016-04-25 01:44:13.129499705 -0500
@@ -482,7 +482,7 @@
 		 */
 		return 0;
 
-	padd_from = inode->i_size & (PAGE_CACHE_SIZE - 1);
+	padd_from = inode->i_size & (PAGE_SIZE - 1);
 	if (!padd_from)
 		/* file is truncated to page boundary */
 		return 0;
@@ -494,7 +494,7 @@
 	}
 
 	/* last page is partially truncated - zero its content */
-	index = (inode->i_size >> PAGE_CACHE_SHIFT);
+	index = (inode->i_size >> PAGE_SHIFT);
 	page = read_mapping_page(inode->i_mapping, index, NULL);
 	if (IS_ERR(page)) {
 		/*
@@ -510,7 +510,7 @@
 	}
 	wait_on_page_locked(page);
 	if (!PageUptodate(page)) {
-		page_cache_release(page);
+		put_page(page);
 		/*
 		 * the below does up(sbinfo->delete_mutex). Do not get
 		 * confused
@@ -530,7 +530,7 @@
 	 * be better to update it here when file is really truncated
 	 */
 	if (result) {
-		page_cache_release(page);
+		put_page(page);
 		/*
 		 * the below does up(sbinfo->delete_mutex). Do not get
 		 * confused
@@ -541,9 +541,9 @@
 
 	lock_page(page);
 	assert("vs-1066", PageLocked(page));
-	zero_user_segment(page, padd_from, PAGE_CACHE_SIZE);
+	zero_user_segment(page, padd_from, PAGE_SIZE);
 	unlock_page(page);
-	page_cache_release(page);
+	put_page(page);
 	/* the below does up(sbinfo->delete_mutex). Do not get confused */
 	reiser4_release_reserved(inode->i_sb);
 	return 0;
@@ -973,7 +973,7 @@
 
 	/* clear MOVED tag for all found pages */
 	for (i = 0; i < pagevec_count(&pvec); i++) {
-		page_cache_get(pvec.pages[i]);
+		get_page(pvec.pages[i]);
 		radix_tree_tag_clear(&mapping->page_tree, pvec.pages[i]->index,
 				     PAGECACHE_TAG_REISER4_MOVED);
 	}
@@ -1107,14 +1107,14 @@
 		 * page may not leave radix tree because it is protected from
 		 * truncating by inode->i_mutex locked by sys_fsync
 		 */
-		page_cache_get(page);
+		get_page(page);
 		spin_unlock_irq(&mapping->tree_lock);
 
 		from = page->index + 1;
 
 		result = sync_page(page);
 
-		page_cache_release(page);
+		put_page(page);
 		spin_lock_irq(&mapping->tree_lock);
 	}
 
@@ -1211,7 +1211,7 @@
 		result = 0;
 		goto end;
 	}
-	jindex = pindex = wbc->range_start >> PAGE_CACHE_SHIFT;
+	jindex = pindex = wbc->range_start >> PAGE_SHIFT;
 	result = 0;
 	nr_pages = size_in_pages(i_size_read(inode));
 
@@ -1357,7 +1357,7 @@
 
 	if (page->mapping->host->i_size <= page_offset(page)) {
 		/* page is out of file */
-		zero_user(page, 0, PAGE_CACHE_SIZE);
+		zero_user(page, 0, PAGE_SIZE);
 		SetPageUptodate(page);
 		unlock_page(page);
 		return 0;
@@ -1390,11 +1390,11 @@
 	key_by_inode_and_offset_common(inode, page_offset(page), &key);
 
 	/* look for file metadata corresponding to first byte of page */
-	page_cache_get(page);
+	get_page(page);
 	unlock_page(page);
 	result = find_file_item(hint, &key, ZNODE_READ_LOCK, inode);
 	lock_page(page);
-	page_cache_release(page);
+	put_page(page);
 
 	if (page->mapping == NULL) {
 		/*
@@ -1476,7 +1476,7 @@
 
 	if (!result) {
 		set_key_offset(&key,
-			       (loff_t) (page->index + 1) << PAGE_CACHE_SHIFT);
+			       (loff_t) (page->index + 1) << PAGE_SHIFT);
 		/* FIXME should call reiser4_set_hint() */
 		reiser4_unset_hint(hint);
 	} else {
@@ -1533,7 +1533,7 @@
 		unlock_page(page);
 		return 0;
 	}
-	page_cache_get(page);
+	get_page(page);
 
 	if (rc->lh.node == 0) {
 		/* no twig lock  - have to do tree search. */
@@ -1602,7 +1602,7 @@
  unlock:
 	unlock_page(page);
  exit:
-	page_cache_release(page);
+	put_page(page);
 	return ret;
 }
 
@@ -1817,7 +1817,7 @@
 	uf_info = unix_file_inode_data(inode);
 
 	/* read by page-aligned chunks */
-	to_read = PAGE_CACHE_SIZE - (*off & (loff_t)(PAGE_CACHE_SIZE - 1));
+	to_read = PAGE_SIZE - (*off & (loff_t)(PAGE_SIZE - 1));
 	if (to_read > count)
 		to_read = count;
 	while (count > 0) {
@@ -1840,8 +1840,8 @@
 		/* total number of read bytes */
 		was_read += result;
 		to_read = count;
-		if (to_read > PAGE_CACHE_SIZE)
-			to_read = PAGE_CACHE_SIZE;
+		if (to_read > PAGE_SIZE)
+			to_read = PAGE_SIZE;
 	}
 	done_lh(&hint->lh);
 	save_file_hint(file, hint);
@@ -1865,8 +1865,8 @@
 static int check_pages_unix_file(struct file *file, struct inode *inode)
 {
 	reiser4_invalidate_pages(inode->i_mapping, 0,
-				 (inode->i_size + PAGE_CACHE_SIZE -
-				  1) >> PAGE_CACHE_SHIFT, 0);
+				 (inode->i_size + PAGE_SIZE -
+				  1) >> PAGE_SHIFT, 0);
 	return unpack(file, inode, 0 /* not forever */ );
 }
 
@@ -2086,7 +2086,7 @@
 	struct inode *inode;
 	struct unix_file_info *uf_info;
 	ssize_t written;
-	int to_write = PAGE_CACHE_SIZE * WRITE_GRANULARITY;
+	int to_write = PAGE_SIZE * WRITE_GRANULARITY;
 	size_t left;
 	ssize_t (*write_op)(struct file *, struct inode *,
 			    const char __user *, size_t,
@@ -2684,7 +2684,7 @@
 			  loff_t pos, unsigned len)
 {
 	int ret;
-	if (len == PAGE_CACHE_SIZE || PageUptodate(page))
+	if (len == PAGE_SIZE || PageUptodate(page))
 		return 0;
 
 	ret = readpage_unix_file(file, page);
diff -Naur linux-4.6-rc5/fs/reiser4/plugin/file/file_conversion.c final/fs/reiser4/plugin/file/file_conversion.c
--- linux-4.6-rc5/fs/reiser4/plugin/file/file_conversion.c	2016-04-25 10:57:59.689989391 -0500
+++ final/fs/reiser4/plugin/file/file_conversion.c	2016-04-25 01:46:12.902827347 -0500
@@ -320,7 +320,7 @@
 			BUG_ON(!PageUptodate(clust->pages[i]));
 			data = kmap(clust->pages[i]);
 			memcpy(tfm_stream_data(tc, INPUT_STREAM) + pg_to_off(i),
-			       data, PAGE_CACHE_SIZE);
+			       data, PAGE_SIZE);
 			kunmap(clust->pages[i]);
 			unlock_page(clust->pages[i]);
 		}
@@ -673,7 +673,7 @@
 	reiser4_context *ctx;
 	struct inode * inode = file_inode(file);
 
-	index = pos >> PAGE_CACHE_SHIFT;
+	index = pos >> PAGE_SHIFT;
 	page = grab_cache_page_write_begin(mapping, index,
 					   flags & AOP_FLAG_NOFS);
 	*pagep = page;
@@ -701,7 +701,7 @@
 	reiser4_exit_context(ctx);
  err2:
 	unlock_page(page);
-	page_cache_release(page);
+	put_page(page);
 	return ret;
 }
 
@@ -727,7 +727,7 @@
 	set_page_dirty_notag(page);
 
 	ret = PROT_PASSIVE(int, write_end, (file, page, pos, copied, fsdata));
-	page_cache_release(page);
+	put_page(page);
 
 	/* don't commit transaction under inode semaphore */
 	context_set_commit_async(ctx);
diff -Naur linux-4.6-rc5/fs/reiser4/plugin/file/tail_conversion.c final/fs/reiser4/plugin/file/tail_conversion.c
--- linux-4.6-rc5/fs/reiser4/plugin/file/tail_conversion.c	2016-04-25 10:57:59.689989391 -0500
+++ final/fs/reiser4/plugin/file/tail_conversion.c	2016-04-25 01:45:28.262829467 -0500
@@ -140,7 +140,7 @@
 #endif
 			break;
 		}
-		page_cache_release(pages[i]);
+		put_page(pages[i]);
 		pages[i] = NULL;
 	}
 }
@@ -372,7 +372,7 @@
 		bytes = 0;
 		for (i = 0; i < sizeof_array(pages) && done == 0; i++) {
 			assert("vs-598",
-			       (get_key_offset(&key) & ~PAGE_CACHE_MASK) == 0);
+			       (get_key_offset(&key) & ~PAGE_MASK) == 0);
 			page = alloc_page(reiser4_ctx_gfp_mask_get());
 			if (!page) {
 				result = RETERR(-ENOMEM);
@@ -381,7 +381,7 @@
 
 			page->index =
 			    (unsigned long)(get_key_offset(&key) >>
-					    PAGE_CACHE_SHIFT);
+					    PAGE_SHIFT);
 			/*
 			 * usually when one is going to longterm lock znode (as
 			 * find_file_item does, for instance) he must not hold
@@ -395,7 +395,7 @@
 			reiser4_invalidate_pages(inode->i_mapping, page->index,
 						 1, 0);
 
-			for (page_off = 0; page_off < PAGE_CACHE_SIZE;) {
+			for (page_off = 0; page_off < PAGE_SIZE;) {
 				coord_t coord;
 				lock_handle lh;
 
@@ -412,7 +412,7 @@
 					 * were found
 					 */
 					done_lh(&lh);
-					page_cache_release(page);
+					put_page(page);
 					goto error;
 				}
 
@@ -425,14 +425,14 @@
 					done = 1;
 					p_data = kmap_atomic(page);
 					memset(p_data + page_off, 0,
-					       PAGE_CACHE_SIZE - page_off);
+					       PAGE_SIZE - page_off);
 					kunmap_atomic(p_data);
 					break;
 				}
 
 				result = zload(coord.node);
 				if (result) {
-					page_cache_release(page);
+					put_page(page);
 					done_lh(&lh);
 					goto error;
 				}
@@ -445,8 +445,8 @@
 				    item_length_by_coord(&coord) -
 				    coord.unit_pos;
 				/* limit length of copy to end of page */
-				if (count > PAGE_CACHE_SIZE - page_off)
-					count = PAGE_CACHE_SIZE - page_off;
+				if (count > PAGE_SIZE - page_off)
+					count = PAGE_SIZE - page_off;
 
 				/*
 				 * copy item (as much as will fit starting from
@@ -470,7 +470,7 @@
 				/* something was copied into page */
 				pages[i] = page;
 			} else {
-				page_cache_release(page);
+				put_page(page);
 				assert("vs-1648", done == 1);
 				break;
 			}
@@ -602,8 +602,8 @@
 
 	/* number of pages in the file */
 	num_pages =
-	    (inode->i_size + - offset + PAGE_CACHE_SIZE - 1) >> PAGE_CACHE_SHIFT;
-	start_page = offset >> PAGE_CACHE_SHIFT;
+	    (inode->i_size + - offset + PAGE_SIZE - 1) >> PAGE_SHIFT;
+	start_page = offset >> PAGE_SHIFT;
 
 	inode_file_plugin(inode)->key_by_inode(inode, offset, &from);
 	to = from;
@@ -633,15 +633,15 @@
 		wait_on_page_locked(page);
 
 		if (!PageUptodate(page)) {
-			page_cache_release(page);
+			put_page(page);
 			result = RETERR(-EIO);
 			break;
 		}
 
 		/* cut part of file we have read */
-		start_byte = (__u64) ((i + start_page) << PAGE_CACHE_SHIFT);
+		start_byte = (__u64) ((i + start_page) << PAGE_SHIFT);
 		set_key_offset(&from, start_byte);
-		set_key_offset(&to, start_byte + PAGE_CACHE_SIZE - 1);
+		set_key_offset(&to, start_byte + PAGE_SIZE - 1);
 		/*
 		 * reiser4_cut_tree_object() returns -E_REPEAT to allow atom
 		 * commits during over-long truncates. But
@@ -652,7 +652,7 @@
 					  &to, inode, 0);
 
 		if (result) {
-			page_cache_release(page);
+			put_page(page);
 			warning("edward-1570",
 				"Can not delete converted chunk: %i",
 				result);
@@ -660,11 +660,11 @@
 		}
 
 		/* put page data into tree via tail_write */
-		count = PAGE_CACHE_SIZE;
+		count = PAGE_SIZE;
 		if ((i == (num_pages - 1)) &&
-		    (inode->i_size & ~PAGE_CACHE_MASK))
+		    (inode->i_size & ~PAGE_MASK))
 			/* last page can be incompleted */
-			count = (inode->i_size & ~PAGE_CACHE_MASK);
+			count = (inode->i_size & ~PAGE_MASK);
 		while (count) {
 			loff_t pos = start_byte;
 
@@ -689,7 +689,7 @@
 				warning("edward-1571",
 			"Report the error code %i to developers. Run FSCK",
 					result);
-				page_cache_release(page);
+				put_page(page);
 				reiser4_inode_clr_flag(inode,
 						       REISER4_PART_IN_CONV);
 				return result;
@@ -708,7 +708,7 @@
 		wait_on_page_writeback(page);
 		reiser4_drop_page(page);
 		/* release reference taken by read_cache_page() above */
-		page_cache_release(page);
+		put_page(page);
 
 		drop_exclusive_access(uf_info);
 		/* throttle the conversion */
diff -Naur linux-4.6-rc5/fs/reiser4/plugin/item/ctail.c final/fs/reiser4/plugin/item/ctail.c
--- linux-4.6-rc5/fs/reiser4/plugin/item/ctail.c	2016-04-25 10:57:59.696656058 -0500
+++ final/fs/reiser4/plugin/item/ctail.c	2016-04-25 01:50:34.696148240 -0500
@@ -662,7 +662,7 @@
 		goto exit;
 	to_page = pbytes(page_index(page), inode);
 	if (to_page == 0) {
-		zero_user(page, 0, PAGE_CACHE_SIZE);
+		zero_user(page, 0, PAGE_SIZE);
 		SetPageUptodate(page);
 		goto exit;
 	}
@@ -679,7 +679,7 @@
 		/* refresh bytes */
 		to_page = pbytes(page_index(page), inode);
 		if (to_page == 0) {
-			zero_user(page, 0, PAGE_CACHE_SIZE);
+			zero_user(page, 0, PAGE_SIZE);
 			SetPageUptodate(page);
 			goto exit;
 		}
@@ -710,7 +710,7 @@
 		 */
 	case FAKE_DISK_CLUSTER:
 		/* fill the page by zeroes */
-		zero_user(page, 0, PAGE_CACHE_SIZE);
+		zero_user(page, 0, PAGE_SIZE);
 		SetPageUptodate(page);
 		break;
 	case PREP_DISK_CLUSTER:
@@ -723,7 +723,7 @@
 
 		data = kmap(page);
 		memcpy(data, tfm_stream_data(tc, OUTPUT_STREAM) + cloff, to_page);
-		memset(data + to_page, 0, (size_t) PAGE_CACHE_SIZE - to_page);
+		memset(data + to_page, 0, (size_t) PAGE_SIZE - to_page);
 		flush_dcache_page(page);
 		kunmap(page);
 		SetPageUptodate(page);
@@ -820,7 +820,7 @@
 		return 0;
 	}
 	if (pbytes(page_index(page), inode) == 0) {
-		zero_user(page, 0, PAGE_CACHE_SIZE);
+		zero_user(page, 0, PAGE_SIZE);
 		SetPageUptodate(page);
 		unlock_page(page);
 		return 0;
diff -Naur linux-4.6-rc5/fs/reiser4/plugin/item/extent_file_ops.c final/fs/reiser4/plugin/item/extent_file_ops.c
--- linux-4.6-rc5/fs/reiser4/plugin/item/extent_file_ops.c	2016-04-25 10:57:59.696656058 -0500
+++ final/fs/reiser4/plugin/item/extent_file_ops.c	2016-04-25 01:52:26.489476261 -0500
@@ -53,7 +53,7 @@
 		set_key_offset(&coord_key,
 			       get_key_offset(&coord_key) +
 			       (uf_coord->extension.extent.
-				pos_in_unit << PAGE_CACHE_SHIFT));
+				pos_in_unit << PAGE_SHIFT));
 		assert("", keyeq(key, &coord_key));
 	}
 #endif
@@ -209,7 +209,7 @@
 	if (item_plugin_by_coord(&c)->s.file.append_key)
 		item_plugin_by_coord(&c)->s.file.append_key(&c, &node_key);
 	set_key_offset(&jnode_key,
-		       get_key_offset(&jnode_key) + (loff_t)count * PAGE_CACHE_SIZE - 1);
+		       get_key_offset(&jnode_key) + (loff_t)count * PAGE_SIZE - 1);
 	assert("", keylt(&jnode_key, &node_key));
 	zrelse(twig);
 #endif
@@ -257,7 +257,7 @@
 	if (count == 0)
 		return 0;
 
-	assert("", get_key_offset(key) == (loff_t)index_jnode(jnodes[0]) * PAGE_CACHE_SIZE);
+	assert("", get_key_offset(key) == (loff_t)index_jnode(jnodes[0]) * PAGE_SIZE);
 
 	inode_add_blocks(mapping_jnode(jnodes[0])->host, count);
 
@@ -726,7 +726,7 @@
 			uf_coord->valid = 0;
 			return i + 1;
 		}
-		set_key_offset(&k, get_key_offset(&k) + PAGE_CACHE_SIZE);
+		set_key_offset(&k, get_key_offset(&k) + PAGE_SIZE);
 	}
 
 	return count;
@@ -824,7 +824,7 @@
 		/*
 		 * count == 0 is special case: expanding truncate
 		 */
-		pos = (loff_t)index_jnode(jnodes[0]) << PAGE_CACHE_SHIFT;
+		pos = (loff_t)index_jnode(jnodes[0]) << PAGE_SHIFT;
 	key_by_inode_and_offset_common(inode, pos, &key);
 
 	assert("", reiser4_lock_counters()->d_refs == 0);
@@ -880,7 +880,7 @@
 
 		jnodes += result;
 		count -= result;
-		set_key_offset(&key, get_key_offset(&key) + result * PAGE_CACHE_SIZE);
+		set_key_offset(&key, get_key_offset(&key) + result * PAGE_SIZE);
 
 		/* seal and unlock znode */
 		if (hint.ext_coord.valid)
@@ -989,9 +989,9 @@
 	BUG_ON(get_current_context()->trans->atom != NULL);
 
 	left = count;
-	index = *pos >> PAGE_CACHE_SHIFT;
+	index = *pos >> PAGE_SHIFT;
 	/* calculate number of pages which are to be written */
-      	end = ((*pos + count - 1) >> PAGE_CACHE_SHIFT);
+      	end = ((*pos + count - 1) >> PAGE_SHIFT);
 	nr_pages = end - index + 1;
 	nr_dirty = 0;
 	assert("", nr_pages <= WRITE_GRANULARITY + 1);
@@ -1009,7 +1009,7 @@
 		jnodes[i] = jnode_of_page(page);
 		if (IS_ERR(jnodes[i])) {
 			unlock_page(page);
-			page_cache_release(page);
+			put_page(page);
 			nr_pages = i;
 			result = RETERR(-ENOMEM);
 			goto out;
@@ -1023,14 +1023,14 @@
 
 	have_to_update_extent = 0;
 
-	page_off = (*pos & (PAGE_CACHE_SIZE - 1));
+	page_off = (*pos & (PAGE_SIZE - 1));
 	for (i = 0; i < nr_pages; i ++) {
-		to_page = PAGE_CACHE_SIZE - page_off;
+		to_page = PAGE_SIZE - page_off;
 		if (to_page > left)
 			to_page = left;
 		page = jnode_page(jnodes[i]);
 		if (page_offset(page) < inode->i_size &&
-		    !PageUptodate(page) && to_page != PAGE_CACHE_SIZE) {
+		    !PageUptodate(page) && to_page != PAGE_SIZE) {
 			/*
 			 * the above is not optimal for partial write to last
 			 * page of file when file size is not at boundary of
@@ -1053,10 +1053,10 @@
 		BUG_ON(get_current_context()->trans->atom != NULL);
 
 		lock_page(page);
-		if (!PageUptodate(page) && to_page != PAGE_CACHE_SIZE)
+		if (!PageUptodate(page) && to_page != PAGE_SIZE)
 			zero_user_segments(page, 0, page_off,
 					   page_off + to_page,
-					   PAGE_CACHE_SIZE);
+					   PAGE_SIZE);
 
 		written = filemap_copy_from_user(page, page_off, buf, to_page);
 		if (unlikely(written != to_page)) {
@@ -1097,7 +1097,7 @@
 	}
 out:
 	for (i = 0; i < nr_pages; i ++) {
-		page_cache_release(jnode_page(jnodes[i]));
+		put_page(jnode_page(jnodes[i]));
 		JF_CLR(jnodes[i], JNODE_WRITE_PREPARED);
 		jput(jnodes[i]);
 	}
@@ -1129,7 +1129,7 @@
 		 */
 		j = jfind(mapping, index);
 		if (j == NULL) {
-			zero_user(page, 0, PAGE_CACHE_SIZE);
+			zero_user(page, 0, PAGE_SIZE);
 			SetPageUptodate(page);
 			unlock_page(page);
 			return 0;
@@ -1144,7 +1144,7 @@
 		block = *jnode_get_io_block(j);
 		spin_unlock_jnode(j);
 		if (block == 0) {
-			zero_user(page, 0, PAGE_CACHE_SIZE);
+			zero_user(page, 0, PAGE_SIZE);
 			SetPageUptodate(page);
 			unlock_page(page);
 			jput(j);
@@ -1203,7 +1203,7 @@
 	struct extent_coord_extension *ext_coord;
 	char *kaddr;
 
-	assert("vs-1353", current_blocksize == PAGE_CACHE_SIZE);
+	assert("vs-1353", current_blocksize == PAGE_SIZE);
 	assert("vs-572", flow->user == 1);
 	assert("vs-1351", flow->length > 0);
 
@@ -1221,10 +1221,10 @@
 	ext_coord = &uf_coord->extension.extent;
 
 	file_off = get_key_offset(&flow->key);
-	page_off = (unsigned long)(file_off & (PAGE_CACHE_SIZE - 1));
-	page_cnt = PAGE_CACHE_SIZE - page_off;
+	page_off = (unsigned long)(file_off & (PAGE_SIZE - 1));
+	page_cnt = PAGE_SIZE - page_off;
 
-	page_idx = (unsigned long)(file_off >> PAGE_CACHE_SHIFT);
+	page_idx = (unsigned long)(file_off >> PAGE_SHIFT);
 
 	/* we start having twig node read locked. However, we do not want to
 	   keep that lock all the time readahead works. So, set a seal and
@@ -1240,7 +1240,7 @@
 		lock_page(page);
 		if (!PageUptodate(page)) {
 			unlock_page(page);
-			page_cache_release(page);
+			put_page(page);
 			warning("jmacd-97178",
 				"extent_read: page is not up to date");
 			return RETERR(-EIO);
@@ -1263,7 +1263,7 @@
 
 		result = fault_in_pages_writeable(flow->data, page_cnt);
 		if (result) {
-			page_cache_release(page);
+			put_page(page);
 			return RETERR(-EFAULT);
 		}
 
@@ -1279,7 +1279,7 @@
 			if (unlikely(result))
 				return RETERR(-EFAULT);
 		}
-		page_cache_release(page);
+		put_page(page);
 
 		/* increase (flow->key) offset,
 		 * update (flow->data) user area pointer
diff -Naur linux-4.6-rc5/fs/reiser4/plugin/item/extent_flush_ops.c final/fs/reiser4/plugin/item/extent_flush_ops.c
--- linux-4.6-rc5/fs/reiser4/plugin/item/extent_flush_ops.c	2016-04-25 10:57:59.696656058 -0500
+++ final/fs/reiser4/plugin/item/extent_flush_ops.c	2016-04-25 01:53:06.792807678 -0500
@@ -70,11 +70,11 @@
 		}
 
 		assert("vs-544",
-		       (get_key_offset(&key) >> PAGE_CACHE_SHIFT) < ~0ul);
+		       (get_key_offset(&key) >> PAGE_SHIFT) < ~0ul);
 		/* index of first or last (depending on @side) page addressed
 		   by the extent */
 		index =
-		    (unsigned long)(get_key_offset(&key) >> PAGE_CACHE_SHIFT);
+		    (unsigned long)(get_key_offset(&key) >> PAGE_SHIFT);
 		if (side == RIGHT_SIDE)
 			index--;
 
diff -Naur linux-4.6-rc5/fs/reiser4/plugin/item/extent_item_ops.c final/fs/reiser4/plugin/item/extent_item_ops.c
--- linux-4.6-rc5/fs/reiser4/plugin/item/extent_item_ops.c	2016-04-25 10:57:59.696656058 -0500
+++ final/fs/reiser4/plugin/item/extent_item_ops.c	2016-04-25 01:51:13.706146386 -0500
@@ -393,29 +393,29 @@
 			write_unlock_tree(tree);
 
 			from_off =
-			    get_key_offset(min_item_key) >> PAGE_CACHE_SHIFT;
+			    get_key_offset(min_item_key) >> PAGE_SHIFT;
 			to_off =
 			    (get_key_offset(max_item_key) +
-			     1) >> PAGE_CACHE_SHIFT;
+			     1) >> PAGE_SHIFT;
 			retval = ITEM_KILLED;
 		} else {
 			/* tail of item is to be removed */
 			from_off =
-			    (get_key_offset(pfrom_key) + PAGE_CACHE_SIZE -
-			     1) >> PAGE_CACHE_SHIFT;
+			    (get_key_offset(pfrom_key) + PAGE_SIZE -
+			     1) >> PAGE_SHIFT;
 			to_off =
 			    (get_key_offset(max_item_key) +
-			     1) >> PAGE_CACHE_SHIFT;
+			     1) >> PAGE_SHIFT;
 			retval = ITEM_TAIL_KILLED;
 		}
 	} else {
 		/* head of item is to be removed */
 		assert("vs-1571", keyeq(pfrom_key, min_item_key));
 		assert("vs-1572",
-		       (get_key_offset(pfrom_key) & (PAGE_CACHE_SIZE - 1)) ==
+		       (get_key_offset(pfrom_key) & (PAGE_SIZE - 1)) ==
 		       0);
 		assert("vs-1573",
-		       ((get_key_offset(pto_key) + 1) & (PAGE_CACHE_SIZE -
+		       ((get_key_offset(pto_key) + 1) & (PAGE_SIZE -
 							 1)) == 0);
 
 		if (kdata->left->node) {
@@ -430,8 +430,8 @@
 			write_unlock_dk(current_tree);
 		}
 
-		from_off = get_key_offset(pfrom_key) >> PAGE_CACHE_SHIFT;
-		to_off = (get_key_offset(pto_key) + 1) >> PAGE_CACHE_SHIFT;
+		from_off = get_key_offset(pfrom_key) >> PAGE_SHIFT;
+		to_off = (get_key_offset(pto_key) + 1) >> PAGE_SHIFT;
 		retval = ITEM_HEAD_KILLED;
 	}
 
@@ -446,7 +446,7 @@
 	ext = extent_item(coord) + from;
 	offset =
 	    (get_key_offset(min_item_key) +
-	     reiser4_extent_size(coord, from)) >> PAGE_CACHE_SHIFT;
+	     reiser4_extent_size(coord, from)) >> PAGE_SHIFT;
 
 	assert("vs-1551", from_off >= offset);
 	assert("vs-1552", from_off - offset <= extent_get_width(ext));
@@ -559,8 +559,8 @@
 	if (new_first) {
 		/* item head is cut. Item key will change. This new key is calculated here */
 		assert("vs-1556",
-		       (get_key_offset(pto_key) & (PAGE_CACHE_SIZE - 1)) ==
-		       (PAGE_CACHE_SIZE - 1));
+		       (get_key_offset(pto_key) & (PAGE_SIZE - 1)) ==
+		       (PAGE_SIZE - 1));
 		*new_first = *pto_key;
 		set_key_offset(new_first, get_key_offset(new_first) + 1);
 	}
@@ -580,8 +580,8 @@
 			/* unit @from is to be cut partially. Its width decreases */
 			ext = extent_item(coord) + from;
 			extent_set_width(ext,
-					 (off + PAGE_CACHE_SIZE -
-					  1) >> PAGE_CACHE_SHIFT);
+					 (off + PAGE_SIZE -
+					  1) >> PAGE_SHIFT);
 			count--;
 		}
 	} else {
@@ -591,7 +591,7 @@
 		assert("vs-1575", result == ITEM_HEAD_KILLED);
 		assert("", from == 0);
 		assert("",
-		       ((get_key_offset(pto_key) + 1) & (PAGE_CACHE_SIZE -
+		       ((get_key_offset(pto_key) + 1) & (PAGE_SIZE -
 							 1)) == 0);
 		assert("",
 		       get_key_offset(pto_key) + 1 >
@@ -604,7 +604,7 @@
 
 		rest =
 		    (max_to_offset -
-		     get_key_offset(pto_key)) >> PAGE_CACHE_SHIFT;
+		     get_key_offset(pto_key)) >> PAGE_SHIFT;
 		if (rest) {
 			/* unit @to is to be cut partially */
 			ext = extent_item(coord) + to;
@@ -662,10 +662,10 @@
 	}
 
 	assert("vs-1555",
-	       (get_key_offset(pfrom_key) & (PAGE_CACHE_SIZE - 1)) == 0);
+	       (get_key_offset(pfrom_key) & (PAGE_SIZE - 1)) == 0);
 	assert("vs-1556",
-	       (get_key_offset(pto_key) & (PAGE_CACHE_SIZE - 1)) ==
-	       (PAGE_CACHE_SIZE - 1));
+	       (get_key_offset(pto_key) & (PAGE_SIZE - 1)) ==
+	       (PAGE_SIZE - 1));
 
 	item_key_by_coord(coord, &item_key);
 
@@ -720,7 +720,7 @@
 		/* tail of unit @from is to be cut partially. Its width decreases */
 		assert("vs-1582", new_first == NULL);
 		ext = extent_item(coord) + from;
-		extent_set_width(ext, off >> PAGE_CACHE_SHIFT);
+		extent_set_width(ext, off >> PAGE_SHIFT);
 		count--;
 	}
 
@@ -735,15 +735,15 @@
 	if (off) {
 		/* @to_key is smaller than max key of unit @to. Unit @to will not be removed. It gets start increased
 		   and width decreased. */
-		assert("vs-1583", (off & (PAGE_CACHE_SIZE - 1)) == 0);
+		assert("vs-1583", (off & (PAGE_SIZE - 1)) == 0);
 		ext = extent_item(coord) + to;
 		if (state_of_extent(ext) == ALLOCATED_EXTENT)
 			extent_set_start(ext,
 					 extent_get_start(ext) +
 					 (extent_get_width(ext) -
-					  (off >> PAGE_CACHE_SHIFT)));
+					  (off >> PAGE_SHIFT)));
 
-		extent_set_width(ext, (off >> PAGE_CACHE_SHIFT));
+		extent_set_width(ext, (off >> PAGE_SHIFT));
 		count--;
 	}
 	return count * sizeof(reiser4_extent);
diff -Naur linux-4.6-rc5/fs/reiser4/plugin/item/tail.c final/fs/reiser4/plugin/item/tail.c
--- linux-4.6-rc5/fs/reiser4/plugin/item/tail.c	2016-04-25 10:57:59.699989391 -0500
+++ final/fs/reiser4/plugin/item/tail.c	2016-04-25 01:50:17.016149080 -0500
@@ -325,11 +325,11 @@
 		goto out_tap_done;
 
 	/* lookup until page is filled up. */
-	for (mapped = 0; mapped < PAGE_CACHE_SIZE; ) {
+	for (mapped = 0; mapped < PAGE_SIZE; ) {
 		/* number of bytes to be copied to page */
 		count = item_length_by_coord(&coord) - coord.unit_pos;
-		if (count > PAGE_CACHE_SIZE - mapped)
-			count = PAGE_CACHE_SIZE - mapped;
+		if (count > PAGE_SIZE - mapped)
+			count = PAGE_SIZE - mapped;
 
 		/* attach @page to address space and get data address */
 		pagedata = kmap_atomic(page);
@@ -346,7 +346,7 @@
 		kunmap_atomic(pagedata);
 
 		/* Getting next tail item. */
-		if (mapped < PAGE_CACHE_SIZE) {
+		if (mapped < PAGE_SIZE) {
 			/*
 			 * unlock page in order to avoid keep it locked
 			 * during tree lookup, which takes long term locks
@@ -390,8 +390,8 @@
 	}
 
  done:
-	if (mapped != PAGE_CACHE_SIZE)
-		zero_user_segment(page, mapped, PAGE_CACHE_SIZE);
+	if (mapped != PAGE_SIZE)
+		zero_user_segment(page, mapped, PAGE_SIZE);
 	SetPageUptodate(page);
  out_unlock_page:
 	unlock_page(page);
@@ -605,11 +605,11 @@
 	loff_t faulted;
 	int to_fault;
 
-	if (count > PAGE_PER_FLOW * PAGE_CACHE_SIZE)
-		count = PAGE_PER_FLOW * PAGE_CACHE_SIZE;
+	if (count > PAGE_PER_FLOW * PAGE_SIZE)
+		count = PAGE_PER_FLOW * PAGE_SIZE;
 	faulted = 0;
 	while (count > 0) {
-		to_fault = PAGE_CACHE_SIZE;
+		to_fault = PAGE_SIZE;
 		if (count < to_fault)
 			to_fault = count;
 		fault_in_pages_readable(buf + faulted, to_fault);
diff -Naur linux-4.6-rc5/fs/reiser4/plugin/space/bitmap.c final/fs/reiser4/plugin/space/bitmap.c
--- linux-4.6-rc5/fs/reiser4/plugin/space/bitmap.c	2016-04-25 10:57:59.706656058 -0500
+++ final/fs/reiser4/plugin/space/bitmap.c	2016-04-25 01:53:36.776139587 -0500
@@ -659,7 +659,7 @@
  * affected.  */
 
 #define REISER4_FIRST_BITMAP_BLOCK \
-	((REISER4_MASTER_OFFSET / PAGE_CACHE_SIZE) + 2)
+	((REISER4_MASTER_OFFSET / PAGE_SIZE) + 2)
 
 /* Audited by: green(2002.06.12) */
 static void
diff -Naur linux-4.6-rc5/fs/reiser4/tree.c final/fs/reiser4/tree.c
--- linux-4.6-rc5/fs/reiser4/tree.c	2016-04-25 10:57:59.713322724 -0500
+++ final/fs/reiser4/tree.c	2016-04-25 01:38:06.696183784 -0500
@@ -721,12 +721,12 @@
 		 * that znode is pinned in memory, which we are, because
 		 * forget_znode() is only called from longterm_unlock_znode().
 		 */
-		page_cache_get(page);
+		get_page(page);
 		spin_unlock_znode(node);
 		lock_page(page);
 		reiser4_uncapture_page(page);
 		unlock_page(page);
-		page_cache_release(page);
+		put_page(page);
 	} else {
 		txn_atom *atom;
 
@@ -1390,10 +1390,10 @@
 	if (reiser4_inode_get_flag(inode, REISER4_HAS_MMAP)) {
 		pgoff_t start_pg, end_pg;
 
-		start_pg = start >> PAGE_CACHE_SHIFT;
-		end_pg = (end - 1) >> PAGE_CACHE_SHIFT;
+		start_pg = start >> PAGE_SHIFT;
+		end_pg = (end - 1) >> PAGE_SHIFT;
 
-		if ((start & (PAGE_CACHE_SIZE - 1)) == 0) {
+		if ((start & (PAGE_SIZE - 1)) == 0) {
 			/*
 			 * kill up to the page boundary.
 			 */
diff -Naur linux-4.6-rc5/fs/reiser4/txnmgr.c final/fs/reiser4/txnmgr.c
--- linux-4.6-rc5/fs/reiser4/txnmgr.c	2016-04-25 10:57:59.716656057 -0500
+++ final/fs/reiser4/txnmgr.c	2016-04-25 01:39:26.616179986 -0500
@@ -858,7 +858,7 @@
 	assert("nikita-3309", atom != NULL);
 
 	captured = (unsigned)atom->capture_count;
-	pinnedpages = (captured >> PAGE_CACHE_SHIFT) * sizeof(znode);
+	pinnedpages = (captured >> PAGE_SHIFT) * sizeof(znode);
 
 	return (pinnedpages > (totalram_pages >> 3)) || (atom->flushed > 100);
 }
@@ -2231,10 +2231,10 @@
 		 * until @node can be removed from flush queue. But
 		 * reiser4_atom_wait_event() cannot be called with page locked,
 		 * because it deadlocks with jnode_extent_write(). Unlock page,
-		 * after making sure (through page_cache_get()) that it cannot
+		 * after making sure (through get_page()) that it cannot
 		 * be released from memory.
 		 */
-		page_cache_get(pg);
+		get_page(pg);
 		unlock_page(pg);
 		reiser4_atom_wait_event(atom);
 		lock_page(pg);
@@ -2243,7 +2243,7 @@
 		 */
 		reiser4_wait_page_writeback(pg);
 		spin_lock_jnode(node);
-		page_cache_release(pg);
+		put_page(pg);
 		atom = jnode_get_atom(node);
 /* VS-FIXME-HANS: improve the commenting in this function */
 		if (atom == NULL) {
@@ -2423,7 +2423,7 @@
 		 * bit. */
 		/* assert("nikita-3292",
 		   !PageWriteback(page) || ZF_ISSET(z, JNODE_WRITEBACK)); */
-		page_cache_get(page);
+		get_page(page);
 
 		/* jnode lock is not needed for the rest of
 		 * znode_set_dirty(). */
@@ -2431,7 +2431,7 @@
 		/* reiser4 file write code calls set_page_dirty for
 		 * unformatted nodes, for formatted nodes we do it here. */
 		set_page_dirty_notag(page);
-		page_cache_release(page);
+		put_page(page);
 		/* bump version counter in znode */
 		z->version = znode_build_version(jnode_get_tree(node));
 	} else {
diff -Naur linux-4.6-rc5/fs/reiser4/wander.c final/fs/reiser4/wander.c
--- linux-4.6-rc5/fs/reiser4/wander.c	2016-04-25 10:58:15.763321966 -0500
+++ final/fs/reiser4/wander.c	2016-04-25 01:40:09.016177971 -0500
@@ -736,7 +736,7 @@
 			pg = jnode_page(cur);
 			assert("zam-573", pg != NULL);
 
-			page_cache_get(pg);
+			get_page(pg);
 
 			lock_and_wait_page_writeback(pg);
 
@@ -746,7 +746,7 @@
 				 * pages to the bio.
 				 */
 				unlock_page(pg);
-				page_cache_release(pg);
+				put_page(pg);
 				break;
 			}
 
diff -Naur linux-4.6-rc5/fs/reiser4/znode.h final/fs/reiser4/znode.h
--- linux-4.6-rc5/fs/reiser4/znode.h	2016-04-25 10:57:59.719989390 -0500
+++ final/fs/reiser4/znode.h	2016-04-25 01:28:09.719545485 -0500
@@ -179,7 +179,7 @@
 znode_size(const znode * node UNUSED_ARG /* znode to query */ )
 {
 	assert("nikita-1416", node != NULL);
-	return PAGE_CACHE_SIZE;
+	return PAGE_SIZE;
 }
 
 extern void parent_coord_to_coord(const parent_coord_t * pcoord,

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] reiser4: port for linux-4.6
  2016-04-25 16:06   ` Mathieu Belanger
@ 2016-04-25 16:21     ` Mathieu Belanger
  2016-04-25 17:14     ` Edward Shishkin
  1 sibling, 0 replies; 6+ messages in thread
From: Mathieu Belanger @ 2016-04-25 16:21 UTC (permalink / raw)
  To: Mathieu Belanger; +Cc: reiserfs-devel

Complete patch to apply directly on the kernel is here : https://korinar.com/reiser4/reiser4-for-4.6-rc3.patch.bz2

It contain my initial patch, the Edward barrier patch and my last page_cache renaming patch.

Mathieu

On Mon, 25 Apr 2016 11:06:20 -0500
Mathieu Belanger <admin@korinar.com> wrote:

> I made the patch to support kernel 4.6-rc3+. They made change that was not in the initial rc.
> 
> kernel function rename:
> page_cache_release -> put_page
> page_cache_get -> get_page
> PAGE_CACHE_* -> PAGE_*
> 
> The attached patch just contain these page_cache change. I will release a unified patch later today for ppl wanting to test it.
> 
> Note : this patch apply directly to the kernel, after you applied the initial reiser4 patch generated by my other patch.
> 
> On Thu, 31 Mar 2016 10:44:45 -0600
> Mathieu Belanger <admin@korinar.com> wrote:
> 
> > * New kernel use tmp_wb instead of wb for that part of generic_writeback_sb_inodes
> > 
> > * Migration doesn't clear page->mem_cgroup of live pages
> > anymore and so account_page_dirtied do not take a mem_cgroup third argument anymore.
> 
> 
> -- 
> Mathieu Belanger <admin@korinar.com>


-- 
Mathieu Belanger <admin@korinar.com>

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] reiser4: port for linux-4.6
  2016-04-25 16:06   ` Mathieu Belanger
  2016-04-25 16:21     ` Mathieu Belanger
@ 2016-04-25 17:14     ` Edward Shishkin
  2016-04-25 19:36       ` Mathieu Belanger
  1 sibling, 1 reply; 6+ messages in thread
From: Edward Shishkin @ 2016-04-25 17:14 UTC (permalink / raw)
  To: Mathieu Belanger; +Cc: reiserfs-devel

Thanks Mathieu,

How your sda2 doing?
Has it survived any crashes since then?

Edward.


On 04/25/2016 06:06 PM, Mathieu Belanger wrote:
> I made the patch to support kernel 4.6-rc3+. They made change that was not in the initial rc.
>
> kernel function rename:
> page_cache_release -> put_page
> page_cache_get -> get_page
> PAGE_CACHE_* -> PAGE_*
>
> The attached patch just contain these page_cache change. I will release a unified patch later today for ppl wanting to test it.
>
> Note : this patch apply directly to the kernel, after you applied the initial reiser4 patch generated by my other patch.
>
> On Thu, 31 Mar 2016 10:44:45 -0600
> Mathieu Belanger <admin@korinar.com> wrote:
>
>> * New kernel use tmp_wb instead of wb for that part of generic_writeback_sb_inodes
>>
>> * Migration doesn't clear page->mem_cgroup of live pages
>> anymore and so account_page_dirtied do not take a mem_cgroup third argument anymore.
>


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] reiser4: port for linux-4.6
  2016-04-25 17:14     ` Edward Shishkin
@ 2016-04-25 19:36       ` Mathieu Belanger
  0 siblings, 0 replies; 6+ messages in thread
From: Mathieu Belanger @ 2016-04-25 19:36 UTC (permalink / raw)
  To: Edward Shishkin; +Cc: reiserfs-devel

Hi Edward,

My sda2 is fine since I did the fsck & RW mount on systemrescuecd. All files came back and since
them I did not have any issue (or crash).

Mathieu

On Mon, 25 Apr 2016 19:14:05 +0200
Edward Shishkin <edward.shishkin@gmail.com> wrote:

> Thanks Mathieu,
> 
> How your sda2 doing?
> Has it survived any crashes since then?
> 
> Edward.
> 
> 
> On 04/25/2016 06:06 PM, Mathieu Belanger wrote:
> > I made the patch to support kernel 4.6-rc3+. They made change that was not in the initial rc.
> >
> > kernel function rename:
> > page_cache_release -> put_page
> > page_cache_get -> get_page
> > PAGE_CACHE_* -> PAGE_*
> >
> > The attached patch just contain these page_cache change. I will release a unified patch later today for ppl wanting to test it.
> >
> > Note : this patch apply directly to the kernel, after you applied the initial reiser4 patch generated by my other patch.
> >
> > On Thu, 31 Mar 2016 10:44:45 -0600
> > Mathieu Belanger <admin@korinar.com> wrote:
> >
> >> * New kernel use tmp_wb instead of wb for that part of generic_writeback_sb_inodes
> >>
> >> * Migration doesn't clear page->mem_cgroup of live pages
> >> anymore and so account_page_dirtied do not take a mem_cgroup third argument anymore.
> >
> 


-- 
Mathieu Belanger <admin@korinar.com>

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2016-04-25 19:36 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <S1755885AbcCaQ3L/20160331162911Z+322@vger.kernel.org>
2016-03-31 16:44 ` [PATCH] reiser4: port for linux-4.6 Mathieu Belanger
2016-03-31 20:18   ` Edward Shishkin
2016-04-25 16:06   ` Mathieu Belanger
2016-04-25 16:21     ` Mathieu Belanger
2016-04-25 17:14     ` Edward Shishkin
2016-04-25 19:36       ` Mathieu Belanger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).