[Libsysio-commit] HEAD: libsysio/include namespace.h inode.h mount.h sysio.h
Brought to you by:
lward
|
From: Lee W. <lw...@us...> - 2004-02-14 19:49:38
|
Update of /cvsroot/libsysio/libsysio/include In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16325/include Modified Files: inode.h mount.h sysio.h Added Files: namespace.h Log Message: + Merged in changes from namespace_assembly branch (see .../misc/init-env.sh) This provoked a bunch of bugs. See below. + Fixed a bug in _sysio_enumerate_extents(). If the IO operation was short, it would go round the loop again, mistakenly trying to fill more of the extent. + In rw.c, fixed bugs in [p]{read,write}[vx] (all the synchronous routines) that improperly propagated error returns. They were returning -errno instead of setting errno and returning -1. + In fs_native.c:doiov, fixed a bug where a zero-length IO was improperly thought to be an error. + In lseek.c:_sysio_lseek, fixed final position check to properly determine {under,over}flow. + In link.c:link, fixed the existence check. No error is returned for nonexistent files when ND_NEGOK is specified. We're supposed to check whether it's a negative entry or not. + A new macro, I_GONE, was added to inode.h. This will *try* to kill an inode but if it can't, it becomes a zombie instead. + In unlink.c:unlink, link.c:link, rename.c:rename, the driver ops were being called but the actual operation in the internal path tree was not reflected. Also, for unlink and rename, use the new I_GONE macro on the destroyed inode. + In fs_native.c:native_inop_gone, close() was always called, even when the fildes was -1. + In fs_native.c:native_inop_gone, close() was called. We really meant to call syscal(SYS_close, ...); + In namei.c:_sysio_path_walk, fixed broken symlink handling. It wasn't following symlinks anywhere if ND_NOFOLLOW was set. That flag only means that the *last* component should not be followed. + In namei.c:_sysio_path_walk, fixed buffer overrun problem for very long symlinks. + In fs_incore.c, fixed dirop_{link,rename,unlink,rmdir} because they were manipulating the system path cache and shouldn't. + In mount.c:_sysio_unmount_all we were mistakenly releasing an FS root after a failed unmount attempt. + Fixes in test_regions.c free allocated memory at the end so valgrind doesn't show a leak. Index: inode.h =================================================================== RCS file: /cvsroot/libsysio/libsysio/include/inode.h,v retrieving revision 1.14 retrieving revision 1.15 diff -u -w -b -B -p -r1.14 -r1.15 --- inode.h 6 Feb 2004 20:07:29 -0000 1.14 +++ inode.h 14 Feb 2004 19:42:58 -0000 1.15 @@ -180,6 +180,17 @@ struct inode { } while (0) /* + * Attempt to kill an inode. + */ +#define I_GONE(ino) \ + do { \ + _sysio_i_undead(ino); \ + I_RELE(ino); \ + if (!(ino)->i_ref) \ + _sysio_i_gone(ino); \ + } while (0) + +/* * The "quick string" record (inspired by the structure of the same name * from Linux) is used to pass a string without delimiters as well as useful * information about the string. Index: mount.h =================================================================== RCS file: /cvsroot/libsysio/libsysio/include/mount.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -w -b -B -p -r1.3 -r1.4 --- mount.h 7 Mar 2003 03:31:36 -0000 1.3 +++ mount.h 14 Feb 2004 19:42:58 -0000 1.4 @@ -86,6 +86,12 @@ extern int _sysio_mount_root(const char const char *type, unsigned flags, const void *data); +extern int _sysio_mount(struct pnode *cwd, + const char *source, + const char *target, + const char *filesystemtype, + unsigned long mountflags, + const void *data); extern int _sysio_unmount_all(void); #ifdef AUTOMOUNT_FILE_NAME extern int _sysio_automount(struct pnode *mntpno); Index: sysio.h =================================================================== RCS file: /cvsroot/libsysio/libsysio/include/sysio.h,v retrieving revision 1.16 retrieving revision 1.17 diff -u -w -b -B -p -r1.16 -r1.17 --- sysio.h 6 Feb 2004 20:07:29 -0000 1.16 +++ sysio.h 14 Feb 2004 19:42:58 -0000 1.17 @@ -163,6 +163,7 @@ extern mode_t _sysio_umask; extern int _sysio_init(void); extern void _sysio_shutdown(void); +extern int _sysio_boot(const char *buf); /* * The following should be defined by the system includes, and probably are, |