LU-6484 build: remove unused LIBLUSTRE stuff - Remove unused LIBLUSTRE stuff - Fix packaging for ptlrpc module - Remove liblustre.h - Remove LIBLUSTRE_TEST - Remove LLCPPFLAGS and LLCFLAGS - Remove AC_LUSTRE_LIB_VER_OFFSET_WARN Signed-off-by: Dmitry Eremin <dmitry.eremin@intel.com> Change-Id: Ib1735e75a8e1b043eacca861448cecdfc84283cd Reviewed-on: http://review.whamcloud.com/14543 Reviewed-by: John L. Hammond <john.hammond@intel.com> Tested-by: Jenkins Reviewed-by: James Simmons <uja.ornl@yahoo.com> Tested-by: Maloo <hpdd-maloo@intel.com> Reviewed-by: frank zago <fzago@cray.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-6068 misc: update Intel copyright messages 2014 Update the copyright messages for changes made in 2014. In some cases, changes made in 2013 did not generate an updated copyright message, so these files are updated accordingly. In some cases there were no licenses on newly-added files, so add them (either with new copyrights, or including copyrights from the source files). Some types of changes that are not actually changing the code (e.g. whitespace, mass changes to add or remote prefixes, patches updating the copyright messages, patch reversions and the reverted patch, patches that only delete code, etc.) have been excluded. The updatecw.sh script was updated to fix a number of problems: - it now handles comments in nroff (man page) files properly - remove need to handle non-Intel copyrights specially - allow subdirectory to be specified on command-line - improve script debugging when running with "sh -vx" - print patches changing the most files, to catch mass replacements There are still a few cases that need to be fixed up by hand (e.g. files split up and "git log --follow" can't find the original). Signed-off-by: Andreas Dilger <andreas.dilger@intel.com> Change-Id: Ib4875400a4908dc79ddc8b82ab0fe3ee903ebbe5 Reviewed-on: http://review.whamcloud.com/13174 Tested-by: Jenkins Tested-by: Maloo <hpdd-maloo@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-4961 lustre: remove liblustre.h and obd.h from userspace In lustre/tests/ and lustre/utils/ replace inclusion of liblustre.h and obd.h with libcfs/libcfs.h and lustre/lustre_idl.h. In obd.h raise a preprocessod error if being compiled in userspace. Replace the contents of liblustre.h with a single preprocessor error moving what few functions were still in use to their files of use. Signed-off-by: John L. Hammond <john.hammond@intel.com> Change-Id: I778b3207ce561d8adef6f7ecbbc899654c23b9d6 Reviewed-on: http://review.whamcloud.com/10194 Tested-by: Jenkins Reviewed-by: Bob Glossman <bob.glossman@intel.com> Tested-by: Maloo <hpdd-maloo@intel.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Robert Read <robert.read@intel.com>
LU-3963 cleanup: C89 and build cleanups use C99 initialization for a types, remove some platform depended code and use POSIX compatible instead. don't build a lhsmtool is none utils allowed. Signed-off-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com> Change-Id: I6e2837953902520240e9ceb251c92329d328d715 Reviewed-on: http://review.whamcloud.com/7803 Tested-by: Jenkins Tested-by: Maloo <hpdd-maloo@intel.com> Reviewed-by: Bob Glossman <bob.glossman@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-4679 liblustre: remove dead code and clean headers In liblustre, remove statically unused functions, varaibles and macros. Also ensure that the headers needed by the c and h files are included at top level. Prune unneeded includes. In libsysio, include sys/queue.h in fs.h. Signed-off-by: John L. Hammond <john.hammond@intel.com> Change-Id: I878b442b6d0ae17d8d5d33375ca7596618323c52 Reviewed-on: http://review.whamcloud.com/9429 Reviewed-by: Lai Siyao <lai.siyao@intel.com> Tested-by: Jenkins Tested-by: Maloo <hpdd-maloo@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-4674 endianness: Fix __{LITTLE,BIG}_ENDIAN macro usage Fixed the userspace code where __{LITTLE,BIG}_ENDIAN is tested with #ifdef. This patch replaces those checks with #if __BYTE_ORDER == __{LITTLE,BIG}_ENDIAN Signed-off-by: Swapnil Pimpale <spimpale@ddn.com> Change-Id: I92d4cf0c880d8032ea5023cb47ccfe7236dd03ab Reviewed-on: http://review.whamcloud.com/9641 Tested-by: Jenkins Tested-by: Maloo <hpdd-maloo@intel.com> Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Jian Yu <jian.yu@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-2430 mdd: add lfs mv to migrate inode. Add lfs mv to migrate the individual inode from one MDT to another MDT, and this function will only migrate inode layout on MDT but not touch data object on OST. lfs mv -M 1 /mnt/lustre/test1 #move test1 to MDT1. The directory will be migrated from top to the bottom, i.e. migrating parent first, then migrating the child. Add migrate into sanity 17n to check on-disk format. Add sanity 230(c,d,e,f) sanityn 80 to for migration. Signed-off-by: wang di <di.wang@intel.com> Change-Id: Ib4456a1db8909bd96260c67fff48922081948dcd Reviewed-on: http://review.whamcloud.com/6662 Tested-by: Jenkins Reviewed-by: Alex Zhuravlev <alexey.zhuravlev@intel.com> Tested-by: Maloo <hpdd-maloo@intel.com> Reviewed-by: John L. Hammond <john.hammond@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-3963 libcfs: convert include/lclient/ldlm/lfsck cfs_atomic This patch converts all cfs_atomic primitives in lustre/include, lclient, ldlm and lfsck directories. Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com> Signed-off-by: Peng Tao <tao.peng@emc.com> Signed-off-by: James Simmons <uja.ornl@gmail.com> Change-Id: Ie746993b917bd6ea8c2403a47488ef0e5a06d6fb Reviewed-on: http://review.whamcloud.com/7072 Tested-by: Jenkins Tested-by: Maloo <hpdd-maloo@intel.com> Reviewed-by: Bob Glossman <bob.glossman@intel.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-3974 libcfs: replace num_physpages with totalram_pages Currently lustre uses an exported kernel variable num_physpages but this variable includes also non-ram pages and is not memory hotplug support aware. Also in kernels 3.11 and above this variable is no longer exported. The exported variable totalram_pages handles the the limitations of num_physpages plus its avaliable in all Lustre supported kernels. Signed-off-by: James Simmons <uja.ornl@gmail.com> Change-Id: I021fbbd99b2c8e538fc0357a676834e26d690702 Reviewed-on: http://review.whamcloud.com/7726 Reviewed-by: Bob Glossman <bob.glossman@intel.com> Reviewed-by: Dmitry Eremin <dmitry.eremin@intel.com> Tested-by: Hudson Tested-by: Maloo <whamcloud.maloo@gmail.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Peng Tao <bergwolf@gmail.com>
LU-1346 libcfs: cleanup libcfs primitive (linux-prim.h) Affected primitives: cfs_mb, cfs_in_interrupt, cfs_might_sleep, cfs_group_info_t, cfs_get_group_info, cfs_put_group_info, cfs_set_current_groups, cfs_groups_free, cfs_groups_alloc, cfs_get_random_bytes_prim Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com> Signed-off-by: Peng Tao <tao.peng@emc.com> Signed-off-by: James Simmons <uja.ornl@gmail.com> Change-Id: I52293cad577f2027cabf1b124dbb1b7354fef3a5 Reviewed-on: http://review.whamcloud.com/6957 Tested-by: Hudson Tested-by: Maloo <whamcloud.maloo@gmail.com> Reviewed-by: Keith Mannthey <keith.mannthey@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-1346 libcfs: cleanup libcfs primitive (linux-prim.h) Affected primitives: cfs_kthread_run, CFS_DAEMON_FLAGS, cfs_task_t, cfs_current, cfs_task_lock, cfs_task_unlock, CFS_DECL_JOURNAL_DATA, CFS_PUSH_JOURNAL, CFS_POP_JOURNAL, cfs_sigset_t, cfs_timer_t, CFS_MAX_SCHEDULE_TIMEOUT Signed-off-by: Peng Tao <tao.peng@emc.com> Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com> Signed-off-by: James Simmons <uja.ornl@gmail.com> Change-Id: Iae0e9a9ccaa39fda71175205e9af451e65b620d1 Reviewed-on: http://review.whamcloud.com/6956 Tested-by: Hudson Reviewed-by: Keith Mannthey <keith.mannthey@intel.com> Tested-by: Maloo <whamcloud.maloo@gmail.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-1346 libcfs: cleanup waitq related primitives Plus some manual change: 1. Remove __wait_event_timeout definition 2. Change cfs_waitq_wait_event_timeout and cfs_waitq_wait_event_interruptible_timeout to linux kernel API 3. Replace some function definitions in linux-prim.c as macros in linux-prim.h Signed-off-by: Peng Tao <tao.peng@emc.com> Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com> Signed-off-by: James Simmons <uja.ornl@gmail.com> Change-Id: I7e53f3deac9e4076e78c109662ff9d1e90239e8d Reviewed-on: http://review.whamcloud.com/6955 Tested-by: Hudson Tested-by: Maloo <whamcloud.maloo@gmail.com> Reviewed-by: Keith Mannthey <keith.mannthey@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-1346 libcfs: cleanup libcfs primitive (linux-prim.h) Affected primitives: CFS_KERN_XXX, CFS_L1_CACHE_ALIGN, CFS_NR_IRQS, CFS_EXPORT_SYMBOL, cfs_psdev_t, cfs_psdev_register/deregister, cfs_sysctl_table_t, cfs_sysctl_table_header_t, cfs_unregister_sysctl_table, PORTAL_SYMBOL_PUT/GET, PORTAL_MODULE_USE/UNUSE, cfs_(try_)module_get, __cfs_module_get, cfs_module_refcount, cfs_module_t, cfs_request_module Signed-off-by: Peng Tao <tao.peng@emc.com> Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com> Signed-off-by: James Simmons <uja.ornl@gmail.com> Change-Id: Ie1ab42d60b2cba052bb21f4ec5b02a7f7a555515 Reviewed-on: http://review.whamcloud.com/6954 Tested-by: Hudson Tested-by: Maloo <whamcloud.maloo@gmail.com> Reviewed-by: Keith Mannthey <keith.mannthey@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-1346 libcfs: cleanup cfs_curproc_xxx macros Change cfs_curproc_xxx to stadard linux kernel API. Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com> Signed-off-by: Peng Tao <tao.peng@emc.com> Signed-off-by: James Simmons <uja.ornl@gmail.com> Change-Id: Ic526d02f547b04550e6049f2e343dd678bdbdf3c Reviewed-on: http://review.whamcloud.com/4779 Tested-by: Hudson Tested-by: Maloo <whamcloud.maloo@gmail.com> Reviewed-by: Keith Mannthey <keith.mannthey@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-1346 libcfs: cleanup macros in portals_compat25.h . remove some unused/unnecessary macros such as smp_num_cpus / SIGNAL_MASK_ASSERT etc. . replace some macros with direct kernel API calls such as RECALC_SIGPENDING/CLEAR_SIGPENDING/CURRENT_SECONDS, cfs_wait_event_interruptible/_exclusive etc. Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com> Signed-off-by: Peng Tao <tao.peng@emc.com> Signed-off-by: James Simmons <uja.ornl@gmail.com> Change-Id: I2fd4bb4e05136d738ee5357b35893a6ca2ec335a Reviewed-on: http://review.whamcloud.com/4778 Tested-by: Hudson Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Keith Mannthey <keith.mannthey@intel.com> Tested-by: Maloo <whamcloud.maloo@gmail.com>
LU-1346 libcfs: tcpip/time/type related cleanup Cleanup some macros in linux-tcpip.h, linux-time.h, linux-type.h. Move some different kernel compatible macros to portals_compat25.h. Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com> Signed-off-by: Peng Tao <tao.peng@emc.com> Signed-off-by: James Simmons <uja.ornl@gmail.com> Change-Id: Ia03046ff53a5f51e67d2fe7ccee7a6441ebe1dc7 Reviewed-on: http://review.whamcloud.com/4777 Tested-by: Hudson Tested-by: Maloo <whamcloud.maloo@gmail.com> Reviewed-by: Keith Mannthey <keith.mannthey@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-2919 hsm: Implementation of exclusive open In this patch, a framework of lease is implemented. However, only exclusive lease is supported right now. To apply a lease, MDS_OPEN_LEASE must be set to open the file, EX mode open lock is returned to the client side to hold a lease. From that time on, if this file is opened again by other processes, the open lock will be revoked so the client who holds the lease will know the lease is already broken by checking that open lock. To release a lease, normal close is used. The client will revoke the open lock before sending CLOSE request. Lease can be applied in two ways. ll_lease_open()/close() can be called directly if the lease holder is in kernel space; or if the lease holder lives in user space, it has to open the file first and then use ioctl() with command LL_IOC_SET_LEASE to apply a lease. The lease holder has to poll the lease status itself. Signed-off-by: Jinshan Xiong <jinshan.xiong@intel.com> Signed-off-by: John L. Hammond <john.hammond@intel.com> Change-Id: I181edbb0b31fcf60858656170528d2ffda9c9bb6 Reviewed-on: http://review.whamcloud.com/6730 Tested-by: Hudson Tested-by: Maloo <whamcloud.maloo@gmail.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-1346 libcfs: replace cfs_ memory wrappers Replace memory relevant wrappers with kernel API. Affected primitives: CFS_PAGE_SIZE, CFS_PAGE_SHIFT, cfs_num_physpages, cfs_copy_from_user, cfs_copy_to_user, cfs_page_address, cfs_kmap/cfs_kunmap, cfs_get_page, cfs_page_count, cfs_page_index, cfs_page_pin, cfs_page_unpin, cfs_memory_pressure_get/set/clr, CFS_NUM_CACHEPAGES, CFS_ALLOC_XXX flags, cfs_alloc/free, cfs_alloc/free_large, cfs_alloc/free_page, CFS_DECL_MMSPACE, CFS_MMSPACE_OPEN, CFS_MMSPACE_CLOSE, CFS_SLAB_XXX flags, cfs_shrinker_t, cfs_set/remove_shrinker, CFS_DEFAULT_SEEKS, cfs_mem_cache_t, cfs_mem_cache_alloc/free/create/destroy, cfs_mem_is_in_cache manual changes: 1. cfs_alloc_flags_to_gfp() is removed 2. remove kmalloc/kfree etc. from linux-mem.c and linux-mem.h 3. remove page_address/kmap/kunmap etc. from linux-mem.h 4. remove page_cache_get/page_cache_release from echo_internal.h. They are defined already in user-mem.h 5. change kmem_cache_create/destroy prototype to kernel's and modify all callers to match them 6. define _SPL_KMEM_H and related macros to avoid using spl's sys/kmem.h that redefines slab allocator 7. change kmem_virt to is_vmalloc_addr as provided by kernel, so that we don't use any spl's sys/kmem.h functions 8. clean up include files a little bit in osd-zfs 9. various coding style cleanup NUMA allocators(cfs_cpt_xxx) are not changed in this patch. gnilnd is not converted, as requested by James Simmons. Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com> Signed-off-by: Peng Tao <tao.peng@emc.com> Change-Id: Iadfbb0d5a0e31c78dd6c811e5ffdb468fa7e6f44 Reviewed-on: http://review.whamcloud.com/2831 Tested-by: Hudson Tested-by: Maloo <whamcloud.maloo@gmail.com> Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>
LU-2850 compat: posix_acl_{to,from}_xattr take user_namespace Commit 5f3a4a28 (v3.7) added a struct user_namespace argument to posix_acl_{to,from}_xattr. Pretty much every caller just uses &init_user_ns. We mask it off in user mode so we don't need to create a fake structure only to ignore it. Signed-off-by: Jeff Mahoney <jeffm@suse.com> Change-Id: I558a06941b364f241fd4423720957beeaf1d3cea Reviewed-on: http://review.whamcloud.com/5768 Tested-by: Hudson Reviewed-by: Alexey Shvetsov <alexxy@gentoo.org> Reviewed-by: Peng Tao <bergwolf@gmail.com> Tested-by: Maloo <whamcloud.maloo@gmail.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com> Reviewed-by: James Simmons <uja.ornl@gmail.com>
LU-3030 build: Update Master Copyrights pre 2.4 split This is the output of the tool. Please note the tool changed to using commit dates over author dates and there are a few spots with erroneous 2011 copyrights that have been removed by the tool. Please see script update for further details. Signed-off-by: Keith Mannthey <keith.mannthey@intel.com> Change-Id: I6600369df53c01c425f33f62d5d6c4f8f1b48498 Reviewed-on: http://review.whamcloud.com/5841 Tested-by: Hudson Tested-by: Maloo <whamcloud.maloo@gmail.com> Reviewed-by: Bob Glossman <bob.glossman@intel.com> Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>