>From: "James A Goodwin" <jagoodwi@xxxxxxxxxx>
>I'm running XFS 1.0.2 on kernel 2.4.14 and am having the following DMAPI
>problem:
>
>dm_get_fileattr() hangs when an append is in progress.
>
>I have a file with a DMAPI region covering whole file (offset & length both
>set to 0).
>The region has read, write, and truncate events enabled.
>When an append is done and the write event is received, a subsequent call
>to dm_get_fileattr() hangs.
>
>Is this something that has been fixed in a later patch, or is it new?
Francis, you reported seeing this via dm_set_region. It's all the same. The
user process had an exclusive lock on the xfs_inode_t, preventing DMAPI from
doing anything with it.
Here's a patch for it.
Dean
-----------
*** /usr/tmp/TmpDir.2091635-0/linux/fs/xfs/linux/xfs_lrw.c_1.140 Thu Jun
6 10:42:48 2002
--- linux/fs/xfs/linux/xfs_lrw.c Wed Jun 5 14:55:58 2002
***************
*** 531,543 ****
if ((DM_EVENT_ENABLED_IO(vp->v_vfsp, io, DM_EVENT_WRITE) &&
!(filp->f_mode & FINVIS) && !eventsent)) {
error = xfs_dm_send_data_event(DM_EVENT_WRITE, bdp,
*offsetp, size,
FILP_DELAY_FLAG(filp), &locktype);
if (error) {
! xfs_iunlock(xip, XFS_ILOCK_EXCL|iolock);
return error;
}
eventsent = 1;
/*
--- 531,545 ----
if ((DM_EVENT_ENABLED_IO(vp->v_vfsp, io, DM_EVENT_WRITE) &&
!(filp->f_mode & FINVIS) && !eventsent)) {
+ xfs_iunlock(xip, XFS_ILOCK_EXCL);
error = xfs_dm_send_data_event(DM_EVENT_WRITE, bdp,
*offsetp, size,
FILP_DELAY_FLAG(filp), &locktype);
if (error) {
! xfs_iunlock(xip, iolock);
return error;
}
+ xfs_ilock(xip, XFS_ILOCK_EXCL);
eventsent = 1;
/*
|