login
Header Space

 
 

[patch 4/4] fuse: support writable mmap fix

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <akpm@...>
Cc: <peterz@...>, <linux-kernel@...>, <linux-fsdevel@...>, <linux-mm@...>
Date: Tuesday, March 18, 2008 - 2:56 pm

From: Miklos Szeredi <mszeredi@suse.cz>

Set the BDI_CAP_NO_ACCT_WB capability, so that fuse can do it's own
accounting of writeback pages.

Signed-off-by: Miklos Szeredi <mszeredi@suse.cz>
---
 fs/fuse/file.c  |    3 ++-
 fs/fuse/inode.c |    2 ++
 2 files changed, 4 insertions(+), 1 deletion(-)

Index: linux/fs/fuse/file.c
===================================================================
--- linux.orig/fs/fuse/file.c	2008-03-18 19:27:43.000000000 +0100
+++ linux/fs/fuse/file.c	2008-03-18 19:43:40.000000000 +0100
@@ -1145,8 +1145,9 @@ static int fuse_writepage_locked(struct 
 	req->end = fuse_writepage_end;
 	req->inode = inode;
 
+	inc_bdi_stat(mapping->backing_dev_info, BDI_WRITEBACK);
 	inc_zone_page_state(tmp_page, NR_WRITEBACK_TEMP);
-	__end_page_writeback(page, false);
+	end_page_writeback(page);
 
 	spin_lock(&fc->lock);
 	list_add(&req->writepages_entry, &fi->writepages);
Index: linux/fs/fuse/inode.c
===================================================================
--- linux.orig/fs/fuse/inode.c	2008-03-18 19:27:43.000000000 +0100
+++ linux/fs/fuse/inode.c	2008-03-18 19:43:40.000000000 +0100
@@ -483,6 +483,8 @@ static struct fuse_conn *new_conn(struct
 		atomic_set(&fc->num_waiting, 0);
 		fc->bdi.ra_pages = (VM_MAX_READAHEAD * 1024) / PAGE_CACHE_SIZE;
 		fc->bdi.unplug_io_fn = default_unplug_io_fn;
+		/* fuse does it's own writeback accounting */
+		fc->bdi.capabilities = BDI_CAP_NO_ACCT_WB;
 		fc->dev = sb->s_dev;
 		err = bdi_init(&fc->bdi);
 		if (err)

--
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[patch 4/4] fuse: support writable mmap fix, Miklos Szeredi, (Tue Mar 18, 2:56 pm)
speck-geostationary