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
73a61e86
Commit
73a61e86
authored
Mar 03, 2004
by
Dean Roehrich
Committed by
Nathan Scott
Mar 03, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[XFS] DMAPI deadlock prevention when interacting with the IO path.
SGI Modid: xfs-linux:xfs-kern:167547a
parent
efe3629c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
7 deletions
+11
-7
fs/xfs/linux/xfs_lrw.c
fs/xfs/linux/xfs_lrw.c
+1
-1
fs/xfs/xfs_dmapi.h
fs/xfs/xfs_dmapi.h
+8
-5
fs/xfs/xfs_vnodeops.c
fs/xfs/xfs_vnodeops.c
+2
-1
No files found.
fs/xfs/linux/xfs_lrw.c
View file @
73a61e86
...
...
@@ -730,7 +730,7 @@ xfs_write(
if
((
DM_EVENT_ENABLED
(
vp
->
v_vfsp
,
xip
,
DM_EVENT_WRITE
)
&&
!
(
ioflags
&
IO_INVIS
)
&&
!
eventsent
))
{
loff_t
savedsize
=
*
offset
;
int
dmflags
=
FILP_DELAY_FLAG
(
file
)
|
DM_SEM_FLAG
(
ioflags
);
int
dmflags
=
FILP_DELAY_FLAG
(
file
)
|
DM_SEM_FLAG
_RD
(
ioflags
);
xfs_iunlock
(
xip
,
XFS_ILOCK_EXCL
);
error
=
XFS_SEND_DATA
(
xip
->
i_mount
,
DM_EVENT_WRITE
,
vp
,
...
...
fs/xfs/xfs_dmapi.h
View file @
73a61e86
...
...
@@ -169,19 +169,22 @@ typedef enum {
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,4,21)
/* i_alloc_sem was added in 2.4.22-pre1 */
#define DM_FLAGS_IALLOCSEM 0x010
/* thread holds i_alloc_sem */
#define DM_FLAGS_IALLOCSEM_RD 0x010
/* thread holds i_alloc_sem rd */
#define DM_FLAGS_IALLOCSEM_WR 0x020
/* thread holds i_alloc_sem wr */
#endif
#endif
/*
* Based on IO_ISDIRECT, decide which i_ flag is set.
*/
#ifdef DM_FLAGS_IALLOCSEM
#define DM_SEM_FLAG(ioflags) (((ioflags) & IO_ISDIRECT) ? \
DM_FLAGS_IALLOCSEM : DM_FLAGS_ISEM)
#ifdef DM_FLAGS_IALLOCSEM_RD
#define DM_SEM_FLAG_RD(ioflags) (((ioflags) & IO_ISDIRECT) ? \
DM_FLAGS_IALLOCSEM_RD : DM_FLAGS_ISEM)
#define DM_SEM_FLAG_WR (DM_FLAGS_IALLOCSEM_WR | DM_FLAGS_ISEM)
#else
#define DM_SEM_FLAG(ioflags) (((ioflags) & IO_ISDIRECT) ? \
#define DM_SEM_FLAG
_RD
(ioflags) (((ioflags) & IO_ISDIRECT) ? \
0 : DM_FLAGS_ISEM)
#define DM_SEM_FLAG_WR (DM_FLAGS_ISEM)
#endif
/*
...
...
fs/xfs/xfs_vnodeops.c
View file @
73a61e86
...
...
@@ -413,8 +413,9 @@ xfs_setattr(
}
else
{
if
(
DM_EVENT_ENABLED
(
vp
->
v_vfsp
,
ip
,
DM_EVENT_TRUNCATE
)
&&
!
(
flags
&
ATTR_DMI
))
{
int
dmflags
=
AT_DELAY_FLAG
(
flags
)
|
DM_SEM_FLAG_WR
;
code
=
XFS_SEND_DATA
(
mp
,
DM_EVENT_TRUNCATE
,
vp
,
vap
->
va_size
,
0
,
AT_DELAY_FLAG
(
flags
)
,
NULL
);
vap
->
va_size
,
0
,
dmflags
,
NULL
);
if
(
code
)
{
lock_flags
=
0
;
goto
error_return
;
...
...
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