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
9d9e7ba9
Commit
9d9e7ba9
authored
Mar 03, 2016
by
Mike Marshall
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Orangefs: improve gossip statements
Signed-off-by:
Mike Marshall
<
hubcap@omnibond.com
>
parent
9f08cfe9
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
49 additions
and
21 deletions
+49
-21
fs/orangefs/devorangefs-req.c
fs/orangefs/devorangefs-req.c
+18
-0
fs/orangefs/file.c
fs/orangefs/file.c
+2
-6
fs/orangefs/orangefs-mod.c
fs/orangefs/orangefs-mod.c
+6
-5
fs/orangefs/waitqueue.c
fs/orangefs/waitqueue.c
+23
-10
No files found.
fs/orangefs/devorangefs-req.c
View file @
9d9e7ba9
...
@@ -245,6 +245,12 @@ static ssize_t orangefs_devreq_read(struct file *file,
...
@@ -245,6 +245,12 @@ static ssize_t orangefs_devreq_read(struct file *file,
* it has been sent to the client.
* it has been sent to the client.
*/
*/
set_op_state_inprogress
(
cur_op
);
set_op_state_inprogress
(
cur_op
);
gossip_debug
(
GOSSIP_DEV_DEBUG
,
"%s: 1 op:%s: op_state:%d: process:%s:
\n
"
,
__func__
,
get_opname_string
(
cur_op
),
cur_op
->
op_state
,
current
->
comm
);
orangefs_devreq_add_op
(
cur_op
);
orangefs_devreq_add_op
(
cur_op
);
spin_unlock
(
&
cur_op
->
lock
);
spin_unlock
(
&
cur_op
->
lock
);
spin_unlock
(
&
htable_ops_in_progress_lock
);
spin_unlock
(
&
htable_ops_in_progress_lock
);
...
@@ -262,6 +268,12 @@ static ssize_t orangefs_devreq_read(struct file *file,
...
@@ -262,6 +268,12 @@ static ssize_t orangefs_devreq_read(struct file *file,
spin_lock
(
&
cur_op
->
lock
);
spin_lock
(
&
cur_op
->
lock
);
if
(
likely
(
!
op_state_given_up
(
cur_op
)))
{
if
(
likely
(
!
op_state_given_up
(
cur_op
)))
{
set_op_state_waiting
(
cur_op
);
set_op_state_waiting
(
cur_op
);
gossip_debug
(
GOSSIP_DEV_DEBUG
,
"%s: 2 op:%s: op_state:%d: process:%s:
\n
"
,
__func__
,
get_opname_string
(
cur_op
),
cur_op
->
op_state
,
current
->
comm
);
list_add
(
&
cur_op
->
list
,
&
orangefs_request_list
);
list_add
(
&
cur_op
->
list
,
&
orangefs_request_list
);
spin_unlock
(
&
cur_op
->
lock
);
spin_unlock
(
&
cur_op
->
lock
);
}
else
{
}
else
{
...
@@ -416,6 +428,12 @@ static ssize_t orangefs_devreq_write_iter(struct kiocb *iocb,
...
@@ -416,6 +428,12 @@ static ssize_t orangefs_devreq_write_iter(struct kiocb *iocb,
complete
(
&
op
->
waitq
);
complete
(
&
op
->
waitq
);
}
else
{
}
else
{
set_op_state_serviced
(
op
);
set_op_state_serviced
(
op
);
gossip_debug
(
GOSSIP_DEV_DEBUG
,
"%s: op:%s: op_state:%d: process:%s:
\n
"
,
__func__
,
get_opname_string
(
op
),
op
->
op_state
,
current
->
comm
);
spin_unlock
(
&
op
->
lock
);
spin_unlock
(
&
op
->
lock
);
}
}
return
ret
;
return
ret
;
...
...
fs/orangefs/file.c
View file @
9d9e7ba9
...
@@ -214,18 +214,14 @@ static ssize_t wait_for_direct_io(enum ORANGEFS_io_type type, struct inode *inod
...
@@ -214,18 +214,14 @@ static ssize_t wait_for_direct_io(enum ORANGEFS_io_type type, struct inode *inod
goto
out
;
goto
out
;
}
}
gossip_debug
(
GOSSIP_FILE_DEBUG
,
gossip_debug
(
GOSSIP_FILE_DEBUG
,
"%s(%pU): Amount
written as
returned by the sys-io call:%d
\n
"
,
"%s(%pU): Amount
%s,
returned by the sys-io call:%d
\n
"
,
__func__
,
__func__
,
handle
,
handle
,
type
==
ORANGEFS_IO_READ
?
"read"
:
"written"
,
(
int
)
new_op
->
downcall
.
resp
.
io
.
amt_complete
);
(
int
)
new_op
->
downcall
.
resp
.
io
.
amt_complete
);
ret
=
new_op
->
downcall
.
resp
.
io
.
amt_complete
;
ret
=
new_op
->
downcall
.
resp
.
io
.
amt_complete
;
/*
* tell the device file owner waiting on I/O that this read has
* completed and it can return now.
*/
out:
out:
if
(
buffer_index
>=
0
)
{
if
(
buffer_index
>=
0
)
{
orangefs_bufmap_put
(
buffer_index
);
orangefs_bufmap_put
(
buffer_index
);
...
...
fs/orangefs/orangefs-mod.c
View file @
9d9e7ba9
...
@@ -261,12 +261,13 @@ void purge_inprogress_ops(void)
...
@@ -261,12 +261,13 @@ void purge_inprogress_ops(void)
next
,
next
,
&
htable_ops_in_progress
[
i
],
&
htable_ops_in_progress
[
i
],
list
)
{
list
)
{
gossip_debug
(
GOSSIP_INIT_DEBUG
,
"pvfs2-client-core: purging in-progress op tag "
"%llu %s
\n
"
,
llu
(
op
->
tag
),
get_opname_string
(
op
));
set_op_state_purged
(
op
);
set_op_state_purged
(
op
);
gossip_debug
(
GOSSIP_DEV_DEBUG
,
"%s: op:%s: op_state:%d: process:%s:
\n
"
,
__func__
,
get_opname_string
(
op
),
op
->
op_state
,
current
->
comm
);
}
}
spin_unlock
(
&
htable_ops_in_progress_lock
);
spin_unlock
(
&
htable_ops_in_progress_lock
);
}
}
...
...
fs/orangefs/waitqueue.c
View file @
9d9e7ba9
...
@@ -37,6 +37,12 @@ void purge_waiting_ops(void)
...
@@ -37,6 +37,12 @@ void purge_waiting_ops(void)
llu
(
op
->
tag
),
llu
(
op
->
tag
),
get_opname_string
(
op
));
get_opname_string
(
op
));
set_op_state_purged
(
op
);
set_op_state_purged
(
op
);
gossip_debug
(
GOSSIP_DEV_DEBUG
,
"%s: op:%s: op_state:%d: process:%s:
\n
"
,
__func__
,
get_opname_string
(
op
),
op
->
op_state
,
current
->
comm
);
}
}
spin_unlock
(
&
orangefs_request_list_lock
);
spin_unlock
(
&
orangefs_request_list_lock
);
}
}
...
@@ -101,6 +107,12 @@ int service_operation(struct orangefs_kernel_op_s *op,
...
@@ -101,6 +107,12 @@ int service_operation(struct orangefs_kernel_op_s *op,
spin_lock
(
&
orangefs_request_list_lock
);
spin_lock
(
&
orangefs_request_list_lock
);
spin_lock
(
&
op
->
lock
);
spin_lock
(
&
op
->
lock
);
set_op_state_waiting
(
op
);
set_op_state_waiting
(
op
);
gossip_debug
(
GOSSIP_DEV_DEBUG
,
"%s: op:%s: op_state:%d: process:%s:
\n
"
,
__func__
,
get_opname_string
(
op
),
op
->
op_state
,
current
->
comm
);
/* add high priority remount op to the front of the line. */
/* add high priority remount op to the front of the line. */
if
(
flags
&
ORANGEFS_OP_PRIORITY
)
if
(
flags
&
ORANGEFS_OP_PRIORITY
)
list_add
(
&
op
->
list
,
&
orangefs_request_list
);
list_add
(
&
op
->
list
,
&
orangefs_request_list
);
...
@@ -173,7 +185,8 @@ int service_operation(struct orangefs_kernel_op_s *op,
...
@@ -173,7 +185,8 @@ int service_operation(struct orangefs_kernel_op_s *op,
out:
out:
gossip_debug
(
GOSSIP_WAIT_DEBUG
,
gossip_debug
(
GOSSIP_WAIT_DEBUG
,
"orangefs: service_operation %s returning: %d for %p.
\n
"
,
"%s: %s returning: %d for %p.
\n
"
,
__func__
,
op_name
,
op_name
,
ret
,
ret
,
op
);
op
);
...
@@ -204,6 +217,12 @@ bool orangefs_cancel_op_in_progress(struct orangefs_kernel_op_s *op)
...
@@ -204,6 +217,12 @@ bool orangefs_cancel_op_in_progress(struct orangefs_kernel_op_s *op)
}
}
spin_lock
(
&
op
->
lock
);
spin_lock
(
&
op
->
lock
);
set_op_state_waiting
(
op
);
set_op_state_waiting
(
op
);
gossip_debug
(
GOSSIP_DEV_DEBUG
,
"%s: op:%s: op_state:%d: process:%s:
\n
"
,
__func__
,
get_opname_string
(
op
),
op
->
op_state
,
current
->
comm
);
list_add
(
&
op
->
list
,
&
orangefs_request_list
);
list_add
(
&
op
->
list
,
&
orangefs_request_list
);
spin_unlock
(
&
op
->
lock
);
spin_unlock
(
&
op
->
lock
);
spin_unlock
(
&
orangefs_request_list_lock
);
spin_unlock
(
&
orangefs_request_list_lock
);
...
@@ -310,9 +329,7 @@ static int wait_for_matching_downcall(struct orangefs_kernel_op_s *op,
...
@@ -310,9 +329,7 @@ static int wait_for_matching_downcall(struct orangefs_kernel_op_s *op,
if
(
unlikely
(
n
<
0
))
{
if
(
unlikely
(
n
<
0
))
{
gossip_debug
(
GOSSIP_WAIT_DEBUG
,
gossip_debug
(
GOSSIP_WAIT_DEBUG
,
"*** %s:"
"%s: operation interrupted, tag %llu, %p
\n
"
,
" operation interrupted by a signal (tag "
"%llu, op %p)
\n
"
,
__func__
,
__func__
,
llu
(
op
->
tag
),
llu
(
op
->
tag
),
op
);
op
);
...
@@ -320,9 +337,7 @@ static int wait_for_matching_downcall(struct orangefs_kernel_op_s *op,
...
@@ -320,9 +337,7 @@ static int wait_for_matching_downcall(struct orangefs_kernel_op_s *op,
}
}
if
(
op_state_purged
(
op
))
{
if
(
op_state_purged
(
op
))
{
gossip_debug
(
GOSSIP_WAIT_DEBUG
,
gossip_debug
(
GOSSIP_WAIT_DEBUG
,
"*** %s:"
"%s: operation purged, tag %llu, %p, %d
\n
"
,
" operation purged (tag "
"%llu, %p, att %d)
\n
"
,
__func__
,
__func__
,
llu
(
op
->
tag
),
llu
(
op
->
tag
),
op
,
op
,
...
@@ -333,9 +348,7 @@ static int wait_for_matching_downcall(struct orangefs_kernel_op_s *op,
...
@@ -333,9 +348,7 @@ static int wait_for_matching_downcall(struct orangefs_kernel_op_s *op,
}
}
/* must have timed out, then... */
/* must have timed out, then... */
gossip_debug
(
GOSSIP_WAIT_DEBUG
,
gossip_debug
(
GOSSIP_WAIT_DEBUG
,
"*** %s:"
"%s: operation timed out, tag %llu, %p, %d)
\n
"
,
" operation timed out (tag"
" %llu, %p, att %d)
\n
"
,
__func__
,
__func__
,
llu
(
op
->
tag
),
llu
(
op
->
tag
),
op
,
op
,
...
...
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