64-bit RES_SEEK_POS

Change-Id: Id13f06417f2f600db167bec7b33bc825742cae79
This commit is contained in:
Ben Gras
2014-02-24 16:54:37 +01:00
committed by Lionel Sambuc
parent 978082bb0d
commit fdd85c4d08
10 changed files with 21 additions and 38 deletions

View File

@@ -106,7 +106,7 @@ int fs_readwrite(void)
position += (off_t) chunk; /* position within the file */
}
fs_m_out.RES_SEEK_POS_LO = position; /* It might change later and the VFS
fs_m_out.RES_SEEK_POS = position; /* It might change later and the VFS
has to know this value */
/* On write, update file size and access time. */
@@ -190,8 +190,7 @@ int fs_breadwrite(void)
position += chunk; /* position within the file */
}
fs_m_out.RES_SEEK_POS_LO = ex64lo(position);
fs_m_out.RES_SEEK_POS_HI = ex64hi(position);
fs_m_out.RES_SEEK_POS = position;
if (rdwt_err != OK) r = rdwt_err; /* check for disk error */
if (rdwt_err == END_OF_FILE) r = OK;
@@ -761,7 +760,7 @@ int fs_getdents(void)
r = EINVAL; /* The user's buffer is too small */
else {
fs_m_out.RES_NBYTES = userbuf_off;
fs_m_out.RES_SEEK_POS_LO = new_pos;
fs_m_out.RES_SEEK_POS = new_pos;
rip->i_update |= ATIME;
rip->i_dirt = IN_DIRTY;
r = OK;

View File

@@ -67,7 +67,7 @@ int fs_read(void) {
position += chunk; /* position within the file */
}
fs_m_out.RES_SEEK_POS_LO = position;
fs_m_out.RES_SEEK_POS = position;
if (rdwt_err != OK) r = rdwt_err; /* check for disk error */
if (rdwt_err == END_OF_FILE) r = OK;
@@ -125,8 +125,7 @@ int fs_bread(void)
position += chunk; /* position within the file */
}
fs_m_out.RES_SEEK_POS_LO = ex64lo(position);
fs_m_out.RES_SEEK_POS_HI = ex64hi(position);
fs_m_out.RES_SEEK_POS = position;
if (rdwt_err != OK) r = rdwt_err; /* check for disk error */
if (rdwt_err == END_OF_FILE) r = OK;
@@ -279,7 +278,7 @@ int fs_getdents(void)
}
fs_m_out.RES_NBYTES = userbuf_off;
fs_m_out.RES_SEEK_POS_LO = cur_pos;
fs_m_out.RES_SEEK_POS = cur_pos;
release_dir_record(dir); /* release the inode */
return(OK);

View File

@@ -113,7 +113,7 @@ int fs_readwrite(void)
position += (off_t) chunk; /* position within the file */
}
fs_m_out.RES_SEEK_POS_LO = position; /* It might change later and the VFS
fs_m_out.RES_SEEK_POS = position; /* It might change later and the VFS
has to know this value */
/* On write, update file size and access time. */
@@ -199,8 +199,7 @@ int fs_breadwrite(void)
position += chunk; /* position within the file */
}
fs_m_out.RES_SEEK_POS_LO = ex64lo(position);
fs_m_out.RES_SEEK_POS_HI = ex64hi(position);
fs_m_out.RES_SEEK_POS = position;
if (lmfs_rdwt_err() != OK) r = lmfs_rdwt_err(); /* check for disk error */
if (lmfs_rdwt_err() == END_OF_FILE) r = OK;
@@ -731,7 +730,7 @@ int fs_getdents(void)
r = EINVAL; /* The user's buffer is too small */
else {
fs_m_out.RES_NBYTES = userbuf_off;
fs_m_out.RES_SEEK_POS_LO = new_pos;
fs_m_out.RES_SEEK_POS = new_pos;
if(!rip->i_sp->s_rd_only) {
rip->i_update |= ATIME;
IN_MARKDIRTY(rip);

View File

@@ -87,7 +87,7 @@ int fs_readwrite(message *fs_m_in, message *fs_m_out)
if (rw_flag == READING) rip->i_update |= ATIME;
if (rw_flag == WRITING) rip->i_update |= CTIME | MTIME;
fs_m_out->RES_NBYTES = (size_t) cum_io;
fs_m_out->RES_SEEK_POS_LO = rip->i_size;
fs_m_out->RES_SEEK_POS = rip->i_size;
put_inode(rip);
put_block(rip->i_dev, rip->i_num);

View File

@@ -61,7 +61,7 @@ int req_breadwrite(
if (r != OK) return(r);
/* Fill in response structure */
*new_pos = make64(m.RES_SEEK_POS_LO, m.RES_SEEK_POS_HI);
*new_pos = m.RES_SEEK_POS;
*cum_iop = m.RES_NBYTES;
return(OK);
@@ -328,11 +328,7 @@ int req_getdents(
cpf_revoke(grant_id);
if (r == OK) {
if (vmp->m_fs_flags & RES_64BIT) {
*new_pos = make64(m.RES_SEEK_POS_LO, m.RES_SEEK_POS_HI);
} else {
*new_pos = m.RES_SEEK_POS_LO;
}
*new_pos = m.RES_SEEK_POS;
r = m.RES_NBYTES;
}
@@ -831,11 +827,7 @@ unsigned int *cum_iop)
if (r == OK) {
/* Fill in response structure */
if (vmp->m_fs_flags & RES_64BIT) {
*new_posp = make64(m.RES_SEEK_POS_LO, m.RES_SEEK_POS_HI);
} else {
*new_posp = m.RES_SEEK_POS_LO;
}
*new_posp = m.RES_SEEK_POS;
*cum_iop = m.RES_NBYTES;
}