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
646daae7
Commit
646daae7
authored
May 20, 2003
by
Christoph Hellwig
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[XFS] avoid sleep_on in the sync code
SGI Modid: 2.5.x-xfs:slinx:148415a
parent
685cfe8b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
23 deletions
+11
-23
fs/xfs/linux/xfs_syncd.c
fs/xfs/linux/xfs_syncd.c
+11
-21
fs/xfs/linux/xfs_vfs.c
fs/xfs/linux/xfs_vfs.c
+0
-1
fs/xfs/linux/xfs_vfs.h
fs/xfs/linux/xfs_vfs.h
+0
-1
No files found.
fs/xfs/linux/xfs_syncd.c
View file @
646daae7
...
@@ -32,20 +32,12 @@
...
@@ -32,20 +32,12 @@
#include <xfs.h>
#include <xfs.h>
static
void
sync_timeout
(
unsigned
long
__data
)
{
struct
task_struct
*
p
=
(
struct
task_struct
*
)
__data
;
wake_up_process
(
p
);
}
#define SYNCD_FLAGS (SYNC_FSDATA|SYNC_BDFLUSH|SYNC_ATTR)
#define SYNCD_FLAGS (SYNC_FSDATA|SYNC_BDFLUSH|SYNC_ATTR)
int
syncd
(
void
*
arg
)
int
syncd
(
void
*
arg
)
{
{
vfs_t
*
vfsp
=
(
vfs_t
*
)
arg
;
vfs_t
*
vfsp
=
(
vfs_t
*
)
arg
;
int
error
;
int
error
;
struct
timer_list
timer
;
daemonize
(
"xfs_syncd"
);
daemonize
(
"xfs_syncd"
);
...
@@ -53,22 +45,20 @@ int syncd(void *arg)
...
@@ -53,22 +45,20 @@ int syncd(void *arg)
wmb
();
wmb
();
wake_up
(
&
vfsp
->
vfs_wait_sync_task
);
wake_up
(
&
vfsp
->
vfs_wait_sync_task
);
init_timer
(
&
timer
);
for
(;;)
{
timer
.
data
=
(
unsigned
long
)
current
;
set_current_state
(
TASK_INTERRUPTIBLE
);
timer
.
function
=
sync_timeout
;
schedule_timeout
(
xfs_params
.
sync_interval
);
if
(
vfsp
->
vfs_flag
&
VFS_UMOUNT
)
do
{
break
;
mod_timer
(
&
timer
,
jiffies
+
xfs_params
.
sync_interval
);
if
(
vfsp
->
vfs_flag
&
VFS_RDONLY
);
interruptible_sleep_on
(
&
vfsp
->
vfs_sync
);
continue
;
if
(
!
(
vfsp
->
vfs_flag
&
VFS_RDONLY
))
VFS_SYNC
(
vfsp
,
SYNCD_FLAGS
,
NULL
,
error
);
VFS_SYNC
(
vfsp
,
SYNCD_FLAGS
,
NULL
,
error
);
}
while
(
!
(
vfsp
->
vfs_flag
&
VFS_UMOUNT
));
}
del_timer_sync
(
&
timer
);
vfsp
->
vfs_sync_task
=
NULL
;
vfsp
->
vfs_sync_task
=
NULL
;
wmb
();
wmb
();
wake_up
(
&
vfsp
->
vfs_wait_sync_task
);
wake_up
(
&
vfsp
->
vfs_wait_sync_task
);
return
0
;
return
0
;
}
}
...
@@ -91,6 +81,6 @@ linvfs_stop_syncd(vfs_t *vfsp)
...
@@ -91,6 +81,6 @@ linvfs_stop_syncd(vfs_t *vfsp)
vfsp
->
vfs_flag
|=
VFS_UMOUNT
;
vfsp
->
vfs_flag
|=
VFS_UMOUNT
;
wmb
();
wmb
();
wake_up
(
&
vfsp
->
vfs_sync
);
wake_up
_process
(
vfsp
->
vfs_sync_task
);
wait_event
(
vfsp
->
vfs_wait_sync_task
,
!
vfsp
->
vfs_sync_task
);
wait_event
(
vfsp
->
vfs_wait_sync_task
,
!
vfsp
->
vfs_sync_task
);
}
}
fs/xfs/linux/xfs_vfs.c
View file @
646daae7
...
@@ -239,7 +239,6 @@ vfs_allocate( void )
...
@@ -239,7 +239,6 @@ vfs_allocate( void )
vfsp
=
kmem_zalloc
(
sizeof
(
vfs_t
),
KM_SLEEP
);
vfsp
=
kmem_zalloc
(
sizeof
(
vfs_t
),
KM_SLEEP
);
bhv_head_init
(
VFS_BHVHEAD
(
vfsp
),
"vfs"
);
bhv_head_init
(
VFS_BHVHEAD
(
vfsp
),
"vfs"
);
init_waitqueue_head
(
&
vfsp
->
vfs_wait_sync_task
);
init_waitqueue_head
(
&
vfsp
->
vfs_wait_sync_task
);
init_waitqueue_head
(
&
vfsp
->
vfs_sync
);
return
vfsp
;
return
vfsp
;
}
}
...
...
fs/xfs/linux/xfs_vfs.h
View file @
646daae7
...
@@ -49,7 +49,6 @@ typedef struct vfs {
...
@@ -49,7 +49,6 @@ typedef struct vfs {
bhv_head_t
vfs_bh
;
/* head of vfs behavior chain */
bhv_head_t
vfs_bh
;
/* head of vfs behavior chain */
struct
super_block
*
vfs_super
;
/* Linux superblock structure */
struct
super_block
*
vfs_super
;
/* Linux superblock structure */
struct
task_struct
*
vfs_sync_task
;
struct
task_struct
*
vfs_sync_task
;
wait_queue_head_t
vfs_sync
;
wait_queue_head_t
vfs_wait_sync_task
;
wait_queue_head_t
vfs_wait_sync_task
;
}
vfs_t
;
}
vfs_t
;
...
...
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