#define REQ_REN_OLD_DIR m9_l3
#define REQ_ROOT_INO m9_l4
#define REQ_SEEK_POS m9_ull2
-#define REQ_TRC_END_HI m9_l4
-#define REQ_TRC_END_LO m9_l5
-#define REQ_TRC_START_HI m9_l2
-#define REQ_TRC_START_LO m9_l3
+#define REQ_TRC_START m9_ull1
+#define REQ_TRC_END m9_ull2
#define REQ_UCRED_SIZE m9_s4
#define REQ_UID m9_s4
if ((pn = puffs_pn_nodewalk(global_pu, 0, &fs_m_in.REQ_INODE_NR)) == NULL)
return(EINVAL);
- start = fs_m_in.REQ_TRC_START_LO;
- end = fs_m_in.REQ_TRC_END_LO;
+ start = fs_m_in.REQ_TRC_START;
+ end = fs_m_in.REQ_TRC_END;
if (end == 0) {
struct vattr va;
if (IS_DIR(ino)) return EISDIR;
- start = make64(m_in.REQ_TRC_START_LO, m_in.REQ_TRC_START_HI);
- end = make64(m_in.REQ_TRC_END_LO, m_in.REQ_TRC_END_HI);
+ start = m_in.REQ_TRC_START;
+ end = m_in.REQ_TRC_END;
if (end == 0) {
/* Truncate or expand the file. */
if( (rip = find_inode(fs_dev, (pino_t) fs_m_in.REQ_INODE_NR)) == NULL)
return(EINVAL);
- start = fs_m_in.REQ_TRC_START_LO;
- end = fs_m_in.REQ_TRC_END_LO;
+ start = fs_m_in.REQ_TRC_START;
+ end = fs_m_in.REQ_TRC_END;
if (end == 0)
r = truncate_inode(rip, start);
if(rip->i_sp->s_rd_only) {
r = EROFS;
} else {
- start = fs_m_in.REQ_TRC_START_LO;
- end = fs_m_in.REQ_TRC_END_LO;
+ start = fs_m_in.REQ_TRC_START;
+ end = fs_m_in.REQ_TRC_END;
if (end == 0)
r = truncate_inode(rip, start);
if( (rip = find_inode(inumb)) == NULL) return(EINVAL);
- start = fs_m_in->REQ_TRC_START_LO;
+ start = fs_m_in->REQ_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.REQ_TRC_START_LO = ex64lo(start);
- if (vmp->m_fs_flags & RES_64BIT) {
- m.REQ_TRC_START_HI = ex64hi(start);
- } else if (start > INT_MAX) {
+ if (!(vmp->m_fs_flags & RES_64BIT) &&
+ ((start > INT_MAX) || (end > INT_MAX))) {
/* FS does not support 64-bit off_t and 32 bits is not enough */
return EINVAL;
- } else {
- m.REQ_TRC_START_HI = 0;
- }
-
- m.REQ_TRC_END_LO = ex64lo(end);
- if (vmp->m_fs_flags & RES_64BIT) {
- m.REQ_TRC_END_HI = ex64hi(end);
- } else if (end > INT_MAX) {
- /* FS does not support 64-bit off_t and 32 bits is not enough */
- return EINVAL;
- } else {
- m.REQ_TRC_END_HI = 0;
}
/* Send/rec request */