Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
linux
Commits
89a58e32
Commit
89a58e32
authored
May 25, 2011
by
Benny Halevy
Committed by
Boaz Harrosh
May 29, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NFSv4.1: use pnfs_generic_pg_test directly by layout driver
Signed-off-by:
Benny Halevy
<
bhalevy@panasas.com
>
parent
18ad0a9f
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
19 deletions
+17
-19
fs/nfs/nfs4filelayout.c
fs/nfs/nfs4filelayout.c
+3
-0
fs/nfs/objlayout/objio_osd.c
fs/nfs/objlayout/objio_osd.c
+1
-13
fs/nfs/pnfs.c
fs/nfs/pnfs.c
+9
-4
fs/nfs/pnfs.h
fs/nfs/pnfs.h
+4
-2
No files found.
fs/nfs/nfs4filelayout.c
View file @
89a58e32
...
@@ -661,6 +661,9 @@ filelayout_pg_test(struct nfs_pageio_descriptor *pgio, struct nfs_page *prev,
...
@@ -661,6 +661,9 @@ filelayout_pg_test(struct nfs_pageio_descriptor *pgio, struct nfs_page *prev,
u64
p_stripe
,
r_stripe
;
u64
p_stripe
,
r_stripe
;
u32
stripe_unit
;
u32
stripe_unit
;
if
(
!
pnfs_generic_pg_test
(
pgio
,
prev
,
req
))
return
0
;
if
(
!
pgio
->
pg_lseg
)
if
(
!
pgio
->
pg_lseg
)
return
1
;
return
1
;
p_stripe
=
(
u64
)
prev
->
wb_index
<<
PAGE_CACHE_SHIFT
;
p_stripe
=
(
u64
)
prev
->
wb_index
<<
PAGE_CACHE_SHIFT
;
...
...
fs/nfs/objlayout/objio_osd.c
View file @
89a58e32
...
@@ -988,18 +988,6 @@ ssize_t objio_write_pagelist(struct objlayout_io_state *ol_state, bool stable)
...
@@ -988,18 +988,6 @@ ssize_t objio_write_pagelist(struct objlayout_io_state *ol_state, bool stable)
return
_write_exec
(
ios
);
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
=
{
static
struct
pnfs_layoutdriver_type
objlayout_type
=
{
.
id
=
LAYOUT_OSD2_OBJECTS
,
.
id
=
LAYOUT_OSD2_OBJECTS
,
.
name
=
"LAYOUT_OSD2_OBJECTS"
,
.
name
=
"LAYOUT_OSD2_OBJECTS"
,
...
@@ -1013,7 +1001,7 @@ static struct pnfs_layoutdriver_type objlayout_type = {
...
@@ -1013,7 +1001,7 @@ static struct pnfs_layoutdriver_type objlayout_type = {
.
read_pagelist
=
objlayout_read_pagelist
,
.
read_pagelist
=
objlayout_read_pagelist
,
.
write_pagelist
=
objlayout_write_pagelist
,
.
write_pagelist
=
objlayout_write_pagelist
,
.
pg_test
=
objlayout
_pg_test
,
.
pg_test
=
pnfs_generic
_pg_test
,
.
free_deviceid_node
=
objio_free_deviceid_node
,
.
free_deviceid_node
=
objio_free_deviceid_node
,
...
...
fs/nfs/pnfs.c
View file @
89a58e32
...
@@ -1067,12 +1067,17 @@ pnfs_generic_pg_test(struct nfs_pageio_descriptor *pgio, struct nfs_page *prev,
...
@@ -1067,12 +1067,17 @@ pnfs_generic_pg_test(struct nfs_pageio_descriptor *pgio, struct nfs_page *prev,
pgio
->
pg_count
,
pgio
->
pg_count
,
access_type
,
access_type
,
gfp_flags
);
gfp_flags
);
}
else
if
(
pgio
->
pg_lseg
&&
return
true
;
req_offset
(
req
)
>
end_offset
(
pgio
->
pg_lseg
->
pls_range
.
offset
,
}
pgio
->
pg_lseg
->
pls_range
.
length
))
if
(
pgio
->
pg_lseg
&&
req_offset
(
req
)
>
end_offset
(
pgio
->
pg_lseg
->
pls_range
.
offset
,
pgio
->
pg_lseg
->
pls_range
.
length
))
return
false
;
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
* Called by non rpc-based layout drivers
...
...
fs/nfs/pnfs.h
View file @
89a58e32
...
@@ -295,8 +295,10 @@ static inline int pnfs_return_layout(struct inode *ino)
...
@@ -295,8 +295,10 @@ static inline int pnfs_return_layout(struct inode *ino)
static
inline
void
pnfs_pageio_init
(
struct
nfs_pageio_descriptor
*
pgio
,
static
inline
void
pnfs_pageio_init
(
struct
nfs_pageio_descriptor
*
pgio
,
struct
inode
*
inode
)
struct
inode
*
inode
)
{
{
if
(
NFS_SERVER
(
inode
)
->
pnfs_curr_ld
)
struct
pnfs_layoutdriver_type
*
ld
=
NFS_SERVER
(
inode
)
->
pnfs_curr_ld
;
pgio
->
pg_test
=
pnfs_generic_pg_test
;
if
(
ld
)
pgio
->
pg_test
=
ld
->
pg_test
;
}
}
#else
/* CONFIG_NFS_V4_1 */
#else
/* CONFIG_NFS_V4_1 */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment