From 4694fcc1d5615120e612d9bd3c6bc02ac93496a0 Mon Sep 17 00:00:00 2001 From: Ben Gras Date: Mon, 24 Feb 2014 17:02:03 +0100 Subject: [PATCH] 64-bit RES_FILE_SIZE Change-Id: Ia17b4b4722f87fb35142948b62d4a8392ded5f73 --- include/minix/vfsif.h | 3 +-- lib/libpuffs/mount.c | 2 +- lib/libpuffs/open.c | 2 +- lib/libpuffs/path.c | 2 +- lib/libsffs/link.c | 3 +-- lib/libsffs/lookup.c | 3 +-- lib/libsffs/mount.c | 3 +-- lib/libvtreefs/mount.c | 3 +-- lib/libvtreefs/path.c | 3 +-- servers/ext2/mount.c | 2 +- servers/ext2/open.c | 2 +- servers/ext2/path.c | 2 +- servers/iso9660fs/mount.c | 2 +- servers/iso9660fs/path.c | 2 +- servers/mfs/mount.c | 2 +- servers/mfs/open.c | 2 +- servers/mfs/path.c | 2 +- servers/pfs/open.c | 2 +- servers/vfs/request.c | 24 ++++-------------------- 19 files changed, 22 insertions(+), 44 deletions(-) diff --git a/include/minix/vfsif.h b/include/minix/vfsif.h index e2e4752cc..2044b55ff 100644 --- a/include/minix/vfsif.h +++ b/include/minix/vfsif.h @@ -42,8 +42,7 @@ #define RES_DEV m9_ull1 #define RES_GID m9_s1 #define RES_INODE_NR m9_l1 -#define RES_FILE_SIZE_HI m9_l2 -#define RES_FILE_SIZE_LO m9_l3 +#define RES_FILE_SIZE m9_ull2 #define RES_MODE m9_s2 #define RES_NBYTES m9_l5 #define RES_OFFSET m9_s2 diff --git a/lib/libpuffs/mount.c b/lib/libpuffs/mount.c index 5218b8b4f..7b7da1cff 100644 --- a/lib/libpuffs/mount.c +++ b/lib/libpuffs/mount.c @@ -30,7 +30,7 @@ int fs_readsuper(void) root_va = &global_pu->pu_pn_root->pn_va; fs_m_out.RES_INODE_NR = root_va->va_fileid; fs_m_out.RES_MODE = root_va->va_mode; - fs_m_out.RES_FILE_SIZE_LO = root_va->va_size; + fs_m_out.RES_FILE_SIZE = root_va->va_size; fs_m_out.RES_UID = root_va->va_uid; fs_m_out.RES_GID = root_va->va_gid; fs_m_out.RES_FLAGS = RES_NOFLAGS; diff --git a/lib/libpuffs/open.c b/lib/libpuffs/open.c index 2d6b4305d..42994b72f 100644 --- a/lib/libpuffs/open.c +++ b/lib/libpuffs/open.c @@ -101,7 +101,7 @@ int fs_create(void) /* Reply message */ fs_m_out.RES_INODE_NR = pn->pn_va.va_fileid; fs_m_out.RES_MODE = pn->pn_va.va_mode; - fs_m_out.RES_FILE_SIZE_LO = pn->pn_va.va_size; + fs_m_out.RES_FILE_SIZE = pn->pn_va.va_size; /* This values are needed for the execution */ fs_m_out.RES_UID = pn->pn_va.va_uid; diff --git a/lib/libpuffs/path.c b/lib/libpuffs/path.c index c749289f2..40030a6b1 100644 --- a/lib/libpuffs/path.c +++ b/lib/libpuffs/path.c @@ -108,7 +108,7 @@ int fs_lookup(void) fs_m_out.RES_INODE_NR = pn->pn_va.va_fileid; fs_m_out.RES_MODE = pn->pn_va.va_mode; - fs_m_out.RES_FILE_SIZE_LO = pn->pn_va.va_size; + fs_m_out.RES_FILE_SIZE = pn->pn_va.va_size; fs_m_out.RES_SYMLOOP = symlinks; fs_m_out.RES_UID = pn->pn_va.va_uid; fs_m_out.RES_GID = pn->pn_va.va_gid; diff --git a/lib/libsffs/link.c b/lib/libsffs/link.c index 67716958c..f42026113 100644 --- a/lib/libsffs/link.c +++ b/lib/libsffs/link.c @@ -117,8 +117,7 @@ int do_create(void) m_out.RES_INODE_NR = INODE_NR(ino); m_out.RES_MODE = get_mode(ino, attr.a_mode); - m_out.RES_FILE_SIZE_HI = ex64hi(attr.a_size); - m_out.RES_FILE_SIZE_LO = ex64lo(attr.a_size); + m_out.RES_FILE_SIZE = attr.a_size; m_out.RES_UID = sffs_params->p_uid; m_out.RES_GID = sffs_params->p_gid; m_out.RES_DEV = NO_DEV; diff --git a/lib/libsffs/lookup.c b/lib/libsffs/lookup.c index b3ef77f25..9c27436db 100644 --- a/lib/libsffs/lookup.c +++ b/lib/libsffs/lookup.c @@ -331,8 +331,7 @@ int do_lookup(void) m_out.RES_INODE_NR = INODE_NR(cur_ino); m_out.RES_MODE = get_mode(cur_ino, attr.a_mode); - m_out.RES_FILE_SIZE_HI = ex64hi(attr.a_size); - m_out.RES_FILE_SIZE_LO = ex64lo(attr.a_size); + m_out.RES_FILE_SIZE = attr.a_size; m_out.RES_UID = sffs_params->p_uid; m_out.RES_GID = sffs_params->p_gid; m_out.RES_DEV = NO_DEV; diff --git a/lib/libsffs/mount.c b/lib/libsffs/mount.c index 3e2d75338..0d3c15afa 100644 --- a/lib/libsffs/mount.c +++ b/lib/libsffs/mount.c @@ -57,8 +57,7 @@ int do_readsuper(void) m_out.RES_INODE_NR = INODE_NR(ino); m_out.RES_MODE = get_mode(ino, attr.a_mode); - m_out.RES_FILE_SIZE_HI = ex64hi(attr.a_size); - m_out.RES_FILE_SIZE_LO = ex64lo(attr.a_size); + m_out.RES_FILE_SIZE = attr.a_size; m_out.RES_UID = sffs_params->p_uid; m_out.RES_GID = sffs_params->p_gid; m_out.RES_DEV = NO_DEV; diff --git a/lib/libvtreefs/mount.c b/lib/libvtreefs/mount.c index dc6a8b7c8..f961e5e7d 100644 --- a/lib/libvtreefs/mount.c +++ b/lib/libvtreefs/mount.c @@ -29,8 +29,7 @@ int fs_readsuper(void) /* Return the root inode's properties. */ fs_m_out.RES_INODE_NR = get_inode_number(root); fs_m_out.RES_MODE = root->i_stat.mode; - fs_m_out.RES_FILE_SIZE_HI = 0; - fs_m_out.RES_FILE_SIZE_LO = root->i_stat.size; + fs_m_out.RES_FILE_SIZE = root->i_stat.size; fs_m_out.RES_UID = root->i_stat.uid; fs_m_out.RES_GID = root->i_stat.gid; fs_m_out.RES_DEV = NO_DEV; diff --git a/lib/libvtreefs/path.c b/lib/libvtreefs/path.c index 55e468c19..9360ed78d 100644 --- a/lib/libvtreefs/path.c +++ b/lib/libvtreefs/path.c @@ -303,8 +303,7 @@ int fs_lookup(void) /* On success, leave the resulting file open and return its details. */ fs_m_out.RES_INODE_NR = get_inode_number(cur_ino); fs_m_out.RES_MODE = cur_ino->i_stat.mode; - fs_m_out.RES_FILE_SIZE_HI = 0; - fs_m_out.RES_FILE_SIZE_LO = cur_ino->i_stat.size; + fs_m_out.RES_FILE_SIZE = cur_ino->i_stat.size; fs_m_out.RES_UID = cur_ino->i_stat.uid; fs_m_out.RES_GID = cur_ino->i_stat.gid; fs_m_out.RES_DEV = cur_ino->i_stat.dev; diff --git a/servers/ext2/mount.c b/servers/ext2/mount.c index c2d76ff1f..f9c13827f 100644 --- a/servers/ext2/mount.c +++ b/servers/ext2/mount.c @@ -155,7 +155,7 @@ int fs_readsuper() /* Root inode properties */ fs_m_out.RES_INODE_NR = root_ip->i_num; fs_m_out.RES_MODE = root_ip->i_mode; - fs_m_out.RES_FILE_SIZE_LO = root_ip->i_size; + fs_m_out.RES_FILE_SIZE = root_ip->i_size; fs_m_out.RES_UID = root_ip->i_uid; fs_m_out.RES_GID = root_ip->i_gid; fs_m_out.RES_FLAGS = RES_HASPEEK; diff --git a/servers/ext2/open.c b/servers/ext2/open.c index dd8988889..e5e4bf2e4 100644 --- a/servers/ext2/open.c +++ b/servers/ext2/open.c @@ -63,7 +63,7 @@ int fs_create() /* Reply message */ fs_m_out.RES_INODE_NR = rip->i_num; fs_m_out.RES_MODE = rip->i_mode; - fs_m_out.RES_FILE_SIZE_LO = rip->i_size; + fs_m_out.RES_FILE_SIZE = rip->i_size; /* This values are needed for the execution */ fs_m_out.RES_UID = rip->i_uid; diff --git a/servers/ext2/path.c b/servers/ext2/path.c index 314c1d9f6..82c467e79 100644 --- a/servers/ext2/path.c +++ b/servers/ext2/path.c @@ -100,7 +100,7 @@ int fs_lookup() fs_m_out.RES_INODE_NR = rip->i_num; fs_m_out.RES_MODE = rip->i_mode; - fs_m_out.RES_FILE_SIZE_LO = rip->i_size; + fs_m_out.RES_FILE_SIZE = rip->i_size; fs_m_out.RES_SYMLOOP = symlinks; fs_m_out.RES_UID = rip->i_uid; fs_m_out.RES_GID = rip->i_gid; diff --git a/servers/iso9660fs/mount.c b/servers/iso9660fs/mount.c index 443b71dac..0de63297b 100644 --- a/servers/iso9660fs/mount.c +++ b/servers/iso9660fs/mount.c @@ -48,7 +48,7 @@ int fs_readsuper() { /* Return some root inode properties */ fs_m_out.RES_INODE_NR = ID_DIR_RECORD(v_pri.dir_rec_root); fs_m_out.RES_MODE = v_pri.dir_rec_root->d_mode; - fs_m_out.RES_FILE_SIZE_LO = v_pri.dir_rec_root->d_file_size; + fs_m_out.RES_FILE_SIZE = v_pri.dir_rec_root->d_file_size; fs_m_out.RES_UID = SYS_UID; /* Always root */ fs_m_out.RES_GID = SYS_GID; /* operator */ fs_m_out.RES_FLAGS = RES_NOFLAGS; diff --git a/servers/iso9660fs/path.c b/servers/iso9660fs/path.c index 865c5c77b..8ccc78c72 100644 --- a/servers/iso9660fs/path.c +++ b/servers/iso9660fs/path.c @@ -60,7 +60,7 @@ int fs_lookup() { fs_m_out.RES_INODE_NR = ID_DIR_RECORD(dir); fs_m_out.RES_MODE = dir->d_mode; - fs_m_out.RES_FILE_SIZE_LO = dir->d_file_size; + fs_m_out.RES_FILE_SIZE = dir->d_file_size; fs_m_out.RES_SYMLOOP = 0; fs_m_out.RES_UID = SYS_UID; /* root */ fs_m_out.RES_GID = SYS_GID; /* operator */ diff --git a/servers/mfs/mount.c b/servers/mfs/mount.c index d4510bb06..14f7aac94 100644 --- a/servers/mfs/mount.c +++ b/servers/mfs/mount.c @@ -103,7 +103,7 @@ int fs_readsuper() /* Root inode properties */ fs_m_out.RES_INODE_NR = root_ip->i_num; fs_m_out.RES_MODE = root_ip->i_mode; - fs_m_out.RES_FILE_SIZE_LO = root_ip->i_size; + fs_m_out.RES_FILE_SIZE = root_ip->i_size; fs_m_out.RES_UID = root_ip->i_uid; fs_m_out.RES_GID = root_ip->i_gid; fs_m_out.RES_FLAGS = RES_HASPEEK; diff --git a/servers/mfs/open.c b/servers/mfs/open.c index 6dc29842d..96ea1234b 100644 --- a/servers/mfs/open.c +++ b/servers/mfs/open.c @@ -54,7 +54,7 @@ int fs_create() /* Reply message */ fs_m_out.RES_INODE_NR = rip->i_num; fs_m_out.RES_MODE = rip->i_mode; - fs_m_out.RES_FILE_SIZE_LO = rip->i_size; + fs_m_out.RES_FILE_SIZE = rip->i_size; /* These values are needed for the execution */ fs_m_out.RES_UID = rip->i_uid; diff --git a/servers/mfs/path.c b/servers/mfs/path.c index 7676c0743..7c69f2a26 100644 --- a/servers/mfs/path.c +++ b/servers/mfs/path.c @@ -99,7 +99,7 @@ int fs_lookup() fs_m_out.RES_INODE_NR = rip->i_num; fs_m_out.RES_MODE = rip->i_mode; - fs_m_out.RES_FILE_SIZE_LO = rip->i_size; + fs_m_out.RES_FILE_SIZE = rip->i_size; fs_m_out.RES_SYMLOOP = symlinks; fs_m_out.RES_UID = rip->i_uid; fs_m_out.RES_GID = rip->i_gid; diff --git a/servers/pfs/open.c b/servers/pfs/open.c index 4d8d202c3..27273dab2 100644 --- a/servers/pfs/open.c +++ b/servers/pfs/open.c @@ -44,7 +44,7 @@ int fs_newnode(message *fs_m_in, message *fs_m_out) /* Fill in the fields of the response message */ fs_m_out->RES_INODE_NR = rip->i_num; fs_m_out->RES_MODE = rip->i_mode; - fs_m_out->RES_FILE_SIZE_LO = rip->i_size; + fs_m_out->RES_FILE_SIZE = rip->i_size; fs_m_out->RES_UID = rip->i_uid; fs_m_out->RES_GID = rip->i_gid; fs_m_out->RES_DEV = dev; diff --git a/servers/vfs/request.c b/servers/vfs/request.c index 81740c6f1..58a64061d 100644 --- a/servers/vfs/request.c +++ b/servers/vfs/request.c @@ -188,11 +188,7 @@ int req_create( res->fs_e = m.m_source; res->inode_nr = (ino_t) m.RES_INODE_NR; res->fmode = (mode_t) m.RES_MODE; - if (vmp->m_fs_flags & RES_64BIT) { - res->fsize = make64(m.RES_FILE_SIZE_LO, m.RES_FILE_SIZE_HI); - } else { - res->fsize = m.RES_FILE_SIZE_LO; - } + res->fsize = m.RES_FILE_SIZE; res->uid = (uid_t) m.RES_UID; res->gid = (gid_t) m.RES_GID; res->dev = NO_DEV; @@ -463,11 +459,7 @@ int req_lookup( case OK: res->inode_nr = (ino_t) m.RES_INODE_NR; res->fmode = (mode_t) m.RES_MODE; - if (vmp->m_fs_flags & RES_64BIT) { - res->fsize = make64(m.RES_FILE_SIZE_LO, m.RES_FILE_SIZE_HI); - } else { - res->fsize = m.RES_FILE_SIZE_LO; - } + res->fsize = m.RES_FILE_SIZE; res->dev = m.RES_DEV; res->uid = (uid_t) m.RES_UID; res->gid = (gid_t) m.RES_GID; @@ -620,11 +612,7 @@ int req_newnode( res->fs_e = m.m_source; res->inode_nr = (ino_t) m.RES_INODE_NR; res->fmode = (mode_t) m.RES_MODE; - if (vmp->m_fs_flags & RES_64BIT) { - res->fsize = make64(m.RES_FILE_SIZE_LO, m.RES_FILE_SIZE_HI); - } else { - res->fsize = m.RES_FILE_SIZE_LO; - } + res->fsize = m.RES_FILE_SIZE; res->dev = m.RES_DEV; res->uid = (uid_t) m.RES_UID; res->gid = (gid_t) m.RES_GID; @@ -771,11 +759,7 @@ int req_readsuper( res->fs_e = m.m_source; res->inode_nr = (ino_t) m.RES_INODE_NR; res->fmode = (mode_t) m.RES_MODE; - if (m.RES_FLAGS & RES_64BIT) { - res->fsize = make64(m.RES_FILE_SIZE_LO, m.RES_FILE_SIZE_HI); - } else { - res->fsize = m.RES_FILE_SIZE_LO; - } + res->fsize = m.RES_FILE_SIZE; res->uid = (uid_t) m.RES_UID; res->gid = (gid_t) m.RES_GID; *fs_flags = m.RES_FLAGS; -- 2.44.0