[Libsysio-commit] HEAD: libsysio/src access.c chdir.c chmod.c chown.c dup.c fcntl.c file.c file_hac
Brought to you by:
lward
From: Lee W. <lw...@us...> - 2007-04-30 16:52:27
|
Update of /cvsroot/libsysio/libsysio/src In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv2000/src Modified Files: access.c chdir.c chmod.c chown.c dup.c fcntl.c file.c file_hack.c fsync.c getdirentries.c init.c inode.c ioctl.c ioctx.c iowait.c link.c lseek.c mkdir.c mknod.c module.mk mount.c namei.c open.c readdir.c readlink.c rename.c rmdir.c rw.c stat.c statvfs.c statvfs64.c stddir.c symlink.c truncate.c unlink.c utime.c Removed Files: stat64.c Log Message: Merged "unification" branch. First, the changes alter the core to perform pnode-ops by pnode. However, it maintains the pre-existing interface in order to minimize driver changes. Second, more detailed tracing information is available now in the form of a tag, indicating which function the data is from, as well as arguments and return data. Note1: The S_IFDIR bit is no longer set when the pnode-op mkdir function is called. If you need that, set it in your driver. Note2: It is possible to encounter a disconnected tree in _sysio_pb_path. If so, it returns an empty string. This *might* be good enough for your driver. If not, you'll need a change for this as well -- In fact, you should go ahead and change it anyway. Instead of _sysio_pb_path, use _sysio_pb_pathof. This new function takes the base pnode and a pointer to a string. It returns an integer. The usual zero on success or a negated errno on failure. Note3: Sockets support is horribly broken and won't build. As far as I know, this was never used. Unless somebody tells me differently, sockets support will be deprecated in the next release. Otherwise, let me know and I'll fix it. Index: access.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/access.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -w -b -B -p -r1.14 -r1.15 --- access.c 23 Mar 2007 19:05:50 -0000 1.14 +++ access.c 30 Apr 2007 16:52:20 -0000 1.15 @@ -76,6 +76,8 @@ _sysio_check_permission(struct pnode *pn int ngids; int group_matched; + assert(pno); + /* * Check amode. */ @@ -256,12 +258,12 @@ SYSIO_INTERFACE_NAME(access)(const char SYSIO_INTERFACE_DISPLAY_BLOCK; - SYSIO_INTERFACE_ENTER; + SYSIO_INTERFACE_ENTER(access, path, amode); INTENT_INIT(&intent, INT_GETATTR, NULL, NULL); err = _sysio_namei(_sysio_cwd, path, 0, &intent, &pno); if (err) - SYSIO_INTERFACE_RETURN(-1, err); + SYSIO_INTERFACE_RETURN(-1, err, access, 0); err = _sysio_ldcreds(geteuid(), getegid(), &cr); if (err < 0) goto out; @@ -269,7 +271,7 @@ SYSIO_INTERFACE_NAME(access)(const char _sysio_check_permission(pno, &cr, amode); out: P_RELE(pno); - SYSIO_INTERFACE_RETURN(err ? -1 : 0, err); + SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, access, 0); } #ifdef REDSTORM Index: chdir.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/chdir.c,v retrieving revision 1.27 retrieving revision 1.28 diff -u -w -b -B -p -r1.27 -r1.28 --- chdir.c 26 Mar 2007 18:35:50 -0000 1.27 +++ chdir.c 30 Apr 2007 16:52:20 -0000 1.28 @@ -126,15 +126,15 @@ SYSIO_INTERFACE_NAME(chdir)(const char * struct pnode *pno; SYSIO_INTERFACE_DISPLAY_BLOCK; - SYSIO_INTERFACE_ENTER; + SYSIO_INTERFACE_ENTER(chdir, path); err = _sysio_namei(_sysio_cwd, path, 0, NULL, &pno); if (err) - SYSIO_INTERFACE_RETURN(-1, err); + SYSIO_INTERFACE_RETURN(-1, err, chdir, 0); err = _sysio_p_chdir(pno); if (err) P_RELE(pno); - SYSIO_INTERFACE_RETURN(err ? -1 : 0, err); + SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, chdir, 0); } #ifdef REDSTORM @@ -175,7 +175,8 @@ _sysio_p_path(struct pnode *pno, char ** * the *covered* nodes name, not this one unless we are at * the root of the name-space. */ - while (pno == pno->p_mount->mnt_root && pno != pno->p_parent ) + while (pno == pno->p_mount->mnt_root && + pno != pno->p_parent) pno = pno->p_mount->mnt_covers; /* @@ -189,7 +190,9 @@ _sysio_p_path(struct pnode *pno, char ** n++; assert(n); pno = pno->p_parent; - } while (pno != pno->p_parent); + } while (pno && pno != pno->p_parent); + if (!pno) + return -ENOENT; if (!*buf) size = len + n + 1; @@ -216,7 +219,8 @@ _sysio_p_path(struct pnode *pno, char ** * the *covered* nodes name, not this one unless we are at * the root of the name-space. */ - while (pno == pno->p_mount->mnt_root && pno != pno->p_parent ) + while (pno == pno->p_mount->mnt_root && + pno != pno->p_parent ) pno = pno->p_mount->mnt_covers; /* @@ -239,7 +243,7 @@ SYSIO_INTERFACE_NAME(getcwd)(char *buf, int err; SYSIO_INTERFACE_DISPLAY_BLOCK; - SYSIO_INTERFACE_ENTER; + SYSIO_INTERFACE_ENTER(getcwd, buf, size); #if DEFER_INIT_CWD if (!_sysio_cwd) { struct pnode *pno; @@ -254,7 +258,7 @@ SYSIO_INTERFACE_NAME(getcwd)(char *buf, } #endif err = _sysio_p_path(_sysio_cwd, &buf, buf ? size : 0); - SYSIO_INTERFACE_RETURN(err ? NULL : buf, err); + SYSIO_INTERFACE_RETURN(err ? NULL : buf, err, getcwd, buf, size); } #ifdef __GLIBC__ Index: chmod.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/chmod.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -w -b -B -p -r1.14 -r1.15 --- chmod.c 27 Jul 2004 15:00:43 -0000 1.14 +++ chmod.c 30 Apr 2007 16:52:20 -0000 1.15 @@ -9,7 +9,7 @@ * terms of the GNU Lesser General Public License * (see cit/LGPL or http://www.gnu.org/licenses/lgpl.html) * - * Cplant(TM) Copyright 1998-2003 Sandia Corporation. + * Cplant(TM) Copyright 1998-2007 Sandia Corporation. * Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive * license for use of this work by or on behalf of the US Government. * Export of this program may require a license from the United States @@ -36,7 +36,7 @@ * Lee Ward * Sandia National Laboratories, New Mexico * P.O. Box 5800 - * Albuquerque, NM 87185-1110 + * Albuquerque, NM 87185-1319 * * le...@sa... */ @@ -55,7 +55,7 @@ #include "sysio-symbols.h" static int -do_chmod(struct pnode *pno, struct inode *ino, mode_t mode) +do_chmod(struct pnode *pno, mode_t mode) { int err; struct intnl_stat stbuf; @@ -64,7 +64,7 @@ do_chmod(struct pnode *pno, struct inode (void )memset(&stbuf, 0, sizeof(struct intnl_stat)); stbuf.st_mode = mode & 07777; mask = SETATTR_MODE; - err = _sysio_setattr(pno, ino, mask, &stbuf); + err = _sysio_p_setattr(pno, mask, &stbuf); return err; } @@ -75,14 +75,14 @@ SYSIO_INTERFACE_NAME(chmod)(const char * struct pnode *pno; SYSIO_INTERFACE_DISPLAY_BLOCK; - SYSIO_INTERFACE_ENTER; + SYSIO_INTERFACE_ENTER(chmod, path, mode); err = _sysio_namei(_sysio_cwd, path, 0, NULL, &pno); if (err) goto out; - err = do_chmod(pno, pno->p_base->pb_ino, mode); + err = do_chmod(pno, mode); P_RELE(pno); out: - SYSIO_INTERFACE_RETURN(err ? -1 : 0, err); + SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, chmod, 0); } #ifdef REDSTORM @@ -98,7 +98,7 @@ SYSIO_INTERFACE_NAME(fchmod)(int fd, mod struct file *fil; SYSIO_INTERFACE_DISPLAY_BLOCK; - SYSIO_INTERFACE_ENTER; + SYSIO_INTERFACE_ENTER(fchmod, fd, mode); err = 0; fil = _sysio_fd_find(fd); if (!fil) { @@ -106,9 +106,9 @@ SYSIO_INTERFACE_NAME(fchmod)(int fd, mod goto out; } - err = do_chmod(NULL, fil->f_ino, mode); + err = do_chmod(fil->f_pno, mode); out: - SYSIO_INTERFACE_RETURN(err ? -1 : 0, err); + SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, fchmod, 0); } #ifdef REDSTORM Index: chown.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/chown.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -w -b -B -p -r1.13 -r1.14 --- chown.c 27 Jul 2004 15:00:43 -0000 1.13 +++ chown.c 30 Apr 2007 16:52:20 -0000 1.14 @@ -9,7 +9,7 @@ * terms of the GNU Lesser General Public License * (see cit/LGPL or http://www.gnu.org/licenses/lgpl.html) * - * Cplant(TM) Copyright 1998-2003 Sandia Corporation. + * Cplant(TM) Copyright 1998-2007 Sandia Corporation. * Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive * license for use of this work by or on behalf of the US Government. * Export of this program may require a license from the United States @@ -36,7 +36,7 @@ * Lee Ward * Sandia National Laboratories, New Mexico * P.O. Box 5800 - * Albuquerque, NM 87185-1110 + * Albuquerque, NM 87185-1319 * * le...@sa... */ @@ -55,7 +55,7 @@ #include "sysio-symbols.h" static int -_do_chown(struct pnode *pno, struct inode *ino, uid_t owner, gid_t group) +_do_chown(struct pnode *pno, uid_t owner, gid_t group) { int err; struct intnl_stat stbuf; @@ -71,7 +71,7 @@ _do_chown(struct pnode *pno, struct inod stbuf.st_gid = group; mask |= SETATTR_GID; } - err = _sysio_setattr(pno, ino, mask, &stbuf); + err = _sysio_p_setattr(pno, mask, &stbuf); return err; } @@ -82,15 +82,15 @@ SYSIO_INTERFACE_NAME(chown)(const char * struct pnode *pno; SYSIO_INTERFACE_DISPLAY_BLOCK; - SYSIO_INTERFACE_ENTER; + SYSIO_INTERFACE_ENTER(chown, path, owner, group); err = _sysio_namei(_sysio_cwd, path, 0, NULL, &pno); if (err) goto out; - err = _do_chown(pno, pno->p_base->pb_ino, owner, group); + err = _do_chown(pno, owner, group); P_RELE(pno); out: - SYSIO_INTERFACE_RETURN(err ? -1 : 0, err); + SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, chown, 0); } #ifdef REDSTORM @@ -106,7 +106,7 @@ SYSIO_INTERFACE_NAME(fchown)(int fd, uid struct file *fil; SYSIO_INTERFACE_DISPLAY_BLOCK; - SYSIO_INTERFACE_ENTER; + SYSIO_INTERFACE_ENTER(fchown, fd, owner, group); err = 0; fil = _sysio_fd_find(fd); if (!fil) { @@ -114,9 +114,9 @@ SYSIO_INTERFACE_NAME(fchown)(int fd, uid goto out; } - err = _do_chown(NULL, fil->f_ino, owner, group); + err = _do_chown(fil->f_pno, owner, group); out: - SYSIO_INTERFACE_RETURN(err ? -1 : 0, err); + SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, fchown, 0); } #ifdef REDSTORM Index: dup.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/dup.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -w -b -B -p -r1.12 -r1.13 --- dup.c 16 Jun 2005 21:01:14 -0000 1.12 +++ dup.c 30 Apr 2007 16:52:20 -0000 1.13 @@ -56,11 +56,11 @@ SYSIO_INTERFACE_NAME(dup2)(int oldfd, in int fd; SYSIO_INTERFACE_DISPLAY_BLOCK; - SYSIO_INTERFACE_ENTER; + SYSIO_INTERFACE_ENTER(dup2, oldfd, newfd); if (newfd < 0) - SYSIO_INTERFACE_RETURN(-1, -EBADF); + SYSIO_INTERFACE_RETURN(-1, -EBADF, dup2, 0); fd = _sysio_fd_dup(oldfd, newfd, 1); - SYSIO_INTERFACE_RETURN(fd < 0 ? -1 : fd, fd < 0 ? fd : 0); + SYSIO_INTERFACE_RETURN(fd < 0 ? -1 : fd, fd < 0 ? fd : 0, dup2, 0); } #ifdef REDSTORM @@ -75,9 +75,9 @@ SYSIO_INTERFACE_NAME(dup)(int oldfd) int fd; SYSIO_INTERFACE_DISPLAY_BLOCK; - SYSIO_INTERFACE_ENTER; + SYSIO_INTERFACE_ENTER(dup, oldfd); fd = _sysio_fd_dup(oldfd, -1, 0); - SYSIO_INTERFACE_RETURN(fd < 0 ? -1 : fd, fd < 0 ? fd : 0); + SYSIO_INTERFACE_RETURN(fd < 0 ? -1 : fd, fd < 0 ? fd : 0, dup, 0); } #ifdef __GLIBC__ Index: fcntl.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/fcntl.c,v retrieving revision 1.26 retrieving revision 1.27 diff -u -w -b -B -p -r1.26 -r1.27 --- fcntl.c 28 Mar 2007 20:50:41 -0000 1.26 +++ fcntl.c 30 Apr 2007 16:52:20 -0000 1.27 @@ -9,7 +9,7 @@ * terms of the GNU Lesser General Public License * (see cit/LGPL or http://www.gnu.org/licenses/lgpl.html) * - * Cplant(TM) Copyright 1998-2005 Sandia Corporation. + * Cplant(TM) Copyright 1998-2007 Sandia Corporation. * Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive * license for use of this work by or on behalf of the US Government. * Export of this program may require a license from the United States @@ -74,13 +74,13 @@ _sysio_lustre_fcntl(int fd, int cmd, va_ #endif static int -_sysio_fcntl_raw_call(struct inode *ino, int *r, int cmd, ...) +_sysio_fcntl_raw_call(struct pnode *pno, int *r, int cmd, ...) { va_list ap; int err; va_start(ap, cmd); - err = ino->i_ops.inop_fcntl(ino, cmd, ap, r); + err = PNOP_FCNTL(pno, cmd, ap, r); va_end(ap); return err; } @@ -126,7 +126,7 @@ _sysio_fcntl_lock(struct file *fil, int return -EINVAL; } err = - _sysio_fcntl_raw_call(fil->f_ino, &rtn, cmd, &flock); + _sysio_fcntl_raw_call(fil->f_pno, &rtn, cmd, &flock); if (err) return err; /* @@ -142,7 +142,7 @@ _sysio_fcntl_lock(struct file *fil, int case SEEK_END: fl->l_start = flock.l_start; fl->l_start -= - fil->f_ino->i_stbuf.st_size; + fil->f_pno->p_base->pb_ino->i_stbuf.st_size; break; default: abort(); @@ -161,7 +161,7 @@ _sysio_vfcntl(int fd, int cmd, va_list a struct file *fil; SYSIO_INTERFACE_DISPLAY_BLOCK; - SYSIO_INTERFACE_ENTER; + SYSIO_INTERFACE_ENTER(vfcntl, fd, cmd); err = 0; fil = _sysio_fd_find(fd); if (!fil) { @@ -209,9 +209,7 @@ _sysio_vfcntl(int fd, int cmd, va_list a * Refresh the cached attributes. */ err = - fil->f_ino->i_ops.inop_getattr(NULL, - fil->f_ino, - &buf); + PNOP_GETATTR(fil->f_pno, &buf); if (err) { rtn = -1; break; @@ -265,12 +263,12 @@ _sysio_vfcntl(int fd, int cmd, va_list a break; #endif default: - err = fil->f_ino->i_ops.inop_fcntl(fil->f_ino, cmd, ap, &rtn); + err = PNOP_FCNTL(fil->f_pno, cmd, ap, &rtn); break; } out: - SYSIO_INTERFACE_RETURN(rtn, err); + SYSIO_INTERFACE_RETURN(rtn, err, vfcntl, 0); } int Index: file.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/file.c,v retrieving revision 1.20 retrieving revision 1.21 diff -u -w -b -B -p -r1.20 -r1.21 --- file.c 3 Jan 2006 13:26:33 -0000 1.20 +++ file.c 30 Apr 2007 16:52:20 -0000 1.21 @@ -9,7 +9,7 @@ * terms of the GNU Lesser General Public License * (see cit/LGPL or http://www.gnu.org/licenses/lgpl.html) * - * Cplant(TM) Copyright 1998-2003 Sandia Corporation. + * Cplant(TM) Copyright 1998-2007 Sandia Corporation. * Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive * license for use of this work by or on behalf of the US Government. * Export of this program may require a license from the United States @@ -66,7 +66,7 @@ static size_t _sysio_oftab_size = 0; * Create and initialize open file record. */ struct file * -_sysio_fnew(struct inode *ino, int flags) +_sysio_fnew(struct pnode *pno, int flags) { struct file *fil; @@ -74,9 +74,9 @@ _sysio_fnew(struct inode *ino, int flags if (!fil) return NULL; - _SYSIO_FINIT(fil, ino, flags); + _SYSIO_FINIT(fil, pno, flags); F_REF(fil); - I_REF(fil->f_ino); + P_REF(fil->f_pno); return fil; } @@ -90,10 +90,10 @@ _sysio_fgone(struct file *fil) int err; assert(!fil->f_ref); - assert(fil->f_ino); - err = (*fil->f_ino->i_ops.inop_close)(fil->f_ino); + assert(fil->f_pno); + err = PNOP_CLOSE(fil->f_pno); assert(!err); - I_RELE(fil->f_ino); + P_RELE(fil->f_pno); free(fil); } @@ -108,7 +108,7 @@ _sysio_fcompletio(struct ioctx *ioctx, s if (ioctx->ioctx_cc <= 0) return; - assert(ioctx->ioctx_ino == fil->f_ino); + assert(ioctx->ioctx_ino == fil->f_pno->p_base->pb_ino); off = fil->f_pos + ioctx->ioctx_cc; if (fil->f_pos && off <= fil->f_pos) abort(); Index: file_hack.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/file_hack.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -w -b -B -p -r1.10 -r1.11 --- file_hack.c 4 Jan 2006 13:16:18 -0000 1.10 +++ file_hack.c 30 Apr 2007 16:52:20 -0000 1.11 @@ -9,7 +9,7 @@ * terms of the GNU Lesser General Public License * (see cit/LGPL or http://www.gnu.org/licenses/lgpl.html) * - * Cplant(TM) Copyright 1998-2003 Sandia Corporation. + * Cplant(TM) Copyright 1998-2007 Sandia Corporation. * Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive * license for use of this work by or on behalf of the US Government. * Export of this program may require a license from the United States @@ -97,7 +97,7 @@ static inline oftab_t *select_oftab(int * Create and initialize open file record. */ struct file * -_sysio_fnew(struct inode *ino, int flags) +_sysio_fnew(struct pnode *pno, int flags) { struct file *fil; @@ -105,9 +105,9 @@ _sysio_fnew(struct inode *ino, int flags if (!fil) return NULL; - _SYSIO_FINIT(fil, ino, flags); + _SYSIO_FINIT(fil, pno, flags); F_REF(fil); - I_REF(ino); + P_REF(pno); return fil; } @@ -121,9 +121,9 @@ _sysio_fgone(struct file *fil) int err; assert(!fil->f_ref); - assert(fil->f_ino); - err = (*fil->f_ino->i_ops.inop_close)(fil->f_ino); - I_RELE(fil->f_ino); + assert(fil->f_pno); + err = PNOP_CLOSE(fil->f_pno); + P_RELE(fil->f_pno); assert(!err); free(fil); } @@ -139,7 +139,7 @@ _sysio_fcompletio(struct ioctx *ioctx, s if (ioctx->ioctx_cc <= 0) return; - assert(ioctx->ioctx_ino == fil->f_ino); + assert(ioctx->ioctx_ino == fil->f_pno->p_base->pb_ino); off = fil->f_pos + ioctx->ioctx_cc; if (fil->f_pos && off <= fil->f_pos) abort(); Index: fsync.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/fsync.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -w -b -B -p -r1.8 -r1.9 --- fsync.c 21 Sep 2004 16:18:30 -0000 1.8 +++ fsync.c 30 Apr 2007 16:52:20 -0000 1.9 @@ -9,7 +9,7 @@ * terms of the GNU Lesser General Public License * (see cit/LGPL or http://www.gnu.org/licenses/lgpl.html) * - * Cplant(TM) Copyright 1998-2003 Sandia Corporation. + * Cplant(TM) Copyright 1998-2007 Sandia Corporation. * Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive * license for use of this work by or on behalf of the US Government. * Export of this program may require a license from the United States @@ -58,12 +58,12 @@ SYSIO_INTERFACE_NAME(fsync)(int fd) int err; SYSIO_INTERFACE_DISPLAY_BLOCK; - SYSIO_INTERFACE_ENTER; + SYSIO_INTERFACE_ENTER(fsync, fd); fil = _sysio_fd_find(fd); - if (!(fil && fil->f_ino)) - SYSIO_INTERFACE_RETURN(-1, -EBADF); - err = (*fil->f_ino->i_ops.inop_sync)(fil->f_ino); - SYSIO_INTERFACE_RETURN(err ? -1 : 0, err); + if (!(fil && fil->f_pno)) + SYSIO_INTERFACE_RETURN(-1, -EBADF, fsync, 0); + err = PNOP_SYNC(fil->f_pno); + SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, fsync, 0); } int @@ -73,10 +73,10 @@ SYSIO_INTERFACE_NAME(fdatasync)(int fd) int err; SYSIO_INTERFACE_DISPLAY_BLOCK; - SYSIO_INTERFACE_ENTER; + SYSIO_INTERFACE_ENTER(fdatasync, fd); fil = _sysio_fd_find(fd); - if (!(fil && fil->f_ino)) - SYSIO_INTERFACE_RETURN(-1, -EBADF); - err = (*fil->f_ino->i_ops.inop_datasync)(fil->f_ino); - SYSIO_INTERFACE_RETURN(err ? -1 : 0, err); + if (!(fil && fil->f_pno)) + SYSIO_INTERFACE_RETURN(-1, -EBADF, fdatasync, 0); + err = PNOP_DATASYNC(fil->f_pno); + SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, fdatasync, 0); } Index: getdirentries.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/getdirentries.c,v retrieving revision 1.22 retrieving revision 1.23 diff -u -w -b -B -p -r1.22 -r1.23 --- getdirentries.c 14 Mar 2007 20:16:31 -0000 1.22 +++ getdirentries.c 30 Apr 2007 16:52:20 -0000 1.23 @@ -9,7 +9,7 @@ * terms of the GNU Lesser General Public License * (see cit/LGPL or http://www.gnu.org/licenses/lgpl.html) * - * Cplant(TM) Copyright 1998-2004 Sandia Corporation. + * Cplant(TM) Copyright 1998-2007 Sandia Corporation. * Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive * license for use of this work by or on behalf of the US Government. * Export of this program may require a license from the United States @@ -70,14 +70,14 @@ filldirents(struct file *fil, _SYSIO_OFF_T opos; ssize_t cc; - if (!S_ISDIR(fil->f_ino->i_stbuf.st_mode)) + if (!(fil && fil->f_pno->p_base->pb_ino)) + return -EBADF; + if (!S_ISDIR(fil->f_pno->p_base->pb_ino->i_stbuf.st_mode)) return -ENOTDIR; opos = fil->f_pos; cc = - (*fil->f_ino->i_ops.inop_filldirentries)(fil->f_ino, - &fil->f_pos, - buf, nbytes); + PNOP_FILLDIRENTRIES(fil->f_pno, &fil->f_pos, buf, nbytes); if (cc < 0) return cc; *basep = opos; @@ -95,15 +95,13 @@ PREPEND(_, SYSIO_INTERFACE_NAME(getdiren ssize_t cc; SYSIO_INTERFACE_DISPLAY_BLOCK; - SYSIO_INTERFACE_ENTER; + SYSIO_INTERFACE_ENTER(getdirentries64, fd, buf, nbytes, basep); fil = _sysio_fd_find(fd); - if (!(fil && fil->f_ino)) { - SYSIO_INTERFACE_RETURN(-1, -EBADF); - } - cc = filldirents(fil, buf, nbytes, basep); - SYSIO_INTERFACE_RETURN(cc < 0 ? -1 : cc, cc < 0 ? (int )cc : 0); + SYSIO_INTERFACE_RETURN(cc < 0 ? -1 : cc, + cc < 0 ? (int )cc : 0, + getdirentries64, buf, basep); } #if _LARGEFILE64_SOURCE @@ -166,13 +164,9 @@ SYSIO_INTERFACE_NAME(getdirentries)(int char *cp; SYSIO_INTERFACE_DISPLAY_BLOCK; - SYSIO_INTERFACE_ENTER; + SYSIO_INTERFACE_ENTER(getdirentries, fd, buf, nbytes, basep); fil = _sysio_fd_find(fd); - if (!(fil && fil->f_ino)) { - SYSIO_INTERFACE_RETURN(-1, -EBADF); - } - count = cc = filldirents(fil, buf, nbytes, &b); d64p = (void *)buf; dp = (void *)buf; @@ -230,10 +224,10 @@ SYSIO_INTERFACE_NAME(getdirentries)(int } if (cc < 0) - SYSIO_INTERFACE_RETURN(-1, cc); + SYSIO_INTERFACE_RETURN(-1, cc, getdirentries, buf, basep); cc = (char *)dp - buf; *basep = b; - SYSIO_INTERFACE_RETURN(cc, 0); + SYSIO_INTERFACE_RETURN(cc, 0, getdirentries, buf, basep); } #else /* !defined(DIRENT64_IS_NATURAL) */ sysio_sym_strong_alias(PREPEND(_, SYSIO_INTERFACE_NAME(getdirentries64), Index: init.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/init.c,v retrieving revision 1.31 retrieving revision 1.32 diff -u -w -b -B -p -r1.31 -r1.32 --- init.c 12 Apr 2007 20:05:52 -0000 1.31 +++ init.c 30 Apr 2007 16:52:20 -0000 1.32 @@ -9,7 +9,7 @@ * terms of the GNU Lesser General Public License * (see cit/LGPL or http://www.gnu.org/licenses/lgpl.html) * - * Cplant(TM) Copyright 1998-2006 Sandia Corporation. + * Cplant(TM) Copyright 1998-2007 Sandia Corporation. * Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive * license for use of this work by or on behalf of the US Government. * Export of this program may require a license from the United States @@ -36,7 +36,7 @@ * Lee Ward * Sandia National Laboratories, New Mexico * P.O. Box 5800 - * Albuquerque, NM 87185-1110 + * Albuquerque, NM 87185-1319 * * le...@sa... */ @@ -91,7 +91,9 @@ struct trace_callback { void (*f)(const char *file, /* callback function */ const char *func, int line, - void *data); + void *data, + int tag, + va_list ap); void *data; /* callback data */ void (*destructor)(void *data); /* data destructor */ }; @@ -323,7 +325,9 @@ _sysio_register_trace(void *q, void (*f)(const char *file, const char *func, int line, - void *data), + void *data, + int tag, + va_list ap), void *data, void (*destructor)(void *data)) { @@ -360,35 +364,46 @@ void _sysio_run_trace_q(void *q, const char *file, const char *func, - int line) + int line, + int tag, + ...) { + va_list ap, aq; struct trace_callback *tcb; + va_start(ap, tag); tcb = ((struct trace_q *)q)->tqh_first; while (tcb) { - (*tcb->f)(file, func, line, tcb->data); + va_copy(aq, ap); + (*tcb->f)(file, func, line, tcb->data, tag, ap); + va_end(aq); tcb = tcb->links.tqe_next; } + va_end(ap); } static void _sysio_trace_entry(const char *file __IS_UNUSED, const char *func, int line __IS_UNUSED, - void *data __IS_UNUSED) + void *data __IS_UNUSED, + tracing_tag tag, + va_list ap __IS_UNUSED) { - _sysio_cprintf("+ENTER+ %s\n", func); + _sysio_cprintf("+ENTER+ %s (%d)\n", func, tag); } static void _sysio_trace_exit(const char *file __IS_UNUSED, const char *func, int line __IS_UNUSED, - void *data __IS_UNUSED) + void *data __IS_UNUSED, + tracing_tag tag, + va_list ap __IS_UNUSED) { - _sysio_cprintf("+EXIT+ %s\n", func); + _sysio_cprintf("+EXIT+ %s (%d)\n", func, tag); } #endif /* defined(SYSIO_TRACING) */ @@ -549,7 +564,6 @@ do_creat(char *args) CREATE_FILE = 4 } op; int intent_mode; - struct inode *ino; int i; len = strlen(args); @@ -641,41 +655,31 @@ do_creat(char *args) err = _sysio_open(pno, O_CREAT|O_EXCL, mode); if (err) break; - ino = pno->p_base->pb_ino; if (v[6].ovi_value) { - struct iovec iovec; - struct intnl_xtvec xtvec; - struct ioctx io_context; + size_t count; + struct ioctx *ioctx; /* * Deposit optional file content. */ - iovec.iov_base = v[6].ovi_value; - iovec.iov_len = strlen(v[6].ovi_value); - xtvec.xtv_off = 0; - xtvec.xtv_len = iovec.iov_len; - IOCTX_INIT(&io_context, - 1, - 1, - ino, - &iovec, 1, - &xtvec, 1); - _sysio_ioctx_enter(&io_context); + count = strlen(v[6].ovi_value); err = - (*ino->i_ops.inop_write)(pno->p_base->pb_ino, - &io_context); + _sysio_p_awrite(pno, + 0, + v[6].ovi_value, + count, + &ioctx); if (!err) { ssize_t cc; - cc = _sysio_ioctx_wait(&io_context); + cc = _sysio_ioctx_wait(ioctx); if (cc < 0) err = cc; - else if ((size_t )cc != iovec.iov_len) + else if ((size_t )cc != count) err = -EIO; /* huh? */ - } else - _sysio_ioctx_complete(&io_context); } - i = (*ino->i_ops.inop_close)(ino); + } + i = PNOP_CLOSE(pno); if (!err) err = i; break; @@ -823,7 +827,7 @@ do_chmd(char *args) err = _sysio_namei(dir, v[0].ovi_value, ND_NOPERMCHECK, NULL, &pno); if (err) return err; - err = _sysio_setattr(pno, pno->p_base->pb_ino, SETATTR_MODE, &stbuf); + err = _sysio_p_setattr(pno, SETATTR_MODE, &stbuf); P_RELE(pno); return err; @@ -875,7 +879,7 @@ do_open(char *args) err = _sysio_open(pno, m, 0); if (err) break; - fil = _sysio_fnew(pno->p_base->pb_ino, m); + fil = _sysio_fnew(pno, m); if (!fil) { err = -ENOMEM; break; Index: inode.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/inode.c,v retrieving revision 1.25 retrieving revision 1.26 diff -u -w -b -B -p -r1.25 -r1.26 --- inode.c 1 Jun 2006 21:28:57 -0000 1.25 +++ inode.c 30 Apr 2007 16:52:20 -0000 1.26 @@ -344,19 +344,13 @@ p_reclaim() t = max_names / 2; do { pno = next; - if (pno->p_ref) { - next = pno->p_nodes.tqe_next; - continue; - } - pno->p_ref++; - assert(pno->p_ref); - (void )_sysio_p_prune(pno); next = pno->p_nodes.tqe_next; - assert(pno->p_ref); - pno->p_ref--; if (pno->p_ref) continue; + next->p_ref++; + assert(next->p_ref); (void )_sysio_p_prune(pno); + next->p_ref--; } while (n_names > t && next); if (n_names > t) @@ -396,7 +390,6 @@ _sysio_pb_new(struct qstr *name, struct cp = (char *)pb + sizeof(struct pnode_base); (void )strncpy(cp, name->name, name->len); pb->pb_name.name = cp; - assert(name->hashval); pb->pb_name.hashval = name->hashval; LIST_INSERT_HEAD(&names[name->hashval % NAMES_TABLE_LEN], pb, @@ -435,12 +429,6 @@ pb_destroy(struct pnode_base *pb) if (pb->pb_parent) LIST_REMOVE(pb, pb_sibs); -#ifndef NDEBUG - /* - * This can help us catch pb-nodes that are free'd redundantly. - */ - pb->pb_name.hashval = 0; -#endif free(pb); } @@ -459,6 +447,30 @@ _sysio_pb_gone(struct pnode_base *pb) } /* + * Clean up the namespace graph after an unlink. + */ +static void +_sysio_pb_disconnect(struct pnode_base *pb) +{ + struct pnode *pno; + + /* + * Disconnect all aliases associated with the referenced base node. + */ + pno = pb->pb_aliases.lh_first; + do { + pno->p_parent = NULL; + } while ((pno = pno->p_links.le_next)); + /* + * Remove name from the names cache so that it can't + * be found anymore. + */ + if (pb->pb_name.len) + LIST_REMOVE(pb, pb_names); + pb->pb_name.len = 0; +} + +/* * Generate more path (alias) nodes for the fast allocator. */ static void @@ -516,8 +528,6 @@ _sysio_p_new_alias(struct pnode *parent, { struct pnode *pno; - assert(!pb->pb_name.name || pb->pb_name.hashval); - pno = free_pnodes.lh_first; if (!pno) { more_pnodes(); @@ -546,18 +556,12 @@ _sysio_p_new_alias(struct pnode *parent, void _sysio_p_gone(struct pnode *pno) { - struct pnode_base *pb; - assert(!pno->p_ref); assert(!pno->p_cover); TAILQ_REMOVE(&_sysio_pnodes, pno, p_nodes); LIST_REMOVE(pno, p_links); - pb = pno->p_base; - if (!(pb->pb_aliases.lh_first || pb->pb_children.lh_first)) - _sysio_pb_gone(pb); - LIST_INSERT_HEAD(&free_pnodes, pno, p_links); } @@ -568,36 +572,35 @@ int _sysio_p_validate(struct pnode *pno, struct intent *intnt, const char *path) { struct inode *ino; - struct pnode_base *rootpb; int err; + if (!(pno && pno->p_parent)) + return -ENOENT; + ino = pno->p_base->pb_ino; + err = PNOP_LOOKUP(pno, &ino, intnt, path); + if (!err) { + if (pno->p_base->pb_ino == NULL) { /* - * An invalid pnode will not have an associated inode. We'll use - * the FS root inode, then -- It *must* be valid. + * Make valid. */ - rootpb = pno->p_mount->mnt_root->p_base; - assert(rootpb->pb_ino); - err = - rootpb->pb_ino->i_ops.inop_lookup(pno, - &ino, - intnt, - path); - /* - * If the inode lookup returns a different inode, release the old if - * present and point to the new. - */ - if (err || pno->p_base->pb_ino != ino) { - if (pno->p_base->pb_ino) - I_RELE(pno->p_base->pb_ino); pno->p_base->pb_ino = ino; + } else if (pno->p_base->pb_ino != ino) { + /* + * Path resolves to a different inode, now. The + * currently attached inode, then, is stale. + */ + err = -ESTALE; + I_RELE(ino); } + } else if (pno->p_base->pb_ino) + _sysio_pb_disconnect(pno->p_base); return err; } /* * Find (or create!) an alias for the given parent and name. A misnomer, - * really -- This is a "get". Returned path node is referenced. + * really -- This is a "lookup". Returned path node is referenced. */ int _sysio_p_find_alias(struct pnode *parent, @@ -608,9 +611,13 @@ _sysio_p_find_alias(struct pnode *parent int err; struct pnode *pno; + if (!parent) + return -ENOENT; + /* * Find the named child. */ + pb = NULL; if (name->len) { /* * Try the names table. @@ -625,20 +632,6 @@ _sysio_p_find_alias(struct pnode *parent break; pb = pb->pb_names.le_next; } - } else { - /* - * Brute force through the parent's list of children. - */ - pb = parent->p_base->pb_children.lh_first; - while (pb) { - if (pb->pb_parent == parent->p_base && - pb->pb_name.len == name->len && - strncmp(pb->pb_name.name, - name->name, - name->len) == 0) - break; - pb = pb->pb_sibs.le_next; - } } if (!pb) { /* @@ -663,8 +656,7 @@ _sysio_p_find_alias(struct pnode *parent } if (!pno) { /* - * Hmm. No alias. Just create an invalid one, to be - * validated later. + * Hmm. No alias. Create one. */ pno = _sysio_p_new_alias(parent, pb, parent->p_mount); if (!pno) @@ -675,8 +667,9 @@ _sysio_p_find_alias(struct pnode *parent return err; } +#if 0 /* - * Prune idle path base nodes freom the passed sub-tree, including the root. + * Prune idle path base nodes from the passed sub-tree, including the root. */ static void _sysio_prune(struct pnode_base *rpb) @@ -698,6 +691,7 @@ _sysio_prune(struct pnode_base *rpb) return; _sysio_pb_gone(rpb); } +#endif /* * Prune idle nodes from the passed sub-tree, including the root. @@ -717,10 +711,12 @@ _sysio_p_prune(struct pnode *root) while ((pb = nxtpb)) { nxtpb = pb->pb_sibs.le_next; nxtpno = pb->pb_aliases.lh_first; +#if 0 if (!nxtpno) { _sysio_prune(pb); continue; } +#endif while ((pno = nxtpno)) { nxtpno = pno->p_links.le_next; if (pno->p_mount != root->p_mount) { @@ -744,8 +740,6 @@ _sysio_p_prune(struct pnode *root) continue; } assert(!pno->p_cover); /* covered => ref'd! */ - assert(!pno->p_base->pb_name.name || - pno->p_base->pb_name.hashval); /* * Ok to prune. */ @@ -767,6 +761,9 @@ _sysio_p_prune(struct pnode *root) #endif } _sysio_p_gone(pno); + if (!(pb->pb_aliases.lh_first || + pb->pb_children.lh_first)) + _sysio_pb_gone(pb); } } @@ -774,7 +771,9 @@ _sysio_p_prune(struct pnode *root) /* * Can't get the root or we disconnect the sub-trees. */ - return count + (root->p_ref ? 1 : 0); + if (root->p_ref) + count++; + return count; } /* @@ -788,7 +787,7 @@ _sysio_p_prune(struct pnode *root) #else /* * This is an automount-point. Must - * unmount before relcaim. + * unmount before reclaim. */ P_REF(root); if (_sysio_do_unmount(root->p_mount) != 0) { @@ -796,8 +795,13 @@ _sysio_p_prune(struct pnode *root) count++; } #endif - } else + } else { + pb = root->p_base; _sysio_p_gone(root); + if (!(pb->pb_aliases.lh_first || + pb->pb_children.lh_first)) + _sysio_pb_gone(pb); + } return count; } @@ -809,12 +813,12 @@ _sysio_p_prune(struct pnode *root) * path (alias) nodes track path relative to our name space -- They cross * mount points. */ -char * -_sysio_pb_path(struct pnode_base *pb, const char separator) +int +_sysio_pb_pathof(struct pnode_base *pb, const char separator, char **pathp) { - char *buf; size_t len, n; struct pnode_base *tmp; + char *buf; char *cp; /* @@ -830,6 +834,8 @@ _sysio_pb_path(struct pnode_base *pb, co len++; tmp = tmp->pb_parent; } while (tmp); + if (tmp && !tmp->pb_name.len) + return -ENOENT; if (!len) len++; /* @@ -837,7 +843,7 @@ _sysio_pb_path(struct pnode_base *pb, co */ buf = malloc(len + 1); if (!buf) - return NULL; + return -ENOMEM; /* * Fill in the path buffer -- Backwards, since we're starting * from the end. @@ -857,27 +863,41 @@ _sysio_pb_path(struct pnode_base *pb, co tmp = tmp->pb_parent; } while (tmp); - return buf; + *pathp = buf; + return 0; +} + +/* + * Return path tracked by the base path node ancestor chain. + * + * NB: Deprecated. + */ +char * +_sysio_pb_path(struct pnode_base *pb, const char separator) +{ + int err; + char *path; + + err = _sysio_pb_pathof(pb, separator, &path); + if (err) { + if (err == -ENOMEM) + return NULL; + path = malloc(1); + if (path == NULL) + return NULL; + *path = '\0'; + } + return path; } /* * Common set attributes routine. */ int -_sysio_setattr(struct pnode *pno, - struct inode *ino, +_sysio_p_setattr(struct pnode *pno, unsigned mask, struct intnl_stat *stbuf) { - /* - * It is possible that pno is null (for ftruncate call). - */ - - if (pno) - assert(!ino || pno->p_base->pb_ino == ino); - if (!ino) - ino = pno->p_base->pb_ino; - assert(ino); if (pno && IS_RDONLY(pno)) return -EROFS; @@ -886,7 +906,132 @@ _sysio_setattr(struct pnode *pno, * Determining permission to change the attributes is * difficult, at best. Just try it. */ - return (*ino->i_ops.inop_setattr)(pno, ino, mask, stbuf); + return PNOP_SETATTR(pno, mask, stbuf); +} + +/* + * Perform unlink operation on some pnode. + */ +int +_sysio_p_unlink(struct pnode *pno) +{ + int err; + + if (!pno->p_base->pb_ino) + return -ENOENT; /* huh? */ + if (S_ISDIR(pno->p_base->pb_ino->i_stbuf.st_mode)) + return -EISDIR; + /* + * Call the FS implementation. + */ + err = PNOP_UNLINK(pno); + if (err) + return err; + /* + * Clean the namespace graphs to reflect the unlink. + */ + _sysio_pb_disconnect(pno->p_base); + return 0; +} + +/* + * Perform unlink operation on some pnode. + */ +int +_sysio_p_rmdir(struct pnode *pno) +{ + int err; + + if (!pno->p_base->pb_ino) + return -ENOENT; /* huh? */ + if (!S_ISDIR(pno->p_base->pb_ino->i_stbuf.st_mode)) + return -ENOTDIR; + /* + * Don't allow unlink of a root or a mount point. + */ + if (pno->p_cover || pno->p_mount->mnt_root == pno) + return -EBUSY; + /* + * Call the FS implementation. + */ + err = PNOP_RMDIR(pno); + if (err) + return err; + /* + * Clean the namespace graphs to reflect the unlink. + */ + _sysio_pb_disconnect(pno->p_base); + return 0; +} + +int +_sysio_p_rename(struct pnode *old, struct pnode *new) +{ + struct pnode_base *nxtpb, *pb; + int err; + + /* + * Check for rename to self. + */ + if (old == new) + return 0; + + /* + * No xdev renames please. + */ + if (old->p_mount->mnt_fs != new->p_mount->mnt_fs) + return -EXDEV; + + /* + * Don't allow mount points to move. + */ + if (old->p_mount->mnt_root == old || + old->p_cover || + new->p_mount->mnt_root == new) + return -EBUSY; + + /* + * Make sure the old pnode can't be found in the ancestor chain + * for the new. If it can, they are trying to move into a subdirectory + * of the old. + */ + nxtpb = new->p_base; + do { + pb = nxtpb; + nxtpb = pb->pb_parent; + if (pb == old->p_base) + return -EINVAL; + } while (nxtpb); + + if (new->p_base->pb_ino) { + /* + * Existing entry. We're replacing the new. Make sure that's + * ok. + */ + if (S_ISDIR(new->p_base->pb_ino->i_stbuf.st_mode)) { + if (!S_ISDIR(old->p_base->pb_ino->i_stbuf.st_mode)) + return -EISDIR; + } else if (S_ISDIR(old->p_base->pb_ino->i_stbuf.st_mode)) + return -ENOTDIR; + } + + /* + * Give the op a try. + */ + err = PNOP_RENAME(old, new); + if (err) + return err; + /* + * Disconnect the old. + */ + _sysio_pb_disconnect(old->p_base); + /* + * Disconnect the new if positive. We want new lookups + * to find the just renamed entity. + */ + if (new->p_base->pb_ino) + _sysio_pb_disconnect(new->p_base); + return 0; } /* Index: ioctl.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/ioctl.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -w -b -B -p -r1.12 -r1.13 --- ioctl.c 21 Sep 2004 16:18:31 -0000 1.12 +++ ioctl.c 30 Apr 2007 16:52:20 -0000 1.13 @@ -9,7 +9,7 @@ * terms of the GNU Lesser General Public License * (see cit/LGPL or http://www.gnu.org/licenses/lgpl.html) * - * Cplant(TM) Copyright 1998-2003 Sandia Corporation. + * Cplant(TM) Copyright 1998-2007 Sandia Corporation. * Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive * license for use of this work by or on behalf of the US Government. * Export of this program may require a license from the United States @@ -61,7 +61,7 @@ SYSIO_INTERFACE_NAME(ioctl)(int fd, unsi va_list ap; SYSIO_INTERFACE_DISPLAY_BLOCK; - SYSIO_INTERFACE_ENTER; + SYSIO_INTERFACE_ENTER(ioctl, fd, request); err = 0; fil = _sysio_fd_find(fd); if (!fil) { @@ -70,11 +70,11 @@ SYSIO_INTERFACE_NAME(ioctl)(int fd, unsi } va_start(ap, request); - err = fil->f_ino->i_ops.inop_ioctl(fil->f_ino, request, ap); + err = PNOP_IOCTL(fil->f_pno, request, ap); va_end(ap); out: - SYSIO_INTERFACE_RETURN(err ? -1 : 0, err); + SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, ioctl, request); } Index: ioctx.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/ioctx.c,v retrieving revision 1.24 retrieving revision 1.25 diff -u -w -b -B -p -r1.24 -r1.25 --- ioctx.c 16 Jun 2005 21:21:42 -0000 1.24 +++ ioctx.c 30 Apr 2007 16:52:20 -0000 1.25 @@ -9,7 +9,7 @@ * terms of the GNU Lesser General Public License * (see cit/LGPL or http://www.gnu.org/licenses/lgpl.html) * - * Cplant(TM) Copyright 1998-2004 Sandia Corporation. + * Cplant(TM) Copyright 1998-2007 Sandia Corporation. * Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive * license for use of this work by or on behalf of the US Government. * Export of this program may require a license from the United States @@ -101,7 +101,7 @@ _sysio_ioctx_enter(struct ioctx *ioctx) * Allocate and initialize a new IO context. */ struct ioctx * -_sysio_ioctx_new(struct inode *ino, +_sysio_ioctx_new(struct pnode *pno, int wr, const struct iovec *iov, size_t iovlen, @@ -114,12 +114,12 @@ _sysio_ioctx_new(struct inode *ino, if (!ioctx) return NULL; - I_REF(ino); + P_REF(pno); IOCTX_INIT(ioctx, 0, wr, - ino, + pno, iov, iovlen, xtv, xtvlen); @@ -184,7 +184,7 @@ _sysio_ioctx_done(struct ioctx *ioctx) if (ioctx->ioctx_done) return 1; - if (!(*ioctx->ioctx_ino->i_ops.inop_iodone)(ioctx)) + if (!PNOP_IODONE(ioctx->ioctx_pno, ioctx)) return 0; ioctx->ioctx_done = 1; return 1; @@ -264,8 +264,6 @@ _sysio_ioctx_complete(struct ioctx *ioct if (ioctx->ioctx_fast) return; - - I_RELE(ioctx->ioctx_ino); - + P_RELE(ioctx->ioctx_pno); free(ioctx); } Index: iowait.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/iowait.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -w -b -B -p -r1.11 -r1.12 --- iowait.c 25 Feb 2005 00:01:06 -0000 1.11 +++ iowait.c 30 Apr 2007 16:52:20 -0000 1.12 @@ -63,13 +63,13 @@ SYSIO_INTERFACE_NAME(iodone)(void *ioid) int rc; SYSIO_INTERFACE_DISPLAY_BLOCK; - SYSIO_INTERFACE_ENTER; + SYSIO_INTERFACE_ENTER(iodone, ioid); ioctx = _sysio_ioctx_find(ioid); if (!ioctx) - SYSIO_INTERFACE_RETURN(-1, -EINVAL); + SYSIO_INTERFACE_RETURN(-1, -EINVAL, iodone, 0); rc = _sysio_ioctx_done(ioctx); - SYSIO_INTERFACE_RETURN(rc < 0 ? -1 : rc, rc < 0 ? rc : 0); + SYSIO_INTERFACE_RETURN(rc < 0 ? -1 : rc, rc < 0 ? rc : 0, iodone, 0); } /* @@ -85,11 +85,12 @@ SYSIO_INTERFACE_NAME(iowait)(void *ioid) ssize_t cc; SYSIO_INTERFACE_DISPLAY_BLOCK; - SYSIO_INTERFACE_ENTER; + SYSIO_INTERFACE_ENTER(iowait, ioid); ioctx = _sysio_ioctx_find(ioid); if (!ioctx) - SYSIO_INTERFACE_RETURN(-1, -EINVAL); + SYSIO_INTERFACE_RETURN(-1, -EINVAL, iowait, 0); cc = _sysio_ioctx_wait(ioctx); - SYSIO_INTERFACE_RETURN(cc < 0 ? -1 : cc, cc < 0 ? (int )cc : 0); + SYSIO_INTERFACE_RETURN(cc < 0 ? -1 : cc, cc < 0 ? (int )cc : 0, + iowait, 0); } Index: link.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/link.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -w -b -B -p -r1.12 -r1.13 --- link.c 25 Jan 2005 18:56:14 -0000 1.12 +++ link.c 30 Apr 2007 16:52:20 -0000 1.13 @@ -9,7 +9,7 @@ * terms of the GNU Lesser General Public License * (see cit/LGPL or http://www.gnu.org/licenses/lgpl.html) * - * Cplant(TM) Copyright 1998-2003 Sandia Corporation. + * Cplant(TM) Copyright 1998-2007 Sandia Corporation. * Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive * license for use of this work by or on behalf of the US Government. * Export of this program may require a license from the United States @@ -62,7 +62,7 @@ SYSIO_INTERFACE_NAME(link)(const char *o struct pnode *old, *new; SYSIO_INTERFACE_DISPLAY_BLOCK; - SYSIO_INTERFACE_ENTER; + SYSIO_INTERFACE_ENTER(link, oldpath, newpath); INTENT_INIT(&intent, 0, NULL, NULL); err = _sysio_namei(_sysio_cwd, oldpath, 0, &intent, &old); if (err) @@ -89,7 +89,7 @@ SYSIO_INTERFACE_NAME(link)(const char *o * driver is implemented using differentiated inode operations based * on file type, such as incore does. */ - err = old->p_parent->p_base->pb_ino->i_ops.inop_link(old, new); + err = PNOP_LINK(old, new); if (err) goto error2; /* @@ -104,7 +104,7 @@ error2: error1: P_RELE(old); out: - SYSIO_INTERFACE_RETURN(err ? -1 : 0, err); + SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, link, 0); } #ifdef REDSTORM Index: lseek.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/lseek.c,v retrieving revision 1.27 retrieving revision 1.28 diff -u -w -b -B -p -r1.27 -r1.28 --- lseek.c 28 Oct 2005 17:59:31 -0000 1.27 +++ lseek.c 30 Apr 2007 16:52:20 -0000 1.28 @@ -9,7 +9,7 @@ * terms of the GNU Lesser General Public License * (see cit/LGPL or http://www.gnu.org/licenses/lgpl.html) * - * Cplant(TM) Copyright 1998-2005 Sandia Corporation. + * Cplant(TM) Copyright 1998-2007 Sandia Corporation. * Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive * license for use of this work by or on behalf of the US Government. * Export of this program may require a license from the United States @@ -82,10 +82,7 @@ _sysio_lseek_prepare(struct file *fil, * in the inode record for this. Give the * driver a chance to refresh them. */ - err = - (*fil->f_ino->i_ops.inop_getattr)(NULL, - fil->f_ino, - &stbuf); + err = PNOP_GETATTR(fil->f_pno, &stbuf); if (err) return err; @@ -114,7 +111,7 @@ _sysio_lseek(struct file *fil, pos = _sysio_lseek_prepare(fil, offset, whence, max); if (pos < 0) return pos; - pos = (fil->f_ino->i_ops.inop_pos)(fil->f_ino, pos); + pos = PNOP_POS(fil->f_pno, pos); if (pos < 0) return pos; fil->f_pos = pos; @@ -131,13 +128,14 @@ SYSIO_INTERFACE_NAME(lseek64)(int fd, of off64_t off; SYSIO_INTERFACE_DISPLAY_BLOCK; - SYSIO_INTERFACE_ENTER; + SYSIO_INTERFACE_ENTER(lseek64, fd, offset, whence); fil = _sysio_fd_find(fd); if (!fil) - SYSIO_INTERFACE_RETURN((off64_t )-1, -EBADF); + SYSIO_INTERFACE_RETURN((off64_t )-1, -EBADF, lseek64, 0); off = _sysio_lseek(fil, offset, whence, _SEEK_MAX(fil)); SYSIO_INTERFACE_RETURN(off < 0 ? (off64_t )-1 : off, - off < 0 ? (int )off : 0); + off < 0 ? (int )off : 0, + lseek64, 0); } #ifdef __GLIBC__ @@ -162,16 +160,16 @@ SYSIO_INTERFACE_NAME(lseek)(int fd, off_ off_t rtn; SYSIO_INTERFACE_DISPLAY_BLOCK; - SYSIO_INTERFACE_ENTER; + SYSIO_INTERFACE_ENTER(lseek, fd, offset, whence); fil = _sysio_fd_find(fd); if (!fil) - SYSIO_INTERFACE_RETURN((off_t )-1, -EBADF); + SYSIO_INTERFACE_RETURN((off_t )-1, -EBADF, lseek, 0); off = _sysio_lseek(fil, offset, whence, LONG_MAX); if (off < 0) - SYSIO_INTERFACE_RETURN((off_t )-1, (int )off); + SYSIO_INTERFACE_RETURN((off_t )-1, (int )off, lseek, 0); rtn = (off_t )off; assert(rtn == off); - SYSIO_INTERFACE_RETURN(rtn, 0); + SYSIO_INTERFACE_RETURN(rtn, 0, lseek, 0); } #ifdef __GLIBC__ @@ -196,17 +194,21 @@ SYSIO_INTERFACE_NAME(llseek)(unsigned in /* * This is just plain goofy. */ - SYSIO_INTERFACE_ENTER; + SYSIO_INTERFACE_ENTER(llseek, + fd, + offset_high, offset_low, + result, + whence); fil = _sysio_fd_find(fd); if (!fil) - SYSIO_INTERFACE_RETURN(-1, -EBADF); + SYSIO_INTERFACE_RETURN(-1, -EBADF, llseek, NULL); #if !_LARGEFILE64_SOURCE if (offset_high) { /* * We are using 32-bit internals. This just isn't * going to work. */ - SYSIO_INTERFACE_RETURN(-1, -EOVERFLOW); + SYSIO_INTERFACE_RETURN(-1, -EOVERFLOW, llseek, NULL); } #else off = offset_high; @@ -215,9 +217,9 @@ SYSIO_INTERFACE_NAME(llseek)(unsigned in #endif off = _sysio_lseek(fil, off, whence, _SEEK_MAX(fil)); if (off < 0) - SYSIO_INTERFACE_RETURN((off_t )-1, (int )off); + SYSIO_INTERFACE_RETURN((off_t )-1, (int )off, llseek, NULL); *result = off; - SYSIO_INTERFACE_RETURN(0, 0); + SYSIO_INTERFACE_RETURN(0, 0, llseek, result); } #undef __llseek Index: mkdir.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/mkdir.c,v retrieving revision 1.20 retrieving revision 1.21 diff -u -w -b -B -p -r1.20 -r1.21 --- mkdir.c 28 Mar 2007 21:27:54 -0000 1.20 +++ mkdir.c 30 Apr 2007 16:52:20 -0000 1.21 @@ -9,7 +9,7 @@ * terms of the GNU Lesser General Public License * (see cit/LGPL or http://www.gnu.org/licenses/lgpl.html) * - * Cplant(TM) Copyright 1998-2006 Sandia Corporation. + * Cplant(TM) Copyright 1998-2007 Sandia Corporation. * Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive * license for use of this work by or on behalf of the US Government. * Export of this program may require a license from the United States @@ -58,7 +58,6 @@ int _sysio_mkdir(struct pnode *pno, mode_t mode) { int err; - struct inode *parenti; if (pno->p_base->pb_ino) return -EEXIST; @@ -67,9 +66,8 @@ _sysio_mkdir(struct pnode *pno, mode_t m if (err) return err; - parenti = pno->p_parent->p_base->pb_ino; - assert(parenti); - return (*parenti->i_ops.inop_mkdir)(pno, mode); + mode |= S_IFDIR; + return PNOP_MKDIR(pno, mode); } int @@ -80,7 +78,7 @@ SYSIO_INTERFACE_NAME(mkdir)(const char * struct pnode *pno; SYSIO_INTERFACE_DISPLAY_BLOCK; - SYSIO_INTERFACE_ENTER; + SYSIO_INTERFACE_ENTER(mkdir, path, mode); INTENT_INIT(&intent, INT_CREAT, &mode, NULL); err = _sysio_namei(_sysio_cwd, path, ND_NEGOK, &intent, &pno); if (err) @@ -90,7 +88,7 @@ SYSIO_INTERFACE_NAME(mkdir)(const char * err = _sysio_mkdir(pno, mode); P_RELE(pno); out: - SYSIO_INTERFACE_RETURN(err ? -1 : 0, err); + SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, mkdir, 0); } #ifdef REDSTORM Index: mknod.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/mknod.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -w -b -B -p -r1.19 -r1.20 --- mknod.c 12 Apr 2007 20:07:02 -0000 1.19 +++ mknod.c 30 Apr 2007 16:52:20 -0000 1.20 @@ -9,7 +9,7 @@ * terms of the GNU Lesser General Public License * (see cit/LGPL or http://www.gnu.org/licenses/lgpl.html) * - * Cplant(TM) Copyright 1998-2003 Sandia Corporation. + * Cplant(TM) Copyright 1998-2007 Sandia Corporation. * Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive * license for use of this work by or on behalf of the US Government. * Export of this program may require a license from the United States @@ -77,9 +77,7 @@ _sysio_mknod(struct pnode *pno, mode_t m if (IS_RDONLY(pno)) return -EROFS; - return (*pno->p_parent->p_base->pb_ino->i_ops.inop_mknod)(pno, - mode, - dev); + return PNOP_MKNOD(pno, mode, dev); } int @@ -93,7 +91,7 @@ PREPEND(__, SYSIO_INTERFACE_NAME(xmknod) struct pnode *pno; SYSIO_INTERFACE_DISPLAY_BLOCK; - SYSIO_INTERFACE_ENTER; + SYSIO_INTERFACE_ENTER(xmknod, __ver, path, mode, dev); if (__ver != _MKNOD_VER) { err = -ENOSYS; goto out; @@ -113,7 +111,7 @@ PREPEND(__, SYSIO_INTERFACE_NAME(xmknod) error: P_RELE(pno); out: - SYSIO_INTERFACE_RETURN(err ? -1 : 0, err); + SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, xmknod, 0); } #ifdef REDSTORM Index: module.mk =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/module.mk,v retrieving revision 1.10 retrieving revision 1.11 diff -u -w -b -B -p -r1.10 -r1.11 --- module.mk 25 Oct 2004 14:29:16 -0000 1.10 +++ module.mk 30 Apr 2007 16:52:20 -0000 1.11 @@ -23,7 +23,7 @@ SRCDIR_SRCS = src/access.c src/chdir.c s src/link.c src/lseek.c src/mkdir.c \ src/mknod.c src/mount.c src/namei.c \ src/open.c src/rw.c src/reconcile.c src/rename.c \ - src/rmdir.c src/stat64.c src/stat.c \ + src/rmdir.c src/stat.c \ src/stddir.c src/readdir.c src/readdir64.c \ src/symlink.c src/readlink.c \ src/truncate.c src/unlink.c src/utime.c \ Index: mount.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/mount.c,v retrieving revision 1.21 retrieving revision 1.22 diff -u -w -b -B -p -r1.21 -r1.22 --- mount.c 25 Jan 2005 00:37:14 -0000 1.21 +++ mount.c 30 Apr 2007 16:52:20 -0000 1.22 @@ -9,7 +9,7 @@ * terms of the GNU Lesser General Public License * (see cit/LGPL or http://www.gnu.org/licenses/lgpl.html) * - * Cplant(TM) Copyright 1998-2004 Sandia Corporation. + * Cplant(TM) Copyright 1998-2007 Sandia Corporation. * Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive * license for use of this work by or on behalf of the US Government. * Export of this program may require a license from the United States @@ -166,13 +166,8 @@ _sysio_do_mount(struct filesys *fs, goto error; } /* - * It may have been a while since the root inode was validated; - * better validate again. And it better be a directory! + * It better be a directory! */ - err = _sysio_p_validate(mnt->mnt_root, NULL, NULL); - if (err) - goto error; - if (!S_ISDIR(mnt->mnt_root->p_base->pb_ino->i_stbuf.st_mode)) { err = -ENOTDIR; goto error; @@ -198,7 +193,7 @@ _sysio_do_mount(struct filesys *fs, error: if (mnt->mnt_root) { P_RELE(mnt->mnt_root); - _sysio_p_prune(mnt->mnt_root); + _sysio_p_gone(mnt->mnt_root); } free(mnt); return err; @@ -211,6 +206,7 @@ int _sysio_do_unmount(struct mount *mnt) { struct pnode *root; + struct pnode_base *rootpb; struct filesys *fs; root = mnt->mnt_root; @@ -241,7 +237,10 @@ _sysio_do_unmount(struct mount *mnt) */ P_RELE(root); root->p_cover = NULL; + rootpb = root->p_base; _sysio_p_gone(root); + if (!(rootpb->pb_aliases.lh_first || rootpb->pb_children.lh_first)) + _sysio_pb_gone(rootpb); /* * Release mount record resource. */ @@ -351,7 +350,10 @@ SYSIO_INTERFACE_NAME(mount)(const char * int err; SYSIO_INTERFACE_DISPLAY_BLOCK; - SYSIO_INTERFACE_ENTER; + SYSIO_INTERFACE_ENTER(mount, + source, target, + filesystemtype, + mountflags); err = _sysio_mount(_sysio_cwd, source, @@ -359,7 +361,7 @@ SYSIO_INTERFACE_NAME(mount)(const char * filesystemtype, mountflags, data); - SYSIO_INTERFACE_RETURN(err ? -1 : 0, err); + SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, mount, 0); } int @@ -367,16 +369,22 @@ SYSIO_INTERFACE_NAME(umount)(const char { int err; struct pnode *pno; + struct mount *mnt; SYSIO_INTERFACE_DISPLAY_BLOCK; - SYSIO_INTERFACE_ENTER; + SYSIO_INTERFACE_ENTER(umount, target); /* * Look up the target path node. */ err = _sysio_namei(_sysio_cwd, target, 0, NULL, &pno); if (err) goto out; + mnt = pno->p_mount; + if (!err && mnt->mnt_root != pno) + err = -EINVAL; P_RELE(pno); /* was ref'd */ + if (err) + goto out; /* * Do the deed. @@ -387,11 +395,10 @@ SYSIO_INTERFACE_NAME(umount)(const char goto error; } #endif - assert(pno->p_mount); - err = _sysio_do_unmount(pno->p_mount); + err = _sysio_do_unmount(mnt); out: - SYSIO_INTERFACE_RETURN(err ? -1 : 0, err); + SYSIO_INTERFACE_RETURN(err ? -1 : 0, err, umount, 0); } /* @@ -416,23 +423,9 @@ _sysio_unmount_all() */ if (!_sysio_p_prune(pno)) continue; -#ifdef notdef - /* - * Need a ref but only if this is not the root of a - * disconnected graph. If it is, then it is covered by itself - * and, so, already referenced. - */ - if (pno->p_cover != pno) - P_REF(pno); -#endif err = _sysio_do_unmount(mnt); - if (err) { -#ifdef notdef - if (pno->p_cover != pno) - P_RELE(pno); -#endif + if (err) break; - } if (pno == _sysio_root) _sysio_root = NULL; } @@ -642,9 +635,8 @@ _sysio_automount(struct pnode *mntpno) { int err; struct inode *ino; - struct iovec iovec; - struct ioctx iocontext; - struct intnl_xtvec xtvec; + char *buf; + struct ioctx *ioctx; ssize_t cc; char *fstype, *source, *opts; unsigned flags; @@ -668,42 +660,27 @@ _sysio_automount(struct pnode *mntpno) */ return -EINVAL; } - iovec.iov_base = malloc(ino->i_stbuf.st_size + 1); - if (!iovec.iov_base) + buf = malloc(ino->i_stbuf.st_size + 1); + if (!buf) return -ENOMEM; - iovec.iov_len = ino->i_stbuf.st_size; err = _sysio_open(mntpno, O_RDONLY, 0); if (err) goto out; - xtvec.xtv_off = 0; - xtvec.xtv_len = ino->i_stbuf.st_size; - IOCTX_INIT(&iocontext, - 1, - 0, - ino, - &iovec, 1, - &xtvec, 1); - _sysio_ioctx_enter(&iocontext); - err = (*ino->i_ops.inop_read)(ino, &iocontext); - if (err) { - _sysio_ioctx_complete(&iocontext); - (void )(*ino->i_ops.inop_close)(ino); - goto out; + err = _sysio_p_aread(mntpno, 0, buf, ino->i_stbuf.st_size, &ioctx); + if (!err) { + cc = _sysio_ioctx_wait(ioctx); + if (cc < 0) + err = (int )cc; } - cc = _sysio_ioctx_wait(&iocontext); - err = (*ino->i_ops.inop_close)(ino); + (void )PNOP_CLOSE(mntpno); if (err) goto out; - if (cc < 0) { - err = (int )cc; - goto out; - } - ((char *)iovec.iov_base)[cc] = '\0'; + buf[cc] = '\0'; /* NUL terminate */ /* * Parse. */ - err = parse_automount_spec(iovec.iov_base, &fstype, &source, &opts); + err = parse_automount_spec(buf, &fstype, &source, &opts); if (err) goto out; flags = 0; @@ -733,8 +710,8 @@ _sysio_automount(struct pnode *mntpno) P_RELE(mntpno->p_parent); out: - if (iovec.iov_base) - free(iovec.iov_base); + if (buf) + free(buf); return err; } #endif Index: namei.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/namei.c,v retrieving revision 1.24 retrieving revision 1.25 diff -u -w -b -B -p -r1.24 -r1.25 --- namei.c 12 Apr 2007 20:06:29 -0000 1.24 +++ namei.c 30 Apr 2007 16:52:20 -0000 1.25 @@ -9,7 +9,7 @@ * terms of the GNU Lesser General Public License * (see cit/LGPL or http://www.gnu.org/licenses/lgpl.html) * - * Cplant(TM) Copyright 1998-2006 Sandia Corporation. + * Cplant(TM) Copyright 1998-2007 Sandia Corporation. * Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive * license for use of this work by or on behalf of the US Government. * Export of this program may require a license from the United States @@ -90,7 +90,13 @@ lookup(struct pnode *parent, int err; struct pnode *pno; - if (!parent->p_base->pb_ino) + assert(parent != NULL); + /* + * The parent must be valid and a directory. + */ + if (!parent->p_parent) + return -ENOENT; + if (!S_ISDIR(parent->p_base->pb_ino->i_stbuf.st_mode)) return -ENOTDIR; /* @@ -109,8 +115,11 @@ lookup(struct pnode *parent, pno = NULL; if (name->len == 1 && name->name[0] == '.') pno = parent; - else if (name->len == 2 && name->name[0] == '.' && name->name[1] == '.') + else if (name->len == 2 && + name->name[0] == '.' && + name->name[1] == '.') { pno = parent->p_parent; + } if (pno) P_REF(pno); else { @@ -139,11 +148,7 @@ lookup(struct pnode *parent, /* * (Re)validate the pnode. */ - err = _sysio_p_validate(pno, intnt, path); - if (err) - return err; - - return 0; + return _sysio_p_validate(pno, intnt, path); } /* @@ -252,10 +257,7 @@ _sysio_path_walk(struct pnode *parent, s err = -ENOMEM; break; } - cc = - ino->i_ops.inop_readlink(nd->nd_pno, - lpath, - MAXPATHLEN); + cc = PNOP_READLINK(nd->nd_pno, lpath, MAXPATHLEN); if (cc < 0) { free(lpath); err = (int )cc; Index: open.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/open.c,v retrieving revision 1.28 retrieving revision 1.29 diff -u -w -b -B -p -r1.28 -r1.29 --- open.c 3 May 2006 22:34:46 -0000 1.28 +++ open.c 30 Apr 2007 16:52:20 -0000 1.29 @@ -9,7 +9,7 @@ * terms of the GNU Lesser General Public License * (see cit/LGPL or http://www.gnu.org/licenses/lgpl.html) * - * Cplant(TM) Copyright 1998-2006 Sandia Corporation. + * Cplant(TM) Copyright 1998-2007 Sandia Corporation. * Under the terms of Contract DE-AC04-94AL85000, there is a non-exclusive * license for use of this work by or on behalf of the US Government. * Export of this program may require a license from the United States @@ -77,7 +77,6 @@ _sysio_open(struct pnode *pno, int flags int ro; int w; int err; - struct inode *ino; ro = IS_RDONLY(pno); w = flags & (O_WRONLY|O_RDWR); @@ -89,35 +88,29 @@ _sysio_open(struct pnode *pno, int flags } if (w && ro) return -EROFS; - ino = pno->p_base->pb_ino; - if ((flags & O_CREAT) && !ino) { - struct pnode *parent; - + if ((flags & O_CREAT) && !pno->p_base->pb_ino) { /* * Must create it. */ if (ro) return -EROFS; - parent = pno->p_parent; - err = _sysio_p_validate(parent, NULL, NULL); - if (!err) { - ino = parent->p_base->pb_ino; - assert(ino); - ... [truncated message content] |