From 1932a135cf8cedcea2d0f2d5be21edd7fe306251 Mon Sep 17 00:00:00 2001 From: Robert Read Date: Tue, 5 Jan 2010 18:05:45 -0800 Subject: [PATCH] Revert "b=19808 2.6.29-fc11 patchless client support" Causing kernel BUG in my testing, see bug 19808. This reverts commit 95dbd166988cf0a2912c51305572c78a9aa2d324. --- build/autoconf/lustre-build.m4 | 2 +- build/lbuild | 2 +- build/lbuild.old_school | 4 +- libcfs/autoconf/lustre-libcfs.m4 | 72 +------------------- libcfs/include/libcfs/curproc.h | 2 - libcfs/include/libcfs/linux/libcfs.h | 34 ---------- libcfs/include/libcfs/linux/linux-tcpip.h | 15 ----- libcfs/include/libcfs/list.h | 10 --- libcfs/include/libcfs/user-prim.h | 3 - libcfs/libcfs/linux/linux-curproc.c | 73 +++++--------------- libcfs/libcfs/linux/linux-module.c | 2 +- libcfs/libcfs/linux/linux-prim.c | 12 +--- libcfs/libcfs/user-prim.c | 15 ----- libsysio/configure.in | 45 ------------- lustre/autoconf/lustre-core.m4 | 84 ------------------------ lustre/include/liblustre.h | 2 - lustre/include/linux/lustre_compat25.h | 21 +----- lustre/include/lprocfs_status.h | 4 +- lustre/include/lustre/ll_fiemap.h | 3 + lustre/include/lustre_dlm.h | 2 +- lustre/include/lustre_net.h | 3 +- lustre/kernel_patches/targets/2.6-fc11.target.in | 18 ----- lustre/ldlm/ldlm_lock.c | 8 +-- lustre/ldlm/ldlm_request.c | 2 +- lustre/llite/dir.c | 2 +- lustre/llite/llite_lib.c | 27 +++----- lustre/llite/llite_nfs.c | 2 +- lustre/llite/lloop.c | 25 +------ lustre/llite/lproc_llite.c | 2 +- lustre/llite/namei.c | 2 +- lustre/llite/remote_perm.c | 10 +-- lustre/llite/rw26.c | 44 ------------- lustre/llite/xattr.c | 3 - lustre/lmv/lmv_obd.c | 24 +++---- lustre/lov/lov_obd.c | 33 +++++----- lustre/lov/lov_pack.c | 21 +++--- lustre/lvfs/lvfs_linux.c | 59 ++++++----------- lustre/mdc/mdc_lib.c | 20 +++--- lustre/mdc/mdc_locks.c | 15 ++--- lustre/mdc/mdc_request.c | 4 +- lustre/obdclass/lprocfs_status.c | 16 +---- lustre/ptlrpc/sec.c | 16 ++--- lustre/tests/test-framework.sh | 14 ++-- 43 files changed, 158 insertions(+), 619 deletions(-) delete mode 100644 lustre/kernel_patches/targets/2.6-fc11.target.in diff --git a/build/autoconf/lustre-build.m4 b/build/autoconf/lustre-build.m4 index 10f1905..b85f5d5 100644 --- a/build/autoconf/lustre-build.m4 +++ b/build/autoconf/lustre-build.m4 @@ -274,7 +274,7 @@ if test x$RHEL_KERNEL = xyes; then else case $LINUXRELEASE in # ext4 was in 2.6.22-2.6.26 but not stable enough to use - 2.6.2[[0-9]]*) enable_ext4='no' ;; + 2.6.2[0-6]*) enable_ext4='no' ;; *) LC_KERNEL_WITH_EXT4([enable_ext4='yes'], [enable_ext4='no']) ;; esac diff --git a/build/lbuild b/build/lbuild index dcb4dd7..e3380ba 100755 --- a/build/lbuild +++ b/build/lbuild @@ -1045,7 +1045,7 @@ find_linux_devel_paths() { # RHEL-style and SLES-style rpms # XXX - until bug 19336 cleans this up, we need to extricate the # ${lnxmin}- from the $lnxrel - local paths="kernels/${lnxmaj}${lnxmin}${delimiter}${lnxrel}-${TARGET_ARCH} kernels/${lnxmaj}${lnxmin}${delimiter}${lnxrel}.${TARGET_ARCH} linux-${lnxmaj}${lnxmin}${delimiter}${lnxrel##${lnxmin#.}-}" + local paths="kernels/${lnxmaj}${lnxmin}${delimiter}${lnxrel}-${TARGET_ARCH} linux-${lnxmaj}${lnxmin}${delimiter}${lnxrel##${lnxmin#.}-}" local path for path in $paths; do diff --git a/build/lbuild.old_school b/build/lbuild.old_school index 3b77c8e..869be39 100644 --- a/build/lbuild.old_school +++ b/build/lbuild.old_school @@ -519,7 +519,7 @@ patchless_build_sequence() { # default to source type -source and special case below local type=-source case "$DISTRO" in - rhel* | fc*) + rhel*) type=-devel ;; esac @@ -546,7 +546,7 @@ patchless_build_sequence() { if [ -n "$OFED_VERSION" -a "$OFED_VERSION" != "inkernel" ]; then $rpmfound && build_kernel_ib fi - ( $rpmfound ) && build_lustre "$LINUX" && buildsuccess=true && find_linux_source_rpm + ( $rpmfound ) && build_lustre && buildsuccess=true && find_linux_source_rpm fi if $buildsuccess; then diff --git a/libcfs/autoconf/lustre-libcfs.m4 b/libcfs/autoconf/lustre-libcfs.m4 index 6cba402..51a5889 100644 --- a/libcfs/autoconf/lustre-libcfs.m4 +++ b/libcfs/autoconf/lustre-libcfs.m4 @@ -508,7 +508,7 @@ AC_DEFUN([LIBCFS_NETWORK_NAMESPACE], LB_LINUX_TRY_COMPILE([ #include ],[ - struct net *net = &init_net; + struct net *net = &init_ns; ],[ AC_MSG_RESULT(yes) AC_DEFINE(HAVE_INIT_NET, 1, @@ -644,70 +644,6 @@ LB_LINUX_TRY_COMPILE([ ]) ]) -# LIBCFS_CRED_WRAPPERS -# -# wrappers for task's credentials are in sles11 -# -AC_DEFUN([LIBCFS_CRED_WRAPPERS], -[AC_MSG_CHECKING([if kernel has wrappers for task's credentials]) -LB_LINUX_TRY_COMPILE([ - #include -],[ - uid_t uid; - - uid = current_uid(); -],[ - AC_MSG_RESULT([yes]) - AC_DEFINE(HAVE_CRED_WRAPPERS, 1, [task's cred wrappers found]) -],[ - AC_MSG_RESULT([no]) -]) -]) - -# -# LN_STRUCT_CRED_IN_TASK -# -# struct cred was introduced in 2.6.29 to streamline credentials in task struct -# -AC_DEFUN([LIBCFS_STRUCT_CRED_IN_TASK], -[AC_MSG_CHECKING([if kernel has struct cred]) -LB_LINUX_TRY_COMPILE([ - #include -],[ - struct task_struct *tsk = NULL; - tsk->real_cred = NULL; -],[ - AC_MSG_RESULT([yes]) - AC_DEFINE(HAVE_STRUCT_CRED, 1, [struct cred found]) -],[ - AC_MSG_RESULT([no]) -]) -]) - -# -# LIBCFS_FUNC_UNSHARE_FS_STRUCT -# -# unshare_fs_struct was introduced in 2.6.30 to prevent others to directly -# mess with copy_fs_struct -# -AC_DEFUN([LIBCFS_FUNC_UNSHARE_FS_STRUCT], -[AC_MSG_CHECKING([if kernel defines unshare_fs_struct()]) -tmp_flags="$EXTRA_KCFLAGS" -EXTRA_KCFLAGS="-Werror" -LB_LINUX_TRY_COMPILE([ - #include - #include -],[ - unshare_fs_struct(); -],[ - AC_MSG_RESULT([yes]) - AC_DEFINE(HAVE_UNSHARE_FS_STRUCT, 1, [unshare_fs_struct found]) -],[ - AC_MSG_RESULT([no]) -]) -EXTRA_KCFLAGS="$tmp_flags" -]) - # # LIBCFS_PROG_LINUX # @@ -751,12 +687,6 @@ LIBCFS_NETLINK_NETNS LIBCFS_FUNC_DUMP_TRACE # 2.6.26 LIBCFS_SEM_COUNT -# 2.6.27 -LIBCFS_CRED_WRAPPERS -# 2.6.29 -LIBCFS_STRUCT_CRED_IN_TASK -# 2.6.30 -LIBCFS_FUNC_UNSHARE_FS_STRUCT LIBCFS_SOCK_MAP_FD_2ARG ]) diff --git a/libcfs/include/libcfs/curproc.h b/libcfs/include/libcfs/curproc.h index 332799b..b79caf1 100644 --- a/libcfs/include/libcfs/curproc.h +++ b/libcfs/include/libcfs/curproc.h @@ -51,8 +51,6 @@ */ uid_t cfs_curproc_uid(void); gid_t cfs_curproc_gid(void); -uid_t cfs_curproc_euid(void); -gid_t cfs_curproc_egid(void); uid_t cfs_curproc_fsuid(void); gid_t cfs_curproc_fsgid(void); pid_t cfs_curproc_pid(void); diff --git a/libcfs/include/libcfs/linux/libcfs.h b/libcfs/include/libcfs/linux/libcfs.h index c7f946d..9e75d75 100644 --- a/libcfs/include/libcfs/linux/libcfs.h +++ b/libcfs/include/libcfs/linux/libcfs.h @@ -126,38 +126,4 @@ typedef long long_ptr_t; #define WITH_WATCHDOG #endif -#ifndef HAVE_STRUCT_CRED - -#define current_cred() (current) - -#define current_cred_xxx(xxx) \ -({ \ - current->xxx; \ -}) - -#ifndef HAVE_CRED_WRAPPERS - -#define current_uid() (current_cred_xxx(uid)) -#define current_gid() (current_cred_xxx(gid)) -#define current_euid() (current_cred_xxx(euid)) -#define current_egid() (current_cred_xxx(egid)) -#define current_suid() (current_cred_xxx(suid)) -#define current_sgid() (current_cred_xxx(sgid)) -#define current_fsuid() (current_cred_xxx(fsuid)) -#define current_fsgid() (current_cred_xxx(fsgid)) -#define current_cap() (current_cred_xxx(cap_effective)) - -#endif /* HAVE_LINUX_CRED_H */ - -#define current_user() (current_cred_xxx(user)) -#define current_user_ns() (current_cred_xxx(user)->user_ns) -#define current_security() (current_cred_xxx(security)) - -#define cred task_struct - -#define prepare_creds() (current) -#define commit_creds(a) - -#endif /* HAVE_STRUCT_CRED */ - #endif /* _LINUX_LIBCFS_H */ diff --git a/libcfs/include/libcfs/linux/linux-tcpip.h b/libcfs/include/libcfs/linux/linux-tcpip.h index 175911e..84dd41b 100644 --- a/libcfs/include/libcfs/linux/linux-tcpip.h +++ b/libcfs/include/libcfs/linux/linux-tcpip.h @@ -51,21 +51,6 @@ #include -#ifndef HIPQUAD -// XXX Should just kill all users -#if defined(__LITTLE_ENDIAN) -#define HIPQUAD(addr) \ - ((unsigned char *)&addr)[3], \ - ((unsigned char *)&addr)[2], \ - ((unsigned char *)&addr)[1], \ - ((unsigned char *)&addr)[0] -#elif defined(__BIG_ENDIAN) -#define HIPQUAD NIPQUAD -#else -#error "Please fix asm/byteorder.h" -#endif /* __LITTLE_ENDIAN */ -#endif - typedef struct socket cfs_socket_t; #if (LINUX_VERSION_CODE < KERNEL_VERSION(2,5,72)) diff --git a/libcfs/include/libcfs/list.h b/libcfs/include/libcfs/list.h index c70c34c..bbdbff5 100644 --- a/libcfs/include/libcfs/list.h +++ b/libcfs/include/libcfs/list.h @@ -450,16 +450,6 @@ static inline void hlist_add_after(struct hlist_node *n, list_for_each_entry(pos, head, member) #endif -#ifndef list_for_each_entry_rcu -#define list_for_each_entry_rcu(pos, head, member) \ - list_for_each_entry(pos, head, member) -#endif - -#ifndef list_for_each_entry_rcu -#define list_for_each_entry_rcu(pos, head, member) \ - list_for_each_entry(pos, head, member) -#endif - #ifndef list_for_each_entry_reverse /** * Iterate backwards over a list of given type. diff --git a/libcfs/include/libcfs/user-prim.h b/libcfs/include/libcfs/user-prim.h index ad99755..a5c4213 100644 --- a/libcfs/include/libcfs/user-prim.h +++ b/libcfs/include/libcfs/user-prim.h @@ -149,9 +149,6 @@ int cfs_create_thread(cfs_thread_t func, void *arg); #endif uid_t cfs_curproc_uid(void); -gid_t cfs_curproc_gid(void); -uid_t cfs_curproc_fsuid(void); -gid_t cfs_curproc_fsgid(void); #define LIBCFS_REALLOC(ptr, size) realloc(ptr, size) diff --git a/libcfs/libcfs/linux/linux-curproc.c b/libcfs/libcfs/linux/linux-curproc.c index 385bbef..be37723 100644 --- a/libcfs/libcfs/linux/linux-curproc.c +++ b/libcfs/libcfs/linux/linux-curproc.c @@ -41,7 +41,6 @@ */ #include -#include #define DEBUG_SUBSYSTEM S_LNET @@ -54,32 +53,22 @@ uid_t cfs_curproc_uid(void) { - return current_uid(); + return current->uid; } gid_t cfs_curproc_gid(void) { - return current_gid(); + return current->gid; } uid_t cfs_curproc_fsuid(void) { - return current_fsuid(); -} - -uid_t cfs_curproc_euid(void) -{ - return current_egid(); -} - -uid_t cfs_curproc_egid(void) -{ - return current_egid(); + return current->fsuid; } gid_t cfs_curproc_fsgid(void) { - return current_fsgid(); + return current->fsgid; } pid_t cfs_curproc_pid(void) @@ -93,7 +82,7 @@ int cfs_curproc_groups_nr(void) #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,4) task_lock(current); - nr = current_cred()->group_info->ngroups; + nr = current->group_info->ngroups; task_unlock(current); #else nr = current->ngroups; @@ -105,8 +94,8 @@ void cfs_curproc_groups_dump(gid_t *array, int size) { #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,4) task_lock(current); - size = min_t(int, size, current_cred()->group_info->ngroups); - memcpy(array, current_cred()->group_info->blocks[0], size * sizeof(__u32)); + size = min_t(int, size, current->group_info->ngroups); + memcpy(array, current->group_info->blocks[0], size * sizeof(__u32)); task_unlock(current); #else LASSERT(size <= NGROUPS); @@ -137,70 +126,46 @@ char *cfs_curproc_comm(void) void cfs_cap_raise(cfs_cap_t cap) { - struct cred *cred; - if ((cred = prepare_creds())) { - cap_raise(cred->cap_effective, cfs_cap_unpack(cap)); - commit_creds(cred); - } + cap_raise(cfs_current()->cap_effective, cfs_cap_unpack(cap)); } void cfs_cap_lower(cfs_cap_t cap) { - struct cred *cred; - if ((cred = prepare_creds())) { - cap_lower(cred->cap_effective, cfs_cap_unpack(cap)); - commit_creds(cred); - } + cap_lower(cfs_current()->cap_effective, cfs_cap_unpack(cap)); } int cfs_cap_raised(cfs_cap_t cap) { - return cap_raised(current_cap(), cfs_cap_unpack(cap)); + return cap_raised(cfs_current()->cap_effective, cfs_cap_unpack(cap)); } -void cfs_kernel_cap_pack(cfs_kernel_cap_t kcap, cfs_cap_t *cap) +cfs_cap_t cfs_curproc_cap_pack(void) { #if defined (_LINUX_CAPABILITY_VERSION) && _LINUX_CAPABILITY_VERSION == 0x19980330 - *cap = cfs_cap_pack(kcap); + return cfs_cap_pack(current->cap_effective); #elif defined (_LINUX_CAPABILITY_VERSION) && _LINUX_CAPABILITY_VERSION == 0x20071026 - *cap = cfs_cap_pack(kcap[0]); + return cfs_cap_pack(current->cap_effective[0]); #elif defined(_KERNEL_CAPABILITY_VERSION) && _KERNEL_CAPABILITY_VERSION == 0x20080522 /* XXX lost high byte */ - *cap = cfs_cap_pack(kcap.cap[0]); + return cfs_cap_pack(current->cap_effective.cap[0]); #else #error "need correct _KERNEL_CAPABILITY_VERSION " #endif } -void cfs_kernel_cap_unpack(cfs_kernel_cap_t *kcap, cfs_cap_t cap) +void cfs_curproc_cap_unpack(cfs_cap_t cap) { #if defined (_LINUX_CAPABILITY_VERSION) && _LINUX_CAPABILITY_VERSION == 0x19980330 - *kcap = cfs_cap_unpack(cap); + current->cap_effective = cfs_cap_unpack(cap); #elif defined (_LINUX_CAPABILITY_VERSION) && _LINUX_CAPABILITY_VERSION == 0x20071026 - (*kcap)[0] = cfs_cap_unpack(cap); + current->cap_effective[0] = cfs_cap_unpack(cap); #elif defined(_KERNEL_CAPABILITY_VERSION) && _KERNEL_CAPABILITY_VERSION == 0x20080522 - kcap->cap[0] = cfs_cap_unpack(cap); + current->cap_effective.cap[0] = cfs_cap_unpack(cap); #else #error "need correct _KERNEL_CAPABILITY_VERSION " #endif } -cfs_cap_t cfs_curproc_cap_pack(void) -{ - cfs_cap_t cap; - cfs_kernel_cap_pack(current_cap(), &cap); - return cap; -} - -void cfs_curproc_cap_unpack(cfs_cap_t cap) -{ - struct cred *cred; - if ((cred = prepare_creds())) { - cfs_kernel_cap_unpack(&cred->cap_effective, cap); - commit_creds(cred); - } -} - int cfs_capable(cfs_cap_t cap) { return capable(cfs_cap_unpack(cap)); @@ -208,9 +173,7 @@ int cfs_capable(cfs_cap_t cap) EXPORT_SYMBOL(cfs_curproc_uid); EXPORT_SYMBOL(cfs_curproc_pid); -EXPORT_SYMBOL(cfs_curproc_euid); EXPORT_SYMBOL(cfs_curproc_gid); -EXPORT_SYMBOL(cfs_curproc_egid); EXPORT_SYMBOL(cfs_curproc_fsuid); EXPORT_SYMBOL(cfs_curproc_fsgid); EXPORT_SYMBOL(cfs_curproc_umask); diff --git a/libcfs/libcfs/linux/linux-module.c b/libcfs/libcfs/linux/linux-module.c index ae6034c..88eab3e 100644 --- a/libcfs/libcfs/linux/linux-module.c +++ b/libcfs/libcfs/linux/linux-module.c @@ -138,7 +138,7 @@ libcfs_ioctl(struct inode *inode, struct file *file, struct cfs_psdev_file pfile; int rc = 0; - if (current_fsuid() != 0) + if (current->fsuid != 0) return -EACCES; if ( _IOC_TYPE(cmd) != IOC_LIBCFS_TYPE || diff --git a/libcfs/libcfs/linux/linux-prim.c b/libcfs/libcfs/linux/linux-prim.c index be9822d..decc551 100644 --- a/libcfs/libcfs/linux/linux-prim.c +++ b/libcfs/libcfs/linux/linux-prim.c @@ -40,7 +40,6 @@ #endif #include #include -#include #include #include @@ -234,24 +233,19 @@ void cfs_daemonize(char *str) { } int cfs_daemonize_ctxt(char *str) { - - cfs_daemonize(str); -#ifndef HAVE_UNSHARE_FS_STRUCT - { struct task_struct *tsk = current; struct fs_struct *fs = NULL; + + cfs_daemonize(str); fs = copy_fs_struct(tsk->fs); if (fs == NULL) return -ENOMEM; exit_fs(tsk); tsk->fs = fs; - } -#else - unshare_fs_struct(); -#endif return 0; } + sigset_t cfs_get_blockedsigs(void) { diff --git a/libcfs/libcfs/user-prim.c b/libcfs/libcfs/user-prim.c index 45f80f3..03e4bea 100644 --- a/libcfs/libcfs/user-prim.c +++ b/libcfs/libcfs/user-prim.c @@ -242,21 +242,6 @@ uid_t cfs_curproc_uid(void) return getuid(); } -gid_t cfs_curproc_gid(void) -{ - return getgid(); -} - -uid_t cfs_curproc_fsuid(void) -{ - return getuid(); -} - -gid_t cfs_curproc_fsgid(void) -{ - return getgid(); -} - void cfs_enter_debugger(void) { /* diff --git a/libsysio/configure.in b/libsysio/configure.in index 510ce21..5ce600f 100644 --- a/libsysio/configure.in +++ b/libsysio/configure.in @@ -405,51 +405,6 @@ AC_MSG_RESULT(no) CFLAGS="$tmp_flags" -AC_MSG_CHECKING(for POSIX 2008 preadv) -tmp_flags="$CFLAGS" -CFLAGS="$CFLAGS -Wall -Werror" -AC_TRY_COMPILE([ -#include -ssize_t preadv (int __fd, const struct iovec *__iovec, - int __count, off_t off) -{ - return 0; -} -],[ -],[ -AC_DEFINE(HAVE_POSIX2008_PREADV, 1, [POSIX 2008 preadv]) -AC_MSG_RESULT(yes) -],[ -AC_MSG_RESULT(no) -]) -CFLAGS="$tmp_flags" - -AC_MSG_CHECKING(for POSIX 2008 scandir) -tmp_flags="$CFLAGS" -CFLAGS="$CFLAGS -Wall -Werror" -AC_TRY_COMPILE([ -#define _BSD_SOURCE - -#include -#include - -int scandir(const char *dir, - struct dirent ***namelist, - int(*filter)(const struct dirent *), - int(*compar)(const struct dirent **, - const struct dirent **) - ); - -],[ -], [ -AC_DEFINE(HAVE_POSIX2008_SCANDIR, 1, [POSIX 2008 scandir]) -AC_MSG_RESULT(yes) -],[ -AC_MSG_RESULT(no) -]) -CFLAGS="$tmp_flags" - - AC_MSG_CHECKING(whether .text pseudo-op must be used) AC_CACHE_VAL(am_cv_sysio_asm_dot_text, [dnl cat > conftest.s < -],[ - d_obtain_alias(NULL); -],[ - AC_DEFINE(HAVE_D_OBTAIN_ALIAS, 1, - [d_obtain_alias exist in kernel]) - AC_MSG_RESULT([yes]) -],[ - AC_MSG_RESULT([no]) -]) -]) - -# # LC_INVALIDATEPAGE_RETURN_INT # 2.6.17 changes return type for invalidatepage to 'void' from 'int' # @@ -2017,63 +1997,6 @@ if test x$enable_liblustre_acl = xyes ; then AC_DEFINE(LIBLUSTRE_POSIX_ACL, 1, Liblustre Support ACL-enabled MDS) fi -# 2.6.29 change prepare/commit_write to write_begin/end -AC_DEFUN([LC_WRITE_BEGIN_END], -[AC_MSG_CHECKING([if kernel has .write_begin/end]) -LB_LINUX_TRY_COMPILE([ - #include - #include -#ifdef HAVE_LINUX_MMTYPES_H - #include -#endif -],[ - struct address_space_operations aops; - struct page *page; - - aops.write_begin = NULL; - aops.write_end = NULL; - page = grab_cache_page_write_begin(NULL, 0, 0); -], [ - AC_MSG_RESULT([yes]) - AC_DEFINE(HAVE_KERNEL_WRITE_BEGIN_END, 1, - [kernel has .write_begin/end]) -],[ - AC_MSG_RESULT([no]) -]) -]) - -# 2.6.29 blkdev_put has 2 arguments -AC_DEFUN([LC_BLKDEV_PUT_2ARGS], -[AC_MSG_CHECKING([blkdev_put needs 2 parameters]) -LB_LINUX_TRY_COMPILE([ - #include -],[ - blkdev_put(NULL, 0); -],[ - AC_DEFINE(HAVE_BLKDEV_PUT_2ARGS, 1, - [blkdev_put needs 2 paramters]) - AC_MSG_RESULT([yes]) -],[ - AC_MSG_RESULT([no]) -]) -]) - -# 2.6.29 dentry_open has 4 arguments -AC_DEFUN([LC_DENTRY_OPEN_4ARGS], -[AC_MSG_CHECKING([dentry_open needs 4 parameters]) -LB_LINUX_TRY_COMPILE([ - #include -],[ - dentry_open(NULL, NULL, 0, NULL); -],[ - AC_DEFINE(HAVE_DENTRY_OPEN_4ARGS, 1, - [dentry_open needs 4 paramters]) - AC_MSG_RESULT([yes]) -],[ - AC_MSG_RESULT([no]) -]) -]) - # # --enable-mpitest # @@ -2438,12 +2361,6 @@ if test x$enable_lu_ref = xyes ; then AC_DEFINE([USE_LU_REF], 1, [enable lu_ref reference tracking code]) fi - #2.6.29 - LC_WRITE_BEGIN_END - LC_D_OBTAIN_ALIAS - LC_BLKDEV_PUT_2ARGS - LC_DENTRY_OPEN_4ARGS - ]) # @@ -2492,7 +2409,6 @@ lustre/kernel_patches/targets/2.6-patchless.target lustre/kernel_patches/targets/2.6-sles10.target lustre/kernel_patches/targets/2.6-sles11.target lustre/kernel_patches/targets/2.6-oel5.target -lustre/kernel_patches/targets/2.6-fc11.target lustre/ldlm/Makefile lustre/fid/Makefile lustre/fid/autoMakefile diff --git a/lustre/include/liblustre.h b/lustre/include/liblustre.h index ae5e012..e72fdbf 100644 --- a/lustre/include/liblustre.h +++ b/lustre/include/liblustre.h @@ -277,8 +277,6 @@ typedef struct task_struct cfs_task_t; #define cfs_current() current #define cfs_curproc_pid() (current->pid) #define cfs_curproc_comm() (current->comm) -#define cfs_curproc_fsuid() (current->fsuid) -#define cfs_curproc_fsgid() (current->fsgid) extern struct task_struct *current; int in_group_p(gid_t gid); diff --git a/lustre/include/linux/lustre_compat25.h b/lustre/include/linux/lustre_compat25.h index df7927c..46b72a7 100644 --- a/lustre/include/linux/lustre_compat25.h +++ b/lustre/include/linux/lustre_compat25.h @@ -43,7 +43,6 @@ #error sorry, lustre requires at least linux kernel 2.6.9 or later #endif -#include #include #include @@ -138,8 +137,8 @@ do {mutex_lock_nested(&(inode)->i_mutex, I_MUTEX_PARENT); } while(0) #define LOCK_DQONOFF_MUTEX(dqopt) do {down(&(dqopt)->dqonoff_sem); } while(0) #endif /* HAVE_DQUOTOFF_MUTEX */ -#define current_ngroups current_cred()->group_info->ngroups -#define current_groups current_cred()->group_info->small_block +#define current_ngroups current->group_info->ngroups +#define current_groups current->group_info->small_block #ifndef page_private #define page_private(page) ((page)->private) @@ -196,18 +195,6 @@ do {mutex_lock_nested(&(inode)->i_mutex, I_MUTEX_PARENT); } while(0) #define val_to_kdev(dev) (dev) #define ILOOKUP(sb, ino, test, data) ilookup5(sb, ino, test, (void *)(data)); -#ifdef HAVE_BLKDEV_PUT_2ARGS -#define ll_blkdev_put(a, b) blkdev_put(a, b) -#else -#define ll_blkdev_put(a, b) blkdev_put(a) -#endif - -#ifdef HAVE_DENTRY_OPEN_4ARGS -#define ll_dentry_open(a, b, c, d) dentry_open(a, b, c, d) -#else -#define ll_dentry_open(a, b, c, d) dentry_open(a, b, c) -#endif - #include static inline int cleanup_group_info(void) @@ -440,10 +427,6 @@ int ll_unregister_blkdev(unsigned int dev, const char *name) #define LL_RENAME_DOES_D_MOVE FS_ODD_RENAME #endif -#ifndef HAVE_D_OBTAIN_ALIAS -#define d_obtain_alias(inode) d_alloc_anon(inode) -#endif - /* add a lustre compatible layer for crypto API */ #include #ifdef HAVE_ASYNC_BLOCK_CIPHER diff --git a/lustre/include/lprocfs_status.h b/lustre/include/lprocfs_status.h index bb783e7..cad6c92 100644 --- a/lustre/include/lprocfs_status.h +++ b/lustre/include/lprocfs_status.h @@ -439,7 +439,7 @@ extern cfs_proc_dir_entry_t *lprocfs_add_simple(struct proc_dir_entry *root, void *data, struct file_operations *fops); extern struct proc_dir_entry *lprocfs_add_symlink(const char *name, - struct proc_dir_entry *parent, const char *format, ...); + struct proc_dir_entry *parent, const char *dest); extern void lprocfs_free_per_client_stats(struct obd_device *obd); extern int lprocfs_nid_stats_clear_write(struct file *file, const char *buffer, unsigned long count, void *data); @@ -778,7 +778,7 @@ static inline cfs_proc_dir_entry_t *lprocfs_add_simple(struct proc_dir_entry *ro struct file_operations *fops) {return 0; } static inline struct proc_dir_entry *lprocfs_add_symlink(const char *name, - struct proc_dir_entry *parent, const char *format, ...) + struct proc_dir_entry *parent, const char *dest) {return NULL; } static inline void lprocfs_free_per_client_stats(struct obd_device *obd) {} diff --git a/lustre/include/lustre/ll_fiemap.h b/lustre/include/lustre/ll_fiemap.h index 9b751a8..265ea65 100644 --- a/lustre/include/lustre/ll_fiemap.h +++ b/lustre/include/lustre/ll_fiemap.h @@ -122,6 +122,9 @@ static inline unsigned fiemap_size_to_count(size_t array_size) #undef FIEMAP_FLAGS_COMPAT #endif +#define FIEMAP_FLAGS_COMPAT (FIEMAP_FLAG_SYNC | FIEMAP_FLAG_XATTR | \ + FIEMAP_FLAG_DEVICE_ORDER) + /* Lustre specific flags - use a high bit, don't conflict with upstream flag */ #define FIEMAP_EXTENT_NO_DIRECT 0x40000000 /* Data mapping undefined */ #define FIEMAP_EXTENT_NET 0x80000000 /* Data stored remotely. diff --git a/lustre/include/lustre_dlm.h b/lustre/include/lustre_dlm.h index 163f837..509756d 100644 --- a/lustre/include/lustre_dlm.h +++ b/lustre/include/lustre_dlm.h @@ -1057,7 +1057,7 @@ int ldlm_completion_ast(struct ldlm_lock *lock, int flags, void *data); int ldlm_cli_enqueue(struct obd_export *exp, struct ptlrpc_request **reqp, struct ldlm_enqueue_info *einfo, const struct ldlm_res_id *res_id, - ldlm_policy_data_t const *policy, int *flags, + ldlm_policy_data_t *policy, int *flags, void *lvb, __u32 lvb_len, struct lustre_handle *lockh, int async); int ldlm_prep_enqueue_req(struct obd_export *exp, diff --git a/lustre/include/lustre_net.h b/lustre/include/lustre_net.h index 01dd399..2a6dc54 100644 --- a/lustre/include/lustre_net.h +++ b/lustre/include/lustre_net.h @@ -105,8 +105,7 @@ */ #define LDLM_THREADS_AUTO_MIN (2) -#define LDLM_THREADS_AUTO_MAX min_t(unsigned int, \ - num_online_cpus()*num_online_cpus()*32, 128) +#define LDLM_THREADS_AUTO_MAX min(num_online_cpus()*num_online_cpus()*32, 128) #define LDLM_BL_THREADS LDLM_THREADS_AUTO_MIN #define LDLM_NBUFS (64 * num_online_cpus()) #define LDLM_BUFSIZE (8 * 1024) diff --git a/lustre/kernel_patches/targets/2.6-fc11.target.in b/lustre/kernel_patches/targets/2.6-fc11.target.in deleted file mode 100644 index 959443f..0000000 --- a/lustre/kernel_patches/targets/2.6-fc11.target.in +++ /dev/null @@ -1,18 +0,0 @@ -lnxmaj="2.6.29.4" -lnxrel="167.fc11" - -KERNEL=linux-${lnxmaj}-${lnxrel}.tar.bz2 -SERIES=2.6-fc5.series -VERSION=${lnxmaj} -EXTRA_VERSION=${lnxrel}_lustre.@VERSION@ -RHBUILD=1 -LINUX26=1 -LUSTRE_VERSION=@VERSION@ - -BASE_ARCHS="i686 x86_64" -BIGMEM_ARCHS="" -BOOT_ARCHS="" -JENSEN_ARCHS="" -SMP_ARCHS="i686 x86_64" -UP_ARCHS="" - diff --git a/lustre/ldlm/ldlm_lock.c b/lustre/ldlm/ldlm_lock.c index 28bc704..096bf9b 100644 --- a/lustre/ldlm/ldlm_lock.c +++ b/lustre/ldlm/ldlm_lock.c @@ -504,6 +504,8 @@ void ldlm_lock2desc(struct ldlm_lock *lock, struct ldlm_lock_desc *desc) */ if ((lock->l_resource->lr_type == LDLM_IBITS) && (exp && !(exp->exp_connect_flags & OBD_CONNECT_IBITS))) { + struct ldlm_resource res = *lock->l_resource; + /* Make sure all the right bits are set in this lock we are going to pass to client */ LASSERTF(lock->l_policy_data.l_inodebits.bits == @@ -511,10 +513,8 @@ void ldlm_lock2desc(struct ldlm_lock *lock, struct ldlm_lock_desc *desc) "Inappropriate inode lock bits during " "conversion " LPU64 "\n", lock->l_policy_data.l_inodebits.bits); - - ldlm_res2desc(lock->l_resource, &desc->l_resource); - desc->l_resource.lr_type = LDLM_PLAIN; - + res.lr_type = LDLM_PLAIN; + ldlm_res2desc(&res, &desc->l_resource); /* Convert "new" lock mode to something old client can understand */ if ((lock->l_req_mode == LCK_CR) || diff --git a/lustre/ldlm/ldlm_request.c b/lustre/ldlm/ldlm_request.c index 40dfb8a..3cabd3d 100644 --- a/lustre/ldlm/ldlm_request.c +++ b/lustre/ldlm/ldlm_request.c @@ -750,7 +750,7 @@ int ldlm_prep_enqueue_req(struct obd_export *exp, struct ptlrpc_request *req, int ldlm_cli_enqueue(struct obd_export *exp, struct ptlrpc_request **reqp, struct ldlm_enqueue_info *einfo, const struct ldlm_res_id *res_id, - ldlm_policy_data_t const *policy, int *flags, + ldlm_policy_data_t *policy, int *flags, void *lvb, __u32 lvb_len, struct lustre_handle *lockh, int async) { diff --git a/lustre/llite/dir.c b/lustre/llite/dir.c index a44bf29..ff45b5f 100644 --- a/lustre/llite/dir.c +++ b/lustre/llite/dir.c @@ -1086,7 +1086,7 @@ static int ll_dir_ioctl(struct inode *inode, struct file *file, GOTO(out_quotactl, rc = -EPERM); break; case Q_GETQUOTA: - if (((type == USRQUOTA && cfs_curproc_euid() != id) || + if (((type == USRQUOTA && current->euid != id) || (type == GRPQUOTA && !in_egroup_p(id))) && (!cfs_capable(CFS_CAP_SYS_ADMIN) || sbi->ll_flags & LL_SBI_RMT_CLIENT)) diff --git a/lustre/llite/llite_lib.c b/lustre/llite/llite_lib.c index 8901da4..ed63c2b 100644 --- a/lustre/llite/llite_lib.c +++ b/lustre/llite/llite_lib.c @@ -1283,7 +1283,7 @@ int ll_setattr_raw(struct inode *inode, struct iattr *attr) /* POSIX: check before ATTR_*TIME_SET set (from inode_change_ok) */ if (ia_valid & (ATTR_MTIME_SET | ATTR_ATIME_SET)) { - if (cfs_curproc_fsuid() != inode->i_uid && + if (current->fsuid != inode->i_uid && !cfs_capable(CFS_CAP_FOWNER)) RETURN(-EPERM); } @@ -1857,7 +1857,7 @@ int ll_flush_ctx(struct inode *inode) { struct ll_sb_info *sbi = ll_i2sbi(inode); - CDEBUG(D_SEC, "flush context for user %d\n", cfs_curproc_uid()); + CDEBUG(D_SEC, "flush context for user %d\n", current->uid); obd_set_info_async(sbi->ll_md_exp, sizeof(KEY_FLUSH_CTX), KEY_FLUSH_CTX, @@ -1880,7 +1880,7 @@ void ll_umount_begin(struct super_block *sb) struct lustre_sb_info *lsi = s2lsi(sb); struct ll_sb_info *sbi = ll_s2sbi(sb); struct obd_device *obd; - struct obd_ioctl_data *ioc_data; + struct obd_ioctl_data ioc_data = { 0 }; ENTRY; #ifdef HAVE_UMOUNTBEGIN_VFSMOUNT @@ -1904,6 +1904,8 @@ void ll_umount_begin(struct super_block *sb) return; } obd->obd_force = 1; + obd_iocontrol(IOC_OSC_SET_ACTIVE, sbi->ll_md_exp, sizeof ioc_data, + &ioc_data, NULL); obd = class_exp2obd(sbi->ll_dt_exp); if (obd == NULL) { @@ -1912,19 +1914,10 @@ void ll_umount_begin(struct super_block *sb) EXIT; return; } - obd->obd_force = 1; - - OBD_ALLOC_PTR(ioc_data); - if (ioc_data) { - obd_iocontrol(IOC_OSC_SET_ACTIVE, sbi->ll_md_exp, - sizeof ioc_data, ioc_data, NULL); - - obd_iocontrol(IOC_OSC_SET_ACTIVE, sbi->ll_dt_exp, - sizeof ioc_data, ioc_data, NULL); - - OBD_FREE_PTR(ioc_data); - } + obd->obd_force = 1; + obd_iocontrol(IOC_OSC_SET_ACTIVE, sbi->ll_dt_exp, sizeof ioc_data, + &ioc_data, NULL); /* Really, we'd like to wait until there are no requests outstanding, * and then continue. For now, we just invalidate the requests, @@ -2123,8 +2116,8 @@ struct md_op_data * ll_prep_md_op_data(struct md_op_data *op_data, op_data->op_namelen = namelen; op_data->op_mode = mode; op_data->op_mod_time = cfs_time_current_sec(); - op_data->op_fsuid = cfs_curproc_fsuid(); - op_data->op_fsgid = cfs_curproc_fsgid(); + op_data->op_fsuid = current->fsuid; + op_data->op_fsgid = current->fsgid; op_data->op_cap = cfs_curproc_cap_pack(); op_data->op_bias = MDS_CHECK_SPLIT; op_data->op_opc = opc; diff --git a/lustre/llite/llite_nfs.c b/lustre/llite/llite_nfs.c index a2ce959..98e1e62 100644 --- a/lustre/llite/llite_nfs.c +++ b/lustre/llite/llite_nfs.c @@ -129,7 +129,7 @@ static struct dentry *ll_iget_for_nfs(struct super_block *sb, RETURN(ERR_PTR(-ESTALE)); } - result = d_obtain_alias(inode); + result = d_alloc_anon(inode); if (!result) { iput(inode); RETURN(ERR_PTR(-ENOMEM)); diff --git a/lustre/llite/lloop.c b/lustre/llite/lloop.c index eb567c5..0acd41e 100644 --- a/lustre/llite/lloop.c +++ b/lustre/llite/lloop.c @@ -599,15 +599,9 @@ static int loop_clr_fd(struct lloop_device *lo, struct block_device *bdev, return 0; } -#ifdef HAVE_BLKDEV_PUT_2ARGS -static int lo_open(struct block_device *bdev, fmode_t mode) -{ - struct lloop_device *lo = bdev->bd_disk->private_data; -#else static int lo_open(struct inode *inode, struct file *file) { struct lloop_device *lo = inode->i_bdev->bd_disk->private_data; -#endif down(&lo->lo_ctl_mutex); lo->lo_refcnt++; @@ -616,15 +610,9 @@ static int lo_open(struct inode *inode, struct file *file) return 0; } -#ifdef HAVE_BLKDEV_PUT_2ARGS -static int lo_release(struct gendisk *disk, fmode_t mode) -{ - struct lloop_device *lo = disk->private_data; -#else static int lo_release(struct inode *inode, struct file *file) { struct lloop_device *lo = inode->i_bdev->bd_disk->private_data; -#endif down(&lo->lo_ctl_mutex); --lo->lo_refcnt; @@ -634,18 +622,11 @@ static int lo_release(struct inode *inode, struct file *file) } /* lloop device node's ioctl function. */ -#ifdef HAVE_BLKDEV_PUT_2ARGS -static int lo_ioctl(struct block_device *bdev, fmode_t mode, - unsigned int cmd, unsigned long arg) -{ - struct lloop_device *lo = bdev->bd_disk->private_data; -#else static int lo_ioctl(struct inode *inode, struct file *unused, unsigned int cmd, unsigned long arg) { struct lloop_device *lo = inode->i_bdev->bd_disk->private_data; struct block_device *bdev = inode->i_bdev; -#endif int err = 0; down(&lloop_mutex); @@ -653,7 +634,7 @@ static int lo_ioctl(struct inode *inode, struct file *unused, case LL_IOC_LLOOP_DETACH: { err = loop_clr_fd(lo, bdev, 2); if (err == 0) - ll_blkdev_put(bdev, 0); /* grabbed in LLOOP_ATTACH */ + blkdev_put(bdev); /* grabbed in LLOOP_ATTACH */ break; } @@ -743,7 +724,7 @@ static enum llioc_iter lloop_ioctl(struct inode *unused, struct file *file, err = loop_set_fd(lo, NULL, bdev, file); if (err) { fput(file); - ll_blkdev_put(bdev, 0); + blkdev_put(bdev); } break; @@ -767,7 +748,7 @@ static enum llioc_iter lloop_ioctl(struct inode *unused, struct file *file, bdev = lo->lo_device; err = loop_clr_fd(lo, bdev, 1); if (err == 0) - ll_blkdev_put(bdev, 0); /* grabbed in LLOOP_ATTACH */ + blkdev_put(bdev); /* grabbed in LLOOP_ATTACH */ break; } diff --git a/lustre/llite/lproc_llite.c b/lustre/llite/lproc_llite.c index eb7e394..943123e 100644 --- a/lustre/llite/lproc_llite.c +++ b/lustre/llite/lproc_llite.c @@ -699,7 +699,7 @@ void ll_stats_ops_tally(struct ll_sb_info *sbi, int op, int count) sbi->ll_stats_track_id == current->parent->pid) lprocfs_counter_add(sbi->ll_stats, op, count); else if (sbi->ll_stats_track_type == STATS_TRACK_GID && - sbi->ll_stats_track_id == cfs_curproc_gid()) + sbi->ll_stats_track_id == current->gid) lprocfs_counter_add(sbi->ll_stats, op, count); } EXPORT_SYMBOL(ll_stats_ops_tally); diff --git a/lustre/llite/namei.c b/lustre/llite/namei.c index 9514012..61fb628 100644 --- a/lustre/llite/namei.c +++ b/lustre/llite/namei.c @@ -855,7 +855,7 @@ static int ll_new_node(struct inode *dir, struct qstr *name, GOTO(err_exit, err = PTR_ERR(op_data)); err = md_create(sbi->ll_md_exp, op_data, tgt, tgt_len, mode, - cfs_curproc_fsuid(), cfs_curproc_fsgid(), + current->fsuid, current->fsgid, cfs_curproc_cap_pack(), rdev, &request); ll_finish_md_op_data(op_data); if (err) diff --git a/lustre/llite/remote_perm.c b/lustre/llite/remote_perm.c index 26c3350..08c4bc1 100644 --- a/lustre/llite/remote_perm.c +++ b/lustre/llite/remote_perm.c @@ -130,17 +130,17 @@ static int do_check_remote_perm(struct ll_inode_info *lli, int mask) if (!lli->lli_remote_perms) RETURN(-ENOENT); - head = lli->lli_remote_perms + remote_perm_hashfunc(cfs_curproc_uid()); + head = lli->lli_remote_perms + remote_perm_hashfunc(current->uid); spin_lock(&lli->lli_lock); hlist_for_each_entry(lrp, node, head, lrp_list) { - if (lrp->lrp_uid != cfs_curproc_uid()) + if (lrp->lrp_uid != current->uid) continue; - if (lrp->lrp_gid != cfs_curproc_gid()) + if (lrp->lrp_gid != current->gid) continue; - if (lrp->lrp_fsuid != cfs_curproc_fsuid()) + if (lrp->lrp_fsuid != current->fsuid) continue; - if (lrp->lrp_fsgid != cfs_curproc_fsgid()) + if (lrp->lrp_fsgid != current->fsgid) continue; found = 1; break; diff --git a/lustre/llite/rw26.c b/lustre/llite/rw26.c index 22dc711..d3b26b4 100644 --- a/lustre/llite/rw26.c +++ b/lustre/llite/rw26.c @@ -468,45 +468,6 @@ out: RETURN(tot_bytes ? : result); } -#ifdef HAVE_KERNEL_WRITE_BEGIN_END -static int ll_write_begin(struct file *file, struct address_space *mapping, - loff_t pos, unsigned len, unsigned flags, - struct page **pagep, void **fsdata) -{ - pgoff_t index = pos >> PAGE_CACHE_SHIFT; - struct page *page; - int rc; - unsigned from = pos & (PAGE_CACHE_SIZE - 1); - ENTRY; - - page = grab_cache_page_write_begin(mapping, index, flags); - if (!page) - RETURN(-ENOMEM); - - *pagep = page; - - rc = ll_prepare_write(file, page, from, from + len); - if (rc) { - unlock_page(page); - page_cache_release(page); - } - RETURN(rc); -} - -static int ll_write_end(struct file *file, struct address_space *mapping, - loff_t pos, unsigned len, unsigned copied, - struct page *page, void *fsdata) -{ - unsigned from = pos & (PAGE_CACHE_SIZE - 1); - int rc; - rc = ll_commit_write(file, page, from, from + copied); - - unlock_page(page); - page_cache_release(page); - return rc?rc:copied; -} -#endif - struct address_space_operations ll_aops = { .readpage = ll_readpage, // .readpages = ll_readpages, @@ -515,13 +476,8 @@ struct address_space_operations ll_aops = { .writepages = generic_writepages, .set_page_dirty = ll_set_page_dirty, .sync_page = NULL, -#ifdef HAVE_KERNEL_WRITE_BEGIN_END - .write_begin = ll_write_begin, - .write_end = ll_write_end, -#else .prepare_write = ll_prepare_write, .commit_write = ll_commit_write, -#endif .invalidatepage = ll_invalidatepage, .releasepage = (void *)ll_releasepage, .bmap = NULL diff --git a/lustre/llite/xattr.c b/lustre/llite/xattr.c index 1d7a4f7..f00f4f0 100644 --- a/lustre/llite/xattr.c +++ b/lustre/llite/xattr.c @@ -358,9 +358,6 @@ do_getxattr: GOTO(out, rc = -ERANGE); } - if (body->eadatasize == 0) - GOTO(out, rc = -ENODATA); - /* do not need swab xattr data */ xdata = req_capsule_server_sized_get(&req->rq_pill, &RMF_EADATA, body->eadatasize); diff --git a/lustre/lmv/lmv_obd.c b/lustre/lmv/lmv_obd.c index b453edb..3e7dfc8 100644 --- a/lustre/lmv/lmv_obd.c +++ b/lustre/lmv/lmv_obd.c @@ -469,14 +469,16 @@ int lmv_connect_mdc(struct obd_device *obd, struct lmv_tgt_desc *tgt) lmv_proc_dir = lprocfs_srch(obd->obd_proc_entry, "target_obds"); if (lmv_proc_dir) { struct proc_dir_entry *mdc_symlink; + char name[MAX_STRING_SIZE + 1]; LASSERT(mdc_obd->obd_type != NULL); LASSERT(mdc_obd->obd_type->typ_name != NULL); - mdc_symlink = lprocfs_add_symlink(mdc_obd->obd_name, - lmv_proc_dir, - "../../../%s/%s", - mdc_obd->obd_type->typ_name, - mdc_obd->obd_name); + name[MAX_STRING_SIZE] = '\0'; + snprintf(name, MAX_STRING_SIZE, "../../../%s/%s", + mdc_obd->obd_type->typ_name, + mdc_obd->obd_name); + mdc_symlink = proc_symlink(mdc_obd->obd_name, + lmv_proc_dir, name); if (mdc_symlink == NULL) { CERROR("Could not register LMV target " "/proc/fs/lustre/%s/%s/target_obds/%s.", @@ -1967,8 +1969,8 @@ repeat: CDEBUG(D_INODE, "Forward to mds #%x ("DFID")\n", mds, PFID(&op_data->op_fid1)); - op_data->op_fsuid = cfs_curproc_fsuid(); - op_data->op_fsgid = cfs_curproc_fsgid(); + op_data->op_fsuid = current->fsuid; + op_data->op_fsgid = current->fsgid; op_data->op_cap = cfs_curproc_cap_pack(); tgt = lmv_get_target(lmv, mds); @@ -2061,8 +2063,8 @@ repeat: RETURN(rc); } - op_data->op_fsuid = cfs_curproc_fsuid(); - op_data->op_fsgid = cfs_curproc_fsgid(); + op_data->op_fsuid = current->fsuid; + op_data->op_fsgid = current->fsgid; op_data->op_cap = cfs_curproc_cap_pack(); src_tgt = lmv_get_target(lmv, mds1); @@ -2450,8 +2452,8 @@ repeat: op_data->op_bias |= MDS_CHECK_SPLIT; } - op_data->op_fsuid = cfs_curproc_fsuid(); - op_data->op_fsgid = cfs_curproc_fsgid(); + op_data->op_fsuid = current->fsuid; + op_data->op_fsgid = current->fsgid; op_data->op_cap = cfs_curproc_cap_pack(); /* diff --git a/lustre/lov/lov_obd.c b/lustre/lov/lov_obd.c index 86c4baea..f8bdec2 100644 --- a/lustre/lov/lov_obd.c +++ b/lustre/lov/lov_obd.c @@ -131,10 +131,11 @@ int lov_connect_obd(struct obd_device *obd, __u32 index, int activate, struct obd_connect_data *data) { struct lov_obd *lov = &obd->u.lov; - struct obd_uuid *tgt_uuid; + struct obd_uuid tgt_uuid; struct obd_device *tgt_obd; static struct obd_uuid lov_osc_uuid = { "LOV_OSC_UUID" }; struct obd_import *imp; + #ifdef __KERNEL__ cfs_proc_dir_entry_t *lov_proc_dir; #endif @@ -144,11 +145,11 @@ int lov_connect_obd(struct obd_device *obd, __u32 index, int activate, if (!lov->lov_tgts[index]) RETURN(-EINVAL); - tgt_uuid = &lov->lov_tgts[index]->ltd_uuid; + tgt_uuid = lov->lov_tgts[index]->ltd_uuid; tgt_obd = lov->lov_tgts[index]->ltd_obd; if (!tgt_obd->obd_set_up) { - CERROR("Target %s not set up\n", obd_uuid2str(tgt_uuid)); + CERROR("Target %s not set up\n", obd_uuid2str(&tgt_uuid)); RETURN(-EINVAL); } @@ -173,14 +174,14 @@ int lov_connect_obd(struct obd_device *obd, __u32 index, int activate, rc = obd_register_observer(tgt_obd, obd); if (rc) { CERROR("Target %s register_observer error %d\n", - obd_uuid2str(tgt_uuid), rc); + obd_uuid2str(&tgt_uuid), rc); RETURN(rc); } if (imp->imp_invalid) { CERROR("not connecting OSC %s; administratively " - "disabled\n", obd_uuid2str(tgt_uuid)); + "disabled\n", obd_uuid2str(&tgt_uuid)); RETURN(0); } @@ -188,35 +189,35 @@ int lov_connect_obd(struct obd_device *obd, __u32 index, int activate, &lov_osc_uuid, data, NULL); if (rc || !lov->lov_tgts[index]->ltd_exp) { CERROR("Target %s connect error %d\n", - obd_uuid2str(tgt_uuid), rc); + obd_uuid2str(&tgt_uuid), rc); RETURN(-ENODEV); } lov->lov_tgts[index]->ltd_reap = 0; CDEBUG(D_CONFIG, "Connected tgt idx %d %s (%s) %sactive\n", index, - obd_uuid2str(tgt_uuid), tgt_obd->obd_name, activate ? "":"in"); + obd_uuid2str(&tgt_uuid), tgt_obd->obd_name, activate ? "":"in"); #ifdef __KERNEL__ lov_proc_dir = lprocfs_srch(obd->obd_proc_entry, "target_obds"); if (lov_proc_dir) { struct obd_device *osc_obd = lov->lov_tgts[index]->ltd_exp->exp_obd; cfs_proc_dir_entry_t *osc_symlink; + char name[MAX_STRING_SIZE]; LASSERT(osc_obd != NULL); LASSERT(osc_obd->obd_magic == OBD_DEVICE_MAGIC); LASSERT(osc_obd->obd_type->typ_name != NULL); - - osc_symlink = lprocfs_add_symlink(osc_obd->obd_name, - lov_proc_dir, - "../../../%s/%s", - osc_obd->obd_type->typ_name, - osc_obd->obd_name); + snprintf(name, MAX_STRING_SIZE, "../../../%s/%s", + osc_obd->obd_type->typ_name, + osc_obd->obd_name); + osc_symlink = lprocfs_add_symlink(osc_obd->obd_name, lov_proc_dir, + name); if (osc_symlink == NULL) { CERROR("could not register LOV target " - "/proc/fs/lustre/%s/%s/target_obds/%s.", - obd->obd_type->typ_name, obd->obd_name, - osc_obd->obd_name); + "/proc/fs/lustre/%s/%s/target_obds/%s.", + obd->obd_type->typ_name, obd->obd_name, + osc_obd->obd_name); lprocfs_remove(&lov_proc_dir); } } diff --git a/lustre/lov/lov_pack.c b/lustre/lov/lov_pack.c index 660dfc4..0ed24bb 100644 --- a/lustre/lov/lov_pack.c +++ b/lustre/lov/lov_pack.c @@ -388,9 +388,8 @@ static int __lov_setstripe(struct obd_export *exp, int max_lmm_size, { struct obd_device *obd = class_exp2obd(exp); struct lov_obd *lov = &obd->u.lov; - char buffer[sizeof(struct lov_user_md_v3)]; - struct lov_user_md_v3 *lumv3 = (struct lov_user_md_v3 *)&buffer[0]; - struct lov_user_md_v1 *lumv1 = (struct lov_user_md_v1 *)&buffer[0]; + struct lov_user_md_v3 lumv3; + struct lov_user_md_v1 *lumv1 = (struct lov_user_md_v1 *)&lumv3; int lmm_magic; int stripe_count; int rc; @@ -405,12 +404,12 @@ static int __lov_setstripe(struct obd_export *exp, int max_lmm_size, lustre_swab_lov_user_md_v1(lumv1); lmm_magic = LOV_USER_MAGIC_V1; } else if (lmm_magic == LOV_USER_MAGIC_V3) { - if (copy_from_user(lumv3, lump, sizeof(*lumv3))) + if (copy_from_user(&lumv3, lump, sizeof(lumv3))) RETURN(-EFAULT); } else if (lmm_magic == __swab32(LOV_USER_MAGIC_V3)) { - if (copy_from_user(lumv3, lump, sizeof(*lumv3))) + if (copy_from_user(&lumv3, lump, sizeof(lumv3))) RETURN(-EFAULT); - lustre_swab_lov_user_md_v3(lumv3); + lustre_swab_lov_user_md_v3(&lumv3); lmm_magic = LOV_USER_MAGIC_V3; } else if (lmm_magic != LOV_USER_MAGIC_V1) { CDEBUG(D_IOCTL, @@ -464,12 +463,12 @@ static int __lov_setstripe(struct obd_export *exp, int max_lmm_size, if (lmm_magic == LOV_USER_MAGIC_V3) { struct pool_desc *pool; - pool = lov_find_pool(lov, lumv3->lmm_pool_name); + pool = lov_find_pool(lov, lumv3.lmm_pool_name); if (pool != NULL) { - if (lumv3->lmm_stripe_offset != - (typeof(lumv3->lmm_stripe_offset))(-1)) { + if (lumv3.lmm_stripe_offset != + (typeof(lumv3.lmm_stripe_offset))(-1)) { rc = lov_check_index_in_pool( - lumv3->lmm_stripe_offset, pool); + lumv3.lmm_stripe_offset, pool); if (rc < 0) { lov_pool_putref(pool); RETURN(-EINVAL); @@ -489,7 +488,7 @@ static int __lov_setstripe(struct obd_export *exp, int max_lmm_size, (*lsmp)->lsm_oinfo[0]->loi_ost_idx = lumv1->lmm_stripe_offset; (*lsmp)->lsm_stripe_size = lumv1->lmm_stripe_size; if (lmm_magic == LOV_USER_MAGIC_V3) - strncpy((*lsmp)->lsm_pool_name, lumv3->lmm_pool_name, + strncpy((*lsmp)->lsm_pool_name, lumv3.lmm_pool_name, LOV_MAXPOOLNAME); rc = 0; } diff --git a/lustre/lvfs/lvfs_linux.c b/lustre/lvfs/lvfs_linux.c index 5d4608b..82b2d66 100644 --- a/lustre/lvfs/lvfs_linux.c +++ b/lustre/lvfs/lvfs_linux.c @@ -89,13 +89,9 @@ static void push_group_info(struct lvfs_run_ctxt *save, save->ngroups = current_ngroups; current_ngroups = 0; } else { - struct cred *cred; task_lock(current); - save->group_info = current_cred()->group_info; - if ((cred = prepare_creds())) { - cred->group_info = ginfo; - commit_creds(cred); - } + save->group_info = current->group_info; + current->group_info = ginfo; task_unlock(current); } } @@ -106,12 +102,8 @@ static void pop_group_info(struct lvfs_run_ctxt *save, if (!ginfo) { current_ngroups = save->ngroups; } else { - struct cred *cred; task_lock(current); - if ((cred = prepare_creds())) { - cred->group_info = save->group_info; - commit_creds(cred); - } + current->group_info = save->group_info; task_unlock(current); } } @@ -130,7 +122,7 @@ void push_ctxt(struct lvfs_run_ctxt *save, struct lvfs_run_ctxt *new_ctx, save->pwd = dget(cfs_fs_pwd(current->fs)); save->pwdmnt = mntget(cfs_fs_mnt(current->fs)); save->luc.luc_umask = current->fs->umask; - save->ngroups = current_cred()->group_info->ngroups; + save->ngroups = current->group_info->ngroups; LASSERT(save->pwd); LASSERT(save->pwdmnt); @@ -138,21 +130,17 @@ void push_ctxt(struct lvfs_run_ctxt *save, struct lvfs_run_ctxt *new_ctx, LASSERT(new_ctx->pwdmnt); if (uc) { - struct cred *cred; - save->luc.luc_uid = current_uid(); - save->luc.luc_gid = current_gid(); - save->luc.luc_fsuid = current_fsuid(); - save->luc.luc_fsgid = current_fsgid(); - save->luc.luc_cap = current_cap(); - - if ((cred = prepare_creds())) { - cred->uid = uc->luc_uid; - cred->gid = uc->luc_gid; - cred->fsuid = uc->luc_fsuid; - cred->fsgid = uc->luc_fsgid; - cred->cap_effective = uc->luc_cap; - commit_creds(cred); - } + save->luc.luc_uid = current->uid; + save->luc.luc_gid = current->gid; + save->luc.luc_fsuid = current->fsuid; + save->luc.luc_fsgid = current->fsgid; + save->luc.luc_cap = current->cap_effective; + + current->uid = uc->luc_uid; + current->gid = uc->luc_gid; + current->fsuid = uc->luc_fsuid; + current->fsgid = uc->luc_fsgid; + current->cap_effective = uc->luc_cap; push_group_info(save, uc->luc_ginfo ?: @@ -183,16 +171,11 @@ void pop_ctxt(struct lvfs_run_ctxt *saved, struct lvfs_run_ctxt *new_ctx, mntput(saved->pwdmnt); current->fs->umask = saved->luc.luc_umask; if (uc) { - struct cred *cred; - if ((cred = prepare_creds())) { - cred->uid = saved->luc.luc_uid; - cred->gid = saved->luc.luc_gid; - cred->fsuid = saved->luc.luc_fsuid; - cred->fsgid = saved->luc.luc_fsgid; - cred->cap_effective = saved->luc.luc_cap; - commit_creds(cred); - } - + current->uid = saved->luc.luc_uid; + current->gid = saved->luc.luc_gid; + current->fsuid = saved->luc.luc_fsuid; + current->fsgid = saved->luc.luc_fsgid; + current->cap_effective = saved->luc.luc_cap; pop_group_info(saved, uc->luc_ginfo ?: uc->luc_identity ? uc->luc_identity->mi_ginfo : @@ -384,7 +367,7 @@ struct l_file *l_dentry_open(struct lvfs_run_ctxt *ctxt, struct l_dentry *de, int flags) { mntget(ctxt->pwdmnt); - return ll_dentry_open(de, ctxt->pwdmnt, flags, current_cred()); + return dentry_open(de, ctxt->pwdmnt, flags); } EXPORT_SYMBOL(l_dentry_open); diff --git a/lustre/mdc/mdc_lib.c b/lustre/mdc/mdc_lib.c index f4223c2..1bab2b6 100644 --- a/lustre/mdc/mdc_lib.c +++ b/lustre/mdc/mdc_lib.c @@ -55,10 +55,10 @@ static void __mdc_pack_body(struct mdt_body *b, __u32 suppgid) LASSERT (b != NULL); b->suppgid = suppgid; - b->uid = cfs_curproc_uid(); - b->gid = cfs_curproc_gid(); - b->fsuid = cfs_curproc_fsuid(); - b->fsgid = cfs_curproc_fsgid(); + b->uid = current->uid; + b->gid = current->gid; + b->fsuid = current->fsuid; + b->fsgid = current->fsgid; b->capability = cfs_curproc_cap_pack(); } @@ -204,8 +204,8 @@ void mdc_open_pack(struct ptlrpc_request *req, struct md_op_data *op_data, /* XXX do something about time, uid, gid */ rec->cr_opcode = REINT_OPEN; - rec->cr_fsuid = cfs_curproc_fsuid(); - rec->cr_fsgid = cfs_curproc_fsgid(); + rec->cr_fsuid = current->fsuid; + rec->cr_fsgid = current->fsgid; rec->cr_cap = cfs_curproc_cap_pack(); if (op_data != NULL) { rec->cr_fid1 = op_data->op_fid1; @@ -284,8 +284,8 @@ static void mdc_setattr_pack_rec(struct mdt_rec_setattr *rec, struct md_op_data *op_data) { rec->sa_opcode = REINT_SETATTR; - rec->sa_fsuid = cfs_curproc_fsuid(); - rec->sa_fsgid = cfs_curproc_fsgid(); + rec->sa_fsuid = current->fsuid; + rec->sa_fsgid = current->fsgid; rec->sa_cap = cfs_curproc_cap_pack(); rec->sa_suppgid = -1; @@ -439,8 +439,8 @@ void mdc_getattr_pack(struct ptlrpc_request *req, __u64 valid, int flags, struct mdt_body *b = req_capsule_client_get(&req->rq_pill, &RMF_MDT_BODY); - b->fsuid = cfs_curproc_fsuid(); - b->fsgid = cfs_curproc_fsgid(); + b->fsuid = current->fsuid; + b->fsgid = current->fsgid; b->capability = cfs_curproc_cap_pack(); b->valid = valid; if (op_data->op_bias & MDS_CHECK_SPLIT) diff --git a/lustre/mdc/mdc_locks.c b/lustre/mdc/mdc_locks.c index d533f11..5606b46 100644 --- a/lustre/mdc/mdc_locks.c +++ b/lustre/mdc/mdc_locks.c @@ -608,11 +608,7 @@ int mdc_enqueue(struct obd_export *exp, struct ldlm_enqueue_info *einfo, int flags = extra_lock_flags; int rc; struct ldlm_res_id res_id; - static const ldlm_policy_data_t lookup_policy = - { .l_inodebits = { MDS_INODELOCK_LOOKUP } }; - static const ldlm_policy_data_t update_policy = - { .l_inodebits = { MDS_INODELOCK_UPDATE } }; - ldlm_policy_data_t const *policy = &lookup_policy; + ldlm_policy_data_t policy = { .l_inodebits = { MDS_INODELOCK_LOOKUP } }; ENTRY; LASSERTF(!it || einfo->ei_type == LDLM_IBITS, "lock type %d\n", @@ -623,7 +619,7 @@ int mdc_enqueue(struct obd_export *exp, struct ldlm_enqueue_info *einfo, if (it) flags |= LDLM_FL_HAS_INTENT; if (it && it->it_op & (IT_UNLINK | IT_GETATTR | IT_READDIR)) - policy = &update_policy; + policy.l_inodebits.bits = MDS_INODELOCK_UPDATE; if (reqp) req = *reqp; @@ -634,12 +630,12 @@ int mdc_enqueue(struct obd_export *exp, struct ldlm_enqueue_info *einfo, LASSERT(lmm && lmmsize == 0); LASSERTF(einfo->ei_type == LDLM_FLOCK, "lock type %d\n", einfo->ei_type); - policy = (ldlm_policy_data_t *)lmm; + policy = *(ldlm_policy_data_t *)lmm; res_id.name[3] = LDLM_FLOCK; } else if (it->it_op & IT_OPEN) { req = mdc_intent_open_pack(exp, it, op_data, lmm, lmmsize, einfo->ei_cbdata); - policy = &update_policy; + policy.l_inodebits.bits = MDS_INODELOCK_UPDATE; einfo->ei_cbdata = NULL; lmm = NULL; } else if (it->it_op & IT_UNLINK) @@ -664,8 +660,7 @@ int mdc_enqueue(struct obd_export *exp, struct ldlm_enqueue_info *einfo, mdc_get_rpc_lock(obddev->u.cli.cl_rpc_lock, it); mdc_enter_request(&obddev->u.cli); } - - rc = ldlm_cli_enqueue(exp, &req, einfo, &res_id, policy, &flags, NULL, + rc = ldlm_cli_enqueue(exp, &req, einfo, &res_id, &policy, &flags, NULL, 0, lockh, 0); if (reqp) *reqp = req; diff --git a/lustre/mdc/mdc_request.c b/lustre/mdc/mdc_request.c index e1ebd0a..3076ce8 100644 --- a/lustre/mdc/mdc_request.c +++ b/lustre/mdc/mdc_request.c @@ -362,8 +362,8 @@ static int mdc_xattr_common(struct obd_export *exp,const struct req_format *fmt, * cfs_curproc_fs{u,g}id() should replace * current->fs{u,g}id for portability. */ - rec->sx_fsuid = cfs_curproc_fsuid(); - rec->sx_fsgid = cfs_curproc_fsgid(); + rec->sx_fsuid = current->fsuid; + rec->sx_fsgid = current->fsgid; rec->sx_cap = cfs_curproc_cap_pack(); rec->sx_suppgid1 = suppgid; rec->sx_suppgid2 = -1; diff --git a/lustre/obdclass/lprocfs_status.c b/lustre/obdclass/lprocfs_status.c index 89d18f2..d059730 100644 --- a/lustre/obdclass/lprocfs_status.c +++ b/lustre/obdclass/lprocfs_status.c @@ -145,29 +145,17 @@ cfs_proc_dir_entry_t *lprocfs_add_simple(struct proc_dir_entry *root, } struct proc_dir_entry *lprocfs_add_symlink(const char *name, - struct proc_dir_entry *parent, const char *format, ...) + struct proc_dir_entry *parent, const char *dest) { struct proc_dir_entry *entry; - char *dest; - va_list ap; - if (parent == NULL || format == NULL) + if (parent == NULL || dest == NULL) return NULL; - OBD_ALLOC_WAIT(dest, MAX_STRING_SIZE + 1); - if (dest == NULL) - return NULL; - - va_start(ap, format); - vsnprintf(dest, MAX_STRING_SIZE, format, ap); - va_end(ap); - entry = proc_symlink(name, parent, dest); if (entry == NULL) CERROR("LprocFS: Could not create symbolic link from %s to %s", name, dest); - - OBD_FREE(dest, MAX_STRING_SIZE + 1); return entry; } diff --git a/lustre/ptlrpc/sec.c b/lustre/ptlrpc/sec.c index 462a3a8..6926fc9 100644 --- a/lustre/ptlrpc/sec.c +++ b/lustre/ptlrpc/sec.c @@ -277,8 +277,8 @@ struct ptlrpc_cli_ctx *get_my_ctx(struct ptlrpc_sec *sec) remove_dead = 0; } } else { - vcred.vc_uid = cfs_curproc_uid(); - vcred.vc_gid = cfs_curproc_gid(); + vcred.vc_uid = cfs_current()->uid; + vcred.vc_gid = cfs_current()->gid; } return sec->ps_policy->sp_cops->lookup_ctx(sec, &vcred, @@ -1471,7 +1471,7 @@ void sptlrpc_import_flush_root_ctx(struct obd_import *imp) void sptlrpc_import_flush_my_ctx(struct obd_import *imp) { - import_flush_ctx_common(imp, cfs_curproc_uid(), 1, 1); + import_flush_ctx_common(imp, cfs_current()->uid, 1, 1); } EXPORT_SYMBOL(sptlrpc_import_flush_my_ctx); @@ -2288,10 +2288,10 @@ int sptlrpc_pack_user_desc(struct lustre_msg *msg, int offset) pud = lustre_msg_buf(msg, offset, 0); - pud->pud_uid = cfs_curproc_uid(); - pud->pud_gid = cfs_curproc_gid(); - pud->pud_fsuid = cfs_curproc_fsuid(); - pud->pud_fsgid = cfs_curproc_fsgid(); + pud->pud_uid = cfs_current()->uid; + pud->pud_gid = cfs_current()->gid; + pud->pud_fsuid = cfs_current()->fsuid; + pud->pud_fsgid = cfs_current()->fsgid; pud->pud_cap = cfs_curproc_cap_pack(); pud->pud_ngroups = (msg->lm_buflens[offset] - sizeof(*pud)) / 4; @@ -2299,7 +2299,7 @@ int sptlrpc_pack_user_desc(struct lustre_msg *msg, int offset) task_lock(current); if (pud->pud_ngroups > current_ngroups) pud->pud_ngroups = current_ngroups; - memcpy(pud->pud_groups, current_cred()->group_info->blocks[0], + memcpy(pud->pud_groups, cfs_current()->group_info->blocks[0], pud->pud_ngroups * sizeof(__u32)); task_unlock(current); #endif diff --git a/lustre/tests/test-framework.sh b/lustre/tests/test-framework.sh index d3dbb63..296073b 100644 --- a/lustre/tests/test-framework.sh +++ b/lustre/tests/test-framework.sh @@ -1467,7 +1467,7 @@ do_node() { local command_status="$TMP/cs" rsh $HOST ":> $command_status" rsh $HOST "(PATH=\$PATH:$RLUSTRE/utils:$RLUSTRE/tests:/sbin:/usr/sbin; - cd $RPWD; LUSTRE=\"$RLUSTRE\" sh -c \"$@\") || + cd $RPWD; sh -c \"$@\") || echo command failed >$command_status" [ -n "$($myPDSH $HOST cat $command_status)" ] && return 1 || true return 0 @@ -1476,12 +1476,12 @@ do_node() { if $verbose ; then # print HOSTNAME for myPDSH="no_dsh" if [[ $myPDSH = no_dsh ]]; then - $myPDSH $HOST "(PATH=\$PATH:$RLUSTRE/utils:$RLUSTRE/tests:/sbin:/usr/sbin; cd $RPWD; LUSTRE=\"$RLUSTRE\" sh -c \"$@\")" | sed -e "s/^/${HOSTNAME}: /" + $myPDSH $HOST "(PATH=\$PATH:$RLUSTRE/utils:$RLUSTRE/tests:/sbin:/usr/sbin; cd $RPWD; sh -c \"$@\")" | sed -e "s/^/${HOSTNAME}: /" else - $myPDSH $HOST "(PATH=\$PATH:$RLUSTRE/utils:$RLUSTRE/tests:/sbin:/usr/sbin; cd $RPWD; LUSTRE=\"$RLUSTRE\" sh -c \"$@\")" + $myPDSH $HOST "(PATH=\$PATH:$RLUSTRE/utils:$RLUSTRE/tests:/sbin:/usr/sbin; cd $RPWD; sh -c \"$@\")" fi else - $myPDSH $HOST "(PATH=\$PATH:$RLUSTRE/utils:$RLUSTRE/tests:/sbin:/usr/sbin; cd $RPWD; LUSTRE=\"$RLUSTRE\" sh -c \"$@\")" | sed "s/^${HOST}: //" + $myPDSH $HOST "(PATH=\$PATH:$RLUSTRE/utils:$RLUSTRE/tests:/sbin:/usr/sbin; cd $RPWD; sh -c \"$@\")" | sed "s/^${HOST}: //" fi return ${PIPESTATUS[0]} } @@ -1522,9 +1522,9 @@ do_nodes() { fi if $verbose ; then - $myPDSH $rnodes "(PATH=\$PATH:$RLUSTRE/utils:$RLUSTRE/tests:/sbin:/usr/sbin; cd $RPWD; LUSTRE=\"$RLUSTRE\" sh -c \"$@\")" + $myPDSH $rnodes "(PATH=\$PATH:$RLUSTRE/utils:$RLUSTRE/tests:/sbin:/usr/sbin; cd $RPWD; sh -c \"$@\")" else - $myPDSH $rnodes "(PATH=\$PATH:$RLUSTRE/utils:$RLUSTRE/tests:/sbin:/usr/sbin; cd $RPWD; LUSTRE=\"$RLUSTRE\" sh -c \"$@\")" | sed -re "s/\w+:\s//g" + $myPDSH $rnodes "(PATH=\$PATH:$RLUSTRE/utils:$RLUSTRE/tests:/sbin:/usr/sbin; cd $RPWD; sh -c \"$@\")" | sed -re "s/\w+:\s//g" fi return ${PIPESTATUS[0]} } @@ -3218,7 +3218,7 @@ do_rpc_nodes () { local list=$1 shift - do_nodes --verbose $list "PATH=$RLUSTRE/tests/:$PATH sh rpc.sh $@ " + do_nodes --verbose $list "PATH=$LUSTRE/tests/:$PATH sh rpc.sh $@ " } wait_clients_import_state () { -- 1.8.3.1