64-bit REQ_SEEK_POS

Change-Id: I2e51a188b171af0f0a02349e4eccbe78e7cc2e0c
This commit is contained in:
Ben Gras
2014-02-24 14:50:01 +01:00
committed by Lionel Sambuc
parent 3c7f4e462e
commit 978082bb0d
11 changed files with 30 additions and 46 deletions

View File

@@ -937,7 +937,7 @@ int lmfs_do_bpeek(message *m)
{
block_t startblock, b, limitblock;
dev_t dev = m->REQ_DEV;
off_t extra, pos = make64(m->REQ_SEEK_POS_LO, m->REQ_SEEK_POS_HI);
off_t extra, pos = m->REQ_SEEK_POS;
size_t len = m->REQ_NBYTES;
struct buf *bp;

View File

@@ -45,7 +45,7 @@ int fs_readwrite(void)
/* Get the values from the request message */
rw_flag = (fs_m_in.m_type == REQ_READ ? READING : WRITING);
gid = (cp_grant_id_t) fs_m_in.REQ_GRANT;
pos = (off_t) fs_m_in.REQ_SEEK_POS_LO;
pos = (off_t) fs_m_in.REQ_SEEK_POS;
nrbytes = bytes_left = (size_t) fs_m_in.REQ_NBYTES;
if (nrbytes > RW_BUFSIZ)
@@ -135,7 +135,7 @@ int fs_getdents(void)
ino = (pino_t) fs_m_in.REQ_INODE_NR;
gid = (cp_grant_id_t) fs_m_in.REQ_GRANT;
size = buf_left = (size_t) fs_m_in.REQ_MEM_SIZE;
pos = (off_t) fs_m_in.REQ_SEEK_POS_LO;
pos = (off_t) fs_m_in.REQ_SEEK_POS;
if ((pn = puffs_pn_nodewalk(global_pu, 0, &ino)) == NULL) {
lpuffs_debug("walk failed...\n");

View File

@@ -36,7 +36,7 @@ int do_read(void)
if ((r = get_handle(ino)) != OK)
return r;
pos = make64(m_in.REQ_SEEK_POS_LO, m_in.REQ_SEEK_POS_HI);
pos = m_in.REQ_SEEK_POS;
count = m_in.REQ_NBYTES;
assert(count > 0);
@@ -96,7 +96,7 @@ int do_getdents(void)
if ((ino = find_inode(m_in.REQ_INODE_NR)) == NULL)
return EINVAL;
if (m_in.REQ_SEEK_POS_HI != 0) return EINVAL;
if(m_in.REQ_SEEK_POS >= ULONG_MAX) return EINVAL;
if (!IS_DIR(ino)) return ENOTDIR;
@@ -115,7 +115,7 @@ int do_getdents(void)
* the "." entry, the second position is for the ".." entry, and the next
* position numbers each represent a file in the directory.
*/
for (pos = m_in.REQ_SEEK_POS_LO; ; pos++) {
for (pos = m_in.REQ_SEEK_POS; ; pos++) {
/* Determine which inode and name to use for this entry.
* We have no idea whether the host will give us "." and/or "..",
* so generate our own and skip those from the host.

View File

@@ -94,7 +94,7 @@ int do_write(void)
if (IS_DIR(ino)) return EISDIR;
pos = make64(m_in.REQ_SEEK_POS_LO, m_in.REQ_SEEK_POS_HI);
pos = m_in.REQ_SEEK_POS;
count = m_in.REQ_NBYTES;
grant = m_in.REQ_GRANT;

View File

@@ -21,9 +21,6 @@ int fs_read(void)
char *ptr;
int r;
if (fs_m_in.REQ_SEEK_POS_HI != 0)
return EIO;
/* Try to get inode by to its inode number. */
if ((node = find_inode(fs_m_in.REQ_INODE_NR)) == NULL)
return EINVAL;
@@ -34,7 +31,7 @@ int fs_read(void)
/* Get the values from the request message. */
gid = fs_m_in.REQ_GRANT;
pos = fs_m_in.REQ_SEEK_POS_LO;
pos = fs_m_in.REQ_SEEK_POS;
/* Call the read hook, if any. */
if (!is_inode_deleted(node) && vtreefs_hooks->read_hook != NULL) {
@@ -83,7 +80,7 @@ int fs_getdents(void)
int r, skip, get_next, indexed;
static char buf[GETDENTS_BUFSIZ];
if (fs_m_in.REQ_SEEK_POS_HI != 0)
if (fs_m_in.REQ_SEEK_POS >= ULONG_MAX)
return EIO;
if ((node = find_inode(fs_m_in.REQ_INODE_NR)) == NULL)
@@ -102,7 +99,7 @@ int fs_getdents(void)
if (r != OK) return r;
}
for (pos = fs_m_in.REQ_SEEK_POS_LO; ; pos++) {
for (pos = fs_m_in.REQ_SEEK_POS; ; pos++) {
/* Determine which inode and name to use for this entry. */
if (pos == 0) {
/* The "." entry. */