Whamcloud - gitweb
b=10163
authorzhanghc <zhanghc>
Wed, 29 Mar 2006 06:24:50 +0000 (06:24 +0000)
committerzhanghc <zhanghc>
Wed, 29 Mar 2006 06:24:50 +0000 (06:24 +0000)
DESCRIPTION:
    keep CFS up to date with latest libsysio version

libsysio/Makefile.am
libsysio/drivers/native/fs_native.c
libsysio/include/module.mk
libsysio/src/init.c
libsysio/src/namei.c

index 43c736a..dfa4f9e 100644 (file)
@@ -49,7 +49,7 @@ endif
 
 if WITH_LUSTRE_HACK
 # it would be better that let configure script check this
 
 if WITH_LUSTRE_HACK
 # it would be better that let configure script check this
-OPTIONAL_LUSTRE_CFLAGS = -fPIC -O0
+OPTIONAL_LUSTRE_CFLAGS = -fPIC
 endif
 
 AM_CFLAGS = $(OPTIONAL_LUSTRE_CFLAGS)
 endif
 
 AM_CFLAGS = $(OPTIONAL_LUSTRE_CFLAGS)
index 684b37f..8f8f91a 100644 (file)
@@ -360,7 +360,14 @@ _sysio_native_init()
         * zero. All permission bits to open/creat/setattr are absolute --
         * They've already had a umask applied, when appropriate.
         */
         * zero. All permission bits to open/creat/setattr are absolute --
         * They've already had a umask applied, when appropriate.
         */
-       _sysio_umask = syscall(SYSIO_SYS_umask, 0);
+#ifndef REDSTORM
+        _sysio_umask = syscall(SYSIO_SYS_umask, 0);
+        /*
+         *      For Red Storm, this functionality is handled in cstart.
+         *      The mask to be "captured" has been sent already.
+         *      This eliminates a system call from every node!
+         */
+#endif  /* REDSTORM  */
 
        return _sysio_fssw_register("native", &native_fssw_ops);
 }
 
        return _sysio_fssw_register("native", &native_fssw_ops);
 }
index 8a53f39..8f7b5f7 100644 (file)
@@ -1,5 +1,5 @@
 INCLUDE_EXTRA = include/dev.h include/file.h include/fs.h \
        include/inode.h include/mount.h include/sysio.h include/sysio-cmn.h \
 INCLUDE_EXTRA = include/dev.h include/file.h include/fs.h \
        include/inode.h include/mount.h include/sysio.h include/sysio-cmn.h \
-       include/sysio-cmn.h include/sysio-symbols.h include/cplant-yod.h \
+       include/sysio-symbols.h include/cplant-yod.h \
        include/module.mk include/xtio.h include/stddir.h \
        include/native.h
        include/module.mk include/xtio.h include/stddir.h \
        include/native.h
index b50ce12..3441d81 100644 (file)
@@ -128,6 +128,12 @@ void       *_sysio_exit_trace_q = &_sysio_exit_trace_head;
 #endif
 
 /*
 #endif
 
 /*
+ * In sysio_init we'll allow simple comments, strings outside {}
+ * delimited by COMMENT_INTRO, and '\n' or '\0'
+ */
+#define COMMENT_INTRO          '#'
+
+/*
  * Sysio library initialization. Must be called before anything else in the
  * library.
  */
  * Sysio library initialization. Must be called before anything else in the
  * library.
  */
@@ -955,9 +961,15 @@ _sysio_boot_namespace(const char *arg)
                /*
                 * Discard leading white space.
                 */
                /*
                 * Discard leading white space.
                 */
-               while ((c = *arg) != '\0' &&
-                      !(c == '{' || strchr(IGNORE_WHITE, c) == NULL))
+               while ((c = *arg) != '\0' && strchr(IGNORE_WHITE, c))
                        arg++;
                        arg++;
+                if (COMMENT_INTRO == c) {
+                        while (*arg && (*arg != '\n')) {
+                                ++arg;
+                        }
+
+                        continue;
+                }
                if (c == '\0')
                        break;
                if (c != '{') {
                if (c == '\0')
                        break;
                if (c != '{') {
index 6167189..f58713c 100644 (file)
@@ -260,6 +260,8 @@ _sysio_path_walk(struct pnode *parent, struct nameidata *nd)
                        lpath[cc] = '\0';                       /* NUL term */
                        /*
                         * Handle symbolic links with recursion. Yuck!
                        lpath[cc] = '\0';                       /* NUL term */
                        /*
                         * Handle symbolic links with recursion. Yuck!
+                        * Pass the NULL intent for recursive symlink
+                        * except the last component.
                         */
                        ND_INIT(&nameidata,
                                (nd->nd_flags | ND_NEGOK),
                         */
                        ND_INIT(&nameidata,
                                (nd->nd_flags | ND_NEGOK),