LU-1842 quota: remove quota code This patch removes the quota code (from quota directory, but also from mdd & obdfilter) which is going to be replaced by the new implementation. This patch also modifies the mdt to use the new space accounting scheme as already used by the ofd layer. sanity-quota.sh now also uses ofd by default and only runs the space accounting tests until quota enforcement support is landed. Signed-off-by: Johann Lombardi <johann@whamcloud.com> Change-Id: I85cbbf6058859e5d19f80aa128f45b6d41c37d92 Reviewed-on: http://review.whamcloud.com/4098 Reviewed-by: Niu Yawei <niu@whamcloud.com> Tested-by: Hudson Reviewed-by: Alex Zhuravlev <bzzz@whamcloud.com> Tested-by: Maloo <whamcloud.maloo@gmail.com>
LU-1756 kernel: cleanup lustre_compat25.h 1. unused functions: ll_remove_suid(), labs() 2. abs() is always defined 3. use SLAB_DESTROY_BY_RCU directly 4. call sb_any_quota_loaded() directl Signed-off-by: Peng Tao <tao.peng@emc.com> Change-Id: Ic52e1a75f3d71887ae91f03a465112ab6c08c746 Reviewed-on: http://review.whamcloud.com/3688 Tested-by: Hudson Tested-by: Maloo <whamcloud.maloo@gmail.com> Reviewed-by: Andreas Dilger <adilger@whamcloud.com> Reviewed-by: Niu Yawei <niu@whamcloud.com> Reviewed-by: Yang Sheng <ys@whamcloud.com>
LU-812 compat: SPIN/RW_LOCK_UNLOCKED no longer exist SPIN_LOCK_UNLOCKED/RW_LOCK_UNLOCKED were deprecated and no longer exist after 2.6.39. Use DEFINE_SPIN_LOCK/DEFINE_RW_LOCK instead. Signed-off-by: James Simmons <uja.ornl@gmail.com> Signed-off-by: Wally Wang <wang@cray.com> Change-Id: Ie294e817c850c35e561987f6ab46c6d12d6d018d Reviewed-on: http://review.whamcloud.com/1942 Reviewed-by: Andreas Dilger <adilger@whamcloud.com> Tested-by: Hudson Tested-by: Maloo <whamcloud.maloo@gmail.com> Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-709 build: clean up i_mutex/i_private/quota_info macros 1. struct inode has i_mutex instead of i_sem since v2.6.16 2. struct inode has i_private since v2.6.17 3. struct quota_info uses mutex instead semaphore since v2.6.17 4. move LC_SECURITY_PLUG to under v2.6.27 Signed-off-by: Peng Tao <tao.peng@emc.com> Change-Id: I587d18a8d63927aa0a668268d252f71e7f224b50 Reviewed-on: http://review.whamcloud.com/2318 Tested-by: Hudson Tested-by: Maloo <whamcloud.maloo@gmail.com> Reviewed-by: Andreas Dilger <adilger@whamcloud.com> Reviewed-by: Yang Sheng <ys@whamcloud.com> Reviewed-by: Niu Yawei <niu@whamcloud.com>
LU-709 build: clean up quota_read, follow_link and RCU 1. super_operations.quota_read exists since v2.6.12 2. inode_operations->follow_link returns a cookie since v2.6.13 3. RCU exists since v2.6.12 Signed-off-by: Peng Tao <tao.peng@emc.com> Change-Id: Id79df5dcb0e3db9eb424337fd71d896ed8fefcd6 Reviewed-on: http://review.whamcloud.com/2316 Tested-by: Hudson Tested-by: Maloo <whamcloud.maloo@gmail.com> Reviewed-by: Andreas Dilger <adilger@whamcloud.com> Reviewed-by: Yang Sheng <ys@whamcloud.com> Reviewed-by: Niu Yawei <niu@whamcloud.com>
LU-56 ptlrpc: partition data for ptlrpc service We will have multiple partition data & threads for ptlrpc service, this patch is the first step work, we moved quite a lot members of ptlrpc_service to a new structure ptlrpc_service_part. Now we only create one instance of ptlrpc_service_part for each service, but we will have multiple instances for each service very soon (instance per CPT, CPU ParTion). Signed-off-by: Liang Zhen <liang@whamcloud.com> Change-Id: I63d816bdf44a22528c6097fe348060f57d862df3 Reviewed-on: http://review.whamcloud.com/2895 Tested-by: Hudson Reviewed-by: wangdi <di.wang@whamcloud.com> Tested-by: Maloo <whamcloud.maloo@gmail.com> Reviewed-by: Andreas Dilger <adilger@whamcloud.com>
LU-1493 quota: extra release caused by race There is a race between the check_cur_qunit() and the dqacq_completion(): check_cur_qunit() read hardlimit and calculate how much quota need be acquired/released based on the hardlimit, however, the hardlimit can be changed by the dqacq_completion() at anytime. So that could result in extra quota acquire/release when there is inflight dqacq. In general, such extra dqacq dosen't bring fatal error, unless an extra release is going to release more than 'hardlimit' quota. To minimize the code changes (anyway, it'll be totally rewritten in the new quota design), we just do one more check here to avoid the extra release which could bring fatal error. A better solution could be calculating the qd_count here and removing the lqs_blk/ino_rec stuff. Signed-off-by: Niu Yawei <niu@whamcloud.com> Change-Id: I0ad5ff0f32e39f32872c201ad1d545fbd9d1a57d Reviewed-on: http://review.whamcloud.com/3074 Tested-by: Hudson Tested-by: Maloo <whamcloud.maloo@gmail.com> Reviewed-by: Johann Lombardi <johann@whamcloud.com> Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
LU-1438 quota: quota active checking is missed on slave On quota slave, we missed checking if quota is enabled in the quota_check_common() and several other places. Which could cause slave retry acquire quota in quota_chk_acq_common() infinitely when the quota is already turned off on master. Signed-off-by: Niu Yawei <niu@whamcloud.com> Change-Id: Iaa48c7cca05daf595b6d3b7e4025c7650e460918 Reviewed-on: http://review.whamcloud.com/3097 Tested-by: Hudson Reviewed-by: Fan Yong <yong.fan@whamcloud.com> Tested-by: Maloo <whamcloud.maloo@gmail.com> Reviewed-by: Johann Lombardi <johann@whamcloud.com>
LU-1438 quota: fix race in quota_chk_acq_common() quota_check_common() & qctxt_adjust_qunit() uses different way to check if quota is enforced on certain ID, which could result in infinite loop in quota_chk_acq_common() when the QB/QI_SET flag is cleared just after checking. This patch used a non-instrusive way to fix this rare race. Signed-off-by: Niu Yawei <niu@whamcloud.com> Change-Id: Ia8c5cb593abf515cf4dc041c63c8a247ebe0cd03 Reviewed-on: http://review.whamcloud.com/2996 Reviewed-by: Johann Lombardi <johann@whamcloud.com> Reviewed-by: Fan Yong <yong.fan@whamcloud.com> Tested-by: Hudson Tested-by: Maloo <whamcloud.maloo@gmail.com> Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-1347 style: removes obsolete EXPORT_SYMTAB macros EXPORT_SYMTAB is obsolete after 2.4 kernel, this patch removes all EXPORT_SYMTAB macros from source code. Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com> Change-Id: I5fe3a5544d0cdb45f8d40cd5828a18ea3e1ad26a Reviewed-on: http://review.whamcloud.com/2671 Tested-by: Hudson Reviewed-by: Andreas Dilger <adilger@whamcloud.com> Tested-by: Maloo <whamcloud.maloo@gmail.com> Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-56 libcfs: NUMA allocator and code cleanup This patch covered a few things: - Implementation of NUMA allocaters based on concept of CPU partition - Add macros of NUMA allocators for both libcfs and OBD - cleanup OBD allocaters - A minor fix for llite, it's using GFP flag which should be CFS_ALLOC flag Signed-off-by: Liang Zhen <liang@whamcloud.com> Change-Id: I5441a504d5df217b59b5db59e37ddb4855e7ae49 Reviewed-on: http://review.whamcloud.com/2523 Tested-by: Hudson Reviewed-by: Doug Oucharek <doug@whamcloud.com> Tested-by: Maloo <whamcloud.maloo@gmail.com> Reviewed-by: Andreas Dilger <adilger@whamcloud.com> Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-1214 quota: don't compile quota module for client 1. Only and always compile lquota module for server, and needs not compile quota library for liblustre. 2. HAVE_QUOTA_SUPPORT macro is no more needed in quota source files 3. Removes several un-used function declarations in quota_internal.h Signed-off-by: Liu Xuezhao <xuezhao.liu@emc.com> Change-Id: Ibf94ba6f37b43721cc53c2d7bde017b039581bbd Reviewed-on: http://review.whamcloud.com/2363 Tested-by: Hudson Tested-by: Maloo <whamcloud.maloo@gmail.com> Reviewed-by: Andreas Dilger <adilger@whamcloud.com> Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-1347 build: remove the vim/emacs modelines Delete all of the vim/emacs modelines. Add copyright information for a few files. Signed-off-by: Liang Zhen <liang@whamcloud.com> Change-Id: Ic22ce8d8cc7786ffdb19937eb9f93a2d49aa2581 Reviewed-on: http://review.whamcloud.com/2658 Tested-by: Hudson Reviewed-by: Andreas Dilger <adilger@whamcloud.com> Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-1146 build: batch update copyright messages Update copyright messages for all files modified by Whamcloud. Signed-off-by: Andreas Dilger <adilger@whamcloud.com> Change-Id: I9654b780c6e4726d369e2a893f7e210d4078819b Reviewed-on: http://review.whamcloud.com/2242 Tested-by: Hudson Tested-by: Maloo <whamcloud.maloo@gmail.com> Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-882 quota: Quota code compares unsigned < 0 Port from b23858. In check_cur_qunit(), it checks "if (limit + record < 0)", however, the limit is unsigned, so this check will be always false, and when limit is smaller than -record, following "limit += record" will make limit a unreasonable large value. This patch also fixed a similar defect in dqacq_handler(). Signed-off-by: Vladimir Saveliev <vladimir.saveliev@oracle.com> Signed-off-by: Niu Yawei <niu@whamcloud.com> Change-Id: Iea02143dae5542f1a9f9cc823a684a18031b8a03 Reviewed-on: http://review.whamcloud.com/1889 Tested-by: Hudson Tested-by: Maloo <whamcloud.maloo@gmail.com> Reviewed-by: Fan Yong <yong.fan@whamcloud.com> Reviewed-by: Johann Lombardi <johann@whamcloud.com> Reviewed-by: Oleg Drokin <green@whamcloud.com>
ORNL-22 general ptlrpcd threads pool support Originally, there were two ptlrpcd threads on each node to serve all async RPCs on the node, one ptlrpcd is for BRW, the other is for all others. Such load mode cannot match more and more async RPCs process on current large SMP node. So we introduce ptlrpcd threads pool, any ptlrpcd threads in the pool can be common shared by all async RPCs, like async I/O, async glimpse lock, statahead, and ect. The async RPC sponsor can affect the system load mode by specifying load policy when pushes the RPC into ptlrpcd queue. On the other hand, it supports some flexible binding policies to bind some ptlrpcd threads on CPU cores for reducing cross-CPU data traffic, and also allow some ptlrpcd threads to be scheduled freely on any CPU core to try to guarantee processing async RPCs in time. Signed-off-by: Fan Yong <yong.fan@whamcloud.com> Change-Id: Icc0bd689df73b6863cc9adc544c3654c046cb8bd Reviewed-on: http://review.whamcloud.com/1184 Tested-by: Hudson Tested-by: Maloo <whamcloud.maloo@gmail.com> Reviewed-by: Andreas Dilger <adilger@whamcloud.com> Reviewed-by: Johann Lombardi <johann@whamcloud.com> Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-550 incorrect quota hash function Quota code uses 'uid' or '(1 << 32) + gid' as the hash key, however, the quota hash function lqs_hash() always try to interpret such a unsigned long long key as a 'quota_adjust_qunit' struct, then calculate the hash value by quota_adjust_qunit->qaq_id. Signed-off-by: Niu Yawei <niu@whamcloud.com> Change-Id: I48dc7f276eb97f34b22097b4edc529d5f76acf37 Reviewed-on: http://review.whamcloud.com/1162 Tested-by: Hudson Reviewed-by: Fan Yong <yong.fan@whamcloud.com> Tested-by: Maloo <whamcloud.maloo@gmail.com> Reviewed-by: Johann Lombardi <johann@whamcloud.com> Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-502 don't allow to kill service threads by OOM killer. OOM can produce a many issues like requests processing counter. Change-Id: I8d417d148b589ea6de84c5d16bc2607a59852564 Signed-off-by: Alexey Lyashkov <alexey_lyashkov@xyratex.com> Reviewed-on: http://review.whamcloud.com/1088 Tested-by: Hudson Reviewed-by: Andreas Dilger <adilger@whamcloud.com> Tested-by: Maloo <whamcloud.maloo@gmail.com> Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-369 assert(t_watchdog) failed in quota_chk_acq_common() Remove the incorrect assert(t_watchdog) in quota_chk_acq_common() and schedule_dqacq(), since they might be called from recovery thread, which doesn't have t_watchdog attached. Signed-off-by: Niu Yawei <niu@whamcloud.com> Change-Id: I22e65c66827811309e43910e9a4d34251aad99c3 Reviewed-on: http://review.whamcloud.com/870 Tested-by: Hudson Tested-by: Maloo <whamcloud.maloo@gmail.com> Reviewed-by: Johann Lombardi <johann@whamcloud.com> Reviewed-by: Oleg Drokin <green@whamcloud.com>
LU-147 hash code cleanup Change-Id: I97cc182a9618271e59c4d6a8fbc2e887e1fb1a17 Signed-off-by: Alexey Lyashkov <Alexey_Lyashkov@xyratex.com> Signed-off-by: Vitaly Fertman <vitaly_fertman@xyratex.com> Reviewed-on: http://review.whamcloud.com/346 Tested-by: Hudson Reviewed-by: Andreas Dilger <adilger@whamcloud.com> Reviewed-by: Liang Zhen <liang@whamcloud.com> Reviewed-by: Oleg Drokin <green@whamcloud.com>