} mess_vfs_fs_flush;
_ASSERT_MSG_SIZE(mess_vfs_fs_flush);
+typedef struct {
+ ino_t inode;
+ off_t trc_start;
+ off_t trc_end;
+
+ uint8_t data[32];
+} mess_vfs_fs_ftrunc;
+_ASSERT_MSG_SIZE(mess_vfs_fs_ftrunc);
+
typedef struct {
ino_t dir_ino;
ino_t root_ino;
mess_vfs_fs_create m_vfs_fs_create;
mess_fs_vfs_create m_fs_vfs_create;
mess_vfs_fs_flush m_vfs_fs_flush;
+ mess_vfs_fs_ftrunc m_vfs_fs_ftrunc;
mess_vfs_fs_lookup m_vfs_fs_lookup;
mess_fs_vfs_lookup m_fs_vfs_lookup;
mess_vfs_fs_mountpoint m_vfs_fs_mountpoint;
off_t start, end;
PUFFS_MAKECRED(pcr, &global_kcred);
- if ((pn = puffs_pn_nodewalk(global_pu, 0, &fs_m_in.REQ_INODE_NR)) == NULL)
+ if ((pn = puffs_pn_nodewalk(global_pu, 0, &fs_m_in.m_vfs_fs_ftrunc.inode)) == NULL)
return(EINVAL);
- start = fs_m_in.REQ_TRC_START;
- end = fs_m_in.REQ_TRC_END;
+ start = fs_m_in.m_vfs_fs_ftrunc.trc_start;
+ end = fs_m_in.m_vfs_fs_ftrunc.trc_end;
if (end == 0) {
struct vattr va;
if (state.s_read_only)
return EROFS;
- if ((ino = find_inode(m_in.REQ_INODE_NR)) == NULL)
+ if ((ino = find_inode(m_in.m_vfs_fs_ftrunc.inode)) == NULL)
return EINVAL;
if (IS_DIR(ino)) return EISDIR;
- start = m_in.REQ_TRC_START;
- end = m_in.REQ_TRC_END;
+ start = m_in.m_vfs_fs_ftrunc.trc_start;
+ end = m_in.m_vfs_fs_ftrunc.trc_end;
if (end == 0) {
/* Truncate or expand the file. */
off_t start, end;
int r;
- if( (rip = find_inode(fs_dev, (pino_t) fs_m_in.REQ_INODE_NR)) == NULL)
+ if( (rip = find_inode(fs_dev, fs_m_in.m_vfs_fs_ftrunc.inode)) == NULL)
return(EINVAL);
- start = fs_m_in.REQ_TRC_START;
- end = fs_m_in.REQ_TRC_END;
+ start = fs_m_in.m_vfs_fs_ftrunc.trc_start;
+ end = fs_m_in.m_vfs_fs_ftrunc.trc_end;
if (end == 0)
r = truncate_inode(rip, start);
off_t start, end;
int r;
- if( (rip = find_inode(fs_dev, (pino_t) fs_m_in.REQ_INODE_NR)) == NULL)
+ if( (rip = find_inode(fs_dev, fs_m_in.m_vfs_fs_ftrunc.inode)) == NULL)
return(EINVAL);
if(rip->i_sp->s_rd_only) {
r = EROFS;
} else {
- start = fs_m_in.REQ_TRC_START;
- end = fs_m_in.REQ_TRC_END;
+ start = fs_m_in.m_vfs_fs_ftrunc.trc_start;
+ end = fs_m_in.m_vfs_fs_ftrunc.trc_end;
if (end == 0)
r = truncate_inode(rip, start);
{
struct inode *rip;
off_t start;
- pino_t inumb;
+ ino_t inumb;
- inumb = (pino_t) fs_m_in->REQ_INODE_NR;
+ inumb = fs_m_in->m_vfs_fs_ftrunc.inode;
if( (rip = find_inode(inumb)) == NULL) return(EINVAL);
- start = fs_m_in->REQ_TRC_START;
+ start = fs_m_in->m_vfs_fs_ftrunc.trc_start;
return truncate_inode(rip, start);
}
/* Fill in request message */
m.m_type = REQ_FTRUNC;
- m.REQ_INODE_NR = (pino_t) inode_nr;
- m.REQ_TRC_START = start;
- m.REQ_TRC_END = end;
+ m.m_vfs_fs_ftrunc.inode = inode_nr;
+ m.m_vfs_fs_ftrunc.trc_start = start;
+ m.m_vfs_fs_ftrunc.trc_end = end;
if (!(vmp->m_fs_flags & RES_64BIT) &&
((start > INT_MAX) || (end > INT_MAX))) {