Whamcloud - gitweb
Backout "liblustre now builds" commit. It breaks building in utils:
authorbrian <brian>
Wed, 10 Aug 2005 17:16:58 +0000 (17:16 +0000)
committerbrian <brian>
Wed, 10 Aug 2005 17:16:58 +0000 (17:16 +0000)
  ../../lustre/include/linux/lustre_sec.h:541: error: field `c_hash' has incomplete type

20 files changed:
lustre/include/liblustre.h
lustre/include/linux/lustre_idl.h
lustre/include/linux/lustre_sec.h
lustre/include/linux/lvfs.h
lustre/liblustre/file.c
lustre/liblustre/genlib.sh
lustre/liblustre/llite_lib.c
lustre/liblustre/namei.c
lustre/liblustre/rw.c
lustre/liblustre/super.c
lustre/llite/llite_capa.c
lustre/obdclass/capa.c
lustre/osc/osc_request.c
lustre/ptlrpc/pack_generic.c
lustre/sec/gss/gss_internal.h
lustre/sec/gss/sec_gss.c
lustre/sec/sec.c
lustre/tests/test45.sh
lustre/utils/lconf
lustre/utils/liblustreapi.c

index c5446ff..56ed008 100644 (file)
@@ -70,56 +70,6 @@ typedef unsigned short umode_t;
 #define smp_processor_id() 0
 #endif
 
 #define smp_processor_id() 0
 #endif
 
-#ifndef smp_mb
-#define smp_mb() do {} while (0)
-#endif
-
-#ifndef might_sleep_if
-#define might_sleep_if(cond) do {} while (0)
-#endif
-
-#ifndef might_sleep
-#define might_sleep() do {} while (0)
-#endif
-
-#ifndef signal_pending
-#define signal_pending(proc) 0
-#endif
-
-#ifndef MAY_EXEC
-#define MAY_EXEC 1
-#endif
-
-#ifndef MAY_WRITE
-#define MAY_WRITE 2
-#endif
-
-#ifndef MAY_READ
-#define MAY_READ 4
-#endif
-
-#ifndef MAY_APPEND
-#define MAY_APPEND 8
-#endif
-
-#ifndef FMODE_READ
-#define FMODE_READ 1
-#endif
-
-#ifndef FMODE_WRITE
-#define FMODE_WRITE 2
-#endif
-
-#ifndef FMODE_EXEC
-#define FMODE_EXEC 4
-#endif
-
-#define LBUG()                                                          \
-        do {                                                            \
-                printf("!!!LBUG at %s:%d\n", __FILE__, __LINE__);       \
-                sleep(1000000);                                         \
-        } while (0)
-
 /* always adopt 2.5 definitions */
 #define KERNEL_VERSION(a,b,c) ((a)*100+(b)*10+c)
 #define LINUX_VERSION_CODE (2*200+5*10+0)
 /* always adopt 2.5 definitions */
 #define KERNEL_VERSION(a,b,c) ((a)*100+(b)*10+c)
 #define LINUX_VERSION_CODE (2*200+5*10+0)
@@ -172,7 +122,7 @@ static inline void *kmalloc(int size, int prot)
 
 typedef struct {
         void *cwd;
 
 typedef struct {
         void *cwd;
-} mm_segment_t;
+}mm_segment_t;
 
 typedef int (read_proc_t)(char *page, char **start, off_t off,
                           int count, int *eof, void *data);
 
 typedef int (read_proc_t)(char *page, char **start, off_t off,
                           int count, int *eof, void *data);
@@ -231,16 +181,6 @@ static __inline__ int test_bit(int nr, long * addr)
        return ((mask & *addr) != 0);
 }
 
        return ((mask & *addr) != 0);
 }
 
-static __inline__ int test_and_set_bit(int nr, long * addr)
-{
-       int     res;
-
-        res = test_bit(nr, addr);
-        set_bit(nr, addr);
-        
-        return res;
-}
-
 static __inline__ int ext2_set_bit(int nr, void *addr)
 {
         return set_bit(nr, (long*)addr);
 static __inline__ int ext2_set_bit(int nr, void *addr)
 {
         return set_bit(nr, (long*)addr);
@@ -592,78 +532,6 @@ struct semaphore {
         int count;
 };
 
         int count;
 };
 
-struct crypto_tfm;
-
-struct scatterlist {
-    struct page                *page;
-    unsigned int       offset;
-    __u32              dma_address;
-    unsigned int       length;
-};
-
-struct cipher_tfm {
-        void *cit_iv;
-        unsigned int cit_ivsize;
-        __u32 cit_mode;
-        int (*cit_setkey)(struct crypto_tfm *tfm,
-                          const __u8 *key, unsigned int keylen);
-        int (*cit_encrypt)(struct crypto_tfm *tfm,
-                           struct scatterlist *dst,
-                           struct scatterlist *src,
-                           unsigned int nbytes);
-        int (*cit_encrypt_iv)(struct crypto_tfm *tfm,
-                              struct scatterlist *dst,
-                              struct scatterlist *src,
-                              unsigned int nbytes, __u8 *iv);
-        int (*cit_decrypt)(struct crypto_tfm *tfm,
-                           struct scatterlist *dst,
-                           struct scatterlist *src,
-                           unsigned int nbytes);
-        int (*cit_decrypt_iv)(struct crypto_tfm *tfm,
-                           struct scatterlist *dst,
-                           struct scatterlist *src,
-                           unsigned int nbytes, __u8 *iv);
-        void (*cit_xor_block)(__u8 *dst, const __u8 *src);
-};
-
-struct digest_tfm {
-        void (*dit_init)(struct crypto_tfm *tfm);
-        void (*dit_update)(struct crypto_tfm *tfm,
-                           struct scatterlist *sg, unsigned int nsg);
-        void (*dit_update_kernel)(struct crypto_tfm *tfm,
-                                  const void *data, size_t count);
-        void (*dit_final)(struct crypto_tfm *tfm, __u8 *out);
-        void (*dit_digest)(struct crypto_tfm *tfm, struct scatterlist *sg,
-                           unsigned int nsg, __u8 *out);
-        int (*dit_setkey)(struct crypto_tfm *tfm,
-                          const __u8 *key, unsigned int keylen);
-#ifdef CONFIG_CRYPTO_HMAC
-        void *dit_hmac_block;
-#endif
-};
-
-struct compress_tfm {
-        int (*cot_compress)(struct crypto_tfm *tfm,
-                            const __u8 *src, unsigned int slen,
-                            __u8 *dst, unsigned int *dlen);
-        int (*cot_decompress)(struct crypto_tfm *tfm,
-                              const __u8 *src, unsigned int slen,
-                              __u8 *dst, unsigned int *dlen);
-};
-
-struct crypto_tfm {
-
-        __u32 crt_flags;
-
-        union {
-                struct cipher_tfm cipher;
-                struct digest_tfm digest;
-                struct compress_tfm compress;
-        } crt_u;
-
-        struct crypto_alg *__crt_alg;
-};
-
 /* use the macro's argument to avoid unused warnings */
 #define down(a) do { (void)a; } while (0)
 #define up(a) do { (void)a; } while (0)
 /* use the macro's argument to avoid unused warnings */
 #define down(a) do { (void)a; } while (0)
 #define up(a) do { (void)a; } while (0)
@@ -673,25 +541,16 @@ struct crypto_tfm {
 #define up_write(a) do { (void)a; } while (0)
 #define sema_init(a,b) do { (void)a; } while (0)
 #define init_rwsem(a) do { (void)a; } while (0)
 #define up_write(a) do { (void)a; } while (0)
 #define sema_init(a,b) do { (void)a; } while (0)
 #define init_rwsem(a) do { (void)a; } while (0)
-
 #define DECLARE_MUTEX(name)     \
         struct semaphore name = { 1 }
 #define DECLARE_MUTEX(name)     \
         struct semaphore name = { 1 }
-
 static inline void init_MUTEX (struct semaphore *sem)
 {
         sema_init(sem, 1);
 }
 
 static inline void init_MUTEX (struct semaphore *sem)
 {
         sema_init(sem, 1);
 }
 
-struct rpc_pipe_msg {
-        struct list_head list;
-        void *data;
-        size_t len;
-        size_t copied;
-        int error;
-};
 
 typedef struct  {
 
 typedef struct  {
-        struct list_head task_list;
+        struct list_head sleepers;
 } wait_queue_head_t;
 
 typedef struct  {
 } wait_queue_head_t;
 
 typedef struct  {
@@ -721,7 +580,6 @@ struct task_struct {
         int ngroups;
         gid_t *groups;
         __u32 cap_effective;
         int ngroups;
         gid_t *groups;
         __u32 cap_effective;
-        __u32 pag;
 
         struct fs_struct __fs;
 };
 
         struct fs_struct __fs;
 };
@@ -739,15 +597,15 @@ static inline int capable(int cap)
 #define set_current_state(foo) do { current->state = foo; } while (0)
 
 #define init_waitqueue_entry(q,p) do { (q)->process = p; } while (0)
 #define set_current_state(foo) do { current->state = foo; } while (0)
 
 #define init_waitqueue_entry(q,p) do { (q)->process = p; } while (0)
-#define add_wait_queue(q,p) do {  list_add(&(q)->task_list, &(p)->sleeping); } while (0)
+#define add_wait_queue(q,p) do {  list_add(&(q)->sleepers, &(p)->sleeping); } while (0)
 #define del_wait_queue(p) do { list_del(&(p)->sleeping); } while (0)
 #define remove_wait_queue(q,p) do { list_del(&(p)->sleeping); } while (0)
 
 #define DECLARE_WAIT_QUEUE_HEAD(HEAD)                           \
         wait_queue_head_t HEAD = {                              \
 #define del_wait_queue(p) do { list_del(&(p)->sleeping); } while (0)
 #define remove_wait_queue(q,p) do { list_del(&(p)->sleeping); } while (0)
 
 #define DECLARE_WAIT_QUEUE_HEAD(HEAD)                           \
         wait_queue_head_t HEAD = {                              \
-                .task_list = LIST_HEAD_INIT(HEAD.task_list)       \
+                .sleepers = LIST_HEAD_INIT(HEAD.sleepers)       \
         }
         }
-#define init_waitqueue_head(l) INIT_LIST_HEAD(&(l)->task_list)
+#define init_waitqueue_head(l) INIT_LIST_HEAD(&(l)->sleepers)
 #define wake_up(l) do { int a; a++; } while (0)
 #define TASK_INTERRUPTIBLE 0
 #define TASK_UNINTERRUPTIBLE 1
 #define wake_up(l) do { int a; a++; } while (0)
 #define TASK_INTERRUPTIBLE 0
 #define TASK_UNINTERRUPTIBLE 1
@@ -844,7 +702,6 @@ typedef struct { volatile int counter; } atomic_t;
 #define atomic_read(a) ((a)->counter)
 #define atomic_set(a,b) do {(a)->counter = b; } while (0)
 #define atomic_dec_and_test(a) ((--((a)->counter)) == 0)
 #define atomic_read(a) ((a)->counter)
 #define atomic_set(a,b) do {(a)->counter = b; } while (0)
 #define atomic_dec_and_test(a) ((--((a)->counter)) == 0)
-#define atomic_dec_and_lock(a, l) atomic_dec_and_test(a)
 #define atomic_inc(a)  (((a)->counter)++)
 #define atomic_dec(a)  do { (a)->counter--; } while (0)
 #define atomic_add(b,a)  do {(a)->counter += b;} while (0)
 #define atomic_inc(a)  (((a)->counter)++)
 #define atomic_dec(a)  do { (a)->counter--; } while (0)
 #define atomic_add(b,a)  do {(a)->counter += b;} while (0)
@@ -892,6 +749,14 @@ static inline int llog_cleanup_commit_master(int force) { return 0; }
 static inline void portals_run_lbug_upcall(char *file, const char *fn,
                                            const int l){}
 
 static inline void portals_run_lbug_upcall(char *file, const char *fn,
                                            const int l){}
 
+#define LBUG()                                                          \
+        do {                                                            \
+                printf("!!!LBUG at %s:%d\n", __FILE__, __LINE__);       \
+                sleep(1000000);                                         \
+        } while (0)
+
+
+
 /* completion */
 struct completion {
         unsigned int done;
 /* completion */
 struct completion {
         unsigned int done;
index b78582f..2ee7cd0 100644 (file)
@@ -1288,6 +1288,7 @@ typedef enum {
         GKS_GET_MAC      = 704,
 } gks_cmd_t;
 
         GKS_GET_MAC      = 704,
 } gks_cmd_t;
 
+#ifdef __KERNEL__
 #define KEY_SIZE        16 
 #define MAC_SIZE        16 
 
 #define KEY_SIZE        16 
 #define MAC_SIZE        16 
 
@@ -1297,14 +1298,6 @@ struct crypto_key {
         __u32   ck_type;
 };
 
         __u32   ck_type;
 };
 
-#ifndef __KERNEL__
-struct posix_acl_entry {
-        short           e_tag;
-        unsigned short  e_perm;
-        unsigned int    e_id;
-};
-#endif
-
 struct key_perm {
         uid_t    kp_uid;       
         gid_t    kp_gid;
 struct key_perm {
         uid_t    kp_uid;       
         gid_t    kp_gid;
@@ -1319,11 +1312,11 @@ struct key_context {
         __u32  kc_valid;
         struct key_perm kc_perm;
 }; 
         __u32  kc_valid;
         struct key_perm kc_perm;
 }; 
-typedef int (*crypt_cb_t)(struct page *page, __u64 offset,
-                          __u64 count, int flags);
-
+typedef int (*crypt_cb_t)(struct page *page, __u64 offset, __u64 count, 
+                          int flags);
 extern void lustre_swab_key_context (struct key_context *kctxt);
 extern void lustre_swab_key_perms (struct key_perm *kperm);
 extern void lustre_swab_key_context (struct key_context *kctxt);
 extern void lustre_swab_key_perms (struct key_perm *kperm);
+#endif /*for define __KERNEL*/
 
 extern void lustre_swab_lustre_id(struct lustre_id *id);
 extern void lustre_swab_lov_desc(struct lov_desc *desc);
 
 extern void lustre_swab_lustre_id(struct lustre_id *id);
 extern void lustre_swab_lov_desc(struct lov_desc *desc);
index cafae26..22bcffa 100644 (file)
@@ -128,6 +128,8 @@ __u32 ptlrpcs_name2flavor(const char *name);
 char *ptlrpcs_flavor2name(__u32 flavor);
 
 
 char *ptlrpcs_flavor2name(__u32 flavor);
 
 
+#ifdef __KERNEL__
+
 /* forward declaration */
 struct obd_import;
 struct ptlrpc_request;
 /* forward declaration */
 struct obd_import;
 struct ptlrpc_request;
@@ -136,6 +138,7 @@ struct ptlrpc_credops;
 struct ptlrpc_sec;
 struct ptlrpc_secops;
 
 struct ptlrpc_sec;
 struct ptlrpc_secops;
 
+
 typedef struct {
         struct list_head        list;
         __u32                   flavor;
 typedef struct {
         struct list_head        list;
         __u32                   flavor;
@@ -503,9 +506,7 @@ int svcsec_null_init(void);
 int svcsec_null_exit(void);
 
 /* capability */
 int svcsec_null_exit(void);
 
 /* capability */
-#ifdef __KERNEL__
 #include <linux/crypto.h>
 #include <linux/crypto.h>
-#endif
 
 #define NR_CAPAHASH 32
 #define CAPA_TIMEOUT 1800                /* sec, == 30 min */
 
 #define NR_CAPAHASH 32
 #define CAPA_TIMEOUT 1800                /* sec, == 30 min */
@@ -577,7 +578,7 @@ struct obd_capa *capa_get(uid_t uid, int capa_op, __u64 mdsid,
                           struct lustre_handle *handle);
 void capa_put(struct obd_capa *ocapa, int type);
 int capa_renew(struct lustre_capa *capa, int type);
                           struct lustre_handle *handle);
 void capa_put(struct obd_capa *ocapa, int type);
 int capa_renew(struct lustre_capa *capa, int type);
-void capa_hmac(struct crypto_tfm *tfm, __u8 *key, struct lustre_capa *capa);
+void capa_hmac(struct crypto_tfm *tfm, u8 *key, struct lustre_capa *capa);
 void capa_dup(void *dst, struct obd_capa *ocapa);
 void capa_dup2(void *dst, struct lustre_capa *capa);
 int capa_expired(struct lustre_capa *capa);
 void capa_dup(void *dst, struct obd_capa *ocapa);
 void capa_dup2(void *dst, struct lustre_capa *capa);
 int capa_expired(struct lustre_capa *capa);
@@ -631,6 +632,8 @@ expiry_to_jiffies(__u64 expiry)
         return jiffies + ((unsigned long)expiry - tv.tv_sec) * HZ;
 }
 
         return jiffies + ((unsigned long)expiry - tv.tv_sec) * HZ;
 }
 
+#endif /* __KERNEL__ */
+
 struct mds_capa_key {
         struct list_head        k_list;
 
 struct mds_capa_key {
         struct list_head        k_list;
 
@@ -640,6 +643,7 @@ struct mds_capa_key {
 
 struct filter_capa_key {
         struct list_head        k_list;
 
 struct filter_capa_key {
         struct list_head        k_list;
+
         struct lustre_capa_key  k_key;
 };
 
         struct lustre_capa_key  k_key;
 };
 
index 0fc302f..4c3c8e1 100644 (file)
 #include <linux/namei.h>
 #include <linux/lustre_compat25.h>
 #include <linux/lvfs_linux.h>
 #include <linux/namei.h>
 #include <linux/lustre_compat25.h>
 #include <linux/lvfs_linux.h>
-#else
-#include <liblustre.h>
+#endif
+
+#ifdef LIBLUSTRE
+#include <lvfs_user_fs.h>
 #endif
 
 struct mds_grp_hash_entry;
 #endif
 
 struct mds_grp_hash_entry;
index 1563798..b2fa8f4 100644 (file)
@@ -408,9 +408,8 @@ static void llu_truncate(struct inode *inode)
                oa.o_id, lli->lli_st_size);
 
         /* truncate == punch from new size to absolute end of file */
                oa.o_id, lli->lli_st_size);
 
         /* truncate == punch from new size to absolute end of file */
-        /* XXX: capa is NULL here, is it correct? */
         err = obd_punch(llu_i2dtexp(inode), &oa, lsm, lli->lli_st_size,
         err = obd_punch(llu_i2dtexp(inode), &oa, lsm, lli->lli_st_size,
-                        OBD_OBJECT_EOF, NULL, NULL);
+                        OBD_OBJECT_EOF, NULL);
         if (err)
                 CERROR("obd_truncate fails (%d) ino %lu\n", err, lli->lli_st_ino);
         else
         if (err)
                 CERROR("obd_truncate fails (%d) ino %lu\n", err, lli->lli_st_ino);
         else
index c60cd66..f5c489e 100755 (executable)
@@ -53,7 +53,7 @@ build_sysio_obj_list() {
   _objs=`$AR -t $1`
   mkdir -p $sysio_tmp
   cd $sysio_tmp
   _objs=`$AR -t $1`
   mkdir -p $sysio_tmp
   cd $sysio_tmp
-  $AR -x $1
+  $AR -x ../$1
   cd ..
   for _lib in $_objs; do
     ALL_OBJS=$ALL_OBJS"$sysio_tmp/$_lib ";
   cd ..
   for _lib in $_objs; do
     ALL_OBJS=$ALL_OBJS"$sysio_tmp/$_lib ";
index d1528e6..c4b00a5 100644 (file)
@@ -124,16 +124,16 @@ int liblustre_process_log(struct config_llog_instance *cfg, int allow_recov)
         lcfg = lustre_cfg_new(LCFG_ADD_UUID, &bufs);
         lcfg->lcfg_nid = nid;
         lcfg->lcfg_nal = nal;
         lcfg = lustre_cfg_new(LCFG_ADD_UUID, &bufs);
         lcfg->lcfg_nid = nid;
         lcfg->lcfg_nal = nal;
-        err = class_process_config(lcfg);
+        err = class_process_config(&lcfg);
         lustre_cfg_free(lcfg);
         if (err < 0)
                 GOTO(out, err);
 
         lustre_cfg_bufs_reset(&bufs, name);
         lustre_cfg_free(lcfg);
         if (err < 0)
                 GOTO(out, err);
 
         lustre_cfg_bufs_reset(&bufs, name);
-        lustre_cfg_bufs_set_string(&bufs, 1, OBD_MDC_DEVICENAME);
+        lustre_cfg_bufs_set_string(&bufs, 1, LUSTRE_MDC_NAME);
         lustre_cfg_bufs_set_string(&bufs, 2, mdc_uuid.uuid);
         lcfg = lustre_cfg_new(LCFG_ATTACH, &bufs);
         lustre_cfg_bufs_set_string(&bufs, 2, mdc_uuid.uuid);
         lcfg = lustre_cfg_new(LCFG_ATTACH, &bufs);
-        err = class_process_config(lcfg);
+        err = class_process_config(&lcfg);
         lustre_cfg_free(lcfg);
         if (err < 0)
                 GOTO(out_del_uuid, err);
         lustre_cfg_free(lcfg);
         if (err < 0)
                 GOTO(out_del_uuid, err);
@@ -142,7 +142,7 @@ int liblustre_process_log(struct config_llog_instance *cfg, int allow_recov)
         lustre_cfg_bufs_set_string(&bufs, 1, g_zconf_mdsname);
         lustre_cfg_bufs_set_string(&bufs, 2, peer);
         lcfg = lustre_cfg_new(LCFG_SETUP, &bufs);
         lustre_cfg_bufs_set_string(&bufs, 1, g_zconf_mdsname);
         lustre_cfg_bufs_set_string(&bufs, 2, peer);
         lcfg = lustre_cfg_new(LCFG_SETUP, &bufs);
-        err = class_process_config(lcfg);
+        err = class_process_config(&lcfg);
         lustre_cfg_free(lcfg);
         if (err < 0)
                 GOTO(out_detach, err);
         lustre_cfg_free(lcfg);
         if (err < 0)
                 GOTO(out_detach, err);
@@ -175,7 +175,7 @@ int liblustre_process_log(struct config_llog_instance *cfg, int allow_recov)
 out_cleanup:
         lustre_cfg_bufs_reset(&bufs, name);
         lcfg = lustre_cfg_new(LCFG_CLEANUP, &bufs);
 out_cleanup:
         lustre_cfg_bufs_reset(&bufs, name);
         lcfg = lustre_cfg_new(LCFG_CLEANUP, &bufs);
-        err = class_process_config(lcfg);
+        err = class_process_config(&lcfg);
         lustre_cfg_free(lcfg);
         if (err < 0)
                 GOTO(out, err);
         lustre_cfg_free(lcfg);
         if (err < 0)
                 GOTO(out, err);
@@ -183,7 +183,7 @@ out_cleanup:
 out_detach:
         lustre_cfg_bufs_reset(&bufs, name);
         lcfg = lustre_cfg_new(LCFG_DETACH, &bufs);
 out_detach:
         lustre_cfg_bufs_reset(&bufs, name);
         lcfg = lustre_cfg_new(LCFG_DETACH, &bufs);
-        err = class_process_config(lcfg);
+        err = class_process_config(&lcfg);
         lustre_cfg_free(lcfg);
         if (err < 0)
                 GOTO(out, err);
         lustre_cfg_free(lcfg);
         if (err < 0)
                 GOTO(out, err);
index 02abb60..92d9444 100644 (file)
@@ -385,8 +385,7 @@ static int lookup_it_finish(struct ptlrpc_request *request, int offset,
 struct inode *llu_inode_from_lock(struct ldlm_lock *lock)
 {
         struct inode *inode;
 struct inode *llu_inode_from_lock(struct ldlm_lock *lock)
 {
         struct inode *inode;
-#warning "fix l_lock() using here!"
-//        l_lock(&lock->l_resource->lr_namespace->ns_lock);
+        l_lock(&lock->l_resource->lr_namespace->ns_lock);
 
         if (lock->l_ast_data) {
                 inode = (struct inode *)lock->l_ast_data;
 
         if (lock->l_ast_data) {
                 inode = (struct inode *)lock->l_ast_data;
@@ -394,7 +393,7 @@ struct inode *llu_inode_from_lock(struct ldlm_lock *lock)
         } else
                 inode = NULL;
 
         } else
                 inode = NULL;
 
-//        l_unlock(&lock->l_resource->lr_namespace->ns_lock);
+        l_unlock(&lock->l_resource->lr_namespace->ns_lock);
         return inode;
 }
 
         return inode;
 }
 
index 543be8a..c6f4bd0 100644 (file)
@@ -147,11 +147,10 @@ static int llu_extent_lock_callback(struct ldlm_lock *lock,
                 lsm = lli->lli_smd;
 
                 stripe = llu_lock_to_stripe_offset(inode, lock);
                 lsm = lli->lli_smd;
 
                 stripe = llu_lock_to_stripe_offset(inode, lock);
-#warning "fix l_lock() using here!"
-//                l_lock(&lock->l_resource->lr_namespace->ns_lock);
+                l_lock(&lock->l_resource->lr_namespace->ns_lock);
                 kms = ldlm_extent_shift_kms(lock,
                                             lsm->lsm_oinfo[stripe].loi_kms);
                 kms = ldlm_extent_shift_kms(lock,
                                             lsm->lsm_oinfo[stripe].loi_kms);
-//                l_unlock(&lock->l_resource->lr_namespace->ns_lock);
+                l_unlock(&lock->l_resource->lr_namespace->ns_lock);
                 if (lsm->lsm_oinfo[stripe].loi_kms != kms)
                         LDLM_DEBUG(lock, "updating kms from "LPU64" to "LPU64,
                                    lsm->lsm_oinfo[stripe].loi_kms, kms);
                 if (lsm->lsm_oinfo[stripe].loi_kms != kms)
                         LDLM_DEBUG(lock, "updating kms from "LPU64" to "LPU64,
                                    lsm->lsm_oinfo[stripe].loi_kms, kms);
index 3ac318b..111f038 100644 (file)
@@ -106,13 +106,13 @@ static void llu_fsop_gone(struct filesys *fs)
         
                 lustre_cfg_bufs_reset(&bufs, obd->obd_name);
                 lcfg = lustre_cfg_new(LCFG_CLEANUP, &bufs);
         
                 lustre_cfg_bufs_reset(&bufs, obd->obd_name);
                 lcfg = lustre_cfg_new(LCFG_CLEANUP, &bufs);
-                err = class_process_config(lcfg);
+                err = class_process_config(&lcfg);
                 if (err) {
                         CERROR("cleanup failed: %s\n", obd->obd_name);
                 }
                 
                 lcfg->lcfg_command = LCFG_DETACH; 
                 if (err) {
                         CERROR("cleanup failed: %s\n", obd->obd_name);
                 }
                 
                 lcfg->lcfg_command = LCFG_DETACH; 
-                err = class_process_config(lcfg);
+                err = class_process_config(&lcfg);
                 lustre_cfg_free(lcfg);
                 if (err) {
                         CERROR("detach failed: %s\n", obd->obd_name);
                 lustre_cfg_free(lcfg);
                 if (err) {
                         CERROR("detach failed: %s\n", obd->obd_name);
@@ -346,11 +346,10 @@ int llu_inode_getattr(struct inode *inode, struct lov_stripe_md *lsm)
         RETURN(0);
 }
 
         RETURN(0);
 }
 
-static struct inode *llu_new_inode(struct filesys *fs,
+static struct inodellu_new_inode(struct filesys *fs,
                                    struct lustre_id *id)
 {
        struct inode *inode;
                                    struct lustre_id *id)
 {
        struct inode *inode;
-        struct intnl_stat stat;
         struct llu_inode_info *lli;
 
         OBD_ALLOC(lli, sizeof(*lli));
         struct llu_inode_info *lli;
 
         OBD_ALLOC(lli, sizeof(*lli));
@@ -370,13 +369,15 @@ static struct inode *llu_new_inode(struct filesys *fs,
 
         memcpy(&lli->lli_id, id, sizeof(*id));
 
 
         memcpy(&lli->lli_id, id, sizeof(*id));
 
-#warning "fill @stat by desired attributes of new inode before using_sysio_i_new()"
-        memset(&stat, 0, sizeof(stat));
-        stat.st_ino = id_ino(id);
-        
         /* file identifier is needed by functions like _sysio_i_find() */
        inode = _sysio_i_new(fs, &lli->lli_sysio_fid,
         /* file identifier is needed by functions like _sysio_i_find() */
        inode = _sysio_i_new(fs, &lli->lli_sysio_fid,
-                             &stat, 0, &llu_inode_ops, lli);
+#ifndef AUTOMOUNT_FILE_NAME
+                            id->li_stc.u.e3s.l3s_type & S_IFMT,
+#else
+                            id->li_stc.u.e3s.l3s_type, /* all of the bits! */
+#endif
+                             0, 0,
+                            &llu_inode_ops, lli);
 
        if (!inode)
                OBD_FREE(lli, sizeof(*lli));
 
        if (!inode)
                OBD_FREE(lli, sizeof(*lli));
@@ -445,10 +446,8 @@ static int llu_inode_revalidate(struct inode *inode)
                         valid |= OBD_MD_FLEASIZE;
                 }
                 ll_inode2id(&id, inode);
                         valid |= OBD_MD_FLEASIZE;
                 }
                 ll_inode2id(&id, inode);
-
-                /* XXX: capa is NULL here, is it correct? */
-                rc = mdc_getattr(sbi->ll_md_exp, &id, valid, NULL, NULL,
-                                 0, ealen, NULL, &req);
+                rc = mdc_getattr(sbi->ll_md_exp, &id, valid, NULL, 0,
+                                 NULL, ealen, &req);
                 if (rc) {
                         CERROR("failure %d inode %lu\n", rc, lli->lli_st_ino);
                         RETURN(-abs(rc));
                 if (rc) {
                         CERROR("failure %d inode %lu\n", rc, lli->lli_st_ino);
                         RETURN(-abs(rc));
@@ -490,9 +489,10 @@ static int llu_inode_revalidate(struct inode *inode)
         RETURN(llu_glimpse_size(inode));
 }
 
         RETURN(llu_glimpse_size(inode));
 }
 
-static void copy_stat_buf_lli(struct llu_inode_info *lli,
-                              struct intnl_stat *b)
+static void copy_stat_buf(struct inode *ino, struct intnl_stat *b)
 {
 {
+        struct llu_inode_info *lli = llu_i2info(ino);
+
         b->st_dev = lli->lli_st_dev;
         b->st_ino = lli->lli_st_ino;
         b->st_mode = lli->lli_st_mode;
         b->st_dev = lli->lli_st_dev;
         b->st_ino = lli->lli_st_ino;
         b->st_mode = lli->lli_st_mode;
@@ -508,12 +508,6 @@ static void copy_stat_buf_lli(struct llu_inode_info *lli,
         b->st_ctime = lli->lli_st_ctime;
 }
 
         b->st_ctime = lli->lli_st_ctime;
 }
 
-static void copy_stat_buf(struct inode *ino, struct intnl_stat *b)
-{
-        struct llu_inode_info *lli = llu_i2info(ino);
-        copy_stat_buf_lli(lli, b);
-}
-
 static int llu_iop_getattr(struct pnode *pno,
                            struct inode *ino,
                            struct intnl_stat *b)
 static int llu_iop_getattr(struct pnode *pno,
                            struct inode *ino,
                            struct intnl_stat *b)
@@ -696,7 +690,7 @@ int llu_setattr_raw(struct inode *inode, struct iattr *attr)
                 llu_prepare_mdc_data(&op_data, inode, NULL, NULL, 0, 0);
 
                 rc = mdc_setattr(sbi->ll_md_exp, &op_data,
                 llu_prepare_mdc_data(&op_data, inode, NULL, NULL, 0, 0);
 
                 rc = mdc_setattr(sbi->ll_md_exp, &op_data,
-                                 attr, NULL, 0, NULL, 0, NULL, 0, &request);
+                                 attr, NULL, 0, NULL, 0, &request);
                 
                 if (rc) {
                         ptlrpc_req_finished(request);
                 
                 if (rc) {
                         ptlrpc_req_finished(request);
@@ -883,10 +877,8 @@ static int llu_readlink_internal(struct inode *inode,
         }
 
         ll_inode2id(&id, inode);
         }
 
         ll_inode2id(&id, inode);
-
-        /* XXX: capa is NULL here, is it correct? */
-        rc = mdc_getattr(sbi->ll_md_exp, &id, OBD_MD_LINKNAME, NULL, 0,
-                         0, symlen, NULL, request);
+        rc = mdc_getattr(sbi->ll_md_exp, &id,
+                         OBD_MD_LINKNAME, NULL, 0, NULL, symlen, request);
         if (rc) {
                 CERROR("inode %lu: rc = %d\n", lli->lli_st_ino, rc);
                 RETURN(rc);
         if (rc) {
                 CERROR("inode %lu: rc = %d\n", lli->lli_st_ino, rc);
                 RETURN(rc);
@@ -1538,10 +1530,10 @@ llu_fsswop_mount(const char *source,
         CDEBUG(D_SUPER, "rootid "LPU64"\n", rootid.li_stc.u.e3s.l3s_ino);
         sbi->ll_rootino = rootid.li_stc.u.e3s.l3s_ino;
 
         CDEBUG(D_SUPER, "rootid "LPU64"\n", rootid.li_stc.u.e3s.l3s_ino);
         sbi->ll_rootino = rootid.li_stc.u.e3s.l3s_ino;
 
-        /* XXX: capa is NULL here, is it correct? */
+        /* fetch attr of root inode */
         err = mdc_getattr(sbi->ll_md_exp, &rootid,
         err = mdc_getattr(sbi->ll_md_exp, &rootid,
-                          (OBD_MD_FLNOTOBD | OBD_MD_FLBLOCKS), NULL, 0,
-                          0, 0, NULL, &request);
+                          OBD_MD_FLNOTOBD|OBD_MD_FLBLOCKS, NULL, 0,
+                          NULL, 0, &request);
         if (err) {
                 CERROR("mdc_getattr failed for root: rc = %d\n", err);
                 GOTO(out_lov, err);
         if (err) {
                 CERROR("mdc_getattr failed for root: rc = %d\n", err);
                 GOTO(out_lov, err);
index 4bebb59..40ae02a 100644 (file)
@@ -196,7 +196,7 @@ void ll_capa_stop_thread(void)
 }
 
 int ll_set_och_capa(struct inode *inode, struct lookup_intent *it,
 }
 
 int ll_set_och_capa(struct inode *inode, struct lookup_intent *it,
-                   struct obd_client_handle *och)
+                           struct obd_client_handle *och)
 {
         struct ptlrpc_request *req = LUSTRE_IT(it)->it_data;
         struct ll_inode_info *lli = ll_i2info(inode);
 {
         struct ptlrpc_request *req = LUSTRE_IT(it)->it_data;
         struct ll_inode_info *lli = ll_i2info(inode);
index 18d4311..8d2cb21 100644 (file)
@@ -28,7 +28,6 @@
 
 #define DEBUG_SUBSYSTEM S_SEC
 
 
 #define DEBUG_SUBSYSTEM S_SEC
 
-#ifdef __KERNEL__
 #include <linux/version.h>
 #include <linux/fs.h>
 #include <asm/unistd.h>
 #include <linux/version.h>
 #include <linux/fs.h>
 #include <asm/unistd.h>
 #include <linux/lustre_debug.h>
 #include <linux/lustre_idl.h>
 #include <linux/lustre_sec.h>
 #include <linux/lustre_debug.h>
 #include <linux/lustre_idl.h>
 #include <linux/lustre_sec.h>
-#else
-#include <liblustre.h>
-#endif
-
 #include <libcfs/list.h>
 #include <libcfs/list.h>
-#include <linux/lustre_sec.h>
 
 kmem_cache_t *capa_cachep = NULL;
 
 
 kmem_cache_t *capa_cachep = NULL;
 
@@ -153,19 +147,20 @@ static void destroy_capa(struct obd_capa *ocapa)
 
 int capa_cache_init(void)
 {
 
 int capa_cache_init(void)
 {
-        int nr_hash, i;
+        int order = 0, nr_hash, i;
 
 
-        OBD_ALLOC(capa_hash, PAGE_SIZE);
+        capa_hash = (struct hlist_head *)
+                                __get_free_pages(GFP_ATOMIC, order);
         if (!capa_hash)
         if (!capa_hash)
-                return -ENOMEM;
+                panic("Cannot create capa_hash hash table");
 
 
-        nr_hash = PAGE_SIZE / sizeof(struct hlist_head);
+        nr_hash = (1UL << order) * PAGE_SIZE / sizeof(struct hlist_head);
         LASSERT(nr_hash > NR_CAPAHASH);
 
         for (i = 0; i < NR_CAPAHASH; i++)
                 INIT_HLIST_HEAD(capa_hash + i);
 
         LASSERT(nr_hash > NR_CAPAHASH);
 
         for (i = 0; i < NR_CAPAHASH; i++)
                 INIT_HLIST_HEAD(capa_hash + i);
 
-        for (i = 0; i < 3; i++)
+        for (i =0; i < 3; i++)
                 INIT_LIST_HEAD(&capa_list[i]);
 
         return 0;
                 INIT_LIST_HEAD(&capa_list[i]);
 
         return 0;
@@ -229,9 +224,7 @@ get_new_capa_locked(struct hlist_head *head, uid_t uid, int capa_op,__u64 mdsid,
                 ocapa->c_type = type;
                 if (type == CLIENT_CAPA) {
                         LASSERT(inode);
                 ocapa->c_type = type;
                 if (type == CLIENT_CAPA) {
                         LASSERT(inode);
-#ifdef __KERNEL__
                         igrab(inode);
                         igrab(inode);
-#endif
                         ocapa->c_inode = inode;
                         memcpy(&ocapa->c_handle, handle, sizeof(*handle));
                 }
                         ocapa->c_inode = inode;
                         memcpy(&ocapa->c_handle, handle, sizeof(*handle));
                 }
@@ -311,9 +304,7 @@ void capa_put(struct obd_capa *ocapa, int type)
         if (ocapa) {
                 if (atomic_dec_and_lock(&ocapa->c_refc, &capa_lock)) {
                         if (type == CLIENT_CAPA) {
         if (ocapa) {
                 if (atomic_dec_and_lock(&ocapa->c_refc, &capa_lock)) {
                         if (type == CLIENT_CAPA) {
-#ifdef __KERNEL__
                                 iput(ocapa->c_inode);
                                 iput(ocapa->c_inode);
-#endif
                                 __capa_put(ocapa, type);
                                 destroy_capa(ocapa);
                         }
                                 __capa_put(ocapa, type);
                                 destroy_capa(ocapa);
                         }
@@ -358,7 +349,7 @@ int capa_renew(struct lustre_capa *capa, int type)
         return update_capa_locked(capa, type);
 }
 
         return update_capa_locked(capa, type);
 }
 
-void capa_hmac(struct crypto_tfm *tfm, __u8 *key, struct lustre_capa *capa)
+void capa_hmac(struct crypto_tfm *tfm, u8 *key, struct lustre_capa *capa)
 {
         int keylen = CAPA_KEY_LEN;
         struct scatterlist sl = {
 {
         int keylen = CAPA_KEY_LEN;
         struct scatterlist sl = {
index 00aeb83..aeae7d0 100644 (file)
@@ -778,8 +778,8 @@ static int osc_brw_prep_request(int cmd, struct obd_import *imp,struct obdo *oa,
         struct client_obd       *cli = &imp->imp_obd->u.cli;
         struct ost_body         *body;
         struct lustre_id        *raw_id = obdo_id(oa);
         struct client_obd       *cli = &imp->imp_obd->u.cli;
         struct ost_body         *body;
         struct lustre_id        *raw_id = obdo_id(oa);
-        struct obd_capa         *ocapa = NULL;
-        struct lustre_capa      *capa = NULL;
+        struct obd_capa         *ocapa;
+        struct lustre_capa      *capa;
         struct obd_ioobj        *ioobj;
         struct niobuf_remote    *niobuf;
         int                      niocount;
         struct obd_ioobj        *ioobj;
         struct niobuf_remote    *niobuf;
         int                      niocount;
index 5fc436a..f319244 100644 (file)
@@ -36,6 +36,8 @@
 #include <linux/lustre_sec.h>
 #include <linux/lustre_audit.h>
 #include <linux/fcntl.h>
 #include <linux/lustre_sec.h>
 #include <linux/lustre_audit.h>
 #include <linux/fcntl.h>
+#include <linux/posix_acl.h>
+
 
 #define HDR_SIZE(count) \
     size_round(offsetof (struct lustre_msg, buflens[(count)]))
 
 #define HDR_SIZE(count) \
     size_round(offsetof (struct lustre_msg, buflens[(count)]))
@@ -964,7 +966,6 @@ int llog_log_swabbed(struct llog_log_hdr *hdr)
 void lustre_assert_wire_constants(void)
 {
 }
 void lustre_assert_wire_constants(void)
 {
 }
-
 /* for gks key rec */
 void lustre_swab_key_perms(struct key_perm *kperm)
 {
 /* for gks key rec */
 void lustre_swab_key_perms(struct key_perm *kperm)
 {
@@ -979,10 +980,9 @@ void lustre_swab_key_perms(struct key_perm *kperm)
                 __swab32s(&kperm->kp_acls[i].e_id); 
         }  
 }
                 __swab32s(&kperm->kp_acls[i].e_id); 
         }  
 }
-
 void lustre_swab_key_context (struct key_context *kctxt)
 {
 void lustre_swab_key_context (struct key_context *kctxt)
 {
-        __swab32s(&kctxt->kc_command);
-        __swab32s(&kctxt->kc_valid); /* for use with open */
+        __swab32s (&kctxt->kc_command);
+        __swab32s (&kctxt->kc_valid); /* for use with open */
         lustre_swab_key_perms(&kctxt->kc_perm);
 }
         lustre_swab_key_perms(&kctxt->kc_perm);
 }
index d1e0521..eadb6e4 100644 (file)
 #define CRYPTO_UNSPEC                  0
 #define CRYPTO_MAX_ALG_NAME            64
 
 #define CRYPTO_UNSPEC                  0
 #define CRYPTO_MAX_ALG_NAME            64
 
+struct scatterlist {
+    struct page                *page;
+    unsigned int       offset;
+    __u32              dma_address;
+    unsigned int       length;
+};
+
 static inline struct crypto_tfm *
 crypto_alloc_tfm(const char *name, __u32 flags)
 {
 static inline struct crypto_tfm *
 crypto_alloc_tfm(const char *name, __u32 flags)
 {
index b11872f..a2e6a83 100644 (file)
@@ -384,12 +384,18 @@ out_copy:
 struct gss_sec {
         struct ptlrpc_sec       gs_base;
         struct gss_api_mech    *gs_mech;
 struct gss_sec {
         struct ptlrpc_sec       gs_base;
         struct gss_api_mech    *gs_mech;
+#ifdef __KERNEL__
         spinlock_t              gs_lock;
         struct list_head        gs_upcalls;
         char                   *gs_pipepath;
         struct dentry          *gs_depipe;
         spinlock_t              gs_lock;
         struct list_head        gs_upcalls;
         char                   *gs_pipepath;
         struct dentry          *gs_depipe;
+#endif
 };
 
 };
 
+#ifdef __KERNEL__
+
+static rwlock_t gss_ctx_lock = RW_LOCK_UNLOCKED;
+
 struct gss_upcall_msg_data {
         __u64                           gum_pag;
         __u32                           gum_uid;
 struct gss_upcall_msg_data {
         __u64                           gum_pag;
         __u32                           gum_uid;
@@ -409,8 +415,6 @@ struct gss_upcall_msg {
         struct gss_upcall_msg_data      gum_data;
 };
 
         struct gss_upcall_msg_data      gum_data;
 };
 
-#ifdef __KERNEL__
-static rwlock_t gss_ctx_lock = RW_LOCK_UNLOCKED;
 /**********************************************
  * rpc_pipe upcall helpers                    *
  **********************************************/
 /**********************************************
  * rpc_pipe upcall helpers                    *
  **********************************************/
@@ -432,11 +436,10 @@ void gss_release_msg(struct gss_upcall_msg *gmsg)
 #else
         /* XXX */
         if (!list_empty(&gmsg->gum_base.list)) {
 #else
         /* XXX */
         if (!list_empty(&gmsg->gum_base.list)) {
-                int error = gmsg->gum_base.errno;
-                
                 CWARN("msg %p: list: %p/%p/%p, copied %d, err %d, wq %d\n",
                 CWARN("msg %p: list: %p/%p/%p, copied %d, err %d, wq %d\n",
-                      gmsg, &gmsg->gum_base.list, gmsg->gum_base.list.prev,
-                      gmsg->gum_base.list.next, gmsg->gum_base.copied, error,
+                      gmsg, &gmsg->gum_base.list,
+                      gmsg->gum_base.list.prev, gmsg->gum_base.list.next,
+                      gmsg->gum_base.copied, gmsg->gum_base.errno,
                       list_empty(&gmsg->gum_waitq.task_list));
                 LBUG();
         }
                       list_empty(&gmsg->gum_waitq.task_list));
                 LBUG();
         }
@@ -519,11 +522,10 @@ static void gss_init_upcall_msg(struct gss_upcall_msg *gmsg,
 }
 #endif /* __KERNEL__ */
 
 }
 #endif /* __KERNEL__ */
 
-/* this seems to be used only from userspace code */
-#ifndef __KERNEL__
 /********************************************
  * gss cred manipulation helpers            *
  ********************************************/
 /********************************************
  * gss cred manipulation helpers            *
  ********************************************/
+#if 0
 static
 int gss_cred_is_uptodate_ctx(struct ptlrpc_cred *cred)
 {
 static
 int gss_cred_is_uptodate_ctx(struct ptlrpc_cred *cred)
 {
@@ -541,7 +543,7 @@ int gss_cred_is_uptodate_ctx(struct ptlrpc_cred *cred)
 #endif
 
 static inline
 #endif
 
 static inline
-struct gss_cl_ctx *gss_get_ctx(struct gss_cl_ctx *ctx)
+struct gss_cl_ctx * gss_get_ctx(struct gss_cl_ctx *ctx)
 {
         atomic_inc(&ctx->gc_refcount);
         return ctx;
 {
         atomic_inc(&ctx->gc_refcount);
         return ctx;
@@ -878,7 +880,8 @@ out:
 }
 #else /* !__KERNEL__ */
 extern int lgss_handle_krb5_upcall(uid_t uid, __u32 dest_ip,
 }
 #else /* !__KERNEL__ */
 extern int lgss_handle_krb5_upcall(uid_t uid, __u32 dest_ip,
-                                   char *obd_name, char *buf, int bufsize,
+                                   char *obd_name,
+                                   char *buf, int bufsize,
                                    int (*callback)(char*, unsigned long));
 
 static int gss_cred_refresh(struct ptlrpc_cred *cred)
                                    int (*callback)(char*, unsigned long));
 
 static int gss_cred_refresh(struct ptlrpc_cred *cred)
@@ -889,11 +892,11 @@ static int gss_cred_refresh(struct ptlrpc_cred *cred)
         struct gss_sec         *gsec;
         struct gss_api_mech    *mech;
         struct gss_cl_ctx      *ctx = NULL;
         struct gss_sec         *gsec;
         struct gss_api_mech    *mech;
         struct gss_cl_ctx      *ctx = NULL;
+        struct vfs_cred         vcred = { 0 };
         ptl_nid_t               peer_nid;
         __u32                   dest_ip;
         __u32                   subflavor;
         int                     rc, gss_err;
         ptl_nid_t               peer_nid;
         __u32                   dest_ip;
         __u32                   subflavor;
         int                     rc, gss_err;
-        struct gss_upcall_msg_data gmd = { 0 };
 
         LASSERT(cred);
         LASSERT(cred->pc_sec);
 
         LASSERT(cred);
         LASSERT(cred->pc_sec);
@@ -906,9 +909,9 @@ static int gss_cred_refresh(struct ptlrpc_cred *cred)
         imp = cred->pc_sec->ps_import;
         peer_nid = imp->imp_connection->c_peer.peer_id.nid;
         dest_ip = (__u32) (peer_nid & 0xFFFFFFFF);
         imp = cred->pc_sec->ps_import;
         peer_nid = imp->imp_connection->c_peer.peer_id.nid;
         dest_ip = (__u32) (peer_nid & 0xFFFFFFFF);
-        subflavor = cred->pc_sec->ps_flavor;
+        subflavor = cred->pc_sec->ps_flavor.subflavor;
 
 
-        if (subflavor != PTLRPCS_SUBFLVR_KRB5I) {
+        if (subflavor != PTLRPC_SEC_GSS_KRB5I) {
                 CERROR("unknown subflavor %u\n", subflavor);
                 GOTO(err_out, rc = -EINVAL);
         }
                 CERROR("unknown subflavor %u\n", subflavor);
                 GOTO(err_out, rc = -EINVAL);
         }
@@ -927,8 +930,7 @@ static int gss_cred_refresh(struct ptlrpc_cred *cred)
         gsec = container_of(cred->pc_sec, struct gss_sec, gs_base);
         mech = gsec->gs_mech;
         LASSERT(mech);
         gsec = container_of(cred->pc_sec, struct gss_sec, gs_base);
         mech = gsec->gs_mech;
         LASSERT(mech);
-
-        rc = gss_parse_init_downcall(mech, &obj, &ctx, &gmd,
+        rc = gss_parse_init_downcall(mech, &obj, &ctx, &vcred, &dest_ip,
                                      &gss_err);
         if (rc || gss_err) {
                 CERROR("parse init downcall: rpc %d, gss 0x%x\n", rc, gss_err);
                                      &gss_err);
         if (rc || gss_err) {
                 CERROR("parse init downcall: rpc %d, gss 0x%x\n", rc, gss_err);
@@ -1669,11 +1671,10 @@ struct ptlrpc_sec* gss_create_sec(__u32 flavor,
 {
         struct gss_sec *gsec;
         struct ptlrpc_sec *sec;
 {
         struct gss_sec *gsec;
         struct ptlrpc_sec *sec;
-        uid_t save_uid;
-
 #ifdef __KERNEL__
         char *pos;
         int   pipepath_len;
 #ifdef __KERNEL__
         char *pos;
         int   pipepath_len;
+        uid_t save_uid;
 #endif
         ENTRY;
 
 #endif
         ENTRY;
 
index a9f4e56..b2e8b64 100644 (file)
@@ -1112,13 +1112,12 @@ int __init ptlrpc_sec_init(void)
         return 0;
 }
 
         return 0;
 }
 
-#if defined __KERNEL__ && defined ENABLE_GSS
 static void __exit ptlrpc_sec_exit(void)
 {
         svcsec_null_exit();
         ptlrpcs_null_exit();
 }
 static void __exit ptlrpc_sec_exit(void)
 {
         svcsec_null_exit();
         ptlrpcs_null_exit();
 }
-#endif
+
 
 EXPORT_SYMBOL(ptlrpcs_register);
 EXPORT_SYMBOL(ptlrpcs_unregister);
 
 EXPORT_SYMBOL(ptlrpcs_register);
 EXPORT_SYMBOL(ptlrpcs_unregister);
index 0662f8e..ef1f6f7 100644 (file)
@@ -78,9 +78,8 @@ ${LMC} -m $config --add filesystem --filesystem $FS_NODE2 || exit 1
 ${LMC} -m $config --add filesystem --filesystem $FS_MASTER || exit 1
 
 # node 1
 ${LMC} -m $config --add filesystem --filesystem $FS_MASTER || exit 1
 
 # node 1
-${LMC} -m $config --add net --node client --nid "*" --nettype $NETTYPE  || exit 1
-
 ${LMC} -m $config --add node --node $NODE1 || exit 1
 ${LMC} -m $config --add node --node $NODE1 || exit 1
+
 ${LMC} -m $config --add net --node $NODE1 --nid `h2$NIDTYPE $NODE1` \
 --nettype $NETTYPE || exit 1
 
 ${LMC} -m $config --add net --node $NODE1 --nid `h2$NIDTYPE $NODE1` \
 --nettype $NETTYPE || exit 1
 
@@ -120,6 +119,7 @@ ${LMC} -m $config --add cmobd --node $NODE1 --cmobd $CMOBD_OST1 \
 
 # node 2
 ${LMC} -m $config --add node --node $NODE2 || exit 1
 
 # node 2
 ${LMC} -m $config --add node --node $NODE2 || exit 1
+
 ${LMC} -m $config --add net --node $NODE2 --nid `h2$NIDTYPE $NODE2` \
 --nettype $NETTYPE || exit 1
 
 ${LMC} -m $config --add net --node $NODE2 --nid `h2$NIDTYPE $NODE2` \
 --nettype $NETTYPE || exit 1
 
index b4ff31c..bbc5787 100755 (executable)
@@ -2963,9 +2963,6 @@ class Mountpoint(Module):
         cmd = "mount -t lustre_lite -o osc=%s,mdc=%s,gkc=%s,mds_sec=%s,oss_sec=%s%s %s %s" % \
               (self.vosc.get_name(), self.vmdc.get_name(), gkc_name, self.mds_sec,
               self.oss_sec, self.clientoptions, config.config, self.path)
         cmd = "mount -t lustre_lite -o osc=%s,mdc=%s,gkc=%s,mds_sec=%s,oss_sec=%s%s %s %s" % \
               (self.vosc.get_name(), self.vmdc.get_name(), gkc_name, self.mds_sec,
               self.oss_sec, self.clientoptions, config.config, self.path)
-       log("mount -t lustre_lite -o osc=%s,mdc=%s,gkc=%s,mds_sec=%s,oss_sec=%s%s %s %s" % \
-            (self.vosc.get_name(), self.vmdc.get_name(), gkc_name, self.mds_sec,
-            self.oss_sec, self.clientoptions, config.config, self.path))
         run("mkdir", self.path)
         ret, val = run(cmd)
         if ret:
         run("mkdir", self.path)
         ret, val = run(cmd)
         if ret:
index f13072a..bcba4ae 100644 (file)
@@ -32,9 +32,9 @@
 #include <string.h>
 #include <stddef.h>
 #include <sys/ioctl.h>
 #include <string.h>
 #include <stddef.h>
 #include <sys/ioctl.h>
-#include <errno.h>
 #include <unistd.h>
 #include <fcntl.h>
 #include <unistd.h>
 #include <fcntl.h>
+#include <errno.h>
 #include <dirent.h>
 #include <stdarg.h>
 #include <sys/stat.h>
 #include <dirent.h>
 #include <stdarg.h>
 #include <sys/stat.h>
@@ -55,6 +55,7 @@
 #include <linux/lustre_acl.h>
 #include <lustre/lustre_user.h>
 #include <linux/obd_lov.h>
 #include <linux/lustre_acl.h>
 #include <lustre/lustre_user.h>
 #include <linux/obd_lov.h>
+
 #include <portals/ptlctl.h>
 
 static void err_msg(char *fmt, ...)
 #include <portals/ptlctl.h>
 
 static void err_msg(char *fmt, ...)