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
c675dce8
Commit
c675dce8
authored
May 20, 2003
by
Stephen Lord
Committed by
Christoph Hellwig
May 20, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[XFS] Move xfs_syncd code into xfs_super.c which is the only place which uses it
SGI Modid: 2.5.x-xfs:slinx:148433a
parent
b32d7ca9
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
55 additions
and
3 deletions
+55
-3
fs/xfs/Makefile
fs/xfs/Makefile
+0
-1
fs/xfs/linux/xfs_super.c
fs/xfs/linux/xfs_super.c
+55
-0
fs/xfs/linux/xfs_super.h
fs/xfs/linux/xfs_super.h
+0
-2
No files found.
fs/xfs/Makefile
View file @
c675dce8
...
...
@@ -125,7 +125,6 @@ xfs-y += $(addprefix linux/, \
xfs_iomap.o
\
xfs_iops.o
\
xfs_lrw.o
\
xfs_syncd.o
\
xfs_super.o
\
xfs_vfs.o
\
xfs_vnode.o
)
...
...
fs/xfs/linux/xfs_super.c
View file @
c675dce8
...
...
@@ -368,6 +368,61 @@ linvfs_clear_inode(
}
}
#define SYNCD_FLAGS (SYNC_FSDATA|SYNC_BDFLUSH|SYNC_ATTR)
STATIC
int
syncd
(
void
*
arg
)
{
vfs_t
*
vfsp
=
(
vfs_t
*
)
arg
;
int
error
;
daemonize
(
"xfs_syncd"
);
vfsp
->
vfs_sync_task
=
current
;
wmb
();
wake_up
(
&
vfsp
->
vfs_wait_sync_task
);
for
(;;)
{
set_current_state
(
TASK_INTERRUPTIBLE
);
schedule_timeout
(
xfs_params
.
sync_interval
);
if
(
vfsp
->
vfs_flag
&
VFS_UMOUNT
)
break
;
if
(
vfsp
->
vfs_flag
&
VFS_RDONLY
);
continue
;
VFS_SYNC
(
vfsp
,
SYNCD_FLAGS
,
NULL
,
error
);
}
vfsp
->
vfs_sync_task
=
NULL
;
wmb
();
wake_up
(
&
vfsp
->
vfs_wait_sync_task
);
return
0
;
}
STATIC
int
linvfs_start_syncd
(
vfs_t
*
vfsp
)
{
int
pid
;
pid
=
kernel_thread
(
syncd
,
(
void
*
)
vfsp
,
CLONE_VM
|
CLONE_FS
|
CLONE_FILES
);
if
(
pid
<
0
)
return
pid
;
wait_event
(
vfsp
->
vfs_wait_sync_task
,
vfsp
->
vfs_sync_task
);
return
0
;
}
STATIC
void
linvfs_stop_syncd
(
vfs_t
*
vfsp
)
{
vfsp
->
vfs_flag
|=
VFS_UMOUNT
;
wmb
();
wake_up_process
(
vfsp
->
vfs_sync_task
);
wait_event
(
vfsp
->
vfs_wait_sync_task
,
!
vfsp
->
vfs_sync_task
);
}
STATIC
void
linvfs_put_super
(
struct
super_block
*
sb
)
...
...
fs/xfs/linux/xfs_super.h
View file @
c675dce8
...
...
@@ -104,7 +104,5 @@ extern void xfs_free_buftarg(struct pb_target *);
extern
void
xfs_setsize_buftarg
(
struct
pb_target
*
,
unsigned
int
,
unsigned
int
);
extern
unsigned
int
xfs_getsize_buftarg
(
struct
pb_target
*
);
extern
int
linvfs_start_syncd
(
vfs_t
*
);
extern
void
linvfs_stop_syncd
(
vfs_t
*
);
#endif
/* __XFS_SUPER_H__ */
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