Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 252913
b: refs/heads/master
c: 89a58e3
h: refs/heads/master
i:
  252911: 2d64781
v: v3
  • Loading branch information
Benny Halevy authored and Boaz Harrosh committed May 29, 2011
1 parent ea75758 commit 068a52a
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 20 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 18ad0a9f2ccd260d37dd6bc5fa04c7819def4c84
refs/heads/master: 89a58e32d9105c01022a757fb32ddc3b51bf0025
3 changes: 3 additions & 0 deletions trunk/fs/nfs/nfs4filelayout.c
Original file line number Diff line number Diff line change
Expand Up @@ -661,6 +661,9 @@ filelayout_pg_test(struct nfs_pageio_descriptor *pgio, struct nfs_page *prev,
u64 p_stripe, r_stripe;
u32 stripe_unit;

if (!pnfs_generic_pg_test(pgio, prev, req))
return 0;

if (!pgio->pg_lseg)
return 1;
p_stripe = (u64)prev->wb_index << PAGE_CACHE_SHIFT;
Expand Down
14 changes: 1 addition & 13 deletions trunk/fs/nfs/objlayout/objio_osd.c
Original file line number Diff line number Diff line change
Expand Up @@ -988,18 +988,6 @@ ssize_t objio_write_pagelist(struct objlayout_io_state *ol_state, bool stable)
return _write_exec(ios);
}

/*
* objlayout_pg_test(). Called by nfs_can_coalesce_requests()
*
* return true iff coalesce page
*/
bool
objlayout_pg_test(struct nfs_pageio_descriptor *pgio, struct nfs_page *prev,
struct nfs_page *req)
{
return true;
}

static struct pnfs_layoutdriver_type objlayout_type = {
.id = LAYOUT_OSD2_OBJECTS,
.name = "LAYOUT_OSD2_OBJECTS",
Expand All @@ -1013,7 +1001,7 @@ static struct pnfs_layoutdriver_type objlayout_type = {

.read_pagelist = objlayout_read_pagelist,
.write_pagelist = objlayout_write_pagelist,
.pg_test = objlayout_pg_test,
.pg_test = pnfs_generic_pg_test,

.free_deviceid_node = objio_free_deviceid_node,

Expand Down
13 changes: 9 additions & 4 deletions trunk/fs/nfs/pnfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1067,12 +1067,17 @@ pnfs_generic_pg_test(struct nfs_pageio_descriptor *pgio, struct nfs_page *prev,
pgio->pg_count,
access_type,
gfp_flags);
} else if (pgio->pg_lseg &&
req_offset(req) > end_offset(pgio->pg_lseg->pls_range.offset,
pgio->pg_lseg->pls_range.length))
return true;
}

if (pgio->pg_lseg &&
req_offset(req) > end_offset(pgio->pg_lseg->pls_range.offset,
pgio->pg_lseg->pls_range.length))
return false;
return NFS_SERVER(pgio->pg_inode)->pnfs_curr_ld->pg_test(pgio, prev, req);

return true;
}
EXPORT_SYMBOL_GPL(pnfs_generic_pg_test);

/*
* Called by non rpc-based layout drivers
Expand Down
6 changes: 4 additions & 2 deletions trunk/fs/nfs/pnfs.h
Original file line number Diff line number Diff line change
Expand Up @@ -295,8 +295,10 @@ static inline int pnfs_return_layout(struct inode *ino)
static inline void pnfs_pageio_init(struct nfs_pageio_descriptor *pgio,
struct inode *inode)
{
if (NFS_SERVER(inode)->pnfs_curr_ld)
pgio->pg_test = pnfs_generic_pg_test;
struct pnfs_layoutdriver_type *ld = NFS_SERVER(inode)->pnfs_curr_ld;

if (ld)
pgio->pg_test = ld->pg_test;
}

#else /* CONFIG_NFS_V4_1 */
Expand Down

0 comments on commit 068a52a

Please sign in to comment.