patch-2.4.26 linux-2.4.26/fs/xfs/linux/xfs_lrw.c
Next file: linux-2.4.26/fs/xfs/linux/xfs_lrw.h
Previous file: linux-2.4.26/fs/xfs/linux/xfs_linux.h
Back to the patch index
Back to the overall index
- Lines: 49
- Date:
2004-04-14 06:05:40.000000000 -0700
- Orig file:
linux-2.4.25/fs/xfs/linux/xfs_lrw.c
- Orig date:
2004-02-18 05:36:31.000000000 -0800
diff -urN linux-2.4.25/fs/xfs/linux/xfs_lrw.c linux-2.4.26/fs/xfs/linux/xfs_lrw.c
@@ -311,9 +311,10 @@
!(ioflags & IO_INVIS)) {
int error;
vrwlock_t locktype = VRWLOCK_READ;
+ int dmflags = FILP_DELAY_FLAG(file) | DM_SEM_FLAG_RD(ioflags);
error = XFS_SEND_DATA(mp, DM_EVENT_READ, BHV_TO_VNODE(bdp), *offset, size,
- FILP_DELAY_FLAG(file), &locktype);
+ dmflags, &locktype);
if (error) {
if (!(ioflags & IO_ISLOCKED))
xfs_iunlock(ip, XFS_IOLOCK_SHARED);
@@ -322,9 +323,13 @@
}
if (unlikely(ioflags & IO_ISDIRECT)) {
+ xfs_rw_enter_trace(XFS_DIORD_ENTER, &ip->i_iocore,
+ buf, size, *offset, ioflags);
ret = do_generic_direct_read(file, buf, size, offset);
UPDATE_ATIME(file->f_dentry->d_inode);
} else {
+ xfs_rw_enter_trace(XFS_READ_ENTER, &ip->i_iocore,
+ buf, size, *offset, ioflags);
ret = generic_file_read(file, buf, size, offset);
}
@@ -593,7 +598,7 @@
if (size == 0)
return 0;
- io = &(xip->i_iocore);
+ io = &xip->i_iocore;
mp = io->io_mount;
xfs_check_frozen(mp, bdp, XFS_FREEZE_WRITE);
@@ -645,11 +650,12 @@
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_RD(ioflags);
xfs_iunlock(xip, XFS_ILOCK_EXCL);
error = XFS_SEND_DATA(xip->i_mount, DM_EVENT_WRITE, vp,
*offset, size,
- FILP_DELAY_FLAG(file), &locktype);
+ dmflags, &locktype);
if (error) {
if (iolock) xfs_iunlock(xip, iolock);
return -error;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)