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
nexedi
linux
Commits
18ad0a9f
Commit
18ad0a9f
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: change pg_test return type to bool
Signed-off-by:
Benny Halevy
<
bhalevy@panasas.com
>
parent
dfed206b
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
22 additions
and
23 deletions
+22
-23
fs/nfs/nfs4filelayout.c
fs/nfs/nfs4filelayout.c
+3
-3
fs/nfs/objlayout/objio_osd.c
fs/nfs/objlayout/objio_osd.c
+3
-4
fs/nfs/pagelist.c
fs/nfs/pagelist.c
+11
-11
fs/nfs/pnfs.c
fs/nfs/pnfs.c
+2
-2
fs/nfs/pnfs.h
fs/nfs/pnfs.h
+2
-2
include/linux/nfs_page.h
include/linux/nfs_page.h
+1
-1
No files found.
fs/nfs/nfs4filelayout.c
View file @
18ad0a9f
...
@@ -651,10 +651,10 @@ filelayout_alloc_lseg(struct pnfs_layout_hdr *layoutid,
...
@@ -651,10 +651,10 @@ filelayout_alloc_lseg(struct pnfs_layout_hdr *layoutid,
/*
/*
* filelayout_pg_test(). Called by nfs_can_coalesce_requests()
* filelayout_pg_test(). Called by nfs_can_coalesce_requests()
*
*
* return
1 :
coalesce page
* return
true :
coalesce page
* return
0 :
don't coalesce page
* return
false :
don't coalesce page
*/
*/
int
bool
filelayout_pg_test
(
struct
nfs_pageio_descriptor
*
pgio
,
struct
nfs_page
*
prev
,
filelayout_pg_test
(
struct
nfs_pageio_descriptor
*
pgio
,
struct
nfs_page
*
prev
,
struct
nfs_page
*
req
)
struct
nfs_page
*
req
)
{
{
...
...
fs/nfs/objlayout/objio_osd.c
View file @
18ad0a9f
...
@@ -991,14 +991,13 @@ ssize_t objio_write_pagelist(struct objlayout_io_state *ol_state, bool stable)
...
@@ -991,14 +991,13 @@ ssize_t objio_write_pagelist(struct objlayout_io_state *ol_state, bool stable)
/*
/*
* objlayout_pg_test(). Called by nfs_can_coalesce_requests()
* objlayout_pg_test(). Called by nfs_can_coalesce_requests()
*
*
* return 1 : coalesce page
* return true iff coalesce page
* return 0 : don't coalesce page
*/
*/
int
bool
objlayout_pg_test
(
struct
nfs_pageio_descriptor
*
pgio
,
struct
nfs_page
*
prev
,
objlayout_pg_test
(
struct
nfs_pageio_descriptor
*
pgio
,
struct
nfs_page
*
prev
,
struct
nfs_page
*
req
)
struct
nfs_page
*
req
)
{
{
return
1
;
return
true
;
}
}
static
struct
pnfs_layoutdriver_type
objlayout_type
=
{
static
struct
pnfs_layoutdriver_type
objlayout_type
=
{
...
...
fs/nfs/pagelist.c
View file @
18ad0a9f
...
@@ -244,29 +244,29 @@ void nfs_pageio_init(struct nfs_pageio_descriptor *desc,
...
@@ -244,29 +244,29 @@ void nfs_pageio_init(struct nfs_pageio_descriptor *desc,
*
*
* Return 'true' if this is the case, else return 'false'.
* Return 'true' if this is the case, else return 'false'.
*/
*/
static
int
nfs_can_coalesce_requests
(
struct
nfs_page
*
prev
,
static
bool
nfs_can_coalesce_requests
(
struct
nfs_page
*
prev
,
struct
nfs_page
*
req
,
struct
nfs_page
*
req
,
struct
nfs_pageio_descriptor
*
pgio
)
struct
nfs_pageio_descriptor
*
pgio
)
{
{
if
(
req
->
wb_context
->
cred
!=
prev
->
wb_context
->
cred
)
if
(
req
->
wb_context
->
cred
!=
prev
->
wb_context
->
cred
)
return
0
;
return
false
;
if
(
req
->
wb_lock_context
->
lockowner
!=
prev
->
wb_lock_context
->
lockowner
)
if
(
req
->
wb_lock_context
->
lockowner
!=
prev
->
wb_lock_context
->
lockowner
)
return
0
;
return
false
;
if
(
req
->
wb_context
->
state
!=
prev
->
wb_context
->
state
)
if
(
req
->
wb_context
->
state
!=
prev
->
wb_context
->
state
)
return
0
;
return
false
;
if
(
req
->
wb_index
!=
(
prev
->
wb_index
+
1
))
if
(
req
->
wb_index
!=
(
prev
->
wb_index
+
1
))
return
0
;
return
false
;
if
(
req
->
wb_pgbase
!=
0
)
if
(
req
->
wb_pgbase
!=
0
)
return
0
;
return
false
;
if
(
prev
->
wb_pgbase
+
prev
->
wb_bytes
!=
PAGE_CACHE_SIZE
)
if
(
prev
->
wb_pgbase
+
prev
->
wb_bytes
!=
PAGE_CACHE_SIZE
)
return
0
;
return
false
;
/*
/*
* Non-whole file layouts need to check that req is inside of
* Non-whole file layouts need to check that req is inside of
* pgio->pg_lseg.
* pgio->pg_lseg.
*/
*/
if
(
pgio
->
pg_test
&&
!
pgio
->
pg_test
(
pgio
,
prev
,
req
))
if
(
pgio
->
pg_test
&&
!
pgio
->
pg_test
(
pgio
,
prev
,
req
))
return
0
;
return
false
;
return
1
;
return
true
;
}
}
/**
/**
...
...
fs/nfs/pnfs.c
View file @
18ad0a9f
...
@@ -1043,7 +1043,7 @@ pnfs_layout_process(struct nfs4_layoutget *lgp)
...
@@ -1043,7 +1043,7 @@ pnfs_layout_process(struct nfs4_layoutget *lgp)
goto
out
;
goto
out
;
}
}
int
bool
pnfs_generic_pg_test
(
struct
nfs_pageio_descriptor
*
pgio
,
struct
nfs_page
*
prev
,
pnfs_generic_pg_test
(
struct
nfs_pageio_descriptor
*
pgio
,
struct
nfs_page
*
prev
,
struct
nfs_page
*
req
)
struct
nfs_page
*
req
)
{
{
...
@@ -1070,7 +1070,7 @@ pnfs_generic_pg_test(struct nfs_pageio_descriptor *pgio, struct nfs_page *prev,
...
@@ -1070,7 +1070,7 @@ pnfs_generic_pg_test(struct nfs_pageio_descriptor *pgio, struct nfs_page *prev,
}
else
if
(
pgio
->
pg_lseg
&&
}
else
if
(
pgio
->
pg_lseg
&&
req_offset
(
req
)
>
end_offset
(
pgio
->
pg_lseg
->
pls_range
.
offset
,
req_offset
(
req
)
>
end_offset
(
pgio
->
pg_lseg
->
pls_range
.
offset
,
pgio
->
pg_lseg
->
pls_range
.
length
))
pgio
->
pg_lseg
->
pls_range
.
length
))
return
0
;
return
false
;
return
NFS_SERVER
(
pgio
->
pg_inode
)
->
pnfs_curr_ld
->
pg_test
(
pgio
,
prev
,
req
);
return
NFS_SERVER
(
pgio
->
pg_inode
)
->
pnfs_curr_ld
->
pg_test
(
pgio
,
prev
,
req
);
}
}
...
...
fs/nfs/pnfs.h
View file @
18ad0a9f
...
@@ -87,7 +87,7 @@ struct pnfs_layoutdriver_type {
...
@@ -87,7 +87,7 @@ struct pnfs_layoutdriver_type {
void
(
*
free_lseg
)
(
struct
pnfs_layout_segment
*
lseg
);
void
(
*
free_lseg
)
(
struct
pnfs_layout_segment
*
lseg
);
/* test for nfs page cache coalescing */
/* test for nfs page cache coalescing */
int
(
*
pg_test
)(
struct
nfs_pageio_descriptor
*
,
struct
nfs_page
*
,
struct
nfs_page
*
);
bool
(
*
pg_test
)(
struct
nfs_pageio_descriptor
*
,
struct
nfs_page
*
,
struct
nfs_page
*
);
/* Returns true if layoutdriver wants to divert this request to
/* Returns true if layoutdriver wants to divert this request to
* driver's commit routine.
* driver's commit routine.
...
@@ -158,7 +158,7 @@ enum pnfs_try_status pnfs_try_to_write_data(struct nfs_write_data *,
...
@@ -158,7 +158,7 @@ enum pnfs_try_status pnfs_try_to_write_data(struct nfs_write_data *,
const
struct
rpc_call_ops
*
,
int
);
const
struct
rpc_call_ops
*
,
int
);
enum
pnfs_try_status
pnfs_try_to_read_data
(
struct
nfs_read_data
*
,
enum
pnfs_try_status
pnfs_try_to_read_data
(
struct
nfs_read_data
*
,
const
struct
rpc_call_ops
*
);
const
struct
rpc_call_ops
*
);
int
pnfs_generic_pg_test
(
struct
nfs_pageio_descriptor
*
pgio
,
struct
nfs_page
*
prev
,
struct
nfs_page
*
req
);
bool
pnfs_generic_pg_test
(
struct
nfs_pageio_descriptor
*
pgio
,
struct
nfs_page
*
prev
,
struct
nfs_page
*
req
);
int
pnfs_layout_process
(
struct
nfs4_layoutget
*
lgp
);
int
pnfs_layout_process
(
struct
nfs4_layoutget
*
lgp
);
void
pnfs_free_lseg_list
(
struct
list_head
*
tmp_list
);
void
pnfs_free_lseg_list
(
struct
list_head
*
tmp_list
);
void
pnfs_destroy_layout
(
struct
nfs_inode
*
);
void
pnfs_destroy_layout
(
struct
nfs_inode
*
);
...
...
include/linux/nfs_page.h
View file @
18ad0a9f
...
@@ -68,7 +68,7 @@ struct nfs_pageio_descriptor {
...
@@ -68,7 +68,7 @@ struct nfs_pageio_descriptor {
int
pg_ioflags
;
int
pg_ioflags
;
int
pg_error
;
int
pg_error
;
struct
pnfs_layout_segment
*
pg_lseg
;
struct
pnfs_layout_segment
*
pg_lseg
;
int
(
*
pg_test
)(
struct
nfs_pageio_descriptor
*
,
struct
nfs_page
*
,
struct
nfs_page
*
);
bool
(
*
pg_test
)(
struct
nfs_pageio_descriptor
*
,
struct
nfs_page
*
,
struct
nfs_page
*
);
};
};
#define NFS_WBACK_BUSY(req) (test_bit(PG_BUSY,&(req)->wb_flags))
#define NFS_WBACK_BUSY(req) (test_bit(PG_BUSY,&(req)->wb_flags))
...
...
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