Skip to content

Commit

Permalink
nilfs2: add sync_page method to page caches of meta data
Browse files Browse the repository at this point in the history
This applies block_sync_page() function to the sync_page method of
page caches for meta data files, gc page caches, and btree node
buffers.  This is a companion patch of ("nilfs2: enable sync_page
mothod") which applied the function for data pages.

This allows lock_page() for those meta data to unplug pending bio
requests.

Signed-off-by: Ryusuke Konishi <konishi.ryusuke@lab.ntt.co.jp>
  • Loading branch information
Ryusuke Konishi committed Jun 10, 2009
1 parent a53b475 commit fa03274
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 3 additions & 1 deletion fs/nilfs2/btnode.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,9 @@ void nilfs_btnode_cache_init_once(struct address_space *btnc)
INIT_LIST_HEAD(&btnc->i_mmap_nonlinear);
}

static struct address_space_operations def_btnode_aops;
static struct address_space_operations def_btnode_aops = {
.sync_page = block_sync_page,
};

void nilfs_btnode_cache_init(struct address_space *btnc,
struct backing_dev_info *bdi)
Expand Down
5 changes: 3 additions & 2 deletions fs/nilfs2/gcinode.c
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,9 @@
#include "dat.h"
#include "ifile.h"

static struct address_space_operations def_gcinode_aops = {};
/* XXX need def_gcinode_iops/fops? */
static struct address_space_operations def_gcinode_aops = {
.sync_page = block_sync_page,
};

/*
* nilfs_gccache_submit_read_data() - add data buffer and submit read request
Expand Down
1 change: 1 addition & 0 deletions fs/nilfs2/mdt.c
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,7 @@ nilfs_mdt_write_page(struct page *page, struct writeback_control *wbc)

static struct address_space_operations def_mdt_aops = {
.writepage = nilfs_mdt_write_page,
.sync_page = block_sync_page,
};

static struct inode_operations def_mdt_iops;
Expand Down

0 comments on commit fa03274

Please sign in to comment.