Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 46293
b: refs/heads/master
c: a8d638e
h: refs/heads/master
i:
  46291: d9a73f7
v: v3
  • Loading branch information
Steven Whitehouse committed Feb 5, 2007
1 parent 11e2302 commit 948e662
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 222d396092acc11b4af03bede309aa066945e920
refs/heads/master: a8d638e30e768adc6956541f79f7bf05139ba475
27 changes: 27 additions & 0 deletions trunk/fs/gfs2/ops_address.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
#include <linux/pagevec.h>
#include <linux/mpage.h>
#include <linux/fs.h>
#include <linux/writeback.h>
#include <linux/gfs2_ondisk.h>
#include <linux/lm_interface.h>

Expand Down Expand Up @@ -156,6 +157,31 @@ static int gfs2_writepage(struct page *page, struct writeback_control *wbc)
return 0;
}

/**
* gfs2_writepages - Write a bunch of dirty pages back to disk
* @mapping: The mapping to write
* @wbc: Write-back control
*
* For journaled files and/or ordered writes this just falls back to the
* kernel's default writepages path for now. We will probably want to change
* that eventually (i.e. when we look at allocate on flush).
*
* For the data=writeback case though we can already ignore buffer heads
* and write whole extents at once. This is a big reduction in the
* number of I/O requests we send and the bmap calls we make in this case.
*/
int gfs2_writepages(struct address_space *mapping, struct writeback_control *wbc)
{
struct inode *inode = mapping->host;
struct gfs2_inode *ip = GFS2_I(inode);
struct gfs2_sbd *sdp = GFS2_SB(inode);

if (sdp->sd_args.ar_data == GFS2_DATA_WRITEBACK && !gfs2_is_jdata(ip))
return mpage_writepages(mapping, wbc, gfs2_get_block_noalloc);

return generic_writepages(mapping, wbc);
}

/**
* stuffed_readpage - Fill in a Linux page with stuffed file data
* @ip: the inode
Expand Down Expand Up @@ -757,6 +783,7 @@ int gfs2_releasepage(struct page *page, gfp_t gfp_mask)

const struct address_space_operations gfs2_file_aops = {
.writepage = gfs2_writepage,
.writepages = gfs2_writepages,
.readpage = gfs2_readpage,
.readpages = gfs2_readpages,
.sync_page = block_sync_page,
Expand Down

0 comments on commit 948e662

Please sign in to comment.