Commit 35d30e0d authored by Dean Roehrich's avatar Dean Roehrich Committed by Stephen Lord

[XFS] Make dm_send_data_event use vp rather than bhv

SGI Modid: 2.5.x-xfs:slinx:158840a
parent 9aca0442
...@@ -218,7 +218,7 @@ xfs_read( ...@@ -218,7 +218,7 @@ xfs_read(
int error; int error;
vrwlock_t locktype = VRWLOCK_READ; vrwlock_t locktype = VRWLOCK_READ;
error = XFS_SEND_DATA(mp, DM_EVENT_READ, bdp, *offset, size, error = XFS_SEND_DATA(mp, DM_EVENT_READ, BHV_TO_VNODE(bdp), *offset, size,
FILP_DELAY_FLAG(file), &locktype); FILP_DELAY_FLAG(file), &locktype);
if (error) { if (error) {
xfs_iunlock(ip, XFS_IOLOCK_SHARED); xfs_iunlock(ip, XFS_IOLOCK_SHARED);
...@@ -612,7 +612,7 @@ xfs_write( ...@@ -612,7 +612,7 @@ xfs_write(
loff_t savedsize = *offset; loff_t savedsize = *offset;
xfs_iunlock(xip, XFS_ILOCK_EXCL); xfs_iunlock(xip, XFS_ILOCK_EXCL);
error = XFS_SEND_DATA(xip->i_mount, DM_EVENT_WRITE, bdp, error = XFS_SEND_DATA(xip->i_mount, DM_EVENT_WRITE, vp,
*offset, size, *offset, size,
FILP_DELAY_FLAG(file), &locktype); FILP_DELAY_FLAG(file), &locktype);
if (error) { if (error) {
......
...@@ -5553,7 +5553,7 @@ xfs_getbmap( ...@@ -5553,7 +5553,7 @@ xfs_getbmap(
&& DM_EVENT_ENABLED(vp->v_vfsp, ip, DM_EVENT_READ) && DM_EVENT_ENABLED(vp->v_vfsp, ip, DM_EVENT_READ)
&& whichfork == XFS_DATA_FORK) { && whichfork == XFS_DATA_FORK) {
error = XFS_SEND_DATA(mp, DM_EVENT_READ, bdp, 0, 0, 0, NULL); error = XFS_SEND_DATA(mp, DM_EVENT_READ, vp, 0, 0, 0, NULL);
if (error) if (error)
return XFS_ERROR(error); return XFS_ERROR(error);
} }
......
...@@ -91,7 +91,7 @@ struct xfs_bmap_free; ...@@ -91,7 +91,7 @@ struct xfs_bmap_free;
* Prototypes and functions for the Data Migration subsystem. * Prototypes and functions for the Data Migration subsystem.
*/ */
typedef int (*xfs_send_data_t)(int, struct bhv_desc *, typedef int (*xfs_send_data_t)(int, struct vnode *,
xfs_off_t, size_t, int, vrwlock_t *); xfs_off_t, size_t, int, vrwlock_t *);
typedef int (*xfs_send_mmap_t)(struct vm_area_struct *, uint); typedef int (*xfs_send_mmap_t)(struct vm_area_struct *, uint);
typedef int (*xfs_send_destroy_t)(struct vnode *, dm_right_t); typedef int (*xfs_send_destroy_t)(struct vnode *, dm_right_t);
...@@ -109,8 +109,8 @@ typedef struct xfs_dmops { ...@@ -109,8 +109,8 @@ typedef struct xfs_dmops {
xfs_send_unmount_t xfs_send_unmount; xfs_send_unmount_t xfs_send_unmount;
} xfs_dmops_t; } xfs_dmops_t;
#define XFS_SEND_DATA(mp, ev,bdp,off,len,fl,lock) \ #define XFS_SEND_DATA(mp, ev,vp,off,len,fl,lock) \
(*(mp)->m_dm_ops.xfs_send_data)(ev,bdp,off,len,fl,lock) (*(mp)->m_dm_ops.xfs_send_data)(ev,vp,off,len,fl,lock)
#define XFS_SEND_MMAP(mp, vma,fl) \ #define XFS_SEND_MMAP(mp, vma,fl) \
(*(mp)->m_dm_ops.xfs_send_mmap)(vma,fl) (*(mp)->m_dm_ops.xfs_send_mmap)(vma,fl)
#define XFS_SEND_DESTROY(mp, vp,right) \ #define XFS_SEND_DESTROY(mp, vp,right) \
......
...@@ -414,7 +414,7 @@ xfs_setattr( ...@@ -414,7 +414,7 @@ xfs_setattr(
} else { } else {
if (DM_EVENT_ENABLED (vp->v_vfsp, ip, DM_EVENT_TRUNCATE) && if (DM_EVENT_ENABLED (vp->v_vfsp, ip, DM_EVENT_TRUNCATE) &&
!(flags & ATTR_DMI)) { !(flags & ATTR_DMI)) {
code = XFS_SEND_DATA(mp, DM_EVENT_TRUNCATE, bdp, code = XFS_SEND_DATA(mp, DM_EVENT_TRUNCATE, vp,
vap->va_size, 0, AT_DELAY_FLAG(flags), NULL); vap->va_size, 0, AT_DELAY_FLAG(flags), NULL);
if (code) { if (code) {
lock_flags = 0; lock_flags = 0;
...@@ -4162,7 +4162,7 @@ xfs_alloc_file_space( ...@@ -4162,7 +4162,7 @@ xfs_alloc_file_space(
end_dmi_offset = offset+len; end_dmi_offset = offset+len;
if (end_dmi_offset > ip->i_d.di_size) if (end_dmi_offset > ip->i_d.di_size)
end_dmi_offset = ip->i_d.di_size; end_dmi_offset = ip->i_d.di_size;
error = XFS_SEND_DATA(mp, DM_EVENT_WRITE, XFS_ITOBHV(ip), error = XFS_SEND_DATA(mp, DM_EVENT_WRITE, XFS_ITOV(ip),
offset, end_dmi_offset - offset, offset, end_dmi_offset - offset,
0, NULL); 0, NULL);
if (error) if (error)
...@@ -4409,7 +4409,7 @@ xfs_free_file_space( ...@@ -4409,7 +4409,7 @@ xfs_free_file_space(
DM_EVENT_ENABLED(XFS_MTOVFS(mp), ip, DM_EVENT_WRITE)) { DM_EVENT_ENABLED(XFS_MTOVFS(mp), ip, DM_EVENT_WRITE)) {
if (end_dmi_offset > ip->i_d.di_size) if (end_dmi_offset > ip->i_d.di_size)
end_dmi_offset = ip->i_d.di_size; end_dmi_offset = ip->i_d.di_size;
error = XFS_SEND_DATA(mp, DM_EVENT_WRITE, XFS_ITOBHV(ip), error = XFS_SEND_DATA(mp, DM_EVENT_WRITE, XFS_ITOV(ip),
offset, end_dmi_offset - offset, offset, end_dmi_offset - offset,
AT_DELAY_FLAG(attr_flags), NULL); AT_DELAY_FLAG(attr_flags), NULL);
if (error) if (error)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment