libsysio-commit Mailing List for libsysio (Page 26)
Brought to you by:
lward
You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
(25) |
May
(28) |
Jun
(25) |
Jul
(30) |
Aug
(60) |
Sep
(52) |
Oct
(100) |
Nov
(15) |
Dec
(34) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(89) |
Feb
(48) |
Mar
(22) |
Apr
(59) |
May
(16) |
Jun
(15) |
Jul
(50) |
Aug
(26) |
Sep
(40) |
Oct
(27) |
Nov
(12) |
Dec
|
2005 |
Jan
(24) |
Feb
(11) |
Mar
|
Apr
|
May
(3) |
Jun
(6) |
Jul
|
Aug
(14) |
Sep
(21) |
Oct
(10) |
Nov
|
Dec
|
2006 |
Jan
(8) |
Feb
(5) |
Mar
(2) |
Apr
(6) |
May
(11) |
Jun
(2) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(3) |
2007 |
Jan
(3) |
Feb
(5) |
Mar
(20) |
Apr
(41) |
May
(21) |
Jun
(3) |
Jul
(5) |
Aug
(12) |
Sep
(21) |
Oct
(5) |
Nov
(16) |
Dec
|
2008 |
Jan
|
Feb
(2) |
Mar
(4) |
Apr
(23) |
May
|
Jun
(22) |
Jul
(13) |
Aug
|
Sep
|
Oct
(9) |
Nov
(3) |
Dec
(13) |
2009 |
Jan
(14) |
Feb
(10) |
Mar
(2) |
Apr
(11) |
May
(7) |
Jun
(1) |
Jul
(1) |
Aug
(36) |
Sep
(12) |
Oct
|
Nov
|
Dec
(10) |
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
From: Lee W. <lw...@us...> - 2004-07-03 05:47:21
|
Update of /cvsroot/libsysio/libsysio/dev/stdfd In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11075/dev/stdfd Modified Files: stdfd.c Log Message: A new, major change, to .../include/xtio.h. This is intended to be the include file for applications. It prototype all of the extended API available as well as the necessary structures. Other shanges to support this. We now need it most everywhere to build the library as well. Index: stdfd.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/dev/stdfd/stdfd.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -w -b -B -p -r1.8 -r1.9 --- stdfd.c 6 Feb 2004 20:07:28 -0000 1.8 +++ stdfd.c 3 Jul 2004 05:47:12 -0000 1.9 @@ -48,10 +48,10 @@ #include <errno.h> #include <sys/syscall.h> #include <unistd.h> -#include <sys/uio.h> #include <sys/types.h> #include <sys/queue.h> +#include "xtio.h" #include "sysio.h" #include "inode.h" #include "dev.h" |
From: Lee W. <lw...@us...> - 2004-07-03 05:47:20
|
Update of /cvsroot/libsysio/libsysio In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11075 Modified Files: Makefile.am Rules.make Log Message: A new, major change, to .../include/xtio.h. This is intended to be the include file for applications. It prototype all of the extended API available as well as the necessary structures. Other shanges to support this. We now need it most everywhere to build the library as well. Index: Makefile.am =================================================================== RCS file: /cvsroot/libsysio/libsysio/Makefile.am,v retrieving revision 1.13 retrieving revision 1.14 diff -u -w -b -B -p -r1.13 -r1.14 --- Makefile.am 2 Jun 2004 22:28:16 -0000 1.13 +++ Makefile.am 3 Jul 2004 05:47:12 -0000 1.14 @@ -50,11 +50,13 @@ endif if WITH_LUSTRE_HACK OPTIONAL_LUSTRE_SRCDIR_SRCS = $(LUSTRE_SRCDIR_SRCS) # it would be better that let configure script check this -AM_CFLAGS = -fPIC +OPTIONAL_LUSTRE_CFLAGS = -fPIC else OPTIONAL_LUSTRE_SRCDIR_SRCS = endif +AM_CFLAGS = $(OPTIONAL_LUSTRE_CFLAGS) + __LIBBUILD_DIR__libsysio_a_SOURCES = \ $(SRCDIR_SRCS) \ $(OPTIONAL_LUSTRE_SRCDIR_SRCS) \ Index: Rules.make =================================================================== RCS file: /cvsroot/libsysio/libsysio/Rules.make,v retrieving revision 1.6 retrieving revision 1.7 diff -u -w -b -B -p -r1.6 -r1.7 --- Rules.make 6 Feb 2004 20:07:28 -0000 1.6 +++ Rules.make 3 Jul 2004 05:47:12 -0000 1.7 @@ -14,5 +14,6 @@ endif DEV_CPPFLAGS = $(STDFD_DEV_CPPFLAGS) AM_CPPFLAGS = \ + -D_POSIX_C_SOURCE=199506L -D_XOPEN_SOURCE=500 \ $(AUTOMOUNT) $(ZERO_SUM_MEMORY) $(DEV_CPPFLAGS) $(SOCKETS_CPPFLAGS) \ -I$(top_srcdir)/include |
From: Lee W. <lw...@us...> - 2004-07-03 05:46:55
|
Update of /cvsroot/libsysio/libsysio/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11011 Modified Files: Tag: 2.0 xtio.h Log Message: A new, major change, to .../include/xtio.h. This is intended to be the include file for applications. It prototype all of the extended API available as well as the necessary structures. Other shanges to support this. We now need it most everywhere to build the library as well. --- NEW FILE --- /* * This Cplant(TM) source code is the property of Sandia National * Laboratories. * * This Cplant(TM) source code is copyrighted by Sandia National * Laboratories. * * The redistribution of this Cplant(TM) source code is subject to the * 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. * 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 * Government. */ /* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Questions or comments about this library should be sent to: * * Lee Ward * Sandia National Laboratories, New Mexico * P.O. Box 5800 * Albuquerque, NM 87185-1110 * * le...@sa... */ /* * Extended application programmers interface for IO as found on Cray RedStorm * and the other current SUNMos/Puma/Cougar/Catamount systems. */ #ifndef _RSIO_H_ #ifndef _IOID_T_DEFINED #define _IOID_T_DEFINED typedef void *ioid_t; #define IOID_FAIL 0 #endif /* * Structure for strided I/O. */ struct xtvec { #ifndef __USE_FILE_OFFSET64 __off_t xtv_off; /* Stride/Extent offset. */ #else __off64_t xtv_off; /* Stride/Extent offset. */ #endif size_t xtv_len; /* Stride/Extent length. */ }; #ifdef __USE_LARGEFILE64 struct xtvec64 { __off64_t xtv_off; /* Stride/Extent offset. */ size_t xtv_len; /* Stride/Extent length. */ }; #endif struct iovec; /* * Get status of previously posted async file IO operation. */ extern int iodone(ioid_t ioid); /* * Wait for completion of a previously posted asynch file IO request. */ extern ssize_t iowait(ioid_t ioid); /* * Post asynch read into buffers mapped by an iovec from file at given offset. */ extern ioid_t ipreadv(int fd, const struct iovec *iov, size_t count, off_t offset); #if _LARGEFILE64_SOURCE /* * Post asynch read into buffers mapped by an iovec from file at given offset. */ extern ioid_t ipread64v(int fd, const struct iovec *iov, size_t count, off64_t offset); #endif /* * Post asynch read into buffer from file at given offset. */ extern ioid_t ipread(int fd, void *buf, size_t count, off_t offset); #if _LARGEFILE64_SOURCE /* * Post asynch read into buffer from file at given offset. */ extern ioid_t ipread64(int fd, void *buf, size_t count, off64_t offset); #endif /* * Read into buffers mapped by an iovec from file at given offset. */ extern ssize_t preadv(int fd, const struct iovec *iov, size_t count, off_t offset); #if _LARGEFILE64_SOURCE /* * Read into buffers mapped by an iovec from file at given offset. */ extern ssize_t pread64v(int fd, const struct iovec *iov, size_t count, off64_t offset); #endif /* * Post asynch read into buffers mapped by an iovec. */ extern ioid_t ireadv(int fd, const struct iovec *iov, int count); /* * Read into buffer. */ extern ioid_t iread(int fd, void *buf, size_t count); /* * Post async read into buffers mapped by iovec from regions mapped * by xtvec. * * NB: An adaptation of "listio" from Argonne's PVFS. */ extern ioid_t ireadx(int fd, const struct iovec *iov, size_t iov_count, const struct xtvec *xtv, size_t xtv_count); #ifdef __USE_LARGEFILE64 /* * Post async read into buffers mapped by iovec from regions mapped * by xtvec. * * NB: An adaptation of "listio" from Argonne's PVFS. */ extern ioid_t iread64x(int fd, const struct iovec *iov, size_t iov_count, const struct xtvec64 *xtv, size_t xtv_count); #endif /* * Read into buffers mapped by iovec from regions mapped * by xtvec. * * NB: An adaptation of "listio" from Argonne's PVFS. */ extern ssize_t readx(int fd, const struct iovec *iov, size_t iov_count, const struct xtvec *xtv, size_t xtv_count); #ifdef __USE_LARGEFILE64 /* * Read into buffers mapped by iovec from regions mapped * by xtvec. * * NB: An adaptation of "listio" from Argonne's PVFS. */ extern ssize_t read64x(int fd, const struct iovec *iov, size_t iov_count, const struct xtvec64 *xtv, size_t xtv_count); #endif /* * Post asynch write from buffers mapped by an iovec to file at given offset. */ extern ioid_t ipwritev(int fd, const struct iovec *iov, size_t count, off_t offset); #if _LARGEFILE64_SOURCE /* * Post asynch write from buffers mapped by an iovec to file at given offset. */ extern ioid_t ipwrite64v(int fd, const struct iovec *iov, size_t count, off64_t offset); #endif /* * Post asynch write from buffer to file at given offset. */ extern ioid_t ipwrite(int fd, const void *buf, size_t count, off_t offset); #if _LARGEFILE64_SOURCE /* * Post asynch write from buffer to file at given offset. */ extern ioid_t ipwrite64(int fd, const void *buf, size_t count, off64_t offset); #endif /* * Write from buffers mapped by an iovec to file at given offset. */ extern ssize_t pwritev(int fd, const struct iovec *iov, size_t count, off_t offset); #if _LARGEFILE64_SOURCE /* * Write from buffers mapped by an iovec to file at given offset. */ extern ssize_t pwrite64v(int fd, const struct iovec *iov, size_t count, off64_t offset); #endif /* * Post asynch write from buffer to file at given offset. */ extern ioid_t iwritev(int fd, const struct iovec *iov, int count); /* * Write from buffer to file at given offset. */ extern ioid_t iwrite(int fd, const void *buf, size_t count); /* * Post async write from buffers mapped by iovec to regions mapped * by xtvec. * * NB: An adaptation of "listio" from Argonne's PVFS. */ extern ioid_t iwritex(int fd, const struct iovec *iov, size_t iov_count, const struct xtvec *xtv, size_t xtv_count); #ifdef __USE_LARGEFILE64 /* * Post async write from buffers mapped by iovec to regions mapped * by xtvec. * * NB: An adaptation of "listio" from Argonne's PVFS. */ extern ioid_t iwrite64x(int fd, const struct iovec *iov, size_t iov_count, const struct xtvec64 *xtv, size_t xtv_count); #endif /* * Write from buffers mapped by iovec to regions mapped * by xtvec. * * NB: An adaptation of "listio" from Argonne's PVFS. */ extern ssize_t writex(int fd, const struct iovec *iov, size_t iov_count, const struct xtvec *xtv, size_t xtv_count); #ifdef __USE_LARGEFILE64 /* * Write from buffers mapped by iovec to regions mapped * by xtvec. * * NB: An adaptation of "listio" from Argonne's PVFS. */ extern ssize_t write64x(int fd, const struct iovec *iov, size_t iov_count, const struct xtvec64 *xtv, size_t xtv_count); #endif #endif /* ! __RSIO_H_ */ |
From: Lee W. <lw...@us...> - 2004-06-30 13:40:53
|
Update of /cvsroot/libsysio/libsysio/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26025 Modified Files: startup.c Log Message: If the envriornment does not contain a value for SYSIO_NAMESPACE now try SYSIO_NATIVE. If that is found, the native root becomes the sysio root. In other words, a 1:1 mapping with the localhost. If neither is defined do nothing, providing compatibility for the older tests. Are any of these still hanging around? Index: startup.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/tests/startup.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -w -b -B -p -r1.2 -r1.3 --- startup.c 14 Feb 2004 19:42:59 -0000 1.2 +++ startup.c 30 Jun 2004 13:40:43 -0000 1.3 @@ -1,4 +1,5 @@ #include <stdlib.h> +#include <string.h> #include <errno.h> #include <sys/types.h> #include <sys/queue.h> @@ -20,8 +21,13 @@ _test_sysio_startup() if (err) return err; s = getenv("SYSIO_NAMESPACE"); - err = s ? _sysio_boot(s) : -ENOTTY; - if (err) - return err; + if (s) + return _sysio_boot(s); + s = getenv("SYSIO_NATIVE"); + if (s) + return _sysio_boot("{mnt,dev=\"native:/\",dir=/,fl=0}"); + /* + * Compatibility with the older tests: They did it all themselves. + */ return 0; } |
From: Sonja T. <so...@us...> - 2004-06-29 18:49:50
|
Update of /cvsroot/libsysio/libsysio/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20742/tests Modified Files: test_all.pl test_driver.c Log Message: Fixing tests to go with namespace assembly changes Index: test_all.pl =================================================================== RCS file: /cvsroot/libsysio/libsysio/tests/test_all.pl,v retrieving revision 1.12 retrieving revision 1.13 diff -u -w -b -B -p -r1.12 -r1.13 --- test_all.pl 5 May 2004 19:05:36 -0000 1.12 +++ test_all.pl 29 Jun 2004 18:49:41 -0000 1.13 @@ -62,8 +62,11 @@ $ENV{$namespace_env} = "\ {creat, ft=chr,nm=\"/dev/stderr\",pm=0200,mm=0+2} \ {creat, ft=dir,nm=\"/dev/fd\",pm=0755,ow=0,gr=0} \ {creat, ft=chr,nm=\"/dev/fd/0\",pm=0400,mm=0+0} \ + {open, nm=\"/dev/fd/0\",fd=0,m=0} \ {creat, ft=chr,nm=\"/dev/fd/1\",pm=0200,mm=0+1} \ + {open, nm=\"/dev/fd/1\",fd=1,m=1} \ {creat, ft=chr,nm=\"/dev/fd/2\",pm=0200,mm=0+2} \ + {open, nm=\"/dev/fd/2\",fd=2,m=1} \ {cd, dir=\"$home\"} \ $extras "; Index: test_driver.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/tests/test_driver.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -w -b -B -p -r1.9 -r1.10 --- test_driver.c 12 Apr 2004 19:31:36 -0000 1.9 +++ test_driver.c 29 Jun 2004 18:49:41 -0000 1.10 @@ -968,11 +968,6 @@ int main(int argc, char *argv[]) */ err = _test_sysio_startup(); - /* Temp. hack until I do the right thing to fix this...*/ - open("/dev/stdin",O_RDONLY); - open("/dev/stdout",O_WRONLY); - open("/dev/stderr",O_WRONLY); - infp = stdin; outfp = stdout; |
From: Sonja T. <so...@us...> - 2004-06-29 18:49:49
|
Update of /cvsroot/libsysio/libsysio/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20742/src Modified Files: module.mk Log Message: Fixing tests to go with namespace assembly changes Index: module.mk =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/module.mk,v retrieving revision 1.7 retrieving revision 1.8 diff -u -w -b -B -p -r1.7 -r1.8 --- module.mk 4 Jun 2004 13:11:08 -0000 1.7 +++ module.mk 29 Jun 2004 18:49:40 -0000 1.8 @@ -26,6 +26,6 @@ SRCDIR_SRCS = src/access.c src/chdir.c s src/rmdir.c src/stat64.c src/stat.c \ src/symlink.c src/readlink.c \ src/truncate.c src/unlink.c src/utime.c \ - $(FILE_SUPPORT) $(LUSTRE_SRCDIR_SOURCES) + $(FILE_SUPPORT) $(LUSTRE_SRCDIR_SRCS) SRCDIR_EXTRA = src/module.mk |
From: Lee W. <lw...@us...> - 2004-06-24 19:58:37
|
Update of /cvsroot/libsysio/libsysio/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32257/src Modified Files: init.c Log Message: Mods to namespace boot. Added the "open" command in order to pre-open a file on a given file descriptor. Usage: open, nm=<path>,fd=<#>,m=<#> Where: nm is the path to the file -- it should already exist fd is the desired fildes m mode flags to open -- only one of O_RDONLY, O_WRONLY, O_RDWR supported Index: init.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/init.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -w -b -B -p -r1.9 -r1.10 --- init.c 28 May 2004 12:48:26 -0000 1.9 +++ init.c 24 Jun 2004 19:58:28 -0000 1.10 @@ -549,6 +549,69 @@ do_chmd(char *args) return err; } +static int +do_open(char *args) +{ + size_t len; + struct named_argument v[] = { + { "nm", NULL }, /* path */ + { "fd", NULL }, /* fildes */ + { "m", NULL }, /* mode */ + { NULL, NULL } + }; + char *cp; + int fd; + mode_t m; + struct pnode *dir, *pno; + struct intent intent; + int err; + struct file *fil; + + len = strlen(args); + if (get_args(args, v) - args != (ssize_t )len || + !(v[0].value && v[1].value && v[2].value)) + return -EINVAL; + fd = strtol(v[1].value, (char **)&cp, 0); + if (*cp || + (((fd == LONG_MIN || fd == LONG_MAX) && errno == ERANGE)) || + fd < 0) + return -EINVAL; + m = strtoul(v[1].value, (char **)&cp, 0); + if (*cp || + (m == LONG_MAX && errno == ERANGE)) + return -EINVAL; + m &= O_RDONLY|O_WRONLY|O_RDWR; + + if (!(dir = _sysio_cwd) && !(dir = _sysio_root)) + return -ENOENT; + INTENT_INIT(&intent, INT_OPEN, &m, NULL); + pno = NULL; + err = _sysio_namei(dir, v[0].value, 0, &intent, &pno); + if (err) + return err; + fil = NULL; + do { + err = _sysio_open(pno, m, 0); + if (err) + break; + fil = _sysio_fnew(pno->p_base->pb_ino, m); + if (!fil) { + err = -ENOMEM; + break; + } + err = _sysio_fd_set(fil, fd); + if (err < 0) + break; + P_RELE(pno); + return 0; + } while (0); + if (fil) + F_RELE(fil); + if (pno) + P_RELE(pno); + return err; +} + /* * Execute the given cmd. * @@ -571,6 +634,8 @@ do_command(char *buf) return do_cd(args); if (strcmp("chmd", cmd) == 0) return do_chmd(args); + if (strcmp("open", cmd) == 0) + return do_open(args); } return -EINVAL; } |
From: Lee W. <lw...@us...> - 2004-06-24 19:58:36
|
Update of /cvsroot/libsysio/libsysio/misc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32257/misc Modified Files: init-env.sh Log Message: Mods to namespace boot. Added the "open" command in order to pre-open a file on a given file descriptor. Usage: open, nm=<path>,fd=<#>,m=<#> Where: nm is the path to the file -- it should already exist fd is the desired fildes m mode flags to open -- only one of O_RDONLY, O_WRONLY, O_RDWR supported Index: init-env.sh =================================================================== RCS file: /cvsroot/libsysio/libsysio/misc/init-env.sh,v retrieving revision 1.4 retrieving revision 1.5 diff -u -w -b -B -p -r1.4 -r1.5 --- init-env.sh 5 Mar 2004 13:07:18 -0000 1.4 +++ init-env.sh 24 Jun 2004 19:58:28 -0000 1.5 @@ -29,8 +29,11 @@ export SYSIO_NAMESPACE="\ {creat, ft=chr,nm=\"/dev/stderr\",pm=0200,mm=0+2} \ {creat, ft=dir,nm=\"/dev/fd\",pm=0755,ow=0,gr=0} \ {creat, ft=chr,nm=\"/dev/fd/0\",pm=0400,mm=0+0} \ + {open, nm=\"/dev/fd/0\",fd=0,m=0} \ {creat, ft=chr,nm=\"/dev/fd/1\",pm=0200,mm=0+1} \ + {open, nm=\"/dev/fd/1\",fd=1,m=1} \ {creat, ft=chr,nm=\"/dev/fd/2\",pm=0200,mm=0+2} \ + {open, nm=\"/dev/fd/2\",fd=2,m=1} \ {cd, dir=\"$HOME\"} \ ${_extras} \ " |
From: Lee W. <lw...@us...> - 2004-06-24 19:53:39
|
Update of /cvsroot/libsysio/libsysio/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31860/include Modified Files: sysio.h Log Message: From Kevin Pedretti; Some trivial fixes for the latest accounting mods for Red Storm Index: sysio.h =================================================================== RCS file: /cvsroot/libsysio/libsysio/include/sysio.h,v retrieving revision 1.24 retrieving revision 1.25 diff -u -w -b -B -p -r1.24 -r1.25 --- sysio.h 16 Jun 2004 13:58:26 -0000 1.24 +++ sysio.h 24 Jun 2004 19:53:31 -0000 1.25 @@ -406,9 +406,9 @@ extern void _sysio_sysleave(); if ((cc) < 0) \ break; \ if (!w) \ - _add_iostats(0, (size_t )(cc)) \ + _add_iostats(0, (size_t )(cc)); \ else \ - _add_iostats((size_t )(cc), 0) \ + _add_iostats((size_t )(cc), 0); \ } while(0) #else #define _SYSIO_UPDACCT(w, cc) |
From: Lee W. <lw...@us...> - 2004-06-24 19:53:39
|
Update of /cvsroot/libsysio/libsysio/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31860/src Modified Files: ioctx.c Log Message: From Kevin Pedretti; Some trivial fixes for the latest accounting mods for Red Storm Index: ioctx.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/ioctx.c,v retrieving revision 1.15 retrieving revision 1.16 diff -u -w -b -B -p -r1.15 -r1.16 --- ioctx.c 16 Jun 2004 13:58:27 -0000 1.15 +++ ioctx.c 24 Jun 2004 19:53:31 -0000 1.16 @@ -55,7 +55,7 @@ #if defined(REDSTORM) -#include "do_iostats.h" +#include <catamount/do_iostats.h> #endif |
From: Lee W. <lw...@us...> - 2004-06-24 12:32:58
|
Update of /cvsroot/libsysio/libsysio/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4076 Modified Files: lseek.c Log Message: From Kevin Pedretti; Legacy return. Uses the interface-return macro now. Index: lseek.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/lseek.c,v retrieving revision 1.20 retrieving revision 1.21 diff -u -w -b -B -p -r1.20 -r1.21 --- lseek.c 4 Jun 2004 14:13:27 -0000 1.20 +++ lseek.c 24 Jun 2004 12:32:50 -0000 1.21 @@ -91,7 +91,7 @@ _sysio_lseek(int fd, _SYSIO_OFF_T offset off = stbuf.st_size; break; default: - return -EINVAL; + SYSIO_INTERFACE_RETURN((off_t )-1, -EINVAL); } pos = off + offset; if ((offset < 0 && -offset > off) || (offset > 0 && pos <= off)) |
From: Lee W. <lw...@us...> - 2004-06-16 13:58:36
|
Update of /cvsroot/libsysio/libsysio/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29040/src Modified Files: ioctx.c Log Message: Changes from Nik Livic and myself to support accounting on Red Storm. NB: We are tracking chars transferred to/from the underlying driver and not what is moved over the wire. Index: ioctx.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/ioctx.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -w -b -B -p -r1.14 -r1.15 --- ioctx.c 28 May 2004 12:48:26 -0000 1.14 +++ ioctx.c 16 Jun 2004 13:58:27 -0000 1.15 @@ -53,6 +53,12 @@ #include "inode.h" #include "xtio.h" + +#if defined(REDSTORM) +#include "do_iostats.h" +#endif + + /* * Asynchronous IO context support. */ @@ -229,6 +235,10 @@ _sysio_ioctx_complete(struct ioctx *ioct { struct ioctx_callback *entry; + + /* update IO stats */ + _SYSIO_UPDACCT(ioctx->ioctx_write, ioctx); + /* * Run the call-back queue. */ |
From: Lee W. <lw...@us...> - 2004-06-16 13:58:35
|
Update of /cvsroot/libsysio/libsysio/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29040/include Modified Files: sysio.h Log Message: Changes from Nik Livic and myself to support accounting on Red Storm. NB: We are tracking chars transferred to/from the underlying driver and not what is moved over the wire. Index: sysio.h =================================================================== RCS file: /cvsroot/libsysio/libsysio/include/sysio.h,v retrieving revision 1.23 retrieving revision 1.24 diff -u -w -b -B -p -r1.23 -r1.24 --- sysio.h 28 May 2004 11:51:52 -0000 1.23 +++ sysio.h 16 Jun 2004 13:58:26 -0000 1.24 @@ -398,3 +398,18 @@ extern void _sysio_sysleave(); #define SYSIO_LEAVE #endif + +/* accounting for IO stats read and write char count */ +#if defined(REDSTORM) +#define _SYSIO_UPDACCT(w, cc) \ + do { \ + if ((cc) < 0) \ + break; \ + if (!w) \ + _add_iostats(0, (size_t )(cc)) \ + else \ + _add_iostats((size_t )(cc), 0) \ + } while(0) +#else +#define _SYSIO_UPDACCT(w, cc) +#endif |
From: Lee W. <lw...@us...> - 2004-06-04 14:13:37
|
Update of /cvsroot/libsysio/libsysio/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20569/src Modified Files: lseek.c Log Message: From Eric Mei; lseek(fd, -64K, SEEK_END) fails if file size is 64K. Fixed a fence-post calculation in the offset check in _sysio_lseek. Index: lseek.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/lseek.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -w -b -B -p -r1.19 -r1.20 --- lseek.c 30 Apr 2004 19:24:46 -0000 1.19 +++ lseek.c 4 Jun 2004 14:13:27 -0000 1.20 @@ -94,7 +94,7 @@ _sysio_lseek(int fd, _SYSIO_OFF_T offset return -EINVAL; } pos = off + offset; - if ((offset < 0 && -offset >= off) || (offset > 0 && pos <= off)) + if ((offset < 0 && -offset > off) || (offset > 0 && pos <= off)) SYSIO_INTERFACE_RETURN((off_t )-1, -EINVAL); #ifdef O_LARGEFILE |
From: Lee W. <lw...@us...> - 2004-06-04 14:05:52
|
Update of /cvsroot/libsysio/libsysio/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17716/src Modified Files: rw.c Log Message: From Eric Mei; A file opened O_RDONLY may be written to. The mode check performed in _sysio_fd_find_capable can't simply check the open mode flags as a mask as O_RDONLY is the absence of any bits. Got rid of _sysio_fd_find_capable and just call _sysio_fd_find straight away. Then, modified _sysio_iiox to make the approrpiate mode check before attempting the operation now. Am leveraging the recent changes for accounting support where the operation is known. Index: rw.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/rw.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -w -b -B -p -r1.9 -r1.10 --- rw.c 28 May 2004 12:48:27 -0000 1.9 +++ rw.c 4 Jun 2004 14:05:38 -0000 1.10 @@ -102,6 +102,14 @@ _sysio_iiox(int (*f)(struct inode *, str int err; struct ioctx_callback *cb; + /* + * Check that it was opened with flags supporting the operation. + */ + if (!(wr + ? (fil->f_flags & (O_RDWR | O_WRONLY)) + : !(fil->f_flags & O_WRONLY))) + return -EBADF; + ino = fil->f_ino; if (!ino) { /* @@ -156,21 +164,6 @@ _sysio_iiox(int (*f)(struct inode *, str } /* - * Find file record from descriptor and return it if capable based on the - * bit-mask of cleared flag bits. - */ -struct file * -_sysio_fd_find_capable(int fd, int clear) -{ - struct file *fil; - - fil = _sysio_fd_find(fd); - if (!fil || fil->f_flags & clear) - return NULL; - return fil; -} - -/* * Sum iovec entries, returning total found or error if range of ssize_t would * be exceeded. */ @@ -256,7 +249,7 @@ SYSIO_INTERFACE_NAME(ireadv)(int fd, con SYSIO_INTERFACE_DISPLAY_BLOCK; SYSIO_INTERFACE_ENTER; - fil = _sysio_fd_find_capable(fd, O_WRONLY); + fil = _sysio_fd_find(fd); if (!fil) SYSIO_INTERFACE_RETURN(IOID_FAIL, -EBADF); @@ -288,7 +281,7 @@ SYSIO_INTERFACE_NAME(readv)(int fd, cons SYSIO_INTERFACE_DISPLAY_BLOCK; SYSIO_INTERFACE_ENTER; - fil = _sysio_fd_find_capable(fd, O_WRONLY); + fil = _sysio_fd_find(fd); if (!fil) SYSIO_INTERFACE_RETURN(-1, -EBADF); @@ -332,7 +325,7 @@ SYSIO_INTERFACE_NAME(iread)(int fd, void SYSIO_INTERFACE_DISPLAY_BLOCK; SYSIO_INTERFACE_ENTER; - fil = _sysio_fd_find_capable(fd, O_WRONLY); + fil = _sysio_fd_find(fd); if (!fil) SYSIO_INTERFACE_RETURN(IOID_FAIL, -EBADF); @@ -373,7 +366,7 @@ SYSIO_INTERFACE_NAME(read)(int fd, void SYSIO_INTERFACE_DISPLAY_BLOCK; SYSIO_INTERFACE_ENTER; - fil = _sysio_fd_find_capable(fd, O_WRONLY); + fil = _sysio_fd_find(fd); if (!fil) SYSIO_INTERFACE_RETURN(-1, -EBADF); @@ -452,7 +445,7 @@ PREPEND(_, SYSIO_INTERFACE_NAME(ipreadv) SYSIO_INTERFACE_DISPLAY_BLOCK; SYSIO_INTERFACE_ENTER; - fil = _sysio_fd_find_capable(fd, O_WRONLY); + fil = _sysio_fd_find(fd); if (!fil) SYSIO_INTERFACE_RETURN(IOID_FAIL, -EBADF); @@ -507,7 +500,7 @@ PREPEND(_, SYSIO_INTERFACE_NAME(preadv)) SYSIO_INTERFACE_DISPLAY_BLOCK; SYSIO_INTERFACE_ENTER; - fil = _sysio_fd_find_capable(fd, O_WRONLY); + fil = _sysio_fd_find(fd); if (!fil) SYSIO_INTERFACE_RETURN(-1, -EBADF); @@ -557,7 +550,7 @@ PREPEND(_, SYSIO_INTERFACE_NAME(ipread)) SYSIO_INTERFACE_DISPLAY_BLOCK; SYSIO_INTERFACE_ENTER; - fil = _sysio_fd_find_capable(fd, O_WRONLY); + fil = _sysio_fd_find(fd); if (!fil) SYSIO_INTERFACE_RETURN(IOID_FAIL, -EBADF); @@ -622,7 +615,7 @@ PREPEND(_, SYSIO_INTERFACE_NAME(pread))( SYSIO_INTERFACE_DISPLAY_BLOCK; SYSIO_INTERFACE_ENTER; - fil = _sysio_fd_find_capable(fd, O_WRONLY); + fil = _sysio_fd_find(fd); if (!fil) SYSIO_INTERFACE_RETURN(IOID_FAIL, -EBADF); @@ -688,7 +681,7 @@ PREPEND(_, SYSIO_INTERFACE_NAME(ireadx)) SYSIO_INTERFACE_DISPLAY_BLOCK; SYSIO_INTERFACE_ENTER; - fil = _sysio_fd_find_capable(fd, O_WRONLY); + fil = _sysio_fd_find(fd); if (!(fil && xtv_count)) SYSIO_INTERFACE_RETURN(IOID_FAIL, -EBADF); @@ -723,7 +716,7 @@ SYSIO_INTERFACE_NAME(ireadx)(int fd, SYSIO_INTERFACE_DISPLAY_BLOCK; SYSIO_INTERFACE_ENTER; - fil = _sysio_fd_find_capable(fd, O_WRONLY); + fil = _sysio_fd_find(fd); if (!(fil && xtv_count)) SYSIO_INTERFACE_RETURN(IOID_FAIL, -EBADF); @@ -822,7 +815,7 @@ SYSIO_INTERFACE_NAME(iwritev)(int fd, SYSIO_INTERFACE_DISPLAY_BLOCK; SYSIO_INTERFACE_ENTER; - fil = _sysio_fd_find_capable(fd, O_RDONLY); + fil = _sysio_fd_find(fd); if (!fil) SYSIO_INTERFACE_RETURN(IOID_FAIL, -EBADF); @@ -854,7 +847,7 @@ SYSIO_INTERFACE_NAME(writev)(int fd, con SYSIO_INTERFACE_DISPLAY_BLOCK; SYSIO_INTERFACE_ENTER; - fil = _sysio_fd_find_capable(fd, O_RDONLY); + fil = _sysio_fd_find(fd); if (!fil) SYSIO_INTERFACE_RETURN(-1, -EBADF); @@ -890,7 +883,7 @@ SYSIO_INTERFACE_NAME(iwrite)(int fd, con SYSIO_INTERFACE_DISPLAY_BLOCK; SYSIO_INTERFACE_ENTER; - fil = _sysio_fd_find_capable(fd, O_RDONLY); + fil = _sysio_fd_find(fd); if (!fil) SYSIO_INTERFACE_RETURN(IOID_FAIL, -EBADF); @@ -931,7 +924,7 @@ SYSIO_INTERFACE_NAME(write)(int fd, cons SYSIO_INTERFACE_DISPLAY_BLOCK; SYSIO_INTERFACE_ENTER; - fil = _sysio_fd_find_capable(fd, O_RDONLY); + fil = _sysio_fd_find(fd); if (!fil) SYSIO_INTERFACE_RETURN(-1, -EBADF); @@ -971,7 +964,7 @@ PREPEND(_, SYSIO_INTERFACE_NAME(ipwritev SYSIO_INTERFACE_DISPLAY_BLOCK; SYSIO_INTERFACE_ENTER; - fil = _sysio_fd_find_capable(fd, O_RDONLY); + fil = _sysio_fd_find(fd); if (!fil) SYSIO_INTERFACE_RETURN(IOID_FAIL, -EBADF); @@ -1026,7 +1019,7 @@ PREPEND(_, SYSIO_INTERFACE_NAME(pwritev) SYSIO_INTERFACE_DISPLAY_BLOCK; SYSIO_INTERFACE_ENTER; - fil = _sysio_fd_find_capable(fd, O_RDONLY); + fil = _sysio_fd_find(fd); if (!fil) SYSIO_INTERFACE_RETURN(-1, -EBADF); @@ -1076,7 +1069,7 @@ PREPEND(_, SYSIO_INTERFACE_NAME(ipwrite) SYSIO_INTERFACE_DISPLAY_BLOCK; SYSIO_INTERFACE_ENTER; - fil = _sysio_fd_find_capable(fd, O_RDONLY); + fil = _sysio_fd_find(fd); if (!fil) SYSIO_INTERFACE_RETURN(IOID_FAIL, -EBADF); @@ -1141,7 +1134,7 @@ PREPEND(_, SYSIO_INTERFACE_NAME(pwrite)) SYSIO_INTERFACE_DISPLAY_BLOCK; SYSIO_INTERFACE_ENTER; - fil = _sysio_fd_find_capable(fd, O_RDONLY); + fil = _sysio_fd_find(fd); if (!fil) SYSIO_INTERFACE_RETURN(-1, -EBADF); @@ -1207,7 +1200,7 @@ PREPEND(_, SYSIO_INTERFACE_NAME(iwritex) SYSIO_INTERFACE_DISPLAY_BLOCK; SYSIO_INTERFACE_ENTER; - fil = _sysio_fd_find_capable(fd, O_RDONLY); + fil = _sysio_fd_find(fd); if (!(fil && xtv_count)) SYSIO_INTERFACE_RETURN(IOID_FAIL, -EBADF); @@ -1242,7 +1235,7 @@ SYSIO_INTERFACE_NAME(iwritex)(int fd, SYSIO_INTERFACE_DISPLAY_BLOCK; SYSIO_INTERFACE_ENTER; - fil = _sysio_fd_find_capable(fd, O_RDONLY); + fil = _sysio_fd_find(fd); if (!(fil && xtv_count)) SYSIO_INTERFACE_RETURN(IOID_FAIL, -EBADF); |
From: Lee W. <lw...@us...> - 2004-06-04 13:11:19
|
Update of /cvsroot/libsysio/libsysio/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5406/src Modified Files: module.mk Log Message: Recent changes caused no open file table support to be included unless WITH_LUSTRE_HACK was somehow defined. Fixed. Index: module.mk =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/module.mk,v retrieving revision 1.6 retrieving revision 1.7 diff -u -w -b -B -p -r1.6 -r1.7 --- module.mk 2 Jun 2004 22:28:17 -0000 1.6 +++ module.mk 4 Jun 2004 13:11:08 -0000 1.7 @@ -2,6 +2,19 @@ # Note; Remove statvfs{,64}.c until we decide what to do with them. # Lee; Tue Feb 24 09:37:32 EST 2004 # + +if WITH_LUSTRE_HACK +FILE_SUPPORT = src/file_hack.c +else +FILE_SUPPORT = src/file.c +endif + +if WITH_LUSTRE_HACK +LUSTRE_SRCDIR_SRCS = src/stdlib.c +else +LUSTRE_SRCDIR_SRCS = +endif + SRCDIR_SRCS = src/access.c src/chdir.c src/chmod.c \ src/chown.c src/dev.c src/dup.c src/fcntl.c \ src/fs.c src/fsync.c \ @@ -12,11 +25,7 @@ SRCDIR_SRCS = src/access.c src/chdir.c s src/open.c src/rw.c src/rename.c \ src/rmdir.c src/stat64.c src/stat.c \ src/symlink.c src/readlink.c \ - src/truncate.c src/unlink.c src/utime.c -if WITH_LUSTRE_HACK -LUSTRE_SRCDIR_SRCS = src/file_hack.c src/stdlib.c -else -LUSTRE_SRCDIR_SRCS = src/file.c -endif + src/truncate.c src/unlink.c src/utime.c \ + $(FILE_SUPPORT) $(LUSTRE_SRCDIR_SOURCES) SRCDIR_EXTRA = src/module.mk |
From: Ruth K. <rk...@us...> - 2004-06-02 22:28:25
|
Update of /cvsroot/libsysio/libsysio In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7921 Modified Files: Makefile.am Log Message: Fix some complaints from automake 1.6. Also use AM_CFLAGS for fPIC flag addition, so that .o names are not changed. Index: Makefile.am =================================================================== RCS file: /cvsroot/libsysio/libsysio/Makefile.am,v retrieving revision 1.12 retrieving revision 1.13 diff -u -w -b -B -p -r1.12 -r1.13 --- Makefile.am 20 May 2004 19:31:48 -0000 1.12 +++ Makefile.am 2 Jun 2004 22:28:16 -0000 1.13 @@ -47,19 +47,23 @@ else OPTIONAL_YOD_SRCS = endif +if WITH_LUSTRE_HACK +OPTIONAL_LUSTRE_SRCDIR_SRCS = $(LUSTRE_SRCDIR_SRCS) +# it would be better that let configure script check this +AM_CFLAGS = -fPIC +else +OPTIONAL_LUSTRE_SRCDIR_SRCS = +endif + __LIBBUILD_DIR__libsysio_a_SOURCES = \ $(SRCDIR_SRCS) \ + $(OPTIONAL_LUSTRE_SRCDIR_SRCS) \ $(OPTIONAL_STDFD_SRCS) \ $(OPTIONAL_INCORE_SRCS) \ $(OPTIONAL_SOCKETS_SRCS) \ $(OPTIONAL_NATIVE_SRCS) \ $(OPTIONAL_YOD_SRCS) -if WITH_LUSTRE_HACK -# it would be better that let configure script check this -__LIBBUILD_DIR__libsysio_a_CFLAGS = -fPIC -endif - include $(top_srcdir)/Rules.make EXTRA_DIST = Rules.make misc/init-env.sh $(TESTS_EXTRA) $(SRCDIR_EXTRA) \ |
From: Ruth K. <rk...@us...> - 2004-06-02 22:28:25
|
Update of /cvsroot/libsysio/libsysio/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7921/src Modified Files: module.mk Log Message: Fix some complaints from automake 1.6. Also use AM_CFLAGS for fPIC flag addition, so that .o names are not changed. Index: module.mk =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/module.mk,v retrieving revision 1.5 retrieving revision 1.6 diff -u -w -b -B -p -r1.5 -r1.6 --- module.mk 28 May 2004 11:51:53 -0000 1.5 +++ module.mk 2 Jun 2004 22:28:17 -0000 1.6 @@ -14,9 +14,9 @@ SRCDIR_SRCS = src/access.c src/chdir.c s src/symlink.c src/readlink.c \ src/truncate.c src/unlink.c src/utime.c if WITH_LUSTRE_HACK -SRCDIR_SRCS += src/file_hack.c src/stdlib.c +LUSTRE_SRCDIR_SRCS = src/file_hack.c src/stdlib.c else -SRCDIR_SRCS += src/file.c +LUSTRE_SRCDIR_SRCS = src/file.c endif SRCDIR_EXTRA = src/module.mk |
From: Lee W. <lw...@us...> - 2004-05-28 12:48:39
|
Update of /cvsroot/libsysio/libsysio/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12502/src Modified Files: init.c ioctx.c mount.c rw.c Log Message: Accounting mods required for Red Storm require us to track the requested IO operation through the life of that operation. Most importantly, the ioctx record has a new field, ioctx_write. If set, the operation is/was a write. Otherwise a read. Index: init.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/init.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -w -b -B -p -r1.8 -r1.9 --- init.c 25 Feb 2004 16:24:00 -0000 1.8 +++ init.c 28 May 2004 12:48:26 -0000 1.9 @@ -395,6 +395,7 @@ do_creat(char *args) IOCTX_INIT(&io_context, 1, (ioid_t )&io_context, + 1, ino, &iovec, 1, &xtvec, 1); Index: ioctx.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/ioctx.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -w -b -B -p -r1.13 -r1.14 --- ioctx.c 27 Apr 2004 15:14:50 -0000 1.13 +++ ioctx.c 28 May 2004 12:48:26 -0000 1.14 @@ -103,6 +103,7 @@ _sysio_ioctx_enter(struct ioctx *ioctx) */ struct ioctx * _sysio_ioctx_new(struct inode *ino, + int wr, const struct iovec *iov, size_t iovlen, const struct intnl_xtvec *xtv, @@ -119,6 +120,7 @@ _sysio_ioctx_new(struct inode *ino, IOCTX_INIT(ioctx, 0, (ioid_t )ioctx, + wr, ino, iov, iovlen, xtv, xtvlen); Index: mount.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/mount.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -w -b -B -p -r1.13 -r1.14 --- mount.c 28 Apr 2004 11:21:30 -0000 1.13 +++ mount.c 28 May 2004 12:48:26 -0000 1.14 @@ -619,6 +619,7 @@ _sysio_automount(struct pnode *mntpno) IOCTX_INIT(&iocontext, 1, (ioid_t )&iocontext, + 0, ino, &iovec, 1, &xtvec, 1); Index: rw.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/rw.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -w -b -B -p -r1.8 -r1.9 --- rw.c 30 Apr 2004 19:24:46 -0000 1.8 +++ rw.c 28 May 2004 12:48:27 -0000 1.9 @@ -57,6 +57,9 @@ #include "sysio-symbols.h" +#define IIOXOP_READ(ino) (ino)->i_ops.inop_read, 0 +#define IIOXOP_WRITE(ino) (ino)->i_ops.inop_write, 1 + /* * Decoding the interface routine names: * @@ -82,6 +85,7 @@ */ static int _sysio_iiox(int (*f)(struct inode *, struct ioctx *), + int wr, struct file *fil, const struct iovec *iov, size_t iov_count, @@ -116,7 +120,7 @@ _sysio_iiox(int (*f)(struct inode *, str _SYSIO_OFF_T_MAX); if (cc < 0) return cc; - ioctx = _sysio_ioctx_new(ino, iov, iov_count, xtv, xtv_count); + ioctx = _sysio_ioctx_new(ino, wr, iov, iov_count, xtv, xtv_count); if (!ioctx) return -ENOMEM; if ((iov_free && @@ -194,6 +198,7 @@ _sysio_sum_iovec(const struct iovec *iov */ static int _sysio_iiov(int (*f)(struct inode *, struct ioctx *), + int wr, struct file *fil, const struct iovec *iov, int count, @@ -222,6 +227,7 @@ _sysio_iiov(int (*f)(struct inode *, str } err = _sysio_iiox(f, + wr, fil, iov, count, iov_free, xtv, 1, xtv_free, @@ -259,7 +265,7 @@ SYSIO_INTERFACE_NAME(ireadv)(int fd, con SYSIO_INTERFACE_RETURN(IOID_FAIL, -ENOMEM); err = - _sysio_iiov(fil->f_ino->i_ops.inop_read, + _sysio_iiov(IIOXOP_READ(fil->f_ino), fil, iov, count, NULL, xtv, free_xtv, @@ -287,7 +293,7 @@ SYSIO_INTERFACE_NAME(readv)(int fd, cons SYSIO_INTERFACE_RETURN(-1, -EBADF); err = - _sysio_iiov(fil->f_ino->i_ops.inop_read, + _sysio_iiov(IIOXOP_READ(fil->f_ino), fil, iov, count, NULL, &xtvector, NULL, @@ -342,7 +348,7 @@ SYSIO_INTERFACE_NAME(iread)(int fd, void SYSIO_INTERFACE_RETURN(IOID_FAIL, -ENOMEM); } err = - _sysio_iiov(fil->f_ino->i_ops.inop_read, + _sysio_iiov(IIOXOP_READ(fil->f_ino), fil, iov, 1, free_iov, xtv, free_xtv, @@ -374,7 +380,7 @@ SYSIO_INTERFACE_NAME(read)(int fd, void iovector.iov_base = buf; iovector.iov_len = count; err = - _sysio_iiov(fil->f_ino->i_ops.inop_read, + _sysio_iiov(IIOXOP_READ(fil->f_ino), fil, &iovector, 1, NULL, &xtvector, NULL, @@ -398,6 +404,7 @@ sysio_sym_weak_alias(SYSIO_INTERFACE_NAM */ static int _sysio_ipiov(int (*f)(struct inode *, struct ioctx *), + int wr, struct file *fil, const struct iovec *iov, int count, @@ -420,6 +427,7 @@ _sysio_ipiov(int (*f)(struct inode *, st xtv->xtv_len = cc; err = _sysio_iiox(f, + wr, fil, iov, count, iov_free, xtv, 1, xtv_free, @@ -453,7 +461,7 @@ PREPEND(_, SYSIO_INTERFACE_NAME(ipreadv) SYSIO_INTERFACE_RETURN(IOID_FAIL, -ENOMEM); err = - _sysio_ipiov(fil->f_ino->i_ops.inop_read, + _sysio_ipiov(IIOXOP_READ(fil->f_ino), fil, iov, count, NULL, offset, @@ -504,7 +512,7 @@ PREPEND(_, SYSIO_INTERFACE_NAME(preadv)) SYSIO_INTERFACE_RETURN(-1, -EBADF); err = - _sysio_ipiov(fil->f_ino->i_ops.inop_read, + _sysio_ipiov(IIOXOP_READ(fil->f_ino), fil, iov, count, NULL, offset, @@ -563,7 +571,7 @@ PREPEND(_, SYSIO_INTERFACE_NAME(ipread)) iov->iov_base = buf; xtv->xtv_len = iov->iov_len = count; err = - _sysio_ipiov(fil->f_ino->i_ops.inop_read, + _sysio_ipiov(IIOXOP_READ(fil->f_ino), fil, iov, 1, free_iov, offset, @@ -622,7 +630,7 @@ PREPEND(_, SYSIO_INTERFACE_NAME(pread))( iovec.iov_base = buf; xtvec.xtv_len = iovec.iov_len = count; err = - _sysio_ipiov(fil->f_ino->i_ops.inop_read, + _sysio_ipiov(IIOXOP_READ(fil->f_ino), fil, &iovec, 1, NULL, offset, @@ -685,7 +693,7 @@ PREPEND(_, SYSIO_INTERFACE_NAME(ireadx)) SYSIO_INTERFACE_RETURN(IOID_FAIL, -EBADF); err = - _sysio_iiox(fil->f_ino->i_ops.inop_read, + _sysio_iiox(IIOXOP_READ(fil->f_ino), fil, iov, iov_count, NULL, xtv, xtv_count, NULL, @@ -732,7 +740,7 @@ SYSIO_INTERFACE_NAME(ireadx)(int fd, } err = - _sysio_iiox(fil->f_ino->i_ops.inop_read, + _sysio_iiox(IIOXOP_READ(fil->f_ino), fil, iov, iov_count, NULL, ixtv, xtv_count, free_xtv, @@ -823,7 +831,7 @@ SYSIO_INTERFACE_NAME(iwritev)(int fd, SYSIO_INTERFACE_RETURN(IOID_FAIL, -ENOMEM); err = - _sysio_iiov(fil->f_ino->i_ops.inop_write, + _sysio_iiov(IIOXOP_WRITE(fil->f_ino), fil, iov, count, NULL, xtv, free_xtv, @@ -851,7 +859,7 @@ SYSIO_INTERFACE_NAME(writev)(int fd, con SYSIO_INTERFACE_RETURN(-1, -EBADF); err = - _sysio_iiov(fil->f_ino->i_ops.inop_write, + _sysio_iiov(IIOXOP_WRITE(fil->f_ino), fil, iov, count, NULL, &xtvector, NULL, @@ -898,7 +906,7 @@ SYSIO_INTERFACE_NAME(iwrite)(int fd, con SYSIO_INTERFACE_RETURN(IOID_FAIL, -ENOMEM); } err = - _sysio_iiov(fil->f_ino->i_ops.inop_write, + _sysio_iiov(IIOXOP_WRITE(fil->f_ino), fil, iov, 1, free_iov, xtv, free_xtv, @@ -930,7 +938,7 @@ SYSIO_INTERFACE_NAME(write)(int fd, cons iovector.iov_base = (void *)buf; iovector.iov_len = count; err = - _sysio_iiov(fil->f_ino->i_ops.inop_write, + _sysio_iiov(IIOXOP_WRITE(fil->f_ino), fil, &iovector, 1, NULL, &xtvector, NULL, @@ -972,7 +980,7 @@ PREPEND(_, SYSIO_INTERFACE_NAME(ipwritev SYSIO_INTERFACE_RETURN(IOID_FAIL, -ENOMEM); err = - _sysio_ipiov(fil->f_ino->i_ops.inop_write, + _sysio_ipiov(IIOXOP_WRITE(fil->f_ino), fil, iov, count, NULL, offset, @@ -1023,7 +1031,7 @@ PREPEND(_, SYSIO_INTERFACE_NAME(pwritev) SYSIO_INTERFACE_RETURN(-1, -EBADF); err = - _sysio_ipiov(fil->f_ino->i_ops.inop_write, + _sysio_ipiov(IIOXOP_WRITE(fil->f_ino), fil, iov, count, NULL, offset, @@ -1082,7 +1090,7 @@ PREPEND(_, SYSIO_INTERFACE_NAME(ipwrite) iov->iov_base = (void *)buf; xtv->xtv_len = iov->iov_len = count; err = - _sysio_ipiov(fil->f_ino->i_ops.inop_write, + _sysio_ipiov(IIOXOP_WRITE(fil->f_ino), fil, iov, 1, free_iov, offset, @@ -1141,7 +1149,7 @@ PREPEND(_, SYSIO_INTERFACE_NAME(pwrite)) iovec.iov_base = (void *)buf; xtvec.xtv_len = iovec.iov_len = count; err = - _sysio_ipiov(fil->f_ino->i_ops.inop_write, + _sysio_ipiov(IIOXOP_WRITE(fil->f_ino), fil, &iovec, 1, NULL, offset, @@ -1204,7 +1212,7 @@ PREPEND(_, SYSIO_INTERFACE_NAME(iwritex) SYSIO_INTERFACE_RETURN(IOID_FAIL, -EBADF); err = - _sysio_iiox(fil->f_ino->i_ops.inop_write, + _sysio_iiox(IIOXOP_WRITE(fil->f_ino), fil, iov, iov_count, NULL, xtv, xtv_count, NULL, @@ -1251,7 +1259,7 @@ SYSIO_INTERFACE_NAME(iwritex)(int fd, } err = - _sysio_iiox(fil->f_ino->i_ops.inop_write, + _sysio_iiox(IIOXOP_WRITE(fil->f_ino), fil, iov, iov_count, NULL, ixtv, xtv_count, free_xtv, |
From: Lee W. <lw...@us...> - 2004-05-28 12:48:37
|
Update of /cvsroot/libsysio/libsysio/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12502/include Modified Files: inode.h Log Message: Accounting mods required for Red Storm require us to track the requested IO operation through the life of that operation. Most importantly, the ioctx record has a new field, ioctx_write. If set, the operation is/was a write. Otherwise a read. Index: inode.h =================================================================== RCS file: /cvsroot/libsysio/libsysio/include/inode.h,v retrieving revision 1.17 retrieving revision 1.18 diff -u -w -b -B -p -r1.17 -r1.18 --- inode.h 28 Apr 2004 12:23:19 -0000 1.17 +++ inode.h 28 May 2004 12:48:26 -0000 1.18 @@ -368,7 +368,8 @@ struct ioctx { LIST_ENTRY(ioctx) ioctx_link; /* AIO list link */ unsigned ioctx_fast : 1, /* from stack space */ - ioctx_done : 1; /* transfer complete */ + ioctx_done : 1, /* transfer complete */ + ioctx_write : 1; /* op is a write */ ioid_t ioctx_id; /* unique ident */ struct inode *ioctx_ino; /* i-node */ const struct iovec *ioctx_iov; /* scatter/gather vec */ @@ -384,10 +385,11 @@ struct ioctx { /* * Init IO context record. */ -#define IOCTX_INIT(ioctx, fast, id, ino, iov, iovlen, xtv, xtvlen) \ +#define IOCTX_INIT(ioctx, fast, id, wr, ino, iov, iovlen, xtv, xtvlen) \ do { \ (ioctx)->ioctx_fast = (fast); \ (ioctx)->ioctx_done = 0; \ + (ioctx)->ioctx_write = (wr) ? 1 : 0; \ (ioctx)->ioctx_id = (id); \ (ioctx)->ioctx_ino = (ino); \ (ioctx)->ioctx_iov = (iov); \ @@ -474,6 +476,7 @@ extern int _sysio_p_chdir(struct pnode * extern int _sysio_ioctx_init(void); extern void _sysio_ioctx_enter(struct ioctx *ioctx); extern struct ioctx *_sysio_ioctx_new(struct inode *ino, + int wr, const struct iovec *iov, size_t iovlen, const struct intnl_xtvec *xtv, |
From: Lee W. <lw...@us...> - 2004-05-28 11:52:37
|
Update of /cvsroot/libsysio/libsysio/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2519/src Added Files: readlink.c Log Message: Oops. Ok, here's readlink(2) now. --- NEW FILE --- /* * This Cplant(TM) source code is the property of Sandia National * Laboratories. * * This Cplant(TM) source code is copyrighted by Sandia National * Laboratories. * * The redistribution of this Cplant(TM) source code is subject to the * 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. * 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 * Government. */ /* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Questions or comments about this library should be sent to: * * Lee Ward * Sandia National Laboratories, New Mexico * P.O. Box 5800 * Albuquerque, NM 87185-1110 * * le...@sa... */ #include <unistd.h> #include <errno.h> #include <assert.h> #include <sys/types.h> #include <sys/queue.h> #include "sysio.h" #include "inode.h" #include "sysio-symbols.h" int SYSIO_INTERFACE_NAME(readlink)(const char *path, char *buf, size_t bufsiz) { struct intent intent; int err; struct pnode *pno; struct inode *ino; SYSIO_INTERFACE_DISPLAY_BLOCK; SYSIO_INTERFACE_ENTER; INTENT_INIT(&intent, INT_GETATTR, NULL, NULL); err = _sysio_namei(_sysio_cwd, path, ND_NOFOLLOW, &intent, &pno); if (err) goto out; ino = pno->p_base->pb_ino; err = (*ino->i_ops.inop_readlink)(pno, buf, bufsiz); if (err) goto error; error: P_RELE(pno); out: SYSIO_INTERFACE_RETURN(err, err >= 0 ? 0 : err); } #ifdef REDSTORM #undef __readlink sysio_sym_weak_alias(SYSIO_INTERFACE_NAME(readlink), PREPEND(__, SYSIO_INTERFACE_NAME(readlink))) #endif |
From: Lee W. <lw...@us...> - 2004-05-28 11:52:04
|
Update of /cvsroot/libsysio/libsysio/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2364/tests Modified Files: test_path.c Log Message: Kevin Pedretti wanted readlink(2). Here it is. Index: test_path.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/tests/test_path.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -w -b -B -p -r1.7 -r1.8 --- test_path.c 14 Feb 2004 19:43:00 -0000 1.7 +++ test_path.c 28 May 2004 11:51:53 -0000 1.8 @@ -149,6 +149,8 @@ statit(const char *path) int err; struct stat stbuf; char t; + static char buf[4096]; + ssize_t cc; /* * Get file attrs. @@ -200,7 +202,17 @@ statit(const char *path) /* * Print path and type. */ - (void )printf("%s: %c\n", path, t); + if (S_ISLNK(stbuf.st_mode)) { + cc = readlink(path, buf, sizeof(buf)); + if (cc < 0) { + perror(path); + return -1; + } + } + (void )printf("%s: %c", path, t); + if (S_ISLNK(stbuf.st_mode) && (size_t )cc < sizeof(buf)) + (void )printf(" %.*s", cc, buf); + (void )putchar('\n'); return 0; } |
From: Lee W. <lw...@us...> - 2004-05-28 11:52:04
|
Update of /cvsroot/libsysio/libsysio/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2364/src Modified Files: module.mk Log Message: Kevin Pedretti wanted readlink(2). Here it is. Index: module.mk =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/module.mk,v retrieving revision 1.4 retrieving revision 1.5 diff -u -w -b -B -p -r1.4 -r1.5 --- module.mk 20 May 2004 19:31:48 -0000 1.4 +++ module.mk 28 May 2004 11:51:53 -0000 1.5 @@ -11,7 +11,7 @@ SRCDIR_SRCS = src/access.c src/chdir.c s src/mknod.c src/mount.c src/namei.c \ src/open.c src/rw.c src/rename.c \ src/rmdir.c src/stat64.c src/stat.c \ - src/symlink.c \ + src/symlink.c src/readlink.c \ src/truncate.c src/unlink.c src/utime.c if WITH_LUSTRE_HACK SRCDIR_SRCS += src/file_hack.c src/stdlib.c |
From: Lee W. <lw...@us...> - 2004-05-28 11:52:02
|
Update of /cvsroot/libsysio/libsysio/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2364/include Modified Files: sysio.h Log Message: Kevin Pedretti wanted readlink(2). Here it is. Index: sysio.h =================================================================== RCS file: /cvsroot/libsysio/libsysio/include/sysio.h,v retrieving revision 1.22 retrieving revision 1.23 diff -u -w -b -B -p -r1.22 -r1.23 --- sysio.h 30 Apr 2004 19:24:57 -0000 1.22 +++ sysio.h 28 May 2004 11:51:52 -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-2003 Sandia Corporation. + * Cplant(TM) Copyright 1998-2004 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 @@ -249,6 +249,9 @@ extern int SYSIO_INTERFACE_NAME(ftruncat #endif extern int SYSIO_INTERFACE_NAME(rmdir)(const char *path); extern int SYSIO_INTERFACE_NAME(symlink)(const char *path1, const char *path2); +extern int SYSIO_INTERFACE_NAME(readlink)(const char *path, + char *buf, + size_t bufsiz); extern int SYSIO_INTERFACE_NAME(link)(const char *oldpath, const char *newpath); extern int SYSIO_INTERFACE_NAME(unlink)(const char *path); extern int SYSIO_INTERFACE_NAME(rename)(const char *oldpath, |
From: Lee W. <lw...@us...> - 2004-05-25 17:53:54
|
Update of /cvsroot/libsysio/libsysio/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19311/src Modified Files: getdirentries.c Log Message: +Changes for Red Storm from Kevin Pedretti +Fix in fs_native.c to conditionally compile DIR_STREAMED code properly. We were always including it -- Even when using getdirentries. Oops. Index: getdirentries.c =================================================================== RCS file: /cvsroot/libsysio/libsysio/src/getdirentries.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -w -b -B -p -r1.14 -r1.15 --- getdirentries.c 28 Apr 2004 21:15:58 -0000 1.14 +++ getdirentries.c 25 May 2004 17:53:43 -0000 1.15 @@ -109,7 +109,7 @@ PREPEND(_, SYSIO_INTERFACE_NAME(getdiren buf, nbytes, basep); - SYSIO_INTERFACE_RETURN(cc < 0 ? -1 : cc, (int )cc); + SYSIO_INTERFACE_RETURN(cc < 0 ? -1 : cc, cc < 0 ? (int )cc : 0); } #if _LARGEFILE64_SOURCE @@ -156,7 +156,7 @@ SYSIO_INTERFACE_NAME(getdirentries)(int _SYSIO_OFF_T ibase; ssize_t cc; struct dirent *dp, *nxtdp; -#if defined(BSD) || defined(REDSTORM) +#if defined(BSD) int off; #endif struct intnl_dirent *od64p, *d64p; @@ -176,16 +176,16 @@ SYSIO_INTERFACE_NAME(getdirentries)(int _rndup(_dbaselen + (namlen) + 1, sizeof(int)) #endif -#if defined(__GLIBC__) && !(defined(REDSTORM)) +#if defined(__GLIBC__) #define _fast_alloc(n) alloca(n) #define _fast_free(p) -#else /* !defined(__GLIBC__) || defined(REDSTORM) */ +#else /* !defined(__GLIBC__) */ #define _fast_alloc(n) malloc(n) #define _fast_free(p) free(p) #endif SYSIO_INTERFACE_ENTER; -#if defined(BSD) || defined(REDSTORM) +#if defined(BSD) if (nbytes < 0) SYSIO_INTERFACE_RETURN(-1, -EINVAL); #endif @@ -219,7 +219,7 @@ SYSIO_INTERFACE_NAME(getdirentries)(int goto out; } -#if defined(BSD) || defined(REDSTORM) +#if defined(BSD) off = *basep; #endif od64p = NULL; @@ -236,13 +236,13 @@ SYSIO_INTERFACE_NAME(getdirentries)(int if (reclen >= (unsigned )nbytes) break; dp->d_ino = (ino_t )d64p->d_ino; -#if !(defined(BSD) || defined(REDSTORM)) +#if !(defined(BSD)) dp->d_off = (off_t )d64p->d_off; #endif if ((sizeof(dp->d_ino) != sizeof(d64p->d_ino) && dp->d_ino != d64p->d_ino) || -#if !(defined(BSD) || defined(REDSTORM)) +#if !(defined(BSD)) (sizeof(dp->d_off) != sizeof(d64p->d_off) && dp->d_off != d64p->d_off) #else @@ -262,7 +262,7 @@ SYSIO_INTERFACE_NAME(getdirentries)(int od64p = d64p; d64p = (struct dirent64 *)((char *)d64p + d64p->d_reclen); nbytes -= reclen; -#if defined(BSD) || defined(REDSTORM) +#if defined(BSD) off += reclen; #endif dp = nxtdp; @@ -276,7 +276,7 @@ out: cc = (char *)dp - buf; if (cc) *basep = -#if !(defined(BSD) || defined(REDSTORM)) +#if !(defined(BSD)) od64p->d_off; #else off; |