From green at linuxhacker.ru Mon Jun 6 03:28:51 2016 From: green at linuxhacker.ru (green at linuxhacker.ru) Date: Sun, 5 Jun 2016 23:28:51 -0400 Subject: [lustre-devel] [PATCH 2/4] staging/lustre/llite: define per open file cache for ll_cl_context In-Reply-To: <1465183733-3147667-1-git-send-email-green@linuxhacker.ru> References: <1465183733-3147667-1-git-send-email-green@linuxhacker.ru> Message-ID: <1465183733-3147667-3-git-send-email-green@linuxhacker.ru> From: Jinshan Xiong In ll_readpage and ll_write_begin, it needs to find out the cl_env and cl_io, a.k.a ll_cl_context, when the IO is initialized. It used to call cl_env_get() to figure it out but turned out to be contended if multiple threads are doing IO. In this patch, a per open file ll_cl_context cache is created. When IO type of CIT_READ, CIT_WRITE and CIR_FAULT is initialized, it will add a ll_cl_context into the cache maintained in ll_file_data. In this case, the ll_cl_context can be found in ll_readpage and ll_write_begin later. Signed-off-by: Jinshan Xiong Reviewed-on: http://review.whamcloud.com/10503 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5108 Reviewed-on: http://review.whamcloud.com/10955 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5260 Reviewed-by: Lai Siyao Reviewed-by: Bobi Jam Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/llite/file.c | 7 + .../staging/lustre/lustre/llite/llite_internal.h | 11 +- drivers/staging/lustre/lustre/llite/llite_mmap.c | 5 + drivers/staging/lustre/lustre/llite/rw.c | 145 +++++++++------------ drivers/staging/lustre/lustre/llite/rw26.c | 17 +-- 5 files changed, 88 insertions(+), 97 deletions(-) diff --git a/drivers/staging/lustre/lustre/llite/file.c b/drivers/staging/lustre/lustre/llite/file.c index f47f2ac..198ee3b 100644 --- a/drivers/staging/lustre/lustre/llite/file.c +++ b/drivers/staging/lustre/lustre/llite/file.c @@ -519,6 +519,11 @@ static int ll_local_open(struct file *file, struct lookup_intent *it, LUSTRE_FPRIVATE(file) = fd; ll_readahead_init(inode, &fd->fd_ras); fd->fd_omode = it->it_flags & (FMODE_READ | FMODE_WRITE | FMODE_EXEC); + + /* ll_cl_context initialize */ + rwlock_init(&fd->fd_lock); + INIT_LIST_HEAD(&fd->fd_lccs); + return 0; } @@ -1178,7 +1183,9 @@ restart: CERROR("Unknown IO type - %u\n", vio->vui_io_subtype); LBUG(); } + ll_cl_add(file, env, io); result = cl_io_loop(env, io); + ll_cl_remove(file, env); if (args->via_io_subtype == IO_NORMAL) up_read(&lli->lli_trunc_sem); if (write_mutex_locked) diff --git a/drivers/staging/lustre/lustre/llite/llite_internal.h b/drivers/staging/lustre/lustre/llite/llite_internal.h index 3f2f30b..7fb949a 100644 --- a/drivers/staging/lustre/lustre/llite/llite_internal.h +++ b/drivers/staging/lustre/lustre/llite/llite_internal.h @@ -640,6 +640,8 @@ struct ll_file_data { * false: unknown failure, should report. */ bool fd_write_failed; + rwlock_t fd_lock; /* protect lcc list */ + struct list_head fd_lccs; /* list of ll_cl_context */ }; struct lov_stripe_md; @@ -715,8 +717,9 @@ void ll_readahead_init(struct inode *inode, struct ll_readahead_state *ras); int ll_readahead(const struct lu_env *env, struct cl_io *io, struct cl_page_list *queue, struct ll_readahead_state *ras, bool hit); -struct ll_cl_context *ll_cl_init(struct file *file, struct page *vmpage); -void ll_cl_fini(struct ll_cl_context *lcc); +struct ll_cl_context *ll_cl_find(struct file *file); +void ll_cl_add(struct file *file, const struct lu_env *env, struct cl_io *io); +void ll_cl_remove(struct file *file, const struct lu_env *env); extern const struct address_space_operations ll_aops; @@ -858,11 +861,11 @@ struct vvp_io_args { }; struct ll_cl_context { + struct list_head lcc_list; void *lcc_cookie; + const struct lu_env *lcc_env; struct cl_io *lcc_io; struct cl_page *lcc_page; - struct lu_env *lcc_env; - int lcc_refcheck; }; struct ll_thread_info { diff --git a/drivers/staging/lustre/lustre/llite/llite_mmap.c b/drivers/staging/lustre/lustre/llite/llite_mmap.c index 88ef1ca..7610799 100644 --- a/drivers/staging/lustre/lustre/llite/llite_mmap.c +++ b/drivers/staging/lustre/lustre/llite/llite_mmap.c @@ -315,8 +315,13 @@ static int ll_fault0(struct vm_area_struct *vma, struct vm_fault *vmf) vio->u.fault.ft_flags = 0; vio->u.fault.ft_flags_valid = false; + /* May call ll_readpage() */ + ll_cl_add(vma->vm_file, env, io); + result = cl_io_loop(env, io); + ll_cl_remove(vma->vm_file, env); + /* ft_flags are only valid if we reached * the call to filemap_fault */ diff --git a/drivers/staging/lustre/lustre/llite/rw.c b/drivers/staging/lustre/lustre/llite/rw.c index 3363977..fa42869 100644 --- a/drivers/staging/lustre/lustre/llite/rw.c +++ b/drivers/staging/lustre/lustre/llite/rw.c @@ -59,84 +59,6 @@ #include "llite_internal.h" #include "../include/linux/lustre_compat25.h" -/** - * Finalizes cl-data before exiting typical address_space operation. Dual to - * ll_cl_init(). - */ -void ll_cl_fini(struct ll_cl_context *lcc) -{ - struct lu_env *env = lcc->lcc_env; - struct cl_io *io = lcc->lcc_io; - struct cl_page *page = lcc->lcc_page; - - LASSERT(lcc->lcc_cookie == current); - LASSERT(env); - - if (page) { - lu_ref_del(&page->cp_reference, "cl_io", io); - cl_page_put(env, page); - } - - cl_env_put(env, &lcc->lcc_refcheck); -} - -/** - * Initializes common cl-data at the typical address_space operation entry - * point. - */ -struct ll_cl_context *ll_cl_init(struct file *file, struct page *vmpage) -{ - struct ll_cl_context *lcc; - struct lu_env *env; - struct cl_io *io; - struct cl_object *clob; - struct vvp_io *vio; - - int refcheck; - int result = 0; - - clob = ll_i2info(file_inode(file))->lli_clob; - LASSERT(clob); - - env = cl_env_get(&refcheck); - if (IS_ERR(env)) - return ERR_CAST(env); - - lcc = &ll_env_info(env)->lti_io_ctx; - memset(lcc, 0, sizeof(*lcc)); - lcc->lcc_env = env; - lcc->lcc_refcheck = refcheck; - lcc->lcc_cookie = current; - - vio = vvp_env_io(env); - io = vio->vui_cl.cis_io; - lcc->lcc_io = io; - if (!io) - result = -EIO; - - if (result == 0 && vmpage) { - struct cl_page *page; - - LASSERT(io->ci_state == CIS_IO_GOING); - LASSERT(vio->vui_fd == LUSTRE_FPRIVATE(file)); - page = cl_page_find(env, clob, vmpage->index, vmpage, - CPT_CACHEABLE); - if (!IS_ERR(page)) { - lcc->lcc_page = page; - lu_ref_add(&page->cp_reference, "cl_io", io); - result = 0; - } else { - result = PTR_ERR(page); - } - } - if (result) { - ll_cl_fini(lcc); - lcc = ERR_PTR(result); - } - - return lcc; -} - static void ll_ra_stats_inc_sbi(struct ll_sb_info *sbi, enum ra_stat which); /** @@ -1112,17 +1034,70 @@ int ll_writepages(struct address_space *mapping, struct writeback_control *wbc) return result; } +struct ll_cl_context *ll_cl_find(struct file *file) +{ + struct ll_file_data *fd = LUSTRE_FPRIVATE(file); + struct ll_cl_context *lcc; + struct ll_cl_context *found = NULL; + + read_lock(&fd->fd_lock); + list_for_each_entry(lcc, &fd->fd_lccs, lcc_list) { + if (lcc->lcc_cookie == current) { + found = lcc; + break; + } + } + read_unlock(&fd->fd_lock); + + return found; +} + +void ll_cl_add(struct file *file, const struct lu_env *env, struct cl_io *io) +{ + struct ll_file_data *fd = LUSTRE_FPRIVATE(file); + struct ll_cl_context *lcc = &ll_env_info(env)->lti_io_ctx; + + memset(lcc, 0, sizeof(*lcc)); + INIT_LIST_HEAD(&lcc->lcc_list); + lcc->lcc_cookie = current; + lcc->lcc_env = env; + lcc->lcc_io = io; + + write_lock(&fd->fd_lock); + list_add(&lcc->lcc_list, &fd->fd_lccs); + write_unlock(&fd->fd_lock); +} + +void ll_cl_remove(struct file *file, const struct lu_env *env) +{ + struct ll_file_data *fd = LUSTRE_FPRIVATE(file); + struct ll_cl_context *lcc = &ll_env_info(env)->lti_io_ctx; + + write_lock(&fd->fd_lock); + list_del_init(&lcc->lcc_list); + write_unlock(&fd->fd_lock); +} + int ll_readpage(struct file *file, struct page *vmpage) { + struct cl_object *clob = ll_i2info(file_inode(file))->lli_clob; struct ll_cl_context *lcc; + const struct lu_env *env; + struct cl_io *io; + struct cl_page *page; int result; - lcc = ll_cl_init(file, vmpage); - if (!IS_ERR(lcc)) { - struct lu_env *env = lcc->lcc_env; - struct cl_io *io = lcc->lcc_io; - struct cl_page *page = lcc->lcc_page; + lcc = ll_cl_find(file); + if (!lcc) { + unlock_page(vmpage); + return -EIO; + } + env = lcc->lcc_env; + io = lcc->lcc_io; + LASSERT(io->ci_state == CIS_IO_GOING); + page = cl_page_find(env, clob, vmpage->index, vmpage, CPT_CACHEABLE); + if (!IS_ERR(page)) { LASSERT(page->cp_type == CPT_CACHEABLE); if (likely(!PageUptodate(vmpage))) { cl_page_assume(env, io, page); @@ -1132,10 +1107,10 @@ int ll_readpage(struct file *file, struct page *vmpage) unlock_page(vmpage); result = 0; } - ll_cl_fini(lcc); + cl_page_put(env, page); } else { unlock_page(vmpage); - result = PTR_ERR(lcc); + result = PTR_ERR(page); } return result; } diff --git a/drivers/staging/lustre/lustre/llite/rw26.c b/drivers/staging/lustre/lustre/llite/rw26.c index c12a048..947a4f5 100644 --- a/drivers/staging/lustre/lustre/llite/rw26.c +++ b/drivers/staging/lustre/lustre/llite/rw26.c @@ -489,7 +489,7 @@ static int ll_write_begin(struct file *file, struct address_space *mapping, struct page **pagep, void **fsdata) { struct ll_cl_context *lcc; - struct lu_env *env; + const struct lu_env *env; struct cl_io *io; struct cl_page *page; struct cl_object *clob = ll_i2info(mapping->host)->lli_clob; @@ -501,9 +501,9 @@ static int ll_write_begin(struct file *file, struct address_space *mapping, CDEBUG(D_VFSTRACE, "Writing %lu of %d to %d bytes\n", index, from, len); - lcc = ll_cl_init(file, NULL); - if (IS_ERR(lcc)) { - result = PTR_ERR(lcc); + lcc = ll_cl_find(file); + if (!lcc) { + result = -EIO; goto out; } @@ -579,8 +579,6 @@ out: unlock_page(vmpage); put_page(vmpage); } - if (!IS_ERR(lcc)) - ll_cl_fini(lcc); } else { *pagep = vmpage; *fsdata = lcc; @@ -593,7 +591,7 @@ static int ll_write_end(struct file *file, struct address_space *mapping, struct page *vmpage, void *fsdata) { struct ll_cl_context *lcc = fsdata; - struct lu_env *env; + const struct lu_env *env; struct cl_io *io; struct vvp_io *vio; struct cl_page *page; @@ -631,6 +629,10 @@ static int ll_write_end(struct file *file, struct address_space *mapping, } else { cl_page_disown(env, io, page); + lcc->lcc_page = NULL; + lu_ref_del(&page->cp_reference, "cl_io", io); + cl_page_put(env, page); + /* page list is not contiguous now, commit it now */ unplug = true; } @@ -639,7 +641,6 @@ static int ll_write_end(struct file *file, struct address_space *mapping, file->f_flags & O_SYNC || IS_SYNC(file_inode(file))) result = vvp_io_write_commit(env, io); - ll_cl_fini(lcc); return result >= 0 ? copied : result; } -- 2.7.4 From green at linuxhacker.ru Mon Jun 6 03:28:49 2016 From: green at linuxhacker.ru (green at linuxhacker.ru) Date: Sun, 5 Jun 2016 23:28:49 -0400 Subject: [lustre-devel] [PATCH 0/4] Lustre fixes and cleanups Message-ID: <1465183733-3147667-1-git-send-email-green@linuxhacker.ru> From: Oleg Drokin Here are a few more Lustre fixes and cleanups. Jinshan Xiong (2): staging/lustre/lov: calculate file offset correctly staging/lustre/llite: define per open file cache for ll_cl_context Oleg Drokin (2): staging/lustre/osc: Remove ops_temp from osc_page staging/lustre/osc: Get rid of osc_page_protected() drivers/staging/lustre/lustre/llite/file.c | 7 + .../staging/lustre/lustre/llite/llite_internal.h | 11 +- drivers/staging/lustre/lustre/llite/llite_mmap.c | 5 + drivers/staging/lustre/lustre/llite/rw.c | 145 +++++++++------------ drivers/staging/lustre/lustre/llite/rw26.c | 17 +-- drivers/staging/lustre/lustre/lov/lov_offset.c | 2 +- .../staging/lustre/lustre/osc/osc_cl_internal.h | 5 - drivers/staging/lustre/lustre/osc/osc_page.c | 22 ---- 8 files changed, 89 insertions(+), 125 deletions(-) -- 2.7.4 From green at linuxhacker.ru Mon Jun 6 03:28:50 2016 From: green at linuxhacker.ru (green at linuxhacker.ru) Date: Sun, 5 Jun 2016 23:28:50 -0400 Subject: [lustre-devel] [PATCH 1/4] staging/lustre/lov: calculate file offset correctly In-Reply-To: <1465183733-3147667-1-git-send-email-green@linuxhacker.ru> References: <1465183733-3147667-1-git-send-email-green@linuxhacker.ru> Message-ID: <1465183733-3147667-2-git-send-email-green@linuxhacker.ru> From: Jinshan Xiong In lov_stripe_pgoff(), it calls lov_stripe_size() to calculate the file size by ost_size, which will be wrong if the stripe_index happens to be stripe aligned. Signed-off-by: Jinshan Xiong Reviewed-on: http://review.whamcloud.com/14462 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6482 Reviewed-by: Bobi Jam Reviewed-by: Andreas Dilger Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/lov/lov_offset.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/lov/lov_offset.c b/drivers/staging/lustre/lustre/lov/lov_offset.c index 9302f06..7636bfa 100644 --- a/drivers/staging/lustre/lustre/lov/lov_offset.c +++ b/drivers/staging/lustre/lustre/lov/lov_offset.c @@ -74,7 +74,7 @@ pgoff_t lov_stripe_pgoff(struct lov_stripe_md *lsm, pgoff_t stripe_index, { loff_t offset; - offset = lov_stripe_size(lsm, stripe_index << PAGE_SHIFT, stripe); + offset = lov_stripe_size(lsm, (stripe_index << PAGE_SHIFT) + 1, stripe); return offset >> PAGE_SHIFT; } -- 2.7.4 From green at linuxhacker.ru Mon Jun 6 03:28:53 2016 From: green at linuxhacker.ru (green at linuxhacker.ru) Date: Sun, 5 Jun 2016 23:28:53 -0400 Subject: [lustre-devel] [PATCH 4/4] staging/lustre/osc: Get rid of osc_page_protected() In-Reply-To: <1465183733-3147667-1-git-send-email-green@linuxhacker.ru> References: <1465183733-3147667-1-git-send-email-green@linuxhacker.ru> Message-ID: <1465183733-3147667-5-git-send-email-green@linuxhacker.ru> From: Oleg Drokin There was a proper debugging function by that name that's long gone. The currently remaining shadow that always returns true is not really useful so it could be dropped along with all the asserts it is part of. Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/osc/osc_page.c | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/drivers/staging/lustre/lustre/osc/osc_page.c b/drivers/staging/lustre/lustre/osc/osc_page.c index fc36743..5a3e694 100644 --- a/drivers/staging/lustre/lustre/osc/osc_page.c +++ b/drivers/staging/lustre/lustre/osc/osc_page.c @@ -52,13 +52,6 @@ static int osc_lru_reserve(const struct lu_env *env, struct osc_object *obj, * @{ */ -static int osc_page_protected(const struct lu_env *env, - const struct osc_page *opg, - enum cl_lock_mode mode, int unref) -{ - return 1; -} - /***************************************************************************** * * Page operations. @@ -110,8 +103,6 @@ int osc_page_cache_add(const struct lu_env *env, struct osc_page *opg = cl2osc_page(slice); int result; - LINVRNT(osc_page_protected(env, opg, CLM_WRITE, 0)); - osc_page_transfer_get(opg, "transfer\0cache"); result = osc_queue_async_io(env, io, opg); if (result != 0) @@ -214,8 +205,6 @@ static void osc_page_delete(const struct lu_env *env, struct osc_object *obj = cl2osc(opg->ops_cl.cpl_obj); int rc; - LINVRNT(osc_page_protected(env, opg, CLM_READ, 1)); - CDEBUG(D_TRACE, "%p\n", opg); osc_page_transfer_put(env, opg); rc = osc_teardown_async_page(env, obj, opg); @@ -254,8 +243,6 @@ static void osc_page_clip(const struct lu_env *env, struct osc_page *opg = cl2osc_page(slice); struct osc_async_page *oap = &opg->ops_oap; - LINVRNT(osc_page_protected(env, opg, CLM_READ, 0)); - opg->ops_from = from; opg->ops_to = to; spin_lock(&oap->oap_lock); @@ -269,8 +256,6 @@ static int osc_page_cancel(const struct lu_env *env, struct osc_page *opg = cl2osc_page(slice); int rc = 0; - LINVRNT(osc_page_protected(env, opg, CLM_READ, 0)); - /* Check if the transferring against this page * is completed, or not even queued. */ @@ -320,10 +305,6 @@ int osc_page_init(const struct lu_env *env, struct cl_object *obj, cl_page_slice_add(page, &opg->ops_cl, obj, index, &osc_page_ops); } - /* - * Cannot assert osc_page_protected() here as read-ahead - * creates temporary pages outside of a lock. - */ /* ops_inflight and ops_lru are the same field, but it doesn't * hurt to initialize it twice :-) */ @@ -382,9 +363,6 @@ void osc_page_submit(const struct lu_env *env, struct osc_page *opg, struct osc_async_page *oap = &opg->ops_oap; struct osc_object *obj = oap->oap_obj; - LINVRNT(osc_page_protected(env, opg, - crt == CRT_WRITE ? CLM_WRITE : CLM_READ, 1)); - LASSERTF(oap->oap_magic == OAP_MAGIC, "Bad oap magic: oap %p, magic 0x%x\n", oap, oap->oap_magic); LASSERT(oap->oap_async_flags & ASYNC_READY); -- 2.7.4 From green at linuxhacker.ru Mon Jun 6 03:28:52 2016 From: green at linuxhacker.ru (green at linuxhacker.ru) Date: Sun, 5 Jun 2016 23:28:52 -0400 Subject: [lustre-devel] [PATCH 3/4] staging/lustre/osc: Remove ops_temp from osc_page In-Reply-To: <1465183733-3147667-1-git-send-email-green@linuxhacker.ru> References: <1465183733-3147667-1-git-send-email-green@linuxhacker.ru> Message-ID: <1465183733-3147667-4-git-send-email-green@linuxhacker.ru> From: Oleg Drokin It's no longer used and never set anywhere. Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/osc/osc_cl_internal.h | 5 ----- drivers/staging/lustre/lustre/osc/osc_page.c | 2 +- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/drivers/staging/lustre/lustre/osc/osc_cl_internal.h b/drivers/staging/lustre/lustre/osc/osc_cl_internal.h index ae19d39..7359fcb 100644 --- a/drivers/staging/lustre/lustre/osc/osc_cl_internal.h +++ b/drivers/staging/lustre/lustre/osc/osc_cl_internal.h @@ -356,11 +356,6 @@ struct osc_page { */ unsigned ops_transfer_pinned:1, /** - * True for a `temporary page' created by read-ahead code, probably - * outside of any DLM lock. - */ - ops_temp:1, - /** * in LRU? */ ops_in_lru:1, diff --git a/drivers/staging/lustre/lustre/osc/osc_page.c b/drivers/staging/lustre/lustre/osc/osc_page.c index c29c2ea..fc36743 100644 --- a/drivers/staging/lustre/lustre/osc/osc_page.c +++ b/drivers/staging/lustre/lustre/osc/osc_page.c @@ -214,7 +214,7 @@ static void osc_page_delete(const struct lu_env *env, struct osc_object *obj = cl2osc(opg->ops_cl.cpl_obj); int rc; - LINVRNT(opg->ops_temp || osc_page_protected(env, opg, CLM_READ, 1)); + LINVRNT(osc_page_protected(env, opg, CLM_READ, 1)); CDEBUG(D_TRACE, "%p\n", opg); osc_page_transfer_put(env, opg); -- 2.7.4 From oleg.drokin at intel.com Tue Jun 7 01:47:12 2016 From: oleg.drokin at intel.com (Oleg Drokin) Date: Mon, 6 Jun 2016 21:47:12 -0400 Subject: [lustre-devel] New tag 2.8.54 Message-ID: <856050BA-DAD9-42BD-BFB8-EE7AEEB0486B@intel.com> Hello! I just tagged a new tag, 2.8.54 in master branch of Lustre develompent tree. Here's the changelog: Alex Zhuravlev (3): LU-7905 osd: pin OI objects LU-7906 osd: no blocksize on non-OST objects LU-7918 mdd: no need to declare attr_set at create Andreas Dilger (4): LU-8139 tests: skip sanity test 101g until fix is landed LU-5810 tests: add client hostname to lctl mark LU-7352 tests: don't fail conf-sanity test_78 on ENOSPC LU-7352 tests: conf-sanity 78 don't check missing files Andriy Skulysh (1): LU-7728 osp: soft lockup in osp_precreate_reserve() Bob Glossman (6): LU-8094 ldlm: restore missing newlines LU-8093 kernel: kernel update RHEL 6.7 [2.6.32-573.26.1.el6] LU-7733 ptlrpc: print times in microseconds LU-8134 kernel: kernel update RHEL7.2 [3.10.0-327.18.2.el7] LU-8141 tests: fix for acl test LU-8126 kernel: new kernel RHEL 6.8 [2.6.32-642.el6] Brian Behlendorf (1): LU-8068 osd-zfs: large dnode support Bruno Faccini (4): LU-8010 mdt: fix orphan layout_lock cases for restore LU-7975 lod: fix delayed stripe error path & Client resend LU-4330 lnet: Allocate MEs and small MDs in own kmem_caches LU-8136 tests: allow CT to registers with all MDTs Christopher J. Morrone (2): LU-8116 build: Shrink multi-line pclmulqdq warnings LU-8116 build: Cleanup GSS configure script messages Di Wang (2): LU-8097 mdt: remove assertion for lock resent LU-7848 target: Do not fail MDT-MDT connection Dmitry Eremin (1): LU-6215 lnet: split struct ib_send_wr Doug Oucharek (1): LU-8022 lnet: Don't access NULL NI on failure path Emoly Liu (2): LU-8098 doc: add "lfs mdts" to lfs main man page LU-8078 iokit: correct obdfilter-survey output data format Fan Yong (6): LU-8127 lfsck: compile XATTR_NAME_LFSCK_NAMESPACE_OLD LU-8048 mgc: use the same lu_env for mgc_fs_{set,clean}up LU-8127 lfsck: remove XATTR_NAME_LFSCK_NAMESPACE_OLD LU-7888 obdclass: not hold global lock when lwp callback LU-8049 obdclass: use __BIG_ENDIAN to detect local endianness LU-8071 ldiskfs: handle system freeze protection Frank Zago (2): LU-8014 hsm: remove invalid kuc_free in coordinator LU-8030 hsm: prevent duplicated HSM requests Giuseppe Di Natale (2): LU-7334 lprocfs: Refactored string to value helpers LU-8100 lmv: Correctly generate target_obd HemaHarish (1): LU-7469 test: add missing init to lustre-rsync-test:test_1a Henri Doreau (1): LU-8079 llog: Remove llog_cat_init_and_process James Nunez (1): LU-7667 tests: Write to unique files in $TMP Jeremy Filizetti (1): LU-7185 ldlm: Restore connect flags on failure Jinshan Xiong (3): LU-4257 obdclass: Get rid of cl_env hash table LU-4257 llite: fix up iov_iter implementation LU-4257 llite: fast read implementation John L. Hammond (4): LU-8035 obd: rename md_getstatus() to md_get_root() LU-7403 llite: change it_data to it_request LU-7403 dlm: const qualify struct lustre_handle * params LU-4781 test: wait for dbench to stop Kit Westneat (2): LU-5092 nodemap: users of ted_nodemap should take ref LU-5092 nodemap: transfer nodemaps between MGS, MDTs, and OSTs Li Dongyang (1): LU-6215 o2iblnd: port to new fast reg API introduced in 4.4 Liang Zhen (1): LU-5050 libcfs: default CPT matches NUMA topology Nathaniel Clark (3): LU-7870 osd-zfs: Build against SPL/ZFS 0.6.5.6 LU-8155 tests: Fix timing of sanity-hsm/16 LU-7134 utils: Ensure hostid set for ZFS during mkfs Niu Yawei (4): LU-8041 mdd: increasing only atime update on close LU-8091 mount: error out properly in server_lsi2mti() LU-7795 quota: tuneable soft least qunit LU-8193 ptlrpc: set proper mbits for EINPROGRESS resend Noopur Maheshwari (1): LU-7656 tests: tar fix for replay-single/70c Oleg Drokin (2): Revert "LU-5050 libcfs: default CPT matches NUMA topology" New tag 2.8.54 Parinay Kondekar (2): LU-6518 obd: Unhandled possible allocation failure in lustre_start_mgc LU-7064 obd: detect errors from llog_declare_destroy() Quentin Bouget (2): LU-8080 utils: Replace calls to signal with sigaction LU-8132 tests: do not truncate fsname from paths to ost/mdt Saurabh Tandan (1): LU-7346 tests: Reintroduce SLOW tests to review process Sebastien Buisson (2): LU-7846 nodemap: add fileset info to nodemap LU-7846 mdt: mount with fileset info from nodemap Sergey Cheremencev (1): LU-7422 llite: don't panic when fid is insane Wang Shilong (2): LU-8210 osd-ldiskfs: fix setting pages PageUptodate state LU-4017 quota: redefine LL_MAXQUOTAS for Lustre Yang Sheng (2): LU-8027 llite: ensure obd is effective in onu_upcall LU-8147 osd-zfs: fix osd_mount error path From jsimmons at infradead.org Wed Jun 8 17:46:21 2016 From: jsimmons at infradead.org (James Simmons) Date: Wed, 8 Jun 2016 18:46:21 +0100 (BST) Subject: [lustre-devel] [PATCH 0/2] *** staging: lustre: Replace semaphore lock with mutex *** In-Reply-To: <1465372242-7116-1-git-send-email-binoy.jayan@linaro.org> References: <1465372242-7116-1-git-send-email-binoy.jayan@linaro.org> Message-ID: > Hi, > > These are a set of patches which removes semaphores from: > > drivers/staging/lustre (lnet) > > These are part of a bigger effort to eliminate all semaphores > from the linux kernel. > > They build correctly (individually and as a whole). > > Thanks, > Binoy I just finishing running the latest staging tree againt our test suite so I'm going to look to testing your patch next. > Binoy Jayan (2): > staging: lustre: lloop_device: Replace semaphore lo_sem with > completion This patch can be dropped. I will be shortly submitting a patch to remove the lloop back device. > staging: lustre: lnet: Replace semaphore ln_rc_signal with completion Will send a ack once I'm done testing. > drivers/staging/lustre/include/linux/lnet/lib-types.h | 3 ++- > drivers/staging/lustre/lnet/lnet/router.c | 9 +++++---- > drivers/staging/lustre/lustre/llite/lloop.c | 14 +++++++------- > 3 files changed, 14 insertions(+), 12 deletions(-) > > -- > The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, > a Linux Foundation Collaborative Project > > _______________________________________________ > devel mailing list > devel at linuxdriverproject.org > http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel > From jsimmons at infradead.org Wed Jun 8 17:49:04 2016 From: jsimmons at infradead.org (James Simmons) Date: Wed, 8 Jun 2016 18:49:04 +0100 (BST) Subject: [lustre-devel] [PATCH 1/2] staging: lustre: lloop_device: Replace semaphore lo_sem with completion In-Reply-To: <1465372242-7116-2-git-send-email-binoy.jayan@linaro.org> References: <1465372242-7116-1-git-send-email-binoy.jayan@linaro.org> <1465372242-7116-2-git-send-email-binoy.jayan@linaro.org> Message-ID: > The semaphore 'lo_sem' in lloop_device is used as completion, so it > should be written as one. Semaphores are going away in the future. > > Signed-off-by: Binoy Jayan NAK. The lloop_device is about to get deleted. > --- > drivers/staging/lustre/lustre/llite/lloop.c | 14 +++++++------- > 1 file changed, 7 insertions(+), 7 deletions(-) > > diff --git a/drivers/staging/lustre/lustre/llite/lloop.c b/drivers/staging/lustre/lustre/llite/lloop.c > index 813a9a3..90b31ba 100644 > --- a/drivers/staging/lustre/lustre/llite/lloop.c > +++ b/drivers/staging/lustre/lustre/llite/lloop.c > @@ -131,7 +131,7 @@ struct lloop_device { > struct bio *lo_bio; > struct bio *lo_biotail; > int lo_state; > - struct semaphore lo_sem; > + struct completion lo_comp; > struct mutex lo_ctl_mutex; > atomic_t lo_pending; > wait_queue_head_t lo_bh_wait; > @@ -423,9 +423,9 @@ static int loop_thread(void *data) > lo->lo_pvec.ldp_offsets = lo->lo_requests[0].lrd_offsets; > > /* > - * up sem, we are running > + * signal completion, we are running > */ > - up(&lo->lo_sem); > + complete(&lo->lo_comp); > > for (;;) { > wait_event(lo->lo_bh_wait, loop_active(lo)); > @@ -466,7 +466,7 @@ static int loop_thread(void *data) > cl_env_put(env, &refcheck); > > out: > - up(&lo->lo_sem); > + complete(&lo->lo_comp); > return ret; > } > > @@ -539,7 +539,7 @@ static int loop_set_fd(struct lloop_device *lo, struct file *unused, > set_blocksize(bdev, lo->lo_blocksize); > > kthread_run(loop_thread, lo, "lloop%d", lo->lo_number); > - down(&lo->lo_sem); > + wait_for_completion(&lo->lo_comp); > return 0; > > out: > @@ -568,7 +568,7 @@ static int loop_clr_fd(struct lloop_device *lo, struct block_device *bdev, > spin_unlock_irq(&lo->lo_lock); > wake_up(&lo->lo_bh_wait); > > - down(&lo->lo_sem); > + wait_for_completion(&lo->lo_comp); > lo->lo_backing_file = NULL; > lo->lo_device = NULL; > lo->lo_offset = 0; > @@ -821,7 +821,7 @@ static int __init lloop_init(void) > goto out_mem4; > > mutex_init(&lo->lo_ctl_mutex); > - sema_init(&lo->lo_sem, 0); > + init_completion(&lo->lo_comp); > init_waitqueue_head(&lo->lo_bh_wait); > lo->lo_number = i; > spin_lock_init(&lo->lo_lock); > -- > The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, > a Linux Foundation Collaborative Project > > _______________________________________________ > devel mailing list > devel at linuxdriverproject.org > http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel > From binoy.jayan at linaro.org Wed Jun 8 07:50:42 2016 From: binoy.jayan at linaro.org (Binoy Jayan) Date: Wed, 8 Jun 2016 13:20:42 +0530 Subject: [lustre-devel] [PATCH 2/2] staging: lustre: lnet: Replace semaphore ln_rc_signal with completion In-Reply-To: <1465372242-7116-1-git-send-email-binoy.jayan@linaro.org> References: <1465372242-7116-1-git-send-email-binoy.jayan@linaro.org> Message-ID: <1465372242-7116-3-git-send-email-binoy.jayan@linaro.org> The semaphore ln_rc_signal is used as completion, so convert it to struct completion. Semaphores are going away in the future. Signed-off-by: Binoy Jayan --- drivers/staging/lustre/include/linux/lnet/lib-types.h | 3 ++- drivers/staging/lustre/lnet/lnet/router.c | 9 +++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/staging/lustre/include/linux/lnet/lib-types.h b/drivers/staging/lustre/include/linux/lnet/lib-types.h index 24c4a08..7967b01 100644 --- a/drivers/staging/lustre/include/linux/lnet/lib-types.h +++ b/drivers/staging/lustre/include/linux/lnet/lib-types.h @@ -38,6 +38,7 @@ #include #include #include +#include #include "types.h" #include "lnetctl.h" @@ -610,7 +611,7 @@ typedef struct { /* rcd ready for free */ struct list_head ln_rcd_zombie; /* serialise startup/shutdown */ - struct semaphore ln_rc_signal; + struct completion ln_rc_signal; struct mutex ln_api_mutex; struct mutex ln_lnd_mutex; diff --git a/drivers/staging/lustre/lnet/lnet/router.c b/drivers/staging/lustre/lnet/lnet/router.c index b01dc42..0635432 100644 --- a/drivers/staging/lustre/lnet/lnet/router.c +++ b/drivers/staging/lustre/lnet/lnet/router.c @@ -18,6 +18,7 @@ */ #define DEBUG_SUBSYSTEM S_LNET +#include #include "../../include/linux/lnet/lib-lnet.h" #define LNET_NRB_TINY_MIN 512 /* min value for each CPT */ @@ -1065,7 +1066,7 @@ lnet_router_checker_start(void) return -EINVAL; } - sema_init(&the_lnet.ln_rc_signal, 0); + init_completion(&the_lnet.ln_rc_signal); rc = LNetEQAlloc(0, lnet_router_checker_event, &the_lnet.ln_rc_eqh); if (rc) { @@ -1079,7 +1080,7 @@ lnet_router_checker_start(void) rc = PTR_ERR(task); CERROR("Can't start router checker thread: %d\n", rc); /* block until event callback signals exit */ - down(&the_lnet.ln_rc_signal); + wait_for_completion(&the_lnet.ln_rc_signal); rc = LNetEQFree(the_lnet.ln_rc_eqh); LASSERT(!rc); the_lnet.ln_rc_state = LNET_RC_STATE_SHUTDOWN; @@ -1112,7 +1113,7 @@ lnet_router_checker_stop(void) wake_up(&the_lnet.ln_rc_waitq); /* block until event callback signals exit */ - down(&the_lnet.ln_rc_signal); + wait_for_completion(&the_lnet.ln_rc_signal); LASSERT(the_lnet.ln_rc_state == LNET_RC_STATE_SHUTDOWN); rc = LNetEQFree(the_lnet.ln_rc_eqh); @@ -1295,7 +1296,7 @@ rescan: lnet_prune_rc_data(1); /* wait for UNLINK */ the_lnet.ln_rc_state = LNET_RC_STATE_SHUTDOWN; - up(&the_lnet.ln_rc_signal); + complete(&the_lnet.ln_rc_signal); /* The unlink event callback will signal final completion */ return 0; } -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project From binoy.jayan at linaro.org Wed Jun 8 07:50:40 2016 From: binoy.jayan at linaro.org (Binoy Jayan) Date: Wed, 8 Jun 2016 13:20:40 +0530 Subject: [lustre-devel] [PATCH 0/2] *** staging: lustre: Replace semaphore lock with mutex *** Message-ID: <1465372242-7116-1-git-send-email-binoy.jayan@linaro.org> Hi, These are a set of patches which removes semaphores from: drivers/staging/lustre (lnet) These are part of a bigger effort to eliminate all semaphores from the linux kernel. They build correctly (individually and as a whole). Thanks, Binoy Binoy Jayan (2): staging: lustre: lloop_device: Replace semaphore lo_sem with completion staging: lustre: lnet: Replace semaphore ln_rc_signal with completion drivers/staging/lustre/include/linux/lnet/lib-types.h | 3 ++- drivers/staging/lustre/lnet/lnet/router.c | 9 +++++---- drivers/staging/lustre/lustre/llite/lloop.c | 14 +++++++------- 3 files changed, 14 insertions(+), 12 deletions(-) -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project From binoy.jayan at linaro.org Wed Jun 8 07:50:41 2016 From: binoy.jayan at linaro.org (Binoy Jayan) Date: Wed, 8 Jun 2016 13:20:41 +0530 Subject: [lustre-devel] [PATCH 1/2] staging: lustre: lloop_device: Replace semaphore lo_sem with completion In-Reply-To: <1465372242-7116-1-git-send-email-binoy.jayan@linaro.org> References: <1465372242-7116-1-git-send-email-binoy.jayan@linaro.org> Message-ID: <1465372242-7116-2-git-send-email-binoy.jayan@linaro.org> The semaphore 'lo_sem' in lloop_device is used as completion, so it should be written as one. Semaphores are going away in the future. Signed-off-by: Binoy Jayan --- drivers/staging/lustre/lustre/llite/lloop.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/staging/lustre/lustre/llite/lloop.c b/drivers/staging/lustre/lustre/llite/lloop.c index 813a9a3..90b31ba 100644 --- a/drivers/staging/lustre/lustre/llite/lloop.c +++ b/drivers/staging/lustre/lustre/llite/lloop.c @@ -131,7 +131,7 @@ struct lloop_device { struct bio *lo_bio; struct bio *lo_biotail; int lo_state; - struct semaphore lo_sem; + struct completion lo_comp; struct mutex lo_ctl_mutex; atomic_t lo_pending; wait_queue_head_t lo_bh_wait; @@ -423,9 +423,9 @@ static int loop_thread(void *data) lo->lo_pvec.ldp_offsets = lo->lo_requests[0].lrd_offsets; /* - * up sem, we are running + * signal completion, we are running */ - up(&lo->lo_sem); + complete(&lo->lo_comp); for (;;) { wait_event(lo->lo_bh_wait, loop_active(lo)); @@ -466,7 +466,7 @@ static int loop_thread(void *data) cl_env_put(env, &refcheck); out: - up(&lo->lo_sem); + complete(&lo->lo_comp); return ret; } @@ -539,7 +539,7 @@ static int loop_set_fd(struct lloop_device *lo, struct file *unused, set_blocksize(bdev, lo->lo_blocksize); kthread_run(loop_thread, lo, "lloop%d", lo->lo_number); - down(&lo->lo_sem); + wait_for_completion(&lo->lo_comp); return 0; out: @@ -568,7 +568,7 @@ static int loop_clr_fd(struct lloop_device *lo, struct block_device *bdev, spin_unlock_irq(&lo->lo_lock); wake_up(&lo->lo_bh_wait); - down(&lo->lo_sem); + wait_for_completion(&lo->lo_comp); lo->lo_backing_file = NULL; lo->lo_device = NULL; lo->lo_offset = 0; @@ -821,7 +821,7 @@ static int __init lloop_init(void) goto out_mem4; mutex_init(&lo->lo_ctl_mutex); - sema_init(&lo->lo_sem, 0); + init_completion(&lo->lo_comp); init_waitqueue_head(&lo->lo_bh_wait); lo->lo_number = i; spin_lock_init(&lo->lo_lock); -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project From jsimmons at infradead.org Wed Jun 8 22:50:12 2016 From: jsimmons at infradead.org (James Simmons) Date: Wed, 8 Jun 2016 18:50:12 -0400 Subject: [lustre-devel] [PATCH] staging: lustre: llite: remove lloop device Message-ID: <1465426212-3392-1-git-send-email-jsimmons@infradead.org> The lloop device was original developed to work around the lack of direct I/O for the default loop back device. Also the lloop device greatly out performed the default loop back device. The lloop hasn't been worked on for some time and now it no longer out performs the loop device and loop now supports direct I/O. Since this is the case we can delete this device. Signed-off-by: James Simmons --- drivers/staging/lustre/lustre/Kconfig | 6 - drivers/staging/lustre/lustre/llite/Makefile | 3 - drivers/staging/lustre/lustre/llite/lloop.c | 883 -------------------------- 3 files changed, 0 insertions(+), 892 deletions(-) delete mode 100644 drivers/staging/lustre/lustre/llite/lloop.c diff --git a/drivers/staging/lustre/lustre/Kconfig b/drivers/staging/lustre/lustre/Kconfig index 8ac7cd4..9f5d75f 100644 --- a/drivers/staging/lustre/lustre/Kconfig +++ b/drivers/staging/lustre/lustre/Kconfig @@ -54,9 +54,3 @@ config LUSTRE_TRANSLATE_ERRNOS bool depends on LUSTRE_FS && !X86 default y - -config LUSTRE_LLITE_LLOOP - tristate "Lustre virtual block device" - depends on LUSTRE_FS && BLOCK - depends on !PPC_64K_PAGES && !ARM64_64K_PAGES && !MICROBLAZE_64K_PAGES && !PAGE_SIZE_64KB && !IA64_PAGE_SIZE_64KB && !PARISC_PAGE_SIZE_64KB - default m diff --git a/drivers/staging/lustre/lustre/llite/Makefile b/drivers/staging/lustre/lustre/llite/Makefile index 2ce10ff..19701e7 100644 --- a/drivers/staging/lustre/lustre/llite/Makefile +++ b/drivers/staging/lustre/lustre/llite/Makefile @@ -1,5 +1,4 @@ obj-$(CONFIG_LUSTRE_FS) += lustre.o -obj-$(CONFIG_LUSTRE_LLITE_LLOOP) += llite_lloop.o lustre-y := dcache.o dir.o file.o llite_close.o llite_lib.o llite_nfs.o \ rw.o namei.o symlink.o llite_mmap.o \ xattr.o xattr_cache.o remote_perm.o llite_rmtacl.o \ @@ -7,5 +6,3 @@ lustre-y := dcache.o dir.o file.o llite_close.o llite_lib.o llite_nfs.o \ glimpse.o lcommon_cl.o lcommon_misc.o \ vvp_dev.o vvp_page.o vvp_lock.o vvp_io.o vvp_object.o vvp_req.o \ lproc_llite.o - -llite_lloop-y := lloop.o diff --git a/drivers/staging/lustre/lustre/llite/lloop.c b/drivers/staging/lustre/lustre/llite/lloop.c deleted file mode 100644 index 813a9a3..0000000 --- a/drivers/staging/lustre/lustre/llite/lloop.c +++ /dev/null @@ -1,883 +0,0 @@ -/* - * GPL HEADER START - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 only, - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License version 2 for more details (a copy is included - * in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU General Public License - * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf - * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * - * GPL HEADER END - */ -/* - * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. - * Use is subject to license terms. - * - * Copyright (c) 2011, 2012, Intel Corporation. - */ -/* - * This file is part of Lustre, http://www.lustre.org/ - * Lustre is a trademark of Sun Microsystems, Inc. - */ - -/* - * linux/drivers/block/loop.c - * - * Written by Theodore Ts'o, 3/29/93 - * - * Copyright 1993 by Theodore Ts'o. Redistribution of this file is - * permitted under the GNU General Public License. - * - * Modularized and updated for 1.1.16 kernel - Mitch Dsouza 28th May 1994 - * Adapted for 1.3.59 kernel - Andries Brouwer, 1 Feb 1996 - * - * Fixed do_loop_request() re-entrancy - Vincent.Renardias at waw.com Mar 20, 1997 - * - * Added devfs support - Richard Gooch 16-Jan-1998 - * - * Handle sparse backing files correctly - Kenn Humborg, Jun 28, 1998 - * - * Loadable modules and other fixes by AK, 1998 - * - * Maximum number of loop devices now dynamic via max_loop module parameter. - * Russell Kroll 19990701 - * - * Maximum number of loop devices when compiled-in now selectable by passing - * max_loop=<1-255> to the kernel on boot. - * Erik I. Bols?, , Oct 31, 1999 - * - * Completely rewrite request handling to be make_request_fn style and - * non blocking, pushing work to a helper thread. Lots of fixes from - * Al Viro too. - * Jens Axboe , Nov 2000 - * - * Support up to 256 loop devices - * Heinz Mauelshagen , Feb 2002 - * - * Support for falling back on the write file operation when the address space - * operations prepare_write and/or commit_write are not available on the - * backing filesystem. - * Anton Altaparmakov, 16 Feb 2005 - * - * Still To Fix: - * - Advisory locking is ignored here. - * - Should use an own CAP_* category instead of CAP_SYS_ADMIN - * - */ - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include /* for invalidate_bdev() */ -#include -#include -#include -#include -#include - -#include "../include/lustre_lib.h" -#include "../include/lustre_lite.h" -#include "llite_internal.h" - -#define LLOOP_MAX_SEGMENTS LNET_MAX_IOV - -/* Possible states of device */ -enum { - LLOOP_UNBOUND, - LLOOP_BOUND, - LLOOP_RUNDOWN, -}; - -struct lloop_device { - int lo_number; - int lo_refcnt; - loff_t lo_offset; - loff_t lo_sizelimit; - int lo_flags; - struct file *lo_backing_file; - struct block_device *lo_device; - unsigned lo_blocksize; - - gfp_t old_gfp_mask; - - spinlock_t lo_lock; - struct bio *lo_bio; - struct bio *lo_biotail; - int lo_state; - struct semaphore lo_sem; - struct mutex lo_ctl_mutex; - atomic_t lo_pending; - wait_queue_head_t lo_bh_wait; - - struct request_queue *lo_queue; - - const struct lu_env *lo_env; - struct cl_io lo_io; - struct ll_dio_pages lo_pvec; - - /* data to handle bio for lustre. */ - struct lo_request_data { - struct page *lrd_pages[LLOOP_MAX_SEGMENTS]; - loff_t lrd_offsets[LLOOP_MAX_SEGMENTS]; - } lo_requests[1]; -}; - -/* - * Loop flags - */ -enum { - LO_FLAGS_READ_ONLY = 1, -}; - -static int lloop_major; -#define MAX_LOOP_DEFAULT 16 -static int max_loop = MAX_LOOP_DEFAULT; -static struct lloop_device *loop_dev; -static struct gendisk **disks; -static struct mutex lloop_mutex; -static void *ll_iocontrol_magic; - -static loff_t get_loop_size(struct lloop_device *lo, struct file *file) -{ - loff_t size, offset, loopsize; - - /* Compute loopsize in bytes */ - size = i_size_read(file->f_mapping->host); - offset = lo->lo_offset; - loopsize = size - offset; - if (lo->lo_sizelimit > 0 && lo->lo_sizelimit < loopsize) - loopsize = lo->lo_sizelimit; - - /* - * Unfortunately, if we want to do I/O on the device, - * the number of 512-byte sectors has to fit into a sector_t. - */ - return loopsize >> 9; -} - -static int do_bio_lustrebacked(struct lloop_device *lo, struct bio *head) -{ - const struct lu_env *env = lo->lo_env; - struct cl_io *io = &lo->lo_io; - struct inode *inode = file_inode(lo->lo_backing_file); - struct cl_object *obj = ll_i2info(inode)->lli_clob; - pgoff_t offset; - int ret; - int rw; - u32 page_count = 0; - struct bio_vec bvec; - struct bvec_iter iter; - struct bio *bio; - ssize_t bytes; - - struct ll_dio_pages *pvec = &lo->lo_pvec; - struct page **pages = pvec->ldp_pages; - loff_t *offsets = pvec->ldp_offsets; - - truncate_inode_pages(inode->i_mapping, 0); - - /* initialize the IO */ - memset(io, 0, sizeof(*io)); - io->ci_obj = obj; - ret = cl_io_init(env, io, CIT_MISC, obj); - if (ret) - return io->ci_result; - io->ci_lockreq = CILR_NEVER; - - rw = head->bi_rw; - for (bio = head; bio ; bio = bio->bi_next) { - LASSERT(rw == bio->bi_rw); - - offset = (pgoff_t)(bio->bi_iter.bi_sector << 9) + lo->lo_offset; - bio_for_each_segment(bvec, bio, iter) { - BUG_ON(bvec.bv_offset != 0); - BUG_ON(bvec.bv_len != PAGE_SIZE); - - pages[page_count] = bvec.bv_page; - offsets[page_count] = offset; - page_count++; - offset += bvec.bv_len; - } - LASSERT(page_count <= LLOOP_MAX_SEGMENTS); - } - - ll_stats_ops_tally(ll_i2sbi(inode), - (rw == WRITE) ? LPROC_LL_BRW_WRITE : LPROC_LL_BRW_READ, - page_count); - - pvec->ldp_size = page_count << PAGE_SHIFT; - pvec->ldp_nr = page_count; - - /* FIXME: in ll_direct_rw_pages, it has to allocate many cl_page{}s to - * write those pages into OST. Even worse case is that more pages - * would be asked to write out to swap space, and then finally get here - * again. - * Unfortunately this is NOT easy to fix. - * Thoughts on solution: - * 0. Define a reserved pool for cl_pages, which could be a list of - * pre-allocated cl_pages; - * 1. Define a new operation in cl_object_operations{}, says clo_depth, - * which measures how many layers for this lustre object. Generally - * speaking, the depth would be 2, one for llite, and one for lovsub. - * However, for SNS, there will be more since we need additional page - * to store parity; - * 2. Reserve the # of (page_count * depth) cl_pages from the reserved - * pool. Afterwards, the clio would allocate the pages from reserved - * pool, this guarantees we needn't allocate the cl_pages from - * generic cl_page slab cache. - * Of course, if there is NOT enough pages in the pool, we might - * be asked to write less pages once, this purely depends on - * implementation. Anyway, we should be careful to avoid deadlocking. - */ - inode_lock(inode); - bytes = ll_direct_rw_pages(env, io, rw, inode, pvec); - inode_unlock(inode); - cl_io_fini(env, io); - return (bytes == pvec->ldp_size) ? 0 : (int)bytes; -} - -/* - * Add bio to back of pending list - */ -static void loop_add_bio(struct lloop_device *lo, struct bio *bio) -{ - unsigned long flags; - - spin_lock_irqsave(&lo->lo_lock, flags); - if (lo->lo_biotail) { - lo->lo_biotail->bi_next = bio; - lo->lo_biotail = bio; - } else { - lo->lo_bio = lo->lo_biotail = bio; - } - spin_unlock_irqrestore(&lo->lo_lock, flags); - - atomic_inc(&lo->lo_pending); - if (waitqueue_active(&lo->lo_bh_wait)) - wake_up(&lo->lo_bh_wait); -} - -/* - * Grab first pending buffer - */ -static unsigned int loop_get_bio(struct lloop_device *lo, struct bio **req) -{ - struct bio *first; - struct bio **bio; - unsigned int count = 0; - unsigned int page_count = 0; - int rw; - - spin_lock_irq(&lo->lo_lock); - first = lo->lo_bio; - if (unlikely(!first)) { - spin_unlock_irq(&lo->lo_lock); - return 0; - } - - /* TODO: need to split the bio, too bad. */ - LASSERT(first->bi_vcnt <= LLOOP_MAX_SEGMENTS); - - rw = first->bi_rw; - bio = &lo->lo_bio; - while (*bio && (*bio)->bi_rw == rw) { - CDEBUG(D_INFO, "bio sector %llu size %u count %u vcnt%u\n", - (unsigned long long)(*bio)->bi_iter.bi_sector, - (*bio)->bi_iter.bi_size, - page_count, (*bio)->bi_vcnt); - if (page_count + (*bio)->bi_vcnt > LLOOP_MAX_SEGMENTS) - break; - - page_count += (*bio)->bi_vcnt; - count++; - bio = &(*bio)->bi_next; - } - if (*bio) { - /* Some of bios can't be mergeable. */ - lo->lo_bio = *bio; - *bio = NULL; - } else { - /* Hit the end of queue */ - lo->lo_biotail = NULL; - lo->lo_bio = NULL; - } - *req = first; - spin_unlock_irq(&lo->lo_lock); - return count; -} - -static blk_qc_t loop_make_request(struct request_queue *q, struct bio *old_bio) -{ - struct lloop_device *lo = q->queuedata; - int rw = bio_rw(old_bio); - int inactive; - - blk_queue_split(q, &old_bio, q->bio_split); - - if (!lo) - goto err; - - CDEBUG(D_INFO, "submit bio sector %llu size %u\n", - (unsigned long long)old_bio->bi_iter.bi_sector, - old_bio->bi_iter.bi_size); - - spin_lock_irq(&lo->lo_lock); - inactive = lo->lo_state != LLOOP_BOUND; - spin_unlock_irq(&lo->lo_lock); - if (inactive) - goto err; - - if (rw == WRITE) { - if (lo->lo_flags & LO_FLAGS_READ_ONLY) - goto err; - } else if (rw == READA) { - rw = READ; - } else if (rw != READ) { - CERROR("lloop: unknown command (%x)\n", rw); - goto err; - } - loop_add_bio(lo, old_bio); - return BLK_QC_T_NONE; -err: - bio_io_error(old_bio); - return BLK_QC_T_NONE; -} - -static inline void loop_handle_bio(struct lloop_device *lo, struct bio *bio) -{ - int ret; - - ret = do_bio_lustrebacked(lo, bio); - while (bio) { - struct bio *tmp = bio->bi_next; - - bio->bi_next = NULL; - bio->bi_error = ret; - bio_endio(bio); - bio = tmp; - } -} - -static inline int loop_active(struct lloop_device *lo) -{ - return atomic_read(&lo->lo_pending) || - (lo->lo_state == LLOOP_RUNDOWN); -} - -/* - * worker thread that handles reads/writes to file backed loop devices, - * to avoid blocking in our make_request_fn. - */ -static int loop_thread(void *data) -{ - struct lloop_device *lo = data; - struct bio *bio; - unsigned int count; - unsigned long times = 0; - unsigned long total_count = 0; - - struct lu_env *env; - int refcheck; - int ret = 0; - - set_user_nice(current, MIN_NICE); - - lo->lo_state = LLOOP_BOUND; - - env = cl_env_get(&refcheck); - if (IS_ERR(env)) { - ret = PTR_ERR(env); - goto out; - } - - lo->lo_env = env; - memset(&lo->lo_pvec, 0, sizeof(lo->lo_pvec)); - lo->lo_pvec.ldp_pages = lo->lo_requests[0].lrd_pages; - lo->lo_pvec.ldp_offsets = lo->lo_requests[0].lrd_offsets; - - /* - * up sem, we are running - */ - up(&lo->lo_sem); - - for (;;) { - wait_event(lo->lo_bh_wait, loop_active(lo)); - if (!atomic_read(&lo->lo_pending)) { - int exiting = 0; - - spin_lock_irq(&lo->lo_lock); - exiting = (lo->lo_state == LLOOP_RUNDOWN); - spin_unlock_irq(&lo->lo_lock); - if (exiting) - break; - } - - bio = NULL; - count = loop_get_bio(lo, &bio); - if (!count) { - CWARN("lloop(minor: %d): missing bio\n", lo->lo_number); - continue; - } - - total_count += count; - if (total_count < count) { /* overflow */ - total_count = count; - times = 1; - } else { - times++; - } - if ((times & 127) == 0) { - CDEBUG(D_INFO, "total: %lu, count: %lu, avg: %lu\n", - total_count, times, total_count / times); - } - - LASSERT(bio); - LASSERT(count <= atomic_read(&lo->lo_pending)); - loop_handle_bio(lo, bio); - atomic_sub(count, &lo->lo_pending); - } - cl_env_put(env, &refcheck); - -out: - up(&lo->lo_sem); - return ret; -} - -static int loop_set_fd(struct lloop_device *lo, struct file *unused, - struct block_device *bdev, struct file *file) -{ - struct inode *inode; - struct address_space *mapping; - int lo_flags = 0; - int error; - loff_t size; - - if (!try_module_get(THIS_MODULE)) - return -ENODEV; - - error = -EBUSY; - if (lo->lo_state != LLOOP_UNBOUND) - goto out; - - mapping = file->f_mapping; - inode = mapping->host; - - error = -EINVAL; - if (!S_ISREG(inode->i_mode) || inode->i_sb->s_magic != LL_SUPER_MAGIC) - goto out; - - if (!(file->f_mode & FMODE_WRITE)) - lo_flags |= LO_FLAGS_READ_ONLY; - - size = get_loop_size(lo, file); - - if ((loff_t)(sector_t)size != size) { - error = -EFBIG; - goto out; - } - - /* remove all pages in cache so as dirty pages not to be existent. */ - truncate_inode_pages(mapping, 0); - - set_device_ro(bdev, (lo_flags & LO_FLAGS_READ_ONLY) != 0); - - lo->lo_blocksize = PAGE_SIZE; - lo->lo_device = bdev; - lo->lo_flags = lo_flags; - lo->lo_backing_file = file; - lo->lo_sizelimit = 0; - lo->old_gfp_mask = mapping_gfp_mask(mapping); - mapping_set_gfp_mask(mapping, lo->old_gfp_mask & ~(__GFP_IO|__GFP_FS)); - - lo->lo_bio = lo->lo_biotail = NULL; - - /* - * set queue make_request_fn, and add limits based on lower level - * device - */ - blk_queue_make_request(lo->lo_queue, loop_make_request); - lo->lo_queue->queuedata = lo; - - /* queue parameters */ - CLASSERT(PAGE_SIZE < (1 << (sizeof(unsigned short) * 8))); - blk_queue_logical_block_size(lo->lo_queue, - (unsigned short)PAGE_SIZE); - blk_queue_max_hw_sectors(lo->lo_queue, - LLOOP_MAX_SEGMENTS << (PAGE_SHIFT - 9)); - blk_queue_max_segments(lo->lo_queue, LLOOP_MAX_SEGMENTS); - - set_capacity(disks[lo->lo_number], size); - bd_set_size(bdev, size << 9); - - set_blocksize(bdev, lo->lo_blocksize); - - kthread_run(loop_thread, lo, "lloop%d", lo->lo_number); - down(&lo->lo_sem); - return 0; - -out: - /* This is safe: open() is still holding a reference. */ - module_put(THIS_MODULE); - return error; -} - -static int loop_clr_fd(struct lloop_device *lo, struct block_device *bdev, - int count) -{ - struct file *filp = lo->lo_backing_file; - gfp_t gfp = lo->old_gfp_mask; - - if (lo->lo_state != LLOOP_BOUND) - return -ENXIO; - - if (lo->lo_refcnt > count) /* we needed one fd for the ioctl */ - return -EBUSY; - - if (!filp) - return -EINVAL; - - spin_lock_irq(&lo->lo_lock); - lo->lo_state = LLOOP_RUNDOWN; - spin_unlock_irq(&lo->lo_lock); - wake_up(&lo->lo_bh_wait); - - down(&lo->lo_sem); - lo->lo_backing_file = NULL; - lo->lo_device = NULL; - lo->lo_offset = 0; - lo->lo_sizelimit = 0; - lo->lo_flags = 0; - invalidate_bdev(bdev); - set_capacity(disks[lo->lo_number], 0); - bd_set_size(bdev, 0); - mapping_set_gfp_mask(filp->f_mapping, gfp); - lo->lo_state = LLOOP_UNBOUND; - fput(filp); - /* This is safe: open() is still holding a reference. */ - module_put(THIS_MODULE); - return 0; -} - -static int lo_open(struct block_device *bdev, fmode_t mode) -{ - struct lloop_device *lo = bdev->bd_disk->private_data; - - mutex_lock(&lo->lo_ctl_mutex); - lo->lo_refcnt++; - mutex_unlock(&lo->lo_ctl_mutex); - - return 0; -} - -static void lo_release(struct gendisk *disk, fmode_t mode) -{ - struct lloop_device *lo = disk->private_data; - - mutex_lock(&lo->lo_ctl_mutex); - --lo->lo_refcnt; - mutex_unlock(&lo->lo_ctl_mutex); -} - -/* lloop device node's ioctl function. */ -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; - struct inode *inode = NULL; - int err = 0; - - mutex_lock(&lloop_mutex); - switch (cmd) { - case LL_IOC_LLOOP_DETACH: { - err = loop_clr_fd(lo, bdev, 2); - if (err == 0) - blkdev_put(bdev, 0); /* grabbed in LLOOP_ATTACH */ - break; - } - - case LL_IOC_LLOOP_INFO: { - struct lu_fid fid; - - if (!lo->lo_backing_file) { - err = -ENOENT; - break; - } - if (!inode) - inode = file_inode(lo->lo_backing_file); - if (lo->lo_state == LLOOP_BOUND) - fid = ll_i2info(inode)->lli_fid; - else - fid_zero(&fid); - - if (copy_to_user((void __user *)arg, &fid, sizeof(fid))) - err = -EFAULT; - break; - } - - default: - err = -EINVAL; - break; - } - mutex_unlock(&lloop_mutex); - - return err; -} - -static struct block_device_operations lo_fops = { - .owner = THIS_MODULE, - .open = lo_open, - .release = lo_release, - .ioctl = lo_ioctl, -}; - -/* dynamic iocontrol callback. - * This callback is registered in lloop_init and will be called by - * ll_iocontrol_call. - * - * This is a llite regular file ioctl function. It takes the responsibility - * of attaching or detaching a file by a lloop's device number. - */ -static enum llioc_iter lloop_ioctl(struct inode *unused, struct file *file, - unsigned int cmd, unsigned long arg, - void *magic, int *rcp) -{ - struct lloop_device *lo = NULL; - struct block_device *bdev = NULL; - int err = 0; - dev_t dev; - - if (magic != ll_iocontrol_magic) - return LLIOC_CONT; - - if (!disks) { - err = -ENODEV; - goto out1; - } - - CWARN("Enter llop_ioctl\n"); - - mutex_lock(&lloop_mutex); - switch (cmd) { - case LL_IOC_LLOOP_ATTACH: { - struct lloop_device *lo_free = NULL; - int i; - - for (i = 0; i < max_loop; i++, lo = NULL) { - lo = &loop_dev[i]; - if (lo->lo_state == LLOOP_UNBOUND) { - if (!lo_free) - lo_free = lo; - continue; - } - if (file_inode(lo->lo_backing_file) == file_inode(file)) - break; - } - if (lo || !lo_free) { - err = -EBUSY; - goto out; - } - - lo = lo_free; - dev = MKDEV(lloop_major, lo->lo_number); - - /* quit if the used pointer is writable */ - if (put_user((long)old_encode_dev(dev), (long __user *)arg)) { - err = -EFAULT; - goto out; - } - - bdev = blkdev_get_by_dev(dev, file->f_mode, NULL); - if (IS_ERR(bdev)) { - err = PTR_ERR(bdev); - goto out; - } - - get_file(file); - err = loop_set_fd(lo, NULL, bdev, file); - if (err) { - fput(file); - blkdev_put(bdev, 0); - } - - break; - } - - case LL_IOC_LLOOP_DETACH_BYDEV: { - int minor; - - dev = old_decode_dev(arg); - if (MAJOR(dev) != lloop_major) { - err = -EINVAL; - goto out; - } - - minor = MINOR(dev); - if (minor > max_loop - 1) { - err = -EINVAL; - goto out; - } - - lo = &loop_dev[minor]; - if (lo->lo_state != LLOOP_BOUND) { - err = -EINVAL; - goto out; - } - - bdev = lo->lo_device; - err = loop_clr_fd(lo, bdev, 1); - if (err == 0) - blkdev_put(bdev, 0); /* grabbed in LLOOP_ATTACH */ - - break; - } - - default: - err = -EINVAL; - break; - } - -out: - mutex_unlock(&lloop_mutex); -out1: - if (rcp) - *rcp = err; - return LLIOC_STOP; -} - -static int __init lloop_init(void) -{ - int i; - unsigned int cmdlist[] = { - LL_IOC_LLOOP_ATTACH, - LL_IOC_LLOOP_DETACH_BYDEV, - }; - - if (max_loop < 1 || max_loop > 256) { - max_loop = MAX_LOOP_DEFAULT; - CWARN("lloop: invalid max_loop (must be between 1 and 256), using default (%u)\n", - max_loop); - } - - lloop_major = register_blkdev(0, "lloop"); - if (lloop_major < 0) - return -EIO; - - CDEBUG(D_CONFIG, "registered lloop major %d with %u minors\n", - lloop_major, max_loop); - - ll_iocontrol_magic = ll_iocontrol_register(lloop_ioctl, 2, cmdlist); - if (!ll_iocontrol_magic) - goto out_mem1; - - loop_dev = kcalloc(max_loop, sizeof(*loop_dev), GFP_KERNEL); - if (!loop_dev) - goto out_mem1; - - disks = kcalloc(max_loop, sizeof(*disks), GFP_KERNEL); - if (!disks) - goto out_mem2; - - for (i = 0; i < max_loop; i++) { - disks[i] = alloc_disk(1); - if (!disks[i]) - goto out_mem3; - } - - mutex_init(&lloop_mutex); - - for (i = 0; i < max_loop; i++) { - struct lloop_device *lo = &loop_dev[i]; - struct gendisk *disk = disks[i]; - - lo->lo_queue = blk_alloc_queue(GFP_KERNEL); - if (!lo->lo_queue) - goto out_mem4; - - mutex_init(&lo->lo_ctl_mutex); - sema_init(&lo->lo_sem, 0); - init_waitqueue_head(&lo->lo_bh_wait); - lo->lo_number = i; - spin_lock_init(&lo->lo_lock); - disk->major = lloop_major; - disk->first_minor = i; - disk->fops = &lo_fops; - sprintf(disk->disk_name, "lloop%d", i); - disk->private_data = lo; - disk->queue = lo->lo_queue; - } - - /* We cannot fail after we call this, so another loop!*/ - for (i = 0; i < max_loop; i++) - add_disk(disks[i]); - return 0; - -out_mem4: - while (i--) - blk_cleanup_queue(loop_dev[i].lo_queue); - i = max_loop; -out_mem3: - while (i--) - put_disk(disks[i]); - kfree(disks); -out_mem2: - kfree(loop_dev); -out_mem1: - unregister_blkdev(lloop_major, "lloop"); - ll_iocontrol_unregister(ll_iocontrol_magic); - CERROR("lloop: ran out of memory\n"); - return -ENOMEM; -} - -static void lloop_exit(void) -{ - int i; - - ll_iocontrol_unregister(ll_iocontrol_magic); - for (i = 0; i < max_loop; i++) { - del_gendisk(disks[i]); - blk_cleanup_queue(loop_dev[i].lo_queue); - put_disk(disks[i]); - } - - unregister_blkdev(lloop_major, "lloop"); - - kfree(disks); - kfree(loop_dev); -} - -module_param(max_loop, int, 0444); -MODULE_PARM_DESC(max_loop, "maximum of lloop_device"); -MODULE_AUTHOR("OpenSFS, Inc. "); -MODULE_DESCRIPTION("Lustre virtual block device"); -MODULE_VERSION(LUSTRE_VERSION_STRING); -MODULE_LICENSE("GPL"); - -module_init(lloop_init); -module_exit(lloop_exit); -- 1.7.1 From jsimmons at infradead.org Wed Jun 8 22:52:00 2016 From: jsimmons at infradead.org (James Simmons) Date: Wed, 8 Jun 2016 23:52:00 +0100 (BST) Subject: [lustre-devel] [PATCH 2/2] staging: lustre: lnet: Replace semaphore ln_rc_signal with completion In-Reply-To: <1465372242-7116-3-git-send-email-binoy.jayan@linaro.org> References: <1465372242-7116-1-git-send-email-binoy.jayan@linaro.org> <1465372242-7116-3-git-send-email-binoy.jayan@linaro.org> Message-ID: > The semaphore ln_rc_signal is used as completion, so convert it to > struct completion. Semaphores are going away in the future. > > Signed-off-by: Binoy Jayan No problems in testing. Acked-by: James Simmons > --- > drivers/staging/lustre/include/linux/lnet/lib-types.h | 3 ++- > drivers/staging/lustre/lnet/lnet/router.c | 9 +++++---- > 2 files changed, 7 insertions(+), 5 deletions(-) > > diff --git a/drivers/staging/lustre/include/linux/lnet/lib-types.h b/drivers/staging/lustre/include/linux/lnet/lib-types.h > index 24c4a08..7967b01 100644 > --- a/drivers/staging/lustre/include/linux/lnet/lib-types.h > +++ b/drivers/staging/lustre/include/linux/lnet/lib-types.h > @@ -38,6 +38,7 @@ > #include > #include > #include > +#include > > #include "types.h" > #include "lnetctl.h" > @@ -610,7 +611,7 @@ typedef struct { > /* rcd ready for free */ > struct list_head ln_rcd_zombie; > /* serialise startup/shutdown */ > - struct semaphore ln_rc_signal; > + struct completion ln_rc_signal; > > struct mutex ln_api_mutex; > struct mutex ln_lnd_mutex; > diff --git a/drivers/staging/lustre/lnet/lnet/router.c b/drivers/staging/lustre/lnet/lnet/router.c > index b01dc42..0635432 100644 > --- a/drivers/staging/lustre/lnet/lnet/router.c > +++ b/drivers/staging/lustre/lnet/lnet/router.c > @@ -18,6 +18,7 @@ > */ > > #define DEBUG_SUBSYSTEM S_LNET > +#include > #include "../../include/linux/lnet/lib-lnet.h" > > #define LNET_NRB_TINY_MIN 512 /* min value for each CPT */ > @@ -1065,7 +1066,7 @@ lnet_router_checker_start(void) > return -EINVAL; > } > > - sema_init(&the_lnet.ln_rc_signal, 0); > + init_completion(&the_lnet.ln_rc_signal); > > rc = LNetEQAlloc(0, lnet_router_checker_event, &the_lnet.ln_rc_eqh); > if (rc) { > @@ -1079,7 +1080,7 @@ lnet_router_checker_start(void) > rc = PTR_ERR(task); > CERROR("Can't start router checker thread: %d\n", rc); > /* block until event callback signals exit */ > - down(&the_lnet.ln_rc_signal); > + wait_for_completion(&the_lnet.ln_rc_signal); > rc = LNetEQFree(the_lnet.ln_rc_eqh); > LASSERT(!rc); > the_lnet.ln_rc_state = LNET_RC_STATE_SHUTDOWN; > @@ -1112,7 +1113,7 @@ lnet_router_checker_stop(void) > wake_up(&the_lnet.ln_rc_waitq); > > /* block until event callback signals exit */ > - down(&the_lnet.ln_rc_signal); > + wait_for_completion(&the_lnet.ln_rc_signal); > LASSERT(the_lnet.ln_rc_state == LNET_RC_STATE_SHUTDOWN); > > rc = LNetEQFree(the_lnet.ln_rc_eqh); > @@ -1295,7 +1296,7 @@ rescan: > lnet_prune_rc_data(1); /* wait for UNLINK */ > > the_lnet.ln_rc_state = LNET_RC_STATE_SHUTDOWN; > - up(&the_lnet.ln_rc_signal); > + complete(&the_lnet.ln_rc_signal); > /* The unlink event callback will signal final completion */ > return 0; > } > -- > The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, > a Linux Foundation Collaborative Project > > _______________________________________________ > devel mailing list > devel at linuxdriverproject.org > http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel > From andreas.dilger at intel.com Thu Jun 9 08:59:09 2016 From: andreas.dilger at intel.com (Dilger, Andreas) Date: Thu, 9 Jun 2016 08:59:09 +0000 Subject: [lustre-devel] [PATCH] staging: lustre: llite: remove lloop device In-Reply-To: <1465426212-3392-1-git-send-email-jsimmons@infradead.org> References: <1465426212-3392-1-git-send-email-jsimmons@infradead.org> Message-ID: <997BA7A9-9DAD-46D2-BDB8-B5EE20971E21@intel.com> On 2016/06/08, 16:50, "James Simmons" wrote: >The lloop device was original developed to work around >the lack of direct I/O for the default loop back device. >Also the lloop device greatly out performed the default >loop back device. The lloop hasn't been worked on for >some time and now it no longer out performs the loop >device and loop now supports direct I/O. Since this is >the case we can delete this device. > >Signed-off-by: James Simmons Reviewed-by: Andreas Dilger Cheers, Andreas >--- > drivers/staging/lustre/lustre/Kconfig | 6 - > drivers/staging/lustre/lustre/llite/Makefile | 3 - > drivers/staging/lustre/lustre/llite/lloop.c | 883 -------------------------- > 3 files changed, 0 insertions(+), 892 deletions(-) > delete mode 100644 drivers/staging/lustre/lustre/llite/lloop.c > >diff --git a/drivers/staging/lustre/lustre/Kconfig b/drivers/staging/lustre/lustre/Kconfig >index 8ac7cd4..9f5d75f 100644 >--- a/drivers/staging/lustre/lustre/Kconfig >+++ b/drivers/staging/lustre/lustre/Kconfig >@@ -54,9 +54,3 @@ config LUSTRE_TRANSLATE_ERRNOS > bool > depends on LUSTRE_FS && !X86 > default y >- >-config LUSTRE_LLITE_LLOOP >- tristate "Lustre virtual block device" >- depends on LUSTRE_FS && BLOCK >- depends on !PPC_64K_PAGES && !ARM64_64K_PAGES && !MICROBLAZE_64K_PAGES && !PAGE_SIZE_64KB && !IA64_PAGE_SIZE_64KB && !PARISC_PAGE_SIZE_64KB >- default m >diff --git a/drivers/staging/lustre/lustre/llite/Makefile b/drivers/staging/lustre/lustre/llite/Makefile >index 2ce10ff..19701e7 100644 >--- a/drivers/staging/lustre/lustre/llite/Makefile >+++ b/drivers/staging/lustre/lustre/llite/Makefile >@@ -1,5 +1,4 @@ > obj-$(CONFIG_LUSTRE_FS) += lustre.o >-obj-$(CONFIG_LUSTRE_LLITE_LLOOP) += llite_lloop.o > lustre-y := dcache.o dir.o file.o llite_close.o llite_lib.o llite_nfs.o \ > rw.o namei.o symlink.o llite_mmap.o \ > xattr.o xattr_cache.o remote_perm.o llite_rmtacl.o \ >@@ -7,5 +6,3 @@ lustre-y := dcache.o dir.o file.o llite_close.o llite_lib.o llite_nfs.o \ > glimpse.o lcommon_cl.o lcommon_misc.o \ > vvp_dev.o vvp_page.o vvp_lock.o vvp_io.o vvp_object.o vvp_req.o \ > lproc_llite.o >- >-llite_lloop-y := lloop.o >diff --git a/drivers/staging/lustre/lustre/llite/lloop.c b/drivers/staging/lustre/lustre/llite/lloop.c >deleted file mode 100644 >index 813a9a3..0000000 >--- a/drivers/staging/lustre/lustre/llite/lloop.c >+++ /dev/null >@@ -1,883 +0,0 @@ >-/* >- * GPL HEADER START >- * >- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. >- * >- * This program is free software; you can redistribute it and/or modify >- * it under the terms of the GNU General Public License version 2 only, >- * as published by the Free Software Foundation. >- * >- * This program is distributed in the hope that it will be useful, but >- * WITHOUT ANY WARRANTY; without even the implied warranty of >- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU >- * General Public License version 2 for more details (a copy is included >- * in the LICENSE file that accompanied this code). >- * >- * You should have received a copy of the GNU General Public License >- * version 2 along with this program; If not, see >- * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf >- * >- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, >- * CA 95054 USA or visit www.sun.com if you need additional information or >- * have any questions. >- * >- * GPL HEADER END >- */ >-/* >- * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. >- * Use is subject to license terms. >- * >- * Copyright (c) 2011, 2012, Intel Corporation. >- */ >-/* >- * This file is part of Lustre, http://www.lustre.org/ >- * Lustre is a trademark of Sun Microsystems, Inc. >- */ >- >-/* >- * linux/drivers/block/loop.c >- * >- * Written by Theodore Ts'o, 3/29/93 >- * >- * Copyright 1993 by Theodore Ts'o. Redistribution of this file is >- * permitted under the GNU General Public License. >- * >- * Modularized and updated for 1.1.16 kernel - Mitch Dsouza 28th May 1994 >- * Adapted for 1.3.59 kernel - Andries Brouwer, 1 Feb 1996 >- * >- * Fixed do_loop_request() re-entrancy - Vincent.Renardias at waw.com Mar 20, 1997 >- * >- * Added devfs support - Richard Gooch 16-Jan-1998 >- * >- * Handle sparse backing files correctly - Kenn Humborg, Jun 28, 1998 >- * >- * Loadable modules and other fixes by AK, 1998 >- * >- * Maximum number of loop devices now dynamic via max_loop module parameter. >- * Russell Kroll 19990701 >- * >- * Maximum number of loop devices when compiled-in now selectable by passing >- * max_loop=<1-255> to the kernel on boot. >- * Erik I. Bols?, , Oct 31, 1999 >- * >- * Completely rewrite request handling to be make_request_fn style and >- * non blocking, pushing work to a helper thread. Lots of fixes from >- * Al Viro too. >- * Jens Axboe , Nov 2000 >- * >- * Support up to 256 loop devices >- * Heinz Mauelshagen , Feb 2002 >- * >- * Support for falling back on the write file operation when the address space >- * operations prepare_write and/or commit_write are not available on the >- * backing filesystem. >- * Anton Altaparmakov, 16 Feb 2005 >- * >- * Still To Fix: >- * - Advisory locking is ignored here. >- * - Should use an own CAP_* category instead of CAP_SYS_ADMIN >- * >- */ >- >-#include >- >-#include >-#include >-#include >-#include >-#include >-#include >-#include >-#include >-#include >-#include >-#include >-#include >-#include >-#include >-#include /* for invalidate_bdev() */ >-#include >-#include >-#include >-#include >-#include >- >-#include "../include/lustre_lib.h" >-#include "../include/lustre_lite.h" >-#include "llite_internal.h" >- >-#define LLOOP_MAX_SEGMENTS LNET_MAX_IOV >- >-/* Possible states of device */ >-enum { >- LLOOP_UNBOUND, >- LLOOP_BOUND, >- LLOOP_RUNDOWN, >-}; >- >-struct lloop_device { >- int lo_number; >- int lo_refcnt; >- loff_t lo_offset; >- loff_t lo_sizelimit; >- int lo_flags; >- struct file *lo_backing_file; >- struct block_device *lo_device; >- unsigned lo_blocksize; >- >- gfp_t old_gfp_mask; >- >- spinlock_t lo_lock; >- struct bio *lo_bio; >- struct bio *lo_biotail; >- int lo_state; >- struct semaphore lo_sem; >- struct mutex lo_ctl_mutex; >- atomic_t lo_pending; >- wait_queue_head_t lo_bh_wait; >- >- struct request_queue *lo_queue; >- >- const struct lu_env *lo_env; >- struct cl_io lo_io; >- struct ll_dio_pages lo_pvec; >- >- /* data to handle bio for lustre. */ >- struct lo_request_data { >- struct page *lrd_pages[LLOOP_MAX_SEGMENTS]; >- loff_t lrd_offsets[LLOOP_MAX_SEGMENTS]; >- } lo_requests[1]; >-}; >- >-/* >- * Loop flags >- */ >-enum { >- LO_FLAGS_READ_ONLY = 1, >-}; >- >-static int lloop_major; >-#define MAX_LOOP_DEFAULT 16 >-static int max_loop = MAX_LOOP_DEFAULT; >-static struct lloop_device *loop_dev; >-static struct gendisk **disks; >-static struct mutex lloop_mutex; >-static void *ll_iocontrol_magic; >- >-static loff_t get_loop_size(struct lloop_device *lo, struct file *file) >-{ >- loff_t size, offset, loopsize; >- >- /* Compute loopsize in bytes */ >- size = i_size_read(file->f_mapping->host); >- offset = lo->lo_offset; >- loopsize = size - offset; >- if (lo->lo_sizelimit > 0 && lo->lo_sizelimit < loopsize) >- loopsize = lo->lo_sizelimit; >- >- /* >- * Unfortunately, if we want to do I/O on the device, >- * the number of 512-byte sectors has to fit into a sector_t. >- */ >- return loopsize >> 9; >-} >- >-static int do_bio_lustrebacked(struct lloop_device *lo, struct bio *head) >-{ >- const struct lu_env *env = lo->lo_env; >- struct cl_io *io = &lo->lo_io; >- struct inode *inode = file_inode(lo->lo_backing_file); >- struct cl_object *obj = ll_i2info(inode)->lli_clob; >- pgoff_t offset; >- int ret; >- int rw; >- u32 page_count = 0; >- struct bio_vec bvec; >- struct bvec_iter iter; >- struct bio *bio; >- ssize_t bytes; >- >- struct ll_dio_pages *pvec = &lo->lo_pvec; >- struct page **pages = pvec->ldp_pages; >- loff_t *offsets = pvec->ldp_offsets; >- >- truncate_inode_pages(inode->i_mapping, 0); >- >- /* initialize the IO */ >- memset(io, 0, sizeof(*io)); >- io->ci_obj = obj; >- ret = cl_io_init(env, io, CIT_MISC, obj); >- if (ret) >- return io->ci_result; >- io->ci_lockreq = CILR_NEVER; >- >- rw = head->bi_rw; >- for (bio = head; bio ; bio = bio->bi_next) { >- LASSERT(rw == bio->bi_rw); >- >- offset = (pgoff_t)(bio->bi_iter.bi_sector << 9) + lo->lo_offset; >- bio_for_each_segment(bvec, bio, iter) { >- BUG_ON(bvec.bv_offset != 0); >- BUG_ON(bvec.bv_len != PAGE_SIZE); >- >- pages[page_count] = bvec.bv_page; >- offsets[page_count] = offset; >- page_count++; >- offset += bvec.bv_len; >- } >- LASSERT(page_count <= LLOOP_MAX_SEGMENTS); >- } >- >- ll_stats_ops_tally(ll_i2sbi(inode), >- (rw == WRITE) ? LPROC_LL_BRW_WRITE : LPROC_LL_BRW_READ, >- page_count); >- >- pvec->ldp_size = page_count << PAGE_SHIFT; >- pvec->ldp_nr = page_count; >- >- /* FIXME: in ll_direct_rw_pages, it has to allocate many cl_page{}s to >- * write those pages into OST. Even worse case is that more pages >- * would be asked to write out to swap space, and then finally get here >- * again. >- * Unfortunately this is NOT easy to fix. >- * Thoughts on solution: >- * 0. Define a reserved pool for cl_pages, which could be a list of >- * pre-allocated cl_pages; >- * 1. Define a new operation in cl_object_operations{}, says clo_depth, >- * which measures how many layers for this lustre object. Generally >- * speaking, the depth would be 2, one for llite, and one for lovsub. >- * However, for SNS, there will be more since we need additional page >- * to store parity; >- * 2. Reserve the # of (page_count * depth) cl_pages from the reserved >- * pool. Afterwards, the clio would allocate the pages from reserved >- * pool, this guarantees we needn't allocate the cl_pages from >- * generic cl_page slab cache. >- * Of course, if there is NOT enough pages in the pool, we might >- * be asked to write less pages once, this purely depends on >- * implementation. Anyway, we should be careful to avoid deadlocking. >- */ >- inode_lock(inode); >- bytes = ll_direct_rw_pages(env, io, rw, inode, pvec); >- inode_unlock(inode); >- cl_io_fini(env, io); >- return (bytes == pvec->ldp_size) ? 0 : (int)bytes; >-} >- >-/* >- * Add bio to back of pending list >- */ >-static void loop_add_bio(struct lloop_device *lo, struct bio *bio) >-{ >- unsigned long flags; >- >- spin_lock_irqsave(&lo->lo_lock, flags); >- if (lo->lo_biotail) { >- lo->lo_biotail->bi_next = bio; >- lo->lo_biotail = bio; >- } else { >- lo->lo_bio = lo->lo_biotail = bio; >- } >- spin_unlock_irqrestore(&lo->lo_lock, flags); >- >- atomic_inc(&lo->lo_pending); >- if (waitqueue_active(&lo->lo_bh_wait)) >- wake_up(&lo->lo_bh_wait); >-} >- >-/* >- * Grab first pending buffer >- */ >-static unsigned int loop_get_bio(struct lloop_device *lo, struct bio **req) >-{ >- struct bio *first; >- struct bio **bio; >- unsigned int count = 0; >- unsigned int page_count = 0; >- int rw; >- >- spin_lock_irq(&lo->lo_lock); >- first = lo->lo_bio; >- if (unlikely(!first)) { >- spin_unlock_irq(&lo->lo_lock); >- return 0; >- } >- >- /* TODO: need to split the bio, too bad. */ >- LASSERT(first->bi_vcnt <= LLOOP_MAX_SEGMENTS); >- >- rw = first->bi_rw; >- bio = &lo->lo_bio; >- while (*bio && (*bio)->bi_rw == rw) { >- CDEBUG(D_INFO, "bio sector %llu size %u count %u vcnt%u\n", >- (unsigned long long)(*bio)->bi_iter.bi_sector, >- (*bio)->bi_iter.bi_size, >- page_count, (*bio)->bi_vcnt); >- if (page_count + (*bio)->bi_vcnt > LLOOP_MAX_SEGMENTS) >- break; >- >- page_count += (*bio)->bi_vcnt; >- count++; >- bio = &(*bio)->bi_next; >- } >- if (*bio) { >- /* Some of bios can't be mergeable. */ >- lo->lo_bio = *bio; >- *bio = NULL; >- } else { >- /* Hit the end of queue */ >- lo->lo_biotail = NULL; >- lo->lo_bio = NULL; >- } >- *req = first; >- spin_unlock_irq(&lo->lo_lock); >- return count; >-} >- >-static blk_qc_t loop_make_request(struct request_queue *q, struct bio *old_bio) >-{ >- struct lloop_device *lo = q->queuedata; >- int rw = bio_rw(old_bio); >- int inactive; >- >- blk_queue_split(q, &old_bio, q->bio_split); >- >- if (!lo) >- goto err; >- >- CDEBUG(D_INFO, "submit bio sector %llu size %u\n", >- (unsigned long long)old_bio->bi_iter.bi_sector, >- old_bio->bi_iter.bi_size); >- >- spin_lock_irq(&lo->lo_lock); >- inactive = lo->lo_state != LLOOP_BOUND; >- spin_unlock_irq(&lo->lo_lock); >- if (inactive) >- goto err; >- >- if (rw == WRITE) { >- if (lo->lo_flags & LO_FLAGS_READ_ONLY) >- goto err; >- } else if (rw == READA) { >- rw = READ; >- } else if (rw != READ) { >- CERROR("lloop: unknown command (%x)\n", rw); >- goto err; >- } >- loop_add_bio(lo, old_bio); >- return BLK_QC_T_NONE; >-err: >- bio_io_error(old_bio); >- return BLK_QC_T_NONE; >-} >- >-static inline void loop_handle_bio(struct lloop_device *lo, struct bio *bio) >-{ >- int ret; >- >- ret = do_bio_lustrebacked(lo, bio); >- while (bio) { >- struct bio *tmp = bio->bi_next; >- >- bio->bi_next = NULL; >- bio->bi_error = ret; >- bio_endio(bio); >- bio = tmp; >- } >-} >- >-static inline int loop_active(struct lloop_device *lo) >-{ >- return atomic_read(&lo->lo_pending) || >- (lo->lo_state == LLOOP_RUNDOWN); >-} >- >-/* >- * worker thread that handles reads/writes to file backed loop devices, >- * to avoid blocking in our make_request_fn. >- */ >-static int loop_thread(void *data) >-{ >- struct lloop_device *lo = data; >- struct bio *bio; >- unsigned int count; >- unsigned long times = 0; >- unsigned long total_count = 0; >- >- struct lu_env *env; >- int refcheck; >- int ret = 0; >- >- set_user_nice(current, MIN_NICE); >- >- lo->lo_state = LLOOP_BOUND; >- >- env = cl_env_get(&refcheck); >- if (IS_ERR(env)) { >- ret = PTR_ERR(env); >- goto out; >- } >- >- lo->lo_env = env; >- memset(&lo->lo_pvec, 0, sizeof(lo->lo_pvec)); >- lo->lo_pvec.ldp_pages = lo->lo_requests[0].lrd_pages; >- lo->lo_pvec.ldp_offsets = lo->lo_requests[0].lrd_offsets; >- >- /* >- * up sem, we are running >- */ >- up(&lo->lo_sem); >- >- for (;;) { >- wait_event(lo->lo_bh_wait, loop_active(lo)); >- if (!atomic_read(&lo->lo_pending)) { >- int exiting = 0; >- >- spin_lock_irq(&lo->lo_lock); >- exiting = (lo->lo_state == LLOOP_RUNDOWN); >- spin_unlock_irq(&lo->lo_lock); >- if (exiting) >- break; >- } >- >- bio = NULL; >- count = loop_get_bio(lo, &bio); >- if (!count) { >- CWARN("lloop(minor: %d): missing bio\n", lo->lo_number); >- continue; >- } >- >- total_count += count; >- if (total_count < count) { /* overflow */ >- total_count = count; >- times = 1; >- } else { >- times++; >- } >- if ((times & 127) == 0) { >- CDEBUG(D_INFO, "total: %lu, count: %lu, avg: %lu\n", >- total_count, times, total_count / times); >- } >- >- LASSERT(bio); >- LASSERT(count <= atomic_read(&lo->lo_pending)); >- loop_handle_bio(lo, bio); >- atomic_sub(count, &lo->lo_pending); >- } >- cl_env_put(env, &refcheck); >- >-out: >- up(&lo->lo_sem); >- return ret; >-} >- >-static int loop_set_fd(struct lloop_device *lo, struct file *unused, >- struct block_device *bdev, struct file *file) >-{ >- struct inode *inode; >- struct address_space *mapping; >- int lo_flags = 0; >- int error; >- loff_t size; >- >- if (!try_module_get(THIS_MODULE)) >- return -ENODEV; >- >- error = -EBUSY; >- if (lo->lo_state != LLOOP_UNBOUND) >- goto out; >- >- mapping = file->f_mapping; >- inode = mapping->host; >- >- error = -EINVAL; >- if (!S_ISREG(inode->i_mode) || inode->i_sb->s_magic != LL_SUPER_MAGIC) >- goto out; >- >- if (!(file->f_mode & FMODE_WRITE)) >- lo_flags |= LO_FLAGS_READ_ONLY; >- >- size = get_loop_size(lo, file); >- >- if ((loff_t)(sector_t)size != size) { >- error = -EFBIG; >- goto out; >- } >- >- /* remove all pages in cache so as dirty pages not to be existent. */ >- truncate_inode_pages(mapping, 0); >- >- set_device_ro(bdev, (lo_flags & LO_FLAGS_READ_ONLY) != 0); >- >- lo->lo_blocksize = PAGE_SIZE; >- lo->lo_device = bdev; >- lo->lo_flags = lo_flags; >- lo->lo_backing_file = file; >- lo->lo_sizelimit = 0; >- lo->old_gfp_mask = mapping_gfp_mask(mapping); >- mapping_set_gfp_mask(mapping, lo->old_gfp_mask & ~(__GFP_IO|__GFP_FS)); >- >- lo->lo_bio = lo->lo_biotail = NULL; >- >- /* >- * set queue make_request_fn, and add limits based on lower level >- * device >- */ >- blk_queue_make_request(lo->lo_queue, loop_make_request); >- lo->lo_queue->queuedata = lo; >- >- /* queue parameters */ >- CLASSERT(PAGE_SIZE < (1 << (sizeof(unsigned short) * 8))); >- blk_queue_logical_block_size(lo->lo_queue, >- (unsigned short)PAGE_SIZE); >- blk_queue_max_hw_sectors(lo->lo_queue, >- LLOOP_MAX_SEGMENTS << (PAGE_SHIFT - 9)); >- blk_queue_max_segments(lo->lo_queue, LLOOP_MAX_SEGMENTS); >- >- set_capacity(disks[lo->lo_number], size); >- bd_set_size(bdev, size << 9); >- >- set_blocksize(bdev, lo->lo_blocksize); >- >- kthread_run(loop_thread, lo, "lloop%d", lo->lo_number); >- down(&lo->lo_sem); >- return 0; >- >-out: >- /* This is safe: open() is still holding a reference. */ >- module_put(THIS_MODULE); >- return error; >-} >- >-static int loop_clr_fd(struct lloop_device *lo, struct block_device *bdev, >- int count) >-{ >- struct file *filp = lo->lo_backing_file; >- gfp_t gfp = lo->old_gfp_mask; >- >- if (lo->lo_state != LLOOP_BOUND) >- return -ENXIO; >- >- if (lo->lo_refcnt > count) /* we needed one fd for the ioctl */ >- return -EBUSY; >- >- if (!filp) >- return -EINVAL; >- >- spin_lock_irq(&lo->lo_lock); >- lo->lo_state = LLOOP_RUNDOWN; >- spin_unlock_irq(&lo->lo_lock); >- wake_up(&lo->lo_bh_wait); >- >- down(&lo->lo_sem); >- lo->lo_backing_file = NULL; >- lo->lo_device = NULL; >- lo->lo_offset = 0; >- lo->lo_sizelimit = 0; >- lo->lo_flags = 0; >- invalidate_bdev(bdev); >- set_capacity(disks[lo->lo_number], 0); >- bd_set_size(bdev, 0); >- mapping_set_gfp_mask(filp->f_mapping, gfp); >- lo->lo_state = LLOOP_UNBOUND; >- fput(filp); >- /* This is safe: open() is still holding a reference. */ >- module_put(THIS_MODULE); >- return 0; >-} >- >-static int lo_open(struct block_device *bdev, fmode_t mode) >-{ >- struct lloop_device *lo = bdev->bd_disk->private_data; >- >- mutex_lock(&lo->lo_ctl_mutex); >- lo->lo_refcnt++; >- mutex_unlock(&lo->lo_ctl_mutex); >- >- return 0; >-} >- >-static void lo_release(struct gendisk *disk, fmode_t mode) >-{ >- struct lloop_device *lo = disk->private_data; >- >- mutex_lock(&lo->lo_ctl_mutex); >- --lo->lo_refcnt; >- mutex_unlock(&lo->lo_ctl_mutex); >-} >- >-/* lloop device node's ioctl function. */ >-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; >- struct inode *inode = NULL; >- int err = 0; >- >- mutex_lock(&lloop_mutex); >- switch (cmd) { >- case LL_IOC_LLOOP_DETACH: { >- err = loop_clr_fd(lo, bdev, 2); >- if (err == 0) >- blkdev_put(bdev, 0); /* grabbed in LLOOP_ATTACH */ >- break; >- } >- >- case LL_IOC_LLOOP_INFO: { >- struct lu_fid fid; >- >- if (!lo->lo_backing_file) { >- err = -ENOENT; >- break; >- } >- if (!inode) >- inode = file_inode(lo->lo_backing_file); >- if (lo->lo_state == LLOOP_BOUND) >- fid = ll_i2info(inode)->lli_fid; >- else >- fid_zero(&fid); >- >- if (copy_to_user((void __user *)arg, &fid, sizeof(fid))) >- err = -EFAULT; >- break; >- } >- >- default: >- err = -EINVAL; >- break; >- } >- mutex_unlock(&lloop_mutex); >- >- return err; >-} >- >-static struct block_device_operations lo_fops = { >- .owner = THIS_MODULE, >- .open = lo_open, >- .release = lo_release, >- .ioctl = lo_ioctl, >-}; >- >-/* dynamic iocontrol callback. >- * This callback is registered in lloop_init and will be called by >- * ll_iocontrol_call. >- * >- * This is a llite regular file ioctl function. It takes the responsibility >- * of attaching or detaching a file by a lloop's device number. >- */ >-static enum llioc_iter lloop_ioctl(struct inode *unused, struct file *file, >- unsigned int cmd, unsigned long arg, >- void *magic, int *rcp) >-{ >- struct lloop_device *lo = NULL; >- struct block_device *bdev = NULL; >- int err = 0; >- dev_t dev; >- >- if (magic != ll_iocontrol_magic) >- return LLIOC_CONT; >- >- if (!disks) { >- err = -ENODEV; >- goto out1; >- } >- >- CWARN("Enter llop_ioctl\n"); >- >- mutex_lock(&lloop_mutex); >- switch (cmd) { >- case LL_IOC_LLOOP_ATTACH: { >- struct lloop_device *lo_free = NULL; >- int i; >- >- for (i = 0; i < max_loop; i++, lo = NULL) { >- lo = &loop_dev[i]; >- if (lo->lo_state == LLOOP_UNBOUND) { >- if (!lo_free) >- lo_free = lo; >- continue; >- } >- if (file_inode(lo->lo_backing_file) == file_inode(file)) >- break; >- } >- if (lo || !lo_free) { >- err = -EBUSY; >- goto out; >- } >- >- lo = lo_free; >- dev = MKDEV(lloop_major, lo->lo_number); >- >- /* quit if the used pointer is writable */ >- if (put_user((long)old_encode_dev(dev), (long __user *)arg)) { >- err = -EFAULT; >- goto out; >- } >- >- bdev = blkdev_get_by_dev(dev, file->f_mode, NULL); >- if (IS_ERR(bdev)) { >- err = PTR_ERR(bdev); >- goto out; >- } >- >- get_file(file); >- err = loop_set_fd(lo, NULL, bdev, file); >- if (err) { >- fput(file); >- blkdev_put(bdev, 0); >- } >- >- break; >- } >- >- case LL_IOC_LLOOP_DETACH_BYDEV: { >- int minor; >- >- dev = old_decode_dev(arg); >- if (MAJOR(dev) != lloop_major) { >- err = -EINVAL; >- goto out; >- } >- >- minor = MINOR(dev); >- if (minor > max_loop - 1) { >- err = -EINVAL; >- goto out; >- } >- >- lo = &loop_dev[minor]; >- if (lo->lo_state != LLOOP_BOUND) { >- err = -EINVAL; >- goto out; >- } >- >- bdev = lo->lo_device; >- err = loop_clr_fd(lo, bdev, 1); >- if (err == 0) >- blkdev_put(bdev, 0); /* grabbed in LLOOP_ATTACH */ >- >- break; >- } >- >- default: >- err = -EINVAL; >- break; >- } >- >-out: >- mutex_unlock(&lloop_mutex); >-out1: >- if (rcp) >- *rcp = err; >- return LLIOC_STOP; >-} >- >-static int __init lloop_init(void) >-{ >- int i; >- unsigned int cmdlist[] = { >- LL_IOC_LLOOP_ATTACH, >- LL_IOC_LLOOP_DETACH_BYDEV, >- }; >- >- if (max_loop < 1 || max_loop > 256) { >- max_loop = MAX_LOOP_DEFAULT; >- CWARN("lloop: invalid max_loop (must be between 1 and 256), using default (%u)\n", >- max_loop); >- } >- >- lloop_major = register_blkdev(0, "lloop"); >- if (lloop_major < 0) >- return -EIO; >- >- CDEBUG(D_CONFIG, "registered lloop major %d with %u minors\n", >- lloop_major, max_loop); >- >- ll_iocontrol_magic = ll_iocontrol_register(lloop_ioctl, 2, cmdlist); >- if (!ll_iocontrol_magic) >- goto out_mem1; >- >- loop_dev = kcalloc(max_loop, sizeof(*loop_dev), GFP_KERNEL); >- if (!loop_dev) >- goto out_mem1; >- >- disks = kcalloc(max_loop, sizeof(*disks), GFP_KERNEL); >- if (!disks) >- goto out_mem2; >- >- for (i = 0; i < max_loop; i++) { >- disks[i] = alloc_disk(1); >- if (!disks[i]) >- goto out_mem3; >- } >- >- mutex_init(&lloop_mutex); >- >- for (i = 0; i < max_loop; i++) { >- struct lloop_device *lo = &loop_dev[i]; >- struct gendisk *disk = disks[i]; >- >- lo->lo_queue = blk_alloc_queue(GFP_KERNEL); >- if (!lo->lo_queue) >- goto out_mem4; >- >- mutex_init(&lo->lo_ctl_mutex); >- sema_init(&lo->lo_sem, 0); >- init_waitqueue_head(&lo->lo_bh_wait); >- lo->lo_number = i; >- spin_lock_init(&lo->lo_lock); >- disk->major = lloop_major; >- disk->first_minor = i; >- disk->fops = &lo_fops; >- sprintf(disk->disk_name, "lloop%d", i); >- disk->private_data = lo; >- disk->queue = lo->lo_queue; >- } >- >- /* We cannot fail after we call this, so another loop!*/ >- for (i = 0; i < max_loop; i++) >- add_disk(disks[i]); >- return 0; >- >-out_mem4: >- while (i--) >- blk_cleanup_queue(loop_dev[i].lo_queue); >- i = max_loop; >-out_mem3: >- while (i--) >- put_disk(disks[i]); >- kfree(disks); >-out_mem2: >- kfree(loop_dev); >-out_mem1: >- unregister_blkdev(lloop_major, "lloop"); >- ll_iocontrol_unregister(ll_iocontrol_magic); >- CERROR("lloop: ran out of memory\n"); >- return -ENOMEM; >-} >- >-static void lloop_exit(void) >-{ >- int i; >- >- ll_iocontrol_unregister(ll_iocontrol_magic); >- for (i = 0; i < max_loop; i++) { >- del_gendisk(disks[i]); >- blk_cleanup_queue(loop_dev[i].lo_queue); >- put_disk(disks[i]); >- } >- >- unregister_blkdev(lloop_major, "lloop"); >- >- kfree(disks); >- kfree(loop_dev); >-} >- >-module_param(max_loop, int, 0444); >-MODULE_PARM_DESC(max_loop, "maximum of lloop_device"); >-MODULE_AUTHOR("OpenSFS, Inc. "); >-MODULE_DESCRIPTION("Lustre virtual block device"); >-MODULE_VERSION(LUSTRE_VERSION_STRING); >-MODULE_LICENSE("GPL"); >- >-module_init(lloop_init); >-module_exit(lloop_exit); >-- >1.7.1 > > From deepa.kernel at gmail.com Thu Jun 9 05:04:55 2016 From: deepa.kernel at gmail.com (Deepa Dinamani) Date: Wed, 8 Jun 2016 22:04:55 -0700 Subject: [lustre-devel] [PATCH 11/21] drivers: staging: lustre: Replace CURRENT_TIME with current_fs_time() In-Reply-To: <1465448705-25055-1-git-send-email-deepa.kernel@gmail.com> References: <1465448705-25055-1-git-send-email-deepa.kernel@gmail.com> Message-ID: <1465448705-25055-12-git-send-email-deepa.kernel@gmail.com> CURRENT_TIME macro is not appropriate for filesystems as it doesn't use the right granularity for filesystem timestamps. Use current_fs_time() instead. This is also in preparation for the patch that transitions vfs timestamps to use 64 bit time and hence make them y2038 safe. As part of the effort current_fs_time() will be extended to do range checks. Hence, it is necessary for all file system timestamps to use current_fs_time(). Also change format string for prints so that these are valid when vfs is transitioned to use 64 bit timestamps. Signed-off-by: Deepa Dinamani Cc: Greg Kroah-Hartman Cc: lustre-devel at lists.lustre.org --- drivers/staging/lustre/lustre/llite/llite_lib.c | 17 +++++++++-------- drivers/staging/lustre/lustre/llite/namei.c | 4 ++-- drivers/staging/lustre/lustre/mdc/mdc_reint.c | 6 +++--- .../staging/lustre/lustre/obdclass/linux/linux-obdo.c | 6 +++--- drivers/staging/lustre/lustre/obdclass/obdo.c | 6 +++--- drivers/staging/lustre/lustre/osc/osc_io.c | 2 +- 6 files changed, 21 insertions(+), 20 deletions(-) diff --git a/drivers/staging/lustre/lustre/llite/llite_lib.c b/drivers/staging/lustre/lustre/llite/llite_lib.c index 96c7e9f..919748f 100644 --- a/drivers/staging/lustre/lustre/llite/llite_lib.c +++ b/drivers/staging/lustre/lustre/llite/llite_lib.c @@ -1219,6 +1219,7 @@ static int ll_setattr_done_writing(struct inode *inode, int ll_setattr_raw(struct dentry *dentry, struct iattr *attr, bool hsm_import) { struct inode *inode = d_inode(dentry); + struct super_block *sb = inode->i_sb; struct ll_inode_info *lli = ll_i2info(inode); struct md_op_data *op_data = NULL; struct md_open_data *mod = NULL; @@ -1258,23 +1259,23 @@ int ll_setattr_raw(struct dentry *dentry, struct iattr *attr, bool hsm_import) /* We mark all of the fields "set" so MDS/OST does not re-set them */ if (attr->ia_valid & ATTR_CTIME) { - attr->ia_ctime = CURRENT_TIME; + attr->ia_ctime = current_fs_time(sb); attr->ia_valid |= ATTR_CTIME_SET; } if (!(attr->ia_valid & ATTR_ATIME_SET) && (attr->ia_valid & ATTR_ATIME)) { - attr->ia_atime = CURRENT_TIME; + attr->ia_atime = current_fs_time(sb); attr->ia_valid |= ATTR_ATIME_SET; } if (!(attr->ia_valid & ATTR_MTIME_SET) && (attr->ia_valid & ATTR_MTIME)) { - attr->ia_mtime = CURRENT_TIME; + attr->ia_mtime = current_fs_time(sb); attr->ia_valid |= ATTR_MTIME_SET; } if (attr->ia_valid & (ATTR_MTIME | ATTR_CTIME)) - CDEBUG(D_INODE, "setting mtime %lu, ctime %lu, now = %llu\n", - LTIME_S(attr->ia_mtime), LTIME_S(attr->ia_ctime), + CDEBUG(D_INODE, "setting mtime %llu, ctime %llu, now = %llu\n", + (long long)LTIME_S(attr->ia_mtime), (long long)LTIME_S(attr->ia_ctime), (s64)ktime_get_real_seconds()); /* We always do an MDS RPC, even if we're only changing the size; @@ -1564,9 +1565,9 @@ void ll_update_inode(struct inode *inode, struct lustre_md *md) } if (body->valid & OBD_MD_FLMTIME) { if (body->mtime > LTIME_S(inode->i_mtime)) { - CDEBUG(D_INODE, "setting ino %lu mtime from %lu to %llu\n", - inode->i_ino, LTIME_S(inode->i_mtime), - body->mtime); + CDEBUG(D_INODE, "setting ino %lu mtime from %llu to %llu\n", + inode->i_ino, (unsigned long long)LTIME_S(inode->i_mtime), + (unsigned long long)body->mtime); LTIME_S(inode->i_mtime) = body->mtime; } lli->lli_mtime = body->mtime; diff --git a/drivers/staging/lustre/lustre/llite/namei.c b/drivers/staging/lustre/lustre/llite/namei.c index 5eba0eb..48ed1ce 100644 --- a/drivers/staging/lustre/lustre/llite/namei.c +++ b/drivers/staging/lustre/lustre/llite/namei.c @@ -731,8 +731,8 @@ static void ll_update_times(struct ptlrpc_request *request, LASSERT(body); if (body->valid & OBD_MD_FLMTIME && body->mtime > LTIME_S(inode->i_mtime)) { - CDEBUG(D_INODE, "setting fid "DFID" mtime from %lu to %llu\n", - PFID(ll_inode2fid(inode)), LTIME_S(inode->i_mtime), + CDEBUG(D_INODE, "setting fid "DFID" mtime from %llu to %llu\n", + PFID(ll_inode2fid(inode)), (unsigned long long)LTIME_S(inode->i_mtime), body->mtime); LTIME_S(inode->i_mtime) = body->mtime; } diff --git a/drivers/staging/lustre/lustre/mdc/mdc_reint.c b/drivers/staging/lustre/lustre/mdc/mdc_reint.c index 4ef3db1..9980f3a 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_reint.c +++ b/drivers/staging/lustre/lustre/mdc/mdc_reint.c @@ -143,9 +143,9 @@ int mdc_setattr(struct obd_export *exp, struct md_op_data *op_data, rpc_lock = obd->u.cli.cl_rpc_lock; if (op_data->op_attr.ia_valid & (ATTR_MTIME | ATTR_CTIME)) - CDEBUG(D_INODE, "setting mtime %ld, ctime %ld\n", - LTIME_S(op_data->op_attr.ia_mtime), - LTIME_S(op_data->op_attr.ia_ctime)); + CDEBUG(D_INODE, "setting mtime %lld, ctime %lld\n", + (long long)LTIME_S(op_data->op_attr.ia_mtime), + (long long)LTIME_S(op_data->op_attr.ia_ctime)); mdc_setattr_pack(req, op_data, ea, ealen, ea2, ea2len); ptlrpc_request_set_replen(req); diff --git a/drivers/staging/lustre/lustre/obdclass/linux/linux-obdo.c b/drivers/staging/lustre/lustre/obdclass/linux/linux-obdo.c index b41b65e..ccd2b7b 100644 --- a/drivers/staging/lustre/lustre/obdclass/linux/linux-obdo.c +++ b/drivers/staging/lustre/lustre/obdclass/linux/linux-obdo.c @@ -54,9 +54,9 @@ void obdo_refresh_inode(struct inode *dst, struct obdo *src, u32 valid) if (valid & (OBD_MD_FLCTIME | OBD_MD_FLMTIME)) CDEBUG(D_INODE, - "valid %#llx, cur time %lu/%lu, new %llu/%llu\n", - src->o_valid, LTIME_S(dst->i_mtime), - LTIME_S(dst->i_ctime), src->o_mtime, src->o_ctime); + "valid %#llx, cur time %llu/%llu, new %llu/%llu\n", + src->o_valid, (unsigned long long)LTIME_S(dst->i_mtime), + (unsigned long long)LTIME_S(dst->i_ctime), src->o_mtime, src->o_ctime); if (valid & OBD_MD_FLATIME && src->o_atime > LTIME_S(dst->i_atime)) LTIME_S(dst->i_atime) = src->o_atime; diff --git a/drivers/staging/lustre/lustre/obdclass/obdo.c b/drivers/staging/lustre/lustre/obdclass/obdo.c index 748e33f..973fa4c 100644 --- a/drivers/staging/lustre/lustre/obdclass/obdo.c +++ b/drivers/staging/lustre/lustre/obdclass/obdo.c @@ -62,9 +62,9 @@ void obdo_from_inode(struct obdo *dst, struct inode *src, u32 valid) u32 newvalid = 0; if (valid & (OBD_MD_FLCTIME | OBD_MD_FLMTIME)) - CDEBUG(D_INODE, "valid %x, new time %lu/%lu\n", - valid, LTIME_S(src->i_mtime), - LTIME_S(src->i_ctime)); + CDEBUG(D_INODE, "valid %x, new time %llu/%llu\n", + valid, (unsigned long long)LTIME_S(src->i_mtime), + (unsigned long long)LTIME_S(src->i_ctime)); if (valid & OBD_MD_FLATIME) { dst->o_atime = LTIME_S(src->i_atime); diff --git a/drivers/staging/lustre/lustre/osc/osc_io.c b/drivers/staging/lustre/lustre/osc/osc_io.c index d534b0e..99f69bb 100644 --- a/drivers/staging/lustre/lustre/osc/osc_io.c +++ b/drivers/staging/lustre/lustre/osc/osc_io.c @@ -221,7 +221,7 @@ static void osc_page_touch_at(const struct lu_env *env, kms > loi->loi_kms ? "" : "not ", loi->loi_kms, kms, loi->loi_lvb.lvb_size); - attr->cat_mtime = attr->cat_ctime = LTIME_S(CURRENT_TIME); + attr->cat_mtime = attr->cat_ctime = ktime_get_real_seconds(); valid = CAT_MTIME | CAT_CTIME; if (kms > loi->loi_kms) { attr->cat_kms = kms; -- 1.9.1 From jsimmons at infradead.org Thu Jun 9 22:45:44 2016 From: jsimmons at infradead.org (James Simmons) Date: Thu, 9 Jun 2016 18:45:44 -0400 Subject: [lustre-devel] [PATCH 0/3] staging: lustre: lnet: bug fixs for 4.7-rc2 Message-ID: <1465512347-11650-1-git-send-email-jsimmons@infradead.org> Here are the latest fixes for LNet. One fix covers a bug for the infiniband driver that happens when the o2iblnd intereface is pinged before it is finishing setting up. The next patch set from Bruno adds kmem_caches for the LNet layer. Bruno Faccini (2): staging: lustre: lnet: Allocate MEs and small MDs in own kmem_caches staging: lustre: lnet: optimize memory foot print for lnet_libmd Doug Oucharek (1): staging: lustre: lnet: Don't access NULL NI on failure path .../staging/lustre/include/linux/lnet/lib-lnet.h | 36 ++++++++++++++-- .../staging/lustre/include/linux/lnet/lib-types.h | 2 +- .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c | 7 ++- drivers/staging/lustre/lnet/lnet/api-ni.c | 45 ++++++++++++++++++++ 4 files changed, 82 insertions(+), 8 deletions(-) From jsimmons at infradead.org Thu Jun 9 22:45:45 2016 From: jsimmons at infradead.org (James Simmons) Date: Thu, 9 Jun 2016 18:45:45 -0400 Subject: [lustre-devel] [PATCH 1/3] staging: lustre: lnet: Don't access NULL NI on failure path In-Reply-To: <1465512347-11650-1-git-send-email-jsimmons@infradead.org> References: <1465512347-11650-1-git-send-email-jsimmons@infradead.org> Message-ID: <1465512347-11650-2-git-send-email-jsimmons@infradead.org> From: Doug Oucharek In kiblnd_passive_connect(), if we are failing the connection attempt because we cannot find a valid NI (we have a NULL NI), we were coring after the "goto fail" because the failure path was assuming non-NULL NI. This patch ensures we don't dereference a NULL NI on that failure path. Signed-off-by: Doug Oucharek Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8022 Reviewed-on: http://review.whamcloud.com/19614 Reviewed-by: Dmitry Eremin Reviewed-by: James Simmons Reviewed-by: Matt Ezell Reviewed-by: Oleg Drokin --- .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c index 0f7e3a1..dbc26f1 100644 --- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c +++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c @@ -2529,12 +2529,13 @@ kiblnd_passive_connect(struct rdma_cm_id *cmid, void *priv, int priv_nob) return 0; failed: - if (ni) + if (ni) { lnet_ni_decref(ni); + rej.ibr_cp.ibcp_queue_depth = kiblnd_msg_queue_size(version, ni); + rej.ibr_cp.ibcp_max_frags = kiblnd_rdma_frags(version, ni); + } rej.ibr_version = version; - rej.ibr_cp.ibcp_queue_depth = kiblnd_msg_queue_size(version, ni); - rej.ibr_cp.ibcp_max_frags = kiblnd_rdma_frags(version, ni); kiblnd_reject(cmid, &rej); return -ECONNREFUSED; -- 1.7.1 From jsimmons at infradead.org Thu Jun 9 22:45:46 2016 From: jsimmons at infradead.org (James Simmons) Date: Thu, 9 Jun 2016 18:45:46 -0400 Subject: [lustre-devel] [PATCH 2/3] staging: lustre: lnet: Allocate MEs and small MDs in own kmem_caches In-Reply-To: <1465512347-11650-1-git-send-email-jsimmons@infradead.org> References: <1465512347-11650-1-git-send-email-jsimmons@infradead.org> Message-ID: <1465512347-11650-3-git-send-email-jsimmons@infradead.org> From: Bruno Faccini As part of LU-3848 and LU-4330, it has been discovered that LNET MEs and small MDs (<=128 Bytes) are allocated in kmem_cache and thus can suffer quite frequent corruptions, from other modules or Kernel parts, that occur there. To avoid this, MEs and small-MDs specific kmem_cache have been created. Signed-off-by: Bruno Faccini Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4430 Reviewed-on: http://review.whamcloud.com/18586 Reviewed-by: Andreas Dilger Reviewed-by: Doug Oucharek Reviewed-by: Oleg Drokin Signed-off-by: James Simmons --- .../staging/lustre/include/linux/lnet/lib-lnet.h | 36 ++++++++++++++-- drivers/staging/lustre/lnet/lnet/api-ni.c | 45 ++++++++++++++++++++ 2 files changed, 77 insertions(+), 4 deletions(-) diff --git a/drivers/staging/lustre/include/linux/lnet/lib-lnet.h b/drivers/staging/lustre/include/linux/lnet/lib-lnet.h index 513a822..51ad729 100644 --- a/drivers/staging/lustre/include/linux/lnet/lib-lnet.h +++ b/drivers/staging/lustre/include/linux/lnet/lib-lnet.h @@ -178,6 +178,11 @@ lnet_net_lock_current(void) #define MAX_PORTALS 64 +#define LNET_SMALL_MD_SIZE offsetof(lnet_libmd_t, md_iov.iov[1]) +extern struct kmem_cache *lnet_mes_cachep; /* MEs kmem_cache */ +extern struct kmem_cache *lnet_small_mds_cachep;/* <= LNET_SMALL_MD_SIZE bytes + * MDs kmem_cache + */ static inline lnet_eq_t * lnet_eq_alloc(void) { @@ -208,7 +213,19 @@ lnet_md_alloc(lnet_md_t *umd) size = offsetof(lnet_libmd_t, md_iov.iov[niov]); } - LIBCFS_ALLOC(md, size); + if (size <= LNET_SMALL_MD_SIZE) { + md = kmem_cache_alloc(lnet_small_mds_cachep, + GFP_NOFS | __GFP_ZERO); + if (md) { + CDEBUG(D_MALLOC, "slab-alloced 'md' of size %u at %p.\n", + size, md); + } else { + CDEBUG(D_MALLOC, "failed to allocate 'md' of size %u\n", + size); + } + } else { + LIBCFS_ALLOC(md, size); + } if (md) { /* Set here in case of early free */ @@ -230,7 +247,12 @@ lnet_md_free(lnet_libmd_t *md) else size = offsetof(lnet_libmd_t, md_iov.iov[md->md_niov]); - LIBCFS_FREE(md, size); + if (size <= LNET_SMALL_MD_SIZE) { + CDEBUG(D_MALLOC, "slab-freed 'md' at %p.\n", md); + kmem_cache_free(lnet_small_mds_cachep, md); + } else { + LIBCFS_FREE(md, size); + } } static inline lnet_me_t * @@ -238,14 +260,20 @@ lnet_me_alloc(void) { lnet_me_t *me; - LIBCFS_ALLOC(me, sizeof(*me)); + me = kmem_cache_alloc(lnet_mes_cachep, GFP_NOFS | __GFP_ZERO); + if (me) + CDEBUG(D_MALLOC, "slab-alloced 'me' at %p.\n", me); + else + CDEBUG(D_MALLOC, "failed to allocate 'me'\n"); + return me; } static inline void lnet_me_free(lnet_me_t *me) { - LIBCFS_FREE(me, sizeof(*me)); + CDEBUG(D_MALLOC, "slab-freed 'me' at %p.\n", me); + kmem_cache_free(lnet_mes_cachep, me); } static inline lnet_msg_t * diff --git a/drivers/staging/lustre/lnet/lnet/api-ni.c b/drivers/staging/lustre/lnet/lnet/api-ni.c index fe0dbe7..9db0ff1 100644 --- a/drivers/staging/lustre/lnet/lnet/api-ni.c +++ b/drivers/staging/lustre/lnet/lnet/api-ni.c @@ -103,6 +103,46 @@ lnet_init_locks(void) mutex_init(&the_lnet.ln_api_mutex); } +struct kmem_cache *lnet_mes_cachep; /* MEs kmem_cache */ +struct kmem_cache *lnet_small_mds_cachep; /* <= LNET_SMALL_MD_SIZE bytes + * MDs kmem_cache + */ +static int +lnet_descriptor_setup(void) +{ + /* + * create specific kmem_cache for MEs and small MDs (i.e., originally + * allocated in kmem_cache). + */ + lnet_mes_cachep = kmem_cache_create("lnet_MEs", sizeof(lnet_me_t), + 0, 0, NULL); + if (!lnet_mes_cachep) + return -ENOMEM; + + lnet_small_mds_cachep = kmem_cache_create("lnet_small_MDs", + LNET_SMALL_MD_SIZE, 0, 0, + NULL); + if (!lnet_small_mds_cachep) + return -ENOMEM; + + return 0; +} + +static void +lnet_descriptor_cleanup(void) +{ + + if (lnet_small_mds_cachep) { + kmem_cache_destroy(lnet_small_mds_cachep); + lnet_small_mds_cachep = NULL; + } + + if (lnet_mes_cachep) { + kmem_cache_destroy(lnet_mes_cachep); + lnet_mes_cachep = NULL; + } +} + static int lnet_create_remote_nets_table(void) { @@ -553,6 +593,10 @@ lnet_prepare(lnet_pid_t requested_pid) INIT_LIST_HEAD(&the_lnet.ln_drop_rules); INIT_LIST_HEAD(&the_lnet.ln_delay_rules); + rc = lnet_descriptor_setup(); + if (rc) + goto failed; + rc = lnet_create_remote_nets_table(); if (rc) goto failed; @@ -652,6 +696,7 @@ lnet_unprepare(void) the_lnet.ln_counters = NULL; } lnet_destroy_remote_nets_table(); + lnet_descriptor_cleanup(); return 0; } -- 1.7.1 From jsimmons at infradead.org Thu Jun 9 22:45:47 2016 From: jsimmons at infradead.org (James Simmons) Date: Thu, 9 Jun 2016 18:45:47 -0400 Subject: [lustre-devel] [PATCH 3/3] staging: lustre: lnet: optimize memory foot print for lnet_libmd In-Reply-To: <1465512347-11650-1-git-send-email-jsimmons@infradead.org> References: <1465512347-11650-1-git-send-email-jsimmons@infradead.org> Message-ID: <1465512347-11650-4-git-send-email-jsimmons@infradead.org> From: Bruno Faccini The lnet_libmd struct fields have been re-ordered to optimize its memory foot-print. Signed-off-by: Bruno Faccini Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-4430 Reviewed-on: http://review.whamcloud.com/18586 Reviewed-by: Andreas Dilger Reviewed-by: Doug Oucharek Reviewed-by: Oleg Drokin Signed-off-by: James Simmons --- .../staging/lustre/include/linux/lnet/lib-types.h | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/drivers/staging/lustre/include/linux/lnet/lib-types.h b/drivers/staging/lustre/include/linux/lnet/lib-types.h index 7967b01..79a4ecf 100644 --- a/drivers/staging/lustre/include/linux/lnet/lib-types.h +++ b/drivers/staging/lustre/include/linux/lnet/lib-types.h @@ -151,9 +151,9 @@ typedef struct lnet_libmd { int md_refcount; unsigned int md_options; unsigned int md_flags; + unsigned int md_niov; /* # frags at end of struct */ void *md_user_ptr; lnet_eq_t *md_eq; - unsigned int md_niov; /* # frags */ union { struct kvec iov[LNET_MAX_IOV]; lnet_kiov_t kiov[LNET_MAX_IOV]; -- 1.7.1 From gregkh at linuxfoundation.org Fri Jun 10 01:28:33 2016 From: gregkh at linuxfoundation.org (Greg Kroah-Hartman) Date: Thu, 9 Jun 2016 18:28:33 -0700 Subject: [lustre-devel] [PATCH 2/3] staging: lustre: lnet: Allocate MEs and small MDs in own kmem_caches In-Reply-To: <1465512347-11650-3-git-send-email-jsimmons@infradead.org> References: <1465512347-11650-1-git-send-email-jsimmons@infradead.org> <1465512347-11650-3-git-send-email-jsimmons@infradead.org> Message-ID: <20160610012833.GA6804@kroah.com> On Thu, Jun 09, 2016 at 06:45:46PM -0400, James Simmons wrote: > From: Bruno Faccini > > As part of LU-3848 and LU-4330, it has been discovered that LNET > MEs and small MDs (<=128 Bytes) are allocated in kmem_cache > and thus can suffer quite frequent corruptions, from other modules or > Kernel parts, that occur there. To avoid this, MEs and small-MDs > specific kmem_cache have been created. What? Who corrupts them? That shouldn't be possible, and on some systems, even if you do ask for a separate slab, it will be merged togther with others of the same size. So this patch doesn't do all that much. I think you are having some other problem here, changing to a separate memory cache shouldn't solve corruption issues. sorry, greg k-h From gregkh at linuxfoundation.org Fri Jun 10 01:28:52 2016 From: gregkh at linuxfoundation.org (Greg Kroah-Hartman) Date: Thu, 9 Jun 2016 18:28:52 -0700 Subject: [lustre-devel] [PATCH 3/3] staging: lustre: lnet: optimize memory foot print for lnet_libmd In-Reply-To: <1465512347-11650-4-git-send-email-jsimmons@infradead.org> References: <1465512347-11650-1-git-send-email-jsimmons@infradead.org> <1465512347-11650-4-git-send-email-jsimmons@infradead.org> Message-ID: <20160610012852.GB6804@kroah.com> On Thu, Jun 09, 2016 at 06:45:47PM -0400, James Simmons wrote: > From: Bruno Faccini > > The lnet_libmd struct fields have been re-ordered to optimize its > memory foot-print. This isn't a regression, so isn't ok for 4.7-rc releases, sorry. greg k-h From green at linuxhacker.ru Fri Jun 10 02:35:12 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Thu, 9 Jun 2016 22:35:12 -0400 Subject: [lustre-devel] [PATCH 2/8] staging/lustre/fid: Fix Multiple Assignments In-Reply-To: <1465526118-521053-1-git-send-email-green@linuxhacker.ru> References: <1465526118-521053-1-git-send-email-green@linuxhacker.ru> Message-ID: <1465526118-521053-3-git-send-email-green@linuxhacker.ru> From: Nathaniel Clark Fix all multiple assignments on lustre/fid directory. Signed-off-by: Nathaniel Clark Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/fid/fid_request.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lustre/fid/fid_request.c b/drivers/staging/lustre/lustre/fid/fid_request.c index 3a4df62..9db21ba 100644 --- a/drivers/staging/lustre/lustre/fid/fid_request.c +++ b/drivers/staging/lustre/lustre/fid/fid_request.c @@ -98,8 +98,10 @@ static int seq_client_rpc(struct lu_client_seq *seq, * request here, otherwise if MDT0 is failed(umounted), * it can not release the export of MDT0 */ - if (seq->lcs_type == LUSTRE_SEQ_DATA) - req->rq_no_delay = req->rq_no_resend = 1; + if (seq->lcs_type == LUSTRE_SEQ_DATA) { + req->rq_no_delay = 1; + req->rq_no_resend = 1; + } debug_mask = D_CONSOLE; } else { if (seq->lcs_type == LUSTRE_SEQ_METADATA) { -- 2.7.4 From green at linuxhacker.ru Fri Jun 10 02:35:14 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Thu, 9 Jun 2016 22:35:14 -0400 Subject: [lustre-devel] [PATCH 4/8] staging/lustre/llite: Fix Multiple Assignments In-Reply-To: <1465526118-521053-1-git-send-email-green@linuxhacker.ru> References: <1465526118-521053-1-git-send-email-green@linuxhacker.ru> Message-ID: <1465526118-521053-5-git-send-email-green@linuxhacker.ru> From: Nathaniel Clark Fix all multiple assignments on lustre/llite directory. Signed-off-by: Nathaniel Clark Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/llite/llite_lib.c | 3 ++- drivers/staging/lustre/lustre/llite/namei.c | 3 ++- drivers/staging/lustre/lustre/llite/vvp_io.c | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/staging/lustre/lustre/llite/llite_lib.c b/drivers/staging/lustre/lustre/llite/llite_lib.c index 96c7e9f..b260f60 100644 --- a/drivers/staging/lustre/lustre/llite/llite_lib.c +++ b/drivers/staging/lustre/lustre/llite/llite_lib.c @@ -864,7 +864,8 @@ int ll_fill_super(struct super_block *sb, struct vfsmount *mnt) try_module_get(THIS_MODULE); /* client additional sb info */ - lsi->lsi_llsbi = sbi = ll_init_sbi(sb); + sbi = ll_init_sbi(sb); + lsi->lsi_llsbi = sbi; if (!sbi) { module_put(THIS_MODULE); kfree(cfg); diff --git a/drivers/staging/lustre/lustre/llite/namei.c b/drivers/staging/lustre/lustre/llite/namei.c index 5eba0eb..95643bc 100644 --- a/drivers/staging/lustre/lustre/llite/namei.c +++ b/drivers/staging/lustre/lustre/llite/namei.c @@ -318,7 +318,8 @@ static struct dentry *ll_find_alias(struct inode *inode, struct dentry *dentry) if (hlist_empty(&inode->i_dentry)) return NULL; - discon_alias = invalid_alias = NULL; + discon_alias = NULL; + invalid_alias = NULL; ll_lock_dcache(inode); hlist_for_each_entry(alias, &inode->i_dentry, d_u.d_alias) { diff --git a/drivers/staging/lustre/lustre/llite/vvp_io.c b/drivers/staging/lustre/lustre/llite/vvp_io.c index e26e0f8..763d336 100644 --- a/drivers/staging/lustre/lustre/llite/vvp_io.c +++ b/drivers/staging/lustre/lustre/llite/vvp_io.c @@ -954,7 +954,8 @@ static int vvp_io_write_start(const struct lu_env *env, * out-of-order writes. */ ll_merge_attr(env, inode); - pos = io->u.ci_wr.wr.crw_pos = i_size_read(inode); + pos = i_size_read(inode); + io->u.ci_wr.wr.crw_pos = pos; vio->vui_iocb->ki_pos = pos; } else { LASSERT(vio->vui_iocb->ki_pos == pos); -- 2.7.4 From green at linuxhacker.ru Fri Jun 10 02:35:13 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Thu, 9 Jun 2016 22:35:13 -0400 Subject: [lustre-devel] [PATCH 3/8] staging/lustre/ldlm: Fix Multiple Assignments In-Reply-To: <1465526118-521053-1-git-send-email-green@linuxhacker.ru> References: <1465526118-521053-1-git-send-email-green@linuxhacker.ru> Message-ID: <1465526118-521053-4-git-send-email-green@linuxhacker.ru> From: Nathaniel Clark Fix all multiple assignments on lustre/ldlm directory. Signed-off-by: Nathaniel Clark Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/ldlm/ldlm_lib.c | 3 ++- drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c | 8 +++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_lib.c b/drivers/staging/lustre/lustre/ldlm/ldlm_lib.c index b4ffbe2..b6a90b0 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_lib.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_lib.c @@ -345,7 +345,8 @@ int client_obd_setup(struct obd_device *obddev, struct lustre_cfg *lcfg) * Set cl_chksum* to CRC32 for now to avoid returning screwed info * through procfs. */ - cli->cl_cksum_type = cli->cl_supp_cksum_types = OBD_CKSUM_CRC32; + cli->cl_cksum_type = OBD_CKSUM_CRC32; + cli->cl_supp_cksum_types = OBD_CKSUM_CRC32; atomic_set(&cli->cl_resends, OSC_DEFAULT_RESENDS); /* This value may be reduced at connect time in diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c b/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c index ab739f0..3303ffa 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c @@ -1011,9 +1011,11 @@ static int ldlm_setup(void) blp->blp_min_threads = LDLM_NTHRS_INIT; blp->blp_max_threads = LDLM_NTHRS_MAX; } else { - blp->blp_min_threads = blp->blp_max_threads = - min_t(int, LDLM_NTHRS_MAX, max_t(int, LDLM_NTHRS_INIT, - ldlm_num_threads)); + blp->blp_min_threads = min_t(int, LDLM_NTHRS_MAX, + max_t(int, LDLM_NTHRS_INIT, + ldlm_num_threads)); + + blp->blp_max_threads = blp->blp_min_threads; } for (i = 0; i < blp->blp_min_threads; i++) { -- 2.7.4 From green at linuxhacker.ru Fri Jun 10 02:35:15 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Thu, 9 Jun 2016 22:35:15 -0400 Subject: [lustre-devel] [PATCH 5/8] staging/lustre/lov: Fix Multiple Assignments In-Reply-To: <1465526118-521053-1-git-send-email-green@linuxhacker.ru> References: <1465526118-521053-1-git-send-email-green@linuxhacker.ru> Message-ID: <1465526118-521053-6-git-send-email-green@linuxhacker.ru> From: Nathaniel Clark Fix all multiple assignments on lustre/lov directory. Signed-off-by: Nathaniel Clark Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/lov/lov_obd.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/drivers/staging/lustre/lustre/lov/lov_obd.c b/drivers/staging/lustre/lustre/lov/lov_obd.c index e15ef2e..c179b31 100644 --- a/drivers/staging/lustre/lustre/lov/lov_obd.c +++ b/drivers/staging/lustre/lustre/lov/lov_obd.c @@ -1772,7 +1772,8 @@ static int lov_fiemap(struct lov_obd *lov, __u32 keylen, void *key, fm_start = fiemap->fm_start; fm_length = fiemap->fm_length; /* Calculate start stripe, last stripe and length of mapping */ - actual_start_stripe = start_stripe = lov_stripe_number(lsm, fm_start); + start_stripe = lov_stripe_number(lsm, fm_start); + actual_start_stripe = start_stripe; fm_end = (fm_length == ~0ULL ? fm_key->oa.o_size : fm_start + fm_length - 1); /* If fm_length != ~0ULL but fm_start+fm_length-1 exceeds file size */ @@ -2095,11 +2096,9 @@ static int lov_set_info_async(const struct lu_env *env, struct obd_export *exp, u32 count; int i, rc = 0, err; struct lov_tgt_desc *tgt; - unsigned incr, check_uuid, - do_inactive, no_set; - unsigned next_id = 0, mds_con = 0; + unsigned int incr = 0, check_uuid = 0, do_inactive = 0, no_set = 0; + unsigned int next_id = 0, mds_con = 0; - incr = check_uuid = do_inactive = no_set = 0; if (!set) { no_set = 1; set = ptlrpc_prep_set(); -- 2.7.4 From green at linuxhacker.ru Fri Jun 10 02:35:10 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Thu, 9 Jun 2016 22:35:10 -0400 Subject: [lustre-devel] [PATCH 0/8] Lustre: Multiple assignments removal. Message-ID: <1465526118-521053-1-git-send-email-green@linuxhacker.ru> These patches remove multiple assignments in Lustre, that makes checkpatch (somewhat understandably) unhappy. Nathaniel Clark (8): staging/lustre/osc: Fix Multiple Assignment Warnings staging/lustre/fid: Fix Multiple Assignments staging/lustre/ldlm: Fix Multiple Assignments staging/lustre/llite: Fix Multiple Assignments staging/lustre/lov: Fix Multiple Assignments staging/lustre/obdclass: Fix Multiple Assignments staging/lustre/ptlrpc: Fix Multiple Assignments staging/lustre/lmv: Fix Multiple Assignments drivers/staging/lustre/lustre/fid/fid_request.c | 6 ++++-- drivers/staging/lustre/lustre/ldlm/ldlm_lib.c | 3 ++- drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c | 8 +++++--- drivers/staging/lustre/lustre/llite/llite_lib.c | 3 ++- drivers/staging/lustre/lustre/llite/namei.c | 3 ++- drivers/staging/lustre/lustre/llite/vvp_io.c | 3 ++- drivers/staging/lustre/lustre/lmv/lmv_obd.c | 3 +-- drivers/staging/lustre/lustre/lov/lov_obd.c | 9 ++++----- drivers/staging/lustre/lustre/obdclass/llog.c | 6 ++++-- drivers/staging/lustre/lustre/osc/osc_cache.c | 6 ++++-- drivers/staging/lustre/lustre/osc/osc_io.c | 12 ++++++++---- drivers/staging/lustre/lustre/osc/osc_lock.c | 3 ++- drivers/staging/lustre/lustre/osc/osc_request.c | 6 ++++-- drivers/staging/lustre/lustre/ptlrpc/client.c | 6 ++++-- drivers/staging/lustre/lustre/ptlrpc/import.c | 3 ++- drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c | 3 ++- drivers/staging/lustre/lustre/ptlrpc/pinger.c | 3 ++- drivers/staging/lustre/lustre/ptlrpc/sec_null.c | 3 ++- 18 files changed, 56 insertions(+), 33 deletions(-) -- 2.7.4 From green at linuxhacker.ru Fri Jun 10 02:35:11 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Thu, 9 Jun 2016 22:35:11 -0400 Subject: [lustre-devel] [PATCH 1/8] staging/lustre/osc: Fix Multiple Assignment Warnings In-Reply-To: <1465526118-521053-1-git-send-email-green@linuxhacker.ru> References: <1465526118-521053-1-git-send-email-green@linuxhacker.ru> Message-ID: <1465526118-521053-2-git-send-email-green@linuxhacker.ru> From: Nathaniel Clark Fix all multiple assignments on lustre/osc directory. Signed-off-by: Nathaniel Clark Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/osc/osc_cache.c | 6 ++++-- drivers/staging/lustre/lustre/osc/osc_io.c | 12 ++++++++---- drivers/staging/lustre/lustre/osc/osc_lock.c | 3 ++- drivers/staging/lustre/lustre/osc/osc_request.c | 6 ++++-- 4 files changed, 18 insertions(+), 9 deletions(-) diff --git a/drivers/staging/lustre/lustre/osc/osc_cache.c b/drivers/staging/lustre/lustre/osc/osc_cache.c index 5a14bea..2ca5045 100644 --- a/drivers/staging/lustre/lustre/osc/osc_cache.c +++ b/drivers/staging/lustre/lustre/osc/osc_cache.c @@ -2773,7 +2773,8 @@ int osc_queue_sync_pages(const struct lu_env *env, struct osc_object *obj, ext->oe_sync = 1; ext->oe_urgent = 1; ext->oe_start = start; - ext->oe_end = ext->oe_max_end = end; + ext->oe_end = end; + ext->oe_max_end = end; ext->oe_obj = obj; ext->oe_srvlock = !!(brw_flags & OBD_BRW_SRVLOCK); ext->oe_nr_pages = page_count; @@ -3308,7 +3309,8 @@ int osc_lock_discard_pages(const struct lu_env *env, struct osc_object *osc, goto out; cb = mode == CLM_READ ? check_and_discard_cb : discard_cb; - info->oti_fn_index = info->oti_next_index = start; + info->oti_fn_index = start; + info->oti_next_index = start; do { res = osc_page_gang_lookup(env, io, osc, info->oti_next_index, end, cb, osc); diff --git a/drivers/staging/lustre/lustre/osc/osc_io.c b/drivers/staging/lustre/lustre/osc/osc_io.c index d534b0e..d3bce45 100644 --- a/drivers/staging/lustre/lustre/osc/osc_io.c +++ b/drivers/staging/lustre/lustre/osc/osc_io.c @@ -221,7 +221,8 @@ static void osc_page_touch_at(const struct lu_env *env, kms > loi->loi_kms ? "" : "not ", loi->loi_kms, kms, loi->loi_lvb.lvb_size); - attr->cat_mtime = attr->cat_ctime = LTIME_S(CURRENT_TIME); + attr->cat_ctime = LTIME_S(CURRENT_TIME); + attr->cat_mtime = attr->cat_ctime; valid = CAT_MTIME | CAT_CTIME; if (kms > loi->loi_kms) { attr->cat_kms = kms; @@ -458,7 +459,8 @@ static int osc_io_setattr_start(const struct lu_env *env, unsigned int cl_valid = 0; if (ia_valid & ATTR_SIZE) { - attr->cat_size = attr->cat_kms = size; + attr->cat_size = size; + attr->cat_kms = size; cl_valid = CAT_SIZE | CAT_KMS; } if (ia_valid & ATTR_MTIME_SET) { @@ -526,7 +528,8 @@ static void osc_io_setattr_end(const struct lu_env *env, if (cbargs->opc_rpc_sent) { wait_for_completion(&cbargs->opc_sync); - result = io->ci_result = cbargs->opc_rc; + result = cbargs->opc_rc; + io->ci_result = cbargs->opc_rc; } if (result == 0) { if (oio->oi_lockless) { @@ -575,7 +578,8 @@ static int osc_io_write_start(const struct lu_env *env, OBD_FAIL_TIMEOUT(OBD_FAIL_OSC_DELAY_SETTIME, 1); cl_object_attr_lock(obj); - attr->cat_mtime = attr->cat_ctime = ktime_get_real_seconds(); + attr->cat_ctime = ktime_get_real_seconds(); + attr->cat_mtime = attr->cat_ctime; rc = cl_object_attr_set(env, obj, attr, CAT_MTIME | CAT_CTIME); cl_object_attr_unlock(obj); diff --git a/drivers/staging/lustre/lustre/osc/osc_lock.c b/drivers/staging/lustre/lustre/osc/osc_lock.c index 16f9cd9..d30ed2f 100644 --- a/drivers/staging/lustre/lustre/osc/osc_lock.c +++ b/drivers/staging/lustre/lustre/osc/osc_lock.c @@ -1120,7 +1120,8 @@ static void osc_lock_set_writer(const struct lu_env *env, } } else { LASSERT(cl_io_is_mkwrite(io)); - io_start = io_end = io->u.ci_fault.ft_index; + io_start = io->u.ci_fault.ft_index; + io_end = io->u.ci_fault.ft_index; } if (descr->cld_mode >= CLM_WRITE && diff --git a/drivers/staging/lustre/lustre/osc/osc_request.c b/drivers/staging/lustre/lustre/osc/osc_request.c index 47417f8..7b1fc7e 100644 --- a/drivers/staging/lustre/lustre/osc/osc_request.c +++ b/drivers/staging/lustre/lustre/osc/osc_request.c @@ -474,7 +474,8 @@ static int osc_real_create(struct obd_export *exp, struct obdo *oa, DEBUG_REQ(D_HA, req, "delorphan from OST integration"); /* Don't resend the delorphan req */ - req->rq_no_resend = req->rq_no_delay = 1; + req->rq_no_resend = 1; + req->rq_no_delay = 1; } rc = ptlrpc_queue_wait(req); @@ -2775,7 +2776,8 @@ static int osc_get_info(const struct lu_env *env, struct obd_export *exp, tmp = req_capsule_client_get(&req->rq_pill, &RMF_SETINFO_KEY); memcpy(tmp, key, keylen); - req->rq_no_delay = req->rq_no_resend = 1; + req->rq_no_delay = 1; + req->rq_no_resend = 1; ptlrpc_request_set_replen(req); rc = ptlrpc_queue_wait(req); if (rc) -- 2.7.4 From green at linuxhacker.ru Fri Jun 10 02:35:16 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Thu, 9 Jun 2016 22:35:16 -0400 Subject: [lustre-devel] [PATCH 6/8] staging/lustre/obdclass: Fix Multiple Assignments In-Reply-To: <1465526118-521053-1-git-send-email-green@linuxhacker.ru> References: <1465526118-521053-1-git-send-email-green@linuxhacker.ru> Message-ID: <1465526118-521053-7-git-send-email-green@linuxhacker.ru> From: Nathaniel Clark Fix all multiple assignments on lustre/obdclass directory. Signed-off-by: Nathaniel Clark Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/obdclass/llog.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lustre/obdclass/llog.c b/drivers/staging/lustre/lustre/obdclass/llog.c index 79194d8..55a9755 100644 --- a/drivers/staging/lustre/lustre/obdclass/llog.c +++ b/drivers/staging/lustre/lustre/obdclass/llog.c @@ -123,8 +123,10 @@ static int llog_read_header(const struct lu_env *env, handle->lgh_last_idx = 0; /* header is record with index 0 */ llh->llh_count = 1; /* for the header record */ llh->llh_hdr.lrh_type = LLOG_HDR_MAGIC; - llh->llh_hdr.lrh_len = llh->llh_tail.lrt_len = LLOG_CHUNK_SIZE; - llh->llh_hdr.lrh_index = llh->llh_tail.lrt_index = 0; + llh->llh_hdr.lrh_len = LLOG_CHUNK_SIZE; + llh->llh_tail.lrt_len = LLOG_CHUNK_SIZE; + llh->llh_hdr.lrh_index = 0; + llh->llh_tail.lrt_index = 0; llh->llh_timestamp = ktime_get_real_seconds(); if (uuid) memcpy(&llh->llh_tgtuuid, uuid, -- 2.7.4 From green at linuxhacker.ru Fri Jun 10 02:35:18 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Thu, 9 Jun 2016 22:35:18 -0400 Subject: [lustre-devel] [PATCH 8/8] staging/lustre/lmv: Fix Multiple Assignments In-Reply-To: <1465526118-521053-1-git-send-email-green@linuxhacker.ru> References: <1465526118-521053-1-git-send-email-green@linuxhacker.ru> Message-ID: <1465526118-521053-9-git-send-email-green@linuxhacker.ru> From: Nathaniel Clark Fix all multiple assignments on lustre/lmv directory. Signed-off-by: Nathaniel Clark Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/lmv/lmv_obd.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lustre/lmv/lmv_obd.c b/drivers/staging/lustre/lustre/lmv/lmv_obd.c index 9e31f6b..1d9875e 100644 --- a/drivers/staging/lustre/lustre/lmv/lmv_obd.c +++ b/drivers/staging/lustre/lustre/lmv/lmv_obd.c @@ -2686,7 +2686,7 @@ static int lmv_quotactl(struct obd_device *unused, struct obd_export *exp, struct lmv_obd *lmv = &obd->u.lmv; struct lmv_tgt_desc *tgt = lmv->tgts[0]; int rc = 0, i; - __u64 curspace, curinodes; + __u64 curspace = 0, curinodes = 0; if (!tgt || !tgt->ltd_exp || !tgt->ltd_active || !lmv->desc.ld_tgt_count) { @@ -2699,7 +2699,6 @@ static int lmv_quotactl(struct obd_device *unused, struct obd_export *exp, return rc; } - curspace = curinodes = 0; for (i = 0; i < lmv->desc.ld_tgt_count; i++) { int err; -- 2.7.4 From green at linuxhacker.ru Fri Jun 10 02:35:17 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Thu, 9 Jun 2016 22:35:17 -0400 Subject: [lustre-devel] [PATCH 7/8] staging/lustre/ptlrpc: Fix Multiple Assignments In-Reply-To: <1465526118-521053-1-git-send-email-green@linuxhacker.ru> References: <1465526118-521053-1-git-send-email-green@linuxhacker.ru> Message-ID: <1465526118-521053-8-git-send-email-green@linuxhacker.ru> From: Nathaniel Clark Fix all multiple assignments on lustre/ptlrpc directory. Signed-off-by: Nathaniel Clark Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/ptlrpc/client.c | 6 ++++-- drivers/staging/lustre/lustre/ptlrpc/import.c | 3 ++- drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c | 3 ++- drivers/staging/lustre/lustre/ptlrpc/pinger.c | 3 ++- drivers/staging/lustre/lustre/ptlrpc/sec_null.c | 3 ++- 5 files changed, 12 insertions(+), 6 deletions(-) diff --git a/drivers/staging/lustre/lustre/ptlrpc/client.c b/drivers/staging/lustre/lustre/ptlrpc/client.c index 4b7912a..8336ed1 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/client.c +++ b/drivers/staging/lustre/lustre/ptlrpc/client.c @@ -3024,8 +3024,10 @@ void *ptlrpcd_alloc_work(struct obd_import *imp, req->rq_interpret_reply = work_interpreter; /* don't want reply */ req->rq_receiving_reply = 0; - req->rq_req_unlink = req->rq_reply_unlink = 0; - req->rq_no_delay = req->rq_no_resend = 1; + req->rq_req_unlink = 0; + req->rq_reply_unlink = 0; + req->rq_no_delay = 1; + req->rq_no_resend = 1; req->rq_pill.rc_fmt = (void *)&worker_format; spin_lock_init(&req->rq_lock); diff --git a/drivers/staging/lustre/lustre/ptlrpc/import.c b/drivers/staging/lustre/lustre/ptlrpc/import.c index a4f7544..a236e38 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/import.c +++ b/drivers/staging/lustre/lustre/ptlrpc/import.c @@ -698,7 +698,8 @@ int ptlrpc_connect_import(struct obd_import *imp) lustre_msg_add_op_flags(request->rq_reqmsg, MSG_CONNECT_NEXT_VER); - request->rq_no_resend = request->rq_no_delay = 1; + request->rq_no_resend = 1; + request->rq_no_delay = 1; request->rq_send_state = LUSTRE_IMP_CONNECTING; /* Allow a slightly larger reply for future growth compatibility */ req_capsule_set_size(&request->rq_pill, &RMF_CONNECT_DATA, RCL_SERVER, diff --git a/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c b/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c index 64c0f1e..ff40be2 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c +++ b/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c @@ -872,7 +872,8 @@ ptlrpc_lprocfs_svc_req_history_next(struct seq_file *s, if (i > srhi->srhi_idx) { /* reset iterator for a new CPT */ srhi->srhi_req = NULL; - seq = srhi->srhi_seq = 0; + seq = 0; + srhi->srhi_seq = 0; } else { /* the next sequence */ seq = srhi->srhi_seq + (1 << svc->srv_cpt_bits); } diff --git a/drivers/staging/lustre/lustre/ptlrpc/pinger.c b/drivers/staging/lustre/lustre/ptlrpc/pinger.c index 8a86931..d9d4ca2 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/pinger.c +++ b/drivers/staging/lustre/lustre/ptlrpc/pinger.c @@ -57,7 +57,8 @@ ptlrpc_prep_ping(struct obd_import *imp) LUSTRE_OBD_VERSION, OBD_PING); if (req) { ptlrpc_request_set_replen(req); - req->rq_no_resend = req->rq_no_delay = 1; + req->rq_no_resend = 1; + req->rq_no_delay = 1; } return req; } diff --git a/drivers/staging/lustre/lustre/ptlrpc/sec_null.c b/drivers/staging/lustre/lustre/ptlrpc/sec_null.c index 40e5349..af92e9e 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/sec_null.c +++ b/drivers/staging/lustre/lustre/ptlrpc/sec_null.c @@ -265,7 +265,8 @@ int null_enlarge_reqbuf(struct ptlrpc_sec *sec, memcpy(newbuf, req->rq_reqbuf, req->rq_reqlen); kvfree(req->rq_reqbuf); - req->rq_reqbuf = req->rq_reqmsg = newbuf; + req->rq_reqbuf = newbuf; + req->rq_reqmsg = newbuf; req->rq_reqbuf_len = alloc_size; if (req->rq_import) -- 2.7.4 From ashley at pittman.co.uk Fri Jun 10 12:29:02 2016 From: ashley at pittman.co.uk (Ashley Pittman) Date: Fri, 10 Jun 2016 13:29:02 +0100 Subject: [lustre-devel] [lustre-discuss] more on lustre striping In-Reply-To: <9ebe9f4c-d5a2-4c93-4f00-49029850cbbe@iodoctors.com> References: <1ef5a267-334c-be0d-13f4-c0fab917d1bf@iodoctors.com> <38EA9F32-3869-43BA-B215-EB2E5BA62FD5@intel.com> <01EE2B9D-2359-49B5-A50F-E7C2D97E6696@intel.com> <44e2353d-3bef-ddd7-f15e-ad4bfdda040f@iodoctors.com> <9ebe9f4c-d5a2-4c93-4f00-49029850cbbe@iodoctors.com> Message-ID: <575AB28E.7090404@pittman.co.uk> On 22/05/16 02:56, John Bauer wrote: > > Oleg > > I can intercept the fopen(), but that does me no good as I can't set > the O_LOV_DELAY_CREATE bit. What I can not intercept is the open() > downstream of fopen(). If one examines the symbols in libc you will > see there are no unsatisfied externals relating to open, which means > there is nothing for the runtime linker to find concerning open's. I > will have a look at the Lustre 1.8 source, but I seriously doubt that > the open beneath fopen() was intercepted with LD_PRELOAD. I would > love to find a way to do that. I could throw away a lot of code. > Thanks, John > Could you not intercept fopen() and implement it with calls to open() and fdopen() yourself which would give you full control over what you're looking for here? Ashley. -------------- next part -------------- An HTML attachment was scrubbed... URL: From bruno.faccini at intel.com Fri Jun 10 15:25:28 2016 From: bruno.faccini at intel.com (Faccini, Bruno) Date: Fri, 10 Jun 2016 15:25:28 +0000 Subject: [lustre-devel] [PATCH 2/3] staging: lustre: lnet: Allocate MEs and small MDs in own kmem_caches In-Reply-To: <20160610012833.GA6804@kroah.com> References: <1465512347-11650-1-git-send-email-jsimmons@infradead.org> <1465512347-11650-3-git-send-email-jsimmons@infradead.org> <20160610012833.GA6804@kroah.com> Message-ID: Hello, The intent of this patch is not to solve the corruptions for sure, but only to avoid the concerned MEs/small-MDs LNet structs to be quite frequently impacted due to their high allocation/free rate. This may also possibly help to save cycles due to high usage and contention when using a generic kmem_cache (when they stay separate from others, thanks for the precision!). Bye, Bruno. > Le Jun 10, 2016 à 03:28, Greg Kroah-Hartman a écrit : > > On Thu, Jun 09, 2016 at 06:45:46PM -0400, James Simmons wrote: >> From: Bruno Faccini >> >> As part of LU-3848 and LU-4330, it has been discovered that LNET >> MEs and small MDs (<=128 Bytes) are allocated in kmem_cache >> and thus can suffer quite frequent corruptions, from other modules or >> Kernel parts, that occur there. To avoid this, MEs and small-MDs >> specific kmem_cache have been created. > > What? Who corrupts them? That shouldn't be possible, and on some > systems, even if you do ask for a separate slab, it will be merged > togther with others of the same size. So this patch doesn't do all that > much. > > I think you are having some other problem here, changing to a separate > memory cache shouldn't solve corruption issues. > > sorry, > > greg k-h --------------------------------------------------------------------- Intel Corporation SAS (French simplified joint stock company) Registered headquarters: "Les Montalets"- 2, rue de Paris, 92196 Meudon Cedex, France Registration Number: 302 456 199 R.C.S. NANTERRE Capital: 4,572,000 Euros This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. From gregkh at linuxfoundation.org Fri Jun 10 16:36:10 2016 From: gregkh at linuxfoundation.org (Greg Kroah-Hartman) Date: Fri, 10 Jun 2016 09:36:10 -0700 Subject: [lustre-devel] [PATCH 2/3] staging: lustre: lnet: Allocate MEs and small MDs in own kmem_caches In-Reply-To: References: <1465512347-11650-1-git-send-email-jsimmons@infradead.org> <1465512347-11650-3-git-send-email-jsimmons@infradead.org> <20160610012833.GA6804@kroah.com> Message-ID: <20160610163610.GA20291@kroah.com> A: No. Q: Should I include quotations after my reply? http://daringfireball.net/2007/07/on_top On Fri, Jun 10, 2016 at 03:25:28PM +0000, Faccini, Bruno wrote: > Hello, > The intent of this patch is not to solve the corruptions for sure, but > only to avoid the concerned MEs/small-MDs LNet structs to be quite > frequently impacted due to their high allocation/free rate. But that's not what the patch description said :( And again, putting them in a separate cache is not going to save much of anything, given that your caches might have been merged together anyway. > This may also possibly help to save cycles due to high usage and > contention when using a generic kmem_cache (when they stay separate > from others, thanks for the precision!). Have you measured this? This isn't applicable for 4.7-rc at this time, _unless_ it fixes a bug, which is why I pushed back on this. If you want your own cache for these variables, fine, I don't care, but that makes it a 4.8-rc1 patch instead. hope that helps explain things better, greg k-h From jsimmons at infradead.org Fri Jun 10 20:13:39 2016 From: jsimmons at infradead.org (James Simmons) Date: Fri, 10 Jun 2016 16:13:39 -0400 Subject: [lustre-devel] [PATCH] staging: lustre: o2iblnd: remove typedefs Message-ID: <1465589619-22362-1-git-send-email-jsimmons@infradead.org> Remove all remaining typedefs in o2iblnd driver. Signed-off-by: James Simmons --- .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c | 339 +++++++++--------- .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h | 299 ++++++++-------- .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c | 368 ++++++++++---------- .../lustre/lnet/klnds/o2iblnd/o2iblnd_modparams.c | 2 +- 4 files changed, 504 insertions(+), 504 deletions(-) diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c index 4bb32f1..3f3a9c1 100644 --- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c +++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c @@ -44,7 +44,7 @@ static lnd_t the_o2iblnd; -kib_data_t kiblnd_data; +struct kib_data kiblnd_data; static __u32 kiblnd_cksum(void *ptr, int nob) { @@ -98,40 +98,40 @@ static char *kiblnd_msgtype2str(int type) static int kiblnd_msgtype2size(int type) { - const int hdr_size = offsetof(kib_msg_t, ibm_u); + const int hdr_size = offsetof(struct kib_msg, ibm_u); switch (type) { case IBLND_MSG_CONNREQ: case IBLND_MSG_CONNACK: - return hdr_size + sizeof(kib_connparams_t); + return hdr_size + sizeof(struct kib_connparams); case IBLND_MSG_NOOP: return hdr_size; case IBLND_MSG_IMMEDIATE: - return offsetof(kib_msg_t, ibm_u.immediate.ibim_payload[0]); + return offsetof(struct kib_msg, ibm_u.immediate.ibim_payload[0]); case IBLND_MSG_PUT_REQ: - return hdr_size + sizeof(kib_putreq_msg_t); + return hdr_size + sizeof(struct kib_putreq_msg); case IBLND_MSG_PUT_ACK: - return hdr_size + sizeof(kib_putack_msg_t); + return hdr_size + sizeof(struct kib_putack_msg); case IBLND_MSG_GET_REQ: - return hdr_size + sizeof(kib_get_msg_t); + return hdr_size + sizeof(struct kib_get_msg); case IBLND_MSG_PUT_NAK: case IBLND_MSG_PUT_DONE: case IBLND_MSG_GET_DONE: - return hdr_size + sizeof(kib_completion_msg_t); + return hdr_size + sizeof(struct kib_completion_msg); default: return -1; } } -static int kiblnd_unpack_rd(kib_msg_t *msg, int flip) +static int kiblnd_unpack_rd(struct kib_msg *msg, int flip) { - kib_rdma_desc_t *rd; + struct kib_rdma_desc *rd; int nob; int n; int i; @@ -156,7 +156,7 @@ static int kiblnd_unpack_rd(kib_msg_t *msg, int flip) return 1; } - nob = offsetof(kib_msg_t, ibm_u) + + nob = offsetof(struct kib_msg, ibm_u) + kiblnd_rd_msg_size(rd, msg->ibm_type, n); if (msg->ibm_nob < nob) { @@ -176,10 +176,10 @@ static int kiblnd_unpack_rd(kib_msg_t *msg, int flip) return 0; } -void kiblnd_pack_msg(lnet_ni_t *ni, kib_msg_t *msg, int version, +void kiblnd_pack_msg(lnet_ni_t *ni, struct kib_msg *msg, int version, int credits, lnet_nid_t dstnid, __u64 dststamp) { - kib_net_t *net = ni->ni_data; + struct kib_net *net = ni->ni_data; /* * CAVEAT EMPTOR! all message fields not set here should have been @@ -202,9 +202,9 @@ void kiblnd_pack_msg(lnet_ni_t *ni, kib_msg_t *msg, int version, } } -int kiblnd_unpack_msg(kib_msg_t *msg, int nob) +int kiblnd_unpack_msg(struct kib_msg *msg, int nob) { - const int hdr_size = offsetof(kib_msg_t, ibm_u); + const int hdr_size = offsetof(struct kib_msg, ibm_u); __u32 msg_cksum; __u16 version; int msg_nob; @@ -315,10 +315,10 @@ int kiblnd_unpack_msg(kib_msg_t *msg, int nob) return 0; } -int kiblnd_create_peer(lnet_ni_t *ni, kib_peer_t **peerp, lnet_nid_t nid) +int kiblnd_create_peer(lnet_ni_t *ni, struct kib_peer **peerp, lnet_nid_t nid) { - kib_peer_t *peer; - kib_net_t *net = ni->ni_data; + struct kib_peer *peer; + struct kib_net *net = ni->ni_data; int cpt = lnet_cpt_of_nid(nid); unsigned long flags; @@ -357,9 +357,9 @@ int kiblnd_create_peer(lnet_ni_t *ni, kib_peer_t **peerp, lnet_nid_t nid) return 0; } -void kiblnd_destroy_peer(kib_peer_t *peer) +void kiblnd_destroy_peer(struct kib_peer *peer) { - kib_net_t *net = peer->ibp_ni->ni_data; + struct kib_net *net = peer->ibp_ni->ni_data; LASSERT(net); LASSERT(!atomic_read(&peer->ibp_refcount)); @@ -378,7 +378,7 @@ void kiblnd_destroy_peer(kib_peer_t *peer) atomic_dec(&net->ibn_npeers); } -kib_peer_t *kiblnd_find_peer_locked(lnet_nid_t nid) +struct kib_peer *kiblnd_find_peer_locked(lnet_nid_t nid) { /* * the caller is responsible for accounting the additional reference @@ -386,10 +386,10 @@ kib_peer_t *kiblnd_find_peer_locked(lnet_nid_t nid) */ struct list_head *peer_list = kiblnd_nid2peerlist(nid); struct list_head *tmp; - kib_peer_t *peer; + struct kib_peer *peer; list_for_each(tmp, peer_list) { - peer = list_entry(tmp, kib_peer_t, ibp_list); + peer = list_entry(tmp, struct kib_peer, ibp_list); LASSERT(!kiblnd_peer_idle(peer)); if (peer->ibp_nid != nid) @@ -404,7 +404,7 @@ kib_peer_t *kiblnd_find_peer_locked(lnet_nid_t nid) return NULL; } -void kiblnd_unlink_peer_locked(kib_peer_t *peer) +void kiblnd_unlink_peer_locked(struct kib_peer *peer) { LASSERT(list_empty(&peer->ibp_conns)); @@ -417,7 +417,7 @@ void kiblnd_unlink_peer_locked(kib_peer_t *peer) static int kiblnd_get_peer_info(lnet_ni_t *ni, int index, lnet_nid_t *nidp, int *count) { - kib_peer_t *peer; + struct kib_peer *peer; struct list_head *ptmp; int i; unsigned long flags; @@ -426,7 +426,7 @@ static int kiblnd_get_peer_info(lnet_ni_t *ni, int index, for (i = 0; i < kiblnd_data.kib_peer_hash_size; i++) { list_for_each(ptmp, &kiblnd_data.kib_peers[i]) { - peer = list_entry(ptmp, kib_peer_t, ibp_list); + peer = list_entry(ptmp, struct kib_peer, ibp_list); LASSERT(!kiblnd_peer_idle(peer)); if (peer->ibp_ni != ni) @@ -448,17 +448,17 @@ static int kiblnd_get_peer_info(lnet_ni_t *ni, int index, return -ENOENT; } -static void kiblnd_del_peer_locked(kib_peer_t *peer) +static void kiblnd_del_peer_locked(struct kib_peer *peer) { struct list_head *ctmp; struct list_head *cnxt; - kib_conn_t *conn; + struct kib_conn *conn; if (list_empty(&peer->ibp_conns)) { kiblnd_unlink_peer_locked(peer); } else { list_for_each_safe(ctmp, cnxt, &peer->ibp_conns) { - conn = list_entry(ctmp, kib_conn_t, ibc_list); + conn = list_entry(ctmp, struct kib_conn, ibc_list); kiblnd_close_conn_locked(conn, 0); } @@ -475,7 +475,7 @@ static int kiblnd_del_peer(lnet_ni_t *ni, lnet_nid_t nid) LIST_HEAD(zombies); struct list_head *ptmp; struct list_head *pnxt; - kib_peer_t *peer; + struct kib_peer *peer; int lo; int hi; int i; @@ -494,7 +494,7 @@ static int kiblnd_del_peer(lnet_ni_t *ni, lnet_nid_t nid) for (i = lo; i <= hi; i++) { list_for_each_safe(ptmp, pnxt, &kiblnd_data.kib_peers[i]) { - peer = list_entry(ptmp, kib_peer_t, ibp_list); + peer = list_entry(ptmp, struct kib_peer, ibp_list); LASSERT(!kiblnd_peer_idle(peer)); if (peer->ibp_ni != ni) @@ -522,11 +522,11 @@ static int kiblnd_del_peer(lnet_ni_t *ni, lnet_nid_t nid) return rc; } -static kib_conn_t *kiblnd_get_conn_by_idx(lnet_ni_t *ni, int index) +static struct kib_conn *kiblnd_get_conn_by_idx(lnet_ni_t *ni, int index) { - kib_peer_t *peer; + struct kib_peer *peer; struct list_head *ptmp; - kib_conn_t *conn; + struct kib_conn *conn; struct list_head *ctmp; int i; unsigned long flags; @@ -535,7 +535,7 @@ static kib_conn_t *kiblnd_get_conn_by_idx(lnet_ni_t *ni, int index) for (i = 0; i < kiblnd_data.kib_peer_hash_size; i++) { list_for_each(ptmp, &kiblnd_data.kib_peers[i]) { - peer = list_entry(ptmp, kib_peer_t, ibp_list); + peer = list_entry(ptmp, struct kib_peer, ibp_list); LASSERT(!kiblnd_peer_idle(peer)); if (peer->ibp_ni != ni) @@ -545,7 +545,7 @@ static kib_conn_t *kiblnd_get_conn_by_idx(lnet_ni_t *ni, int index) if (index-- > 0) continue; - conn = list_entry(ctmp, kib_conn_t, + conn = list_entry(ctmp, struct kib_conn, ibc_list); kiblnd_conn_addref(conn); read_unlock_irqrestore( @@ -594,7 +594,7 @@ static void kiblnd_setup_mtu_locked(struct rdma_cm_id *cmid) cmid->route.path_rec->mtu = mtu; } -static int kiblnd_get_completion_vector(kib_conn_t *conn, int cpt) +static int kiblnd_get_completion_vector(struct kib_conn *conn, int cpt) { cpumask_t *mask; int vectors; @@ -621,7 +621,7 @@ static int kiblnd_get_completion_vector(kib_conn_t *conn, int cpt) return 1; } -kib_conn_t *kiblnd_create_conn(kib_peer_t *peer, struct rdma_cm_id *cmid, +struct kib_conn *kiblnd_create_conn(struct kib_peer *peer, struct rdma_cm_id *cmid, int state, int version) { /* @@ -634,12 +634,12 @@ kib_conn_t *kiblnd_create_conn(kib_peer_t *peer, struct rdma_cm_id *cmid, * its ref on 'cmid'). */ rwlock_t *glock = &kiblnd_data.kib_global_lock; - kib_net_t *net = peer->ibp_ni->ni_data; - kib_dev_t *dev; + struct kib_net *net = peer->ibp_ni->ni_data; + struct kib_dev *dev; struct ib_qp_init_attr *init_qp_attr; struct kib_sched_info *sched; struct ib_cq_init_attr cq_attr = {}; - kib_conn_t *conn; + struct kib_conn *conn; struct ib_cq *cq; unsigned long flags; int cpt; @@ -723,7 +723,7 @@ kib_conn_t *kiblnd_create_conn(kib_peer_t *peer, struct rdma_cm_id *cmid, write_unlock_irqrestore(glock, flags); LIBCFS_CPT_ALLOC(conn->ibc_rxs, lnet_cpt_table(), cpt, - IBLND_RX_MSGS(conn) * sizeof(kib_rx_t)); + IBLND_RX_MSGS(conn) * sizeof(struct kib_rx)); if (!conn->ibc_rxs) { CERROR("Cannot allocate RX buffers\n"); goto failed_2; @@ -833,10 +833,10 @@ kib_conn_t *kiblnd_create_conn(kib_peer_t *peer, struct rdma_cm_id *cmid, return NULL; } -void kiblnd_destroy_conn(kib_conn_t *conn, bool free_conn) +void kiblnd_destroy_conn(struct kib_conn *conn, bool free_conn) { struct rdma_cm_id *cmid = conn->ibc_cmid; - kib_peer_t *peer = conn->ibc_peer; + struct kib_peer *peer = conn->ibc_peer; int rc; LASSERT(!in_interrupt()); @@ -879,7 +879,7 @@ void kiblnd_destroy_conn(kib_conn_t *conn, bool free_conn) if (conn->ibc_rxs) { LIBCFS_FREE(conn->ibc_rxs, - IBLND_RX_MSGS(conn) * sizeof(kib_rx_t)); + IBLND_RX_MSGS(conn) * sizeof(struct kib_rx)); } if (conn->ibc_connvars) @@ -890,7 +890,7 @@ void kiblnd_destroy_conn(kib_conn_t *conn, bool free_conn) /* See CAVEAT EMPTOR above in kiblnd_create_conn */ if (conn->ibc_state != IBLND_CONN_INIT) { - kib_net_t *net = peer->ibp_ni->ni_data; + struct kib_net *net = peer->ibp_ni->ni_data; kiblnd_peer_decref(peer); rdma_destroy_id(cmid); @@ -900,15 +900,15 @@ void kiblnd_destroy_conn(kib_conn_t *conn, bool free_conn) LIBCFS_FREE(conn, sizeof(*conn)); } -int kiblnd_close_peer_conns_locked(kib_peer_t *peer, int why) +int kiblnd_close_peer_conns_locked(struct kib_peer *peer, int why) { - kib_conn_t *conn; + struct kib_conn *conn; struct list_head *ctmp; struct list_head *cnxt; int count = 0; list_for_each_safe(ctmp, cnxt, &peer->ibp_conns) { - conn = list_entry(ctmp, kib_conn_t, ibc_list); + conn = list_entry(ctmp, struct kib_conn, ibc_list); CDEBUG(D_NET, "Closing conn -> %s, version: %x, reason: %d\n", libcfs_nid2str(peer->ibp_nid), @@ -921,16 +921,16 @@ int kiblnd_close_peer_conns_locked(kib_peer_t *peer, int why) return count; } -int kiblnd_close_stale_conns_locked(kib_peer_t *peer, +int kiblnd_close_stale_conns_locked(struct kib_peer *peer, int version, __u64 incarnation) { - kib_conn_t *conn; + struct kib_conn *conn; struct list_head *ctmp; struct list_head *cnxt; int count = 0; list_for_each_safe(ctmp, cnxt, &peer->ibp_conns) { - conn = list_entry(ctmp, kib_conn_t, ibc_list); + conn = list_entry(ctmp, struct kib_conn, ibc_list); if (conn->ibc_version == version && conn->ibc_incarnation == incarnation) @@ -951,7 +951,7 @@ int kiblnd_close_stale_conns_locked(kib_peer_t *peer, static int kiblnd_close_matching_conns(lnet_ni_t *ni, lnet_nid_t nid) { - kib_peer_t *peer; + struct kib_peer *peer; struct list_head *ptmp; struct list_head *pnxt; int lo; @@ -972,7 +972,7 @@ static int kiblnd_close_matching_conns(lnet_ni_t *ni, lnet_nid_t nid) for (i = lo; i <= hi; i++) { list_for_each_safe(ptmp, pnxt, &kiblnd_data.kib_peers[i]) { - peer = list_entry(ptmp, kib_peer_t, ibp_list); + peer = list_entry(ptmp, struct kib_peer, ibp_list); LASSERT(!kiblnd_peer_idle(peer)); if (peer->ibp_ni != ni) @@ -1016,7 +1016,7 @@ static int kiblnd_ctl(lnet_ni_t *ni, unsigned int cmd, void *arg) break; } case IOC_LIBCFS_GET_CONN: { - kib_conn_t *conn; + struct kib_conn *conn; rc = 0; conn = kiblnd_get_conn_by_idx(ni, data->ioc_count); @@ -1052,7 +1052,7 @@ static void kiblnd_query(lnet_ni_t *ni, lnet_nid_t nid, unsigned long *when) unsigned long last_alive = 0; unsigned long now = cfs_time_current(); rwlock_t *glock = &kiblnd_data.kib_global_lock; - kib_peer_t *peer; + struct kib_peer *peer; unsigned long flags; read_lock_irqsave(glock, flags); @@ -1078,7 +1078,7 @@ static void kiblnd_query(lnet_ni_t *ni, lnet_nid_t nid, unsigned long *when) last_alive ? cfs_duration_sec(now - last_alive) : -1); } -static void kiblnd_free_pages(kib_pages_t *p) +static void kiblnd_free_pages(struct kib_pages *p) { int npages = p->ibp_npages; int i; @@ -1088,22 +1088,22 @@ static void kiblnd_free_pages(kib_pages_t *p) __free_page(p->ibp_pages[i]); } - LIBCFS_FREE(p, offsetof(kib_pages_t, ibp_pages[npages])); + LIBCFS_FREE(p, offsetof(struct kib_pages, ibp_pages[npages])); } -int kiblnd_alloc_pages(kib_pages_t **pp, int cpt, int npages) +int kiblnd_alloc_pages(struct kib_pages **pp, int cpt, int npages) { - kib_pages_t *p; + struct kib_pages *p; int i; LIBCFS_CPT_ALLOC(p, lnet_cpt_table(), cpt, - offsetof(kib_pages_t, ibp_pages[npages])); + offsetof(struct kib_pages, ibp_pages[npages])); if (!p) { CERROR("Can't allocate descriptor for %d pages\n", npages); return -ENOMEM; } - memset(p, 0, offsetof(kib_pages_t, ibp_pages[npages])); + memset(p, 0, offsetof(struct kib_pages, ibp_pages[npages])); p->ibp_npages = npages; for (i = 0; i < npages; i++) { @@ -1121,9 +1121,9 @@ int kiblnd_alloc_pages(kib_pages_t **pp, int cpt, int npages) return 0; } -void kiblnd_unmap_rx_descs(kib_conn_t *conn) +void kiblnd_unmap_rx_descs(struct kib_conn *conn) { - kib_rx_t *rx; + struct kib_rx *rx; int i; LASSERT(conn->ibc_rxs); @@ -1145,9 +1145,9 @@ void kiblnd_unmap_rx_descs(kib_conn_t *conn) conn->ibc_rx_pages = NULL; } -void kiblnd_map_rx_descs(kib_conn_t *conn) +void kiblnd_map_rx_descs(struct kib_conn *conn) { - kib_rx_t *rx; + struct kib_rx *rx; struct page *pg; int pg_off; int ipg; @@ -1158,7 +1158,7 @@ void kiblnd_map_rx_descs(kib_conn_t *conn) rx = &conn->ibc_rxs[i]; rx->rx_conn = conn; - rx->rx_msg = (kib_msg_t *)(((char *)page_address(pg)) + pg_off); + rx->rx_msg = (struct kib_msg *)(((char *)page_address(pg)) + pg_off); rx->rx_msgaddr = kiblnd_dma_map_single(conn->ibc_hdev->ibh_ibdev, rx->rx_msg, @@ -1183,10 +1183,10 @@ void kiblnd_map_rx_descs(kib_conn_t *conn) } } -static void kiblnd_unmap_tx_pool(kib_tx_pool_t *tpo) +static void kiblnd_unmap_tx_pool(struct kib_tx_pool *tpo) { - kib_hca_dev_t *hdev = tpo->tpo_hdev; - kib_tx_t *tx; + struct kib_hca_dev *hdev = tpo->tpo_hdev; + struct kib_tx *tx; int i; LASSERT(!tpo->tpo_pool.po_allocated); @@ -1206,9 +1206,9 @@ static void kiblnd_unmap_tx_pool(kib_tx_pool_t *tpo) tpo->tpo_hdev = NULL; } -static kib_hca_dev_t *kiblnd_current_hdev(kib_dev_t *dev) +static struct kib_hca_dev *kiblnd_current_hdev(struct kib_dev *dev) { - kib_hca_dev_t *hdev; + struct kib_hca_dev *hdev; unsigned long flags; int i = 0; @@ -1232,14 +1232,14 @@ static kib_hca_dev_t *kiblnd_current_hdev(kib_dev_t *dev) return hdev; } -static void kiblnd_map_tx_pool(kib_tx_pool_t *tpo) +static void kiblnd_map_tx_pool(struct kib_tx_pool *tpo) { - kib_pages_t *txpgs = tpo->tpo_tx_pages; - kib_pool_t *pool = &tpo->tpo_pool; - kib_net_t *net = pool->po_owner->ps_net; - kib_dev_t *dev; + struct kib_pages *txpgs = tpo->tpo_tx_pages; + struct kib_pool *pool = &tpo->tpo_pool; + struct kib_net *net = pool->po_owner->ps_net; + struct kib_dev *dev; struct page *page; - kib_tx_t *tx; + struct kib_tx *tx; int page_offset; int ipage; int i; @@ -1260,7 +1260,7 @@ static void kiblnd_map_tx_pool(kib_tx_pool_t *tpo) page = txpgs->ibp_pages[ipage]; tx = &tpo->tpo_tx_descs[i]; - tx->tx_msg = (kib_msg_t *)(((char *)page_address(page)) + + tx->tx_msg = (struct kib_msg *)(((char *)page_address(page)) + page_offset); tx->tx_msgaddr = kiblnd_dma_map_single( @@ -1283,11 +1283,11 @@ static void kiblnd_map_tx_pool(kib_tx_pool_t *tpo) } } -struct ib_mr *kiblnd_find_rd_dma_mr(struct lnet_ni *ni, kib_rdma_desc_t *rd, +struct ib_mr *kiblnd_find_rd_dma_mr(struct lnet_ni *ni, struct kib_rdma_desc *rd, int negotiated_nfrags) { - kib_net_t *net = ni->ni_data; - kib_hca_dev_t *hdev = net->ibn_dev->ibd_hdev; + struct kib_net *net = ni->ni_data; + struct kib_hca_dev *hdev = net->ibn_dev->ibd_hdev; struct lnet_ioctl_config_o2iblnd_tunables *tunables; __u16 nfrags; int mod; @@ -1304,7 +1304,7 @@ struct ib_mr *kiblnd_find_rd_dma_mr(struct lnet_ni *ni, kib_rdma_desc_t *rd, return hdev->ibh_mrs; } -static void kiblnd_destroy_fmr_pool(kib_fmr_pool_t *fpo) +static void kiblnd_destroy_fmr_pool(struct kib_fmr_pool *fpo) { LASSERT(!fpo->fpo_map_count); @@ -1335,7 +1335,7 @@ static void kiblnd_destroy_fmr_pool(kib_fmr_pool_t *fpo) static void kiblnd_destroy_fmr_pool_list(struct list_head *head) { - kib_fmr_pool_t *fpo, *tmp; + struct kib_fmr_pool *fpo, *tmp; list_for_each_entry_safe(fpo, tmp, head, fpo_list) { list_del(&fpo->fpo_list); @@ -1361,7 +1361,7 @@ kiblnd_fmr_flush_trigger(struct lnet_ioctl_config_o2iblnd_tunables *tunables, return max(IBLND_FMR_POOL_FLUSH, size); } -static int kiblnd_alloc_fmr_pool(kib_fmr_poolset_t *fps, kib_fmr_pool_t *fpo) +static int kiblnd_alloc_fmr_pool(struct kib_fmr_poolset *fps, struct kib_fmr_pool *fpo) { struct ib_fmr_pool_param param = { .max_pages_per_fmr = LNET_MAX_PAYLOAD / PAGE_SIZE, @@ -1388,7 +1388,7 @@ static int kiblnd_alloc_fmr_pool(kib_fmr_poolset_t *fps, kib_fmr_pool_t *fpo) return rc; } -static int kiblnd_alloc_freg_pool(kib_fmr_poolset_t *fps, kib_fmr_pool_t *fpo) +static int kiblnd_alloc_freg_pool(struct kib_fmr_poolset *fps, struct kib_fmr_pool *fpo) { struct kib_fast_reg_descriptor *frd, *tmp; int i, rc; @@ -1438,12 +1438,12 @@ out: return rc; } -static int kiblnd_create_fmr_pool(kib_fmr_poolset_t *fps, - kib_fmr_pool_t **pp_fpo) +static int kiblnd_create_fmr_pool(struct kib_fmr_poolset *fps, + struct kib_fmr_pool **pp_fpo) { - kib_dev_t *dev = fps->fps_net->ibn_dev; + struct kib_dev *dev = fps->fps_net->ibn_dev; struct ib_device_attr *dev_attr; - kib_fmr_pool_t *fpo; + struct kib_fmr_pool *fpo; int rc; LIBCFS_CPT_ALLOC(fpo, lnet_cpt_table(), fps->fps_cpt, sizeof(*fpo)); @@ -1488,7 +1488,7 @@ out_fpo: return rc; } -static void kiblnd_fail_fmr_poolset(kib_fmr_poolset_t *fps, +static void kiblnd_fail_fmr_poolset(struct kib_fmr_poolset *fps, struct list_head *zombies) { if (!fps->fps_net) /* intialized? */ @@ -1497,8 +1497,8 @@ static void kiblnd_fail_fmr_poolset(kib_fmr_poolset_t *fps, spin_lock(&fps->fps_lock); while (!list_empty(&fps->fps_pool_list)) { - kib_fmr_pool_t *fpo = list_entry(fps->fps_pool_list.next, - kib_fmr_pool_t, fpo_list); + struct kib_fmr_pool *fpo = list_entry(fps->fps_pool_list.next, + struct kib_fmr_pool, fpo_list); fpo->fpo_failed = 1; list_del(&fpo->fpo_list); if (!fpo->fpo_map_count) @@ -1510,7 +1510,7 @@ static void kiblnd_fail_fmr_poolset(kib_fmr_poolset_t *fps, spin_unlock(&fps->fps_lock); } -static void kiblnd_fini_fmr_poolset(kib_fmr_poolset_t *fps) +static void kiblnd_fini_fmr_poolset(struct kib_fmr_poolset *fps) { if (fps->fps_net) { /* initialized? */ kiblnd_destroy_fmr_pool_list(&fps->fps_failed_pool_list); @@ -1519,11 +1519,11 @@ static void kiblnd_fini_fmr_poolset(kib_fmr_poolset_t *fps) } static int -kiblnd_init_fmr_poolset(kib_fmr_poolset_t *fps, int cpt, int ncpts, - kib_net_t *net, +kiblnd_init_fmr_poolset(struct kib_fmr_poolset *fps, int cpt, int ncpts, + struct kib_net *net, struct lnet_ioctl_config_o2iblnd_tunables *tunables) { - kib_fmr_pool_t *fpo; + struct kib_fmr_pool *fpo; int rc; memset(fps, 0, sizeof(*fps)); @@ -1546,7 +1546,7 @@ kiblnd_init_fmr_poolset(kib_fmr_poolset_t *fps, int cpt, int ncpts, return rc; } -static int kiblnd_fmr_pool_is_idle(kib_fmr_pool_t *fpo, unsigned long now) +static int kiblnd_fmr_pool_is_idle(struct kib_fmr_pool *fpo, unsigned long now) { if (fpo->fpo_map_count) /* still in use */ return 0; @@ -1556,10 +1556,10 @@ static int kiblnd_fmr_pool_is_idle(kib_fmr_pool_t *fpo, unsigned long now) } static int -kiblnd_map_tx_pages(kib_tx_t *tx, kib_rdma_desc_t *rd) +kiblnd_map_tx_pages(struct kib_tx *tx, struct kib_rdma_desc *rd) { __u64 *pages = tx->tx_pages; - kib_hca_dev_t *hdev; + struct kib_hca_dev *hdev; int npages; int size; int i; @@ -1577,13 +1577,13 @@ kiblnd_map_tx_pages(kib_tx_t *tx, kib_rdma_desc_t *rd) return npages; } -void kiblnd_fmr_pool_unmap(kib_fmr_t *fmr, int status) +void kiblnd_fmr_pool_unmap(struct kib_fmr *fmr, int status) { LIST_HEAD(zombies); - kib_fmr_pool_t *fpo = fmr->fmr_pool; - kib_fmr_poolset_t *fps; + struct kib_fmr_pool *fpo = fmr->fmr_pool; + struct kib_fmr_poolset *fps; unsigned long now = cfs_time_current(); - kib_fmr_pool_t *tmp; + struct kib_fmr_pool *tmp; int rc; if (!fpo) @@ -1633,14 +1633,14 @@ void kiblnd_fmr_pool_unmap(kib_fmr_t *fmr, int status) kiblnd_destroy_fmr_pool_list(&zombies); } -int kiblnd_fmr_pool_map(kib_fmr_poolset_t *fps, kib_tx_t *tx, - kib_rdma_desc_t *rd, __u32 nob, __u64 iov, - kib_fmr_t *fmr) +int kiblnd_fmr_pool_map(struct kib_fmr_poolset *fps, struct kib_tx *tx, + struct kib_rdma_desc *rd, __u32 nob, __u64 iov, + struct kib_fmr *fmr) { __u64 *pages = tx->tx_pages; bool is_rx = (rd != tx->tx_rd); bool tx_pages_mapped = 0; - kib_fmr_pool_t *fpo; + struct kib_fmr_pool *fpo; int npages = 0; __u64 version; int rc; @@ -1780,7 +1780,7 @@ int kiblnd_fmr_pool_map(kib_fmr_poolset_t *fps, kib_tx_t *tx, goto again; } -static void kiblnd_fini_pool(kib_pool_t *pool) +static void kiblnd_fini_pool(struct kib_pool *pool) { LASSERT(list_empty(&pool->po_free_list)); LASSERT(!pool->po_allocated); @@ -1788,7 +1788,7 @@ static void kiblnd_fini_pool(kib_pool_t *pool) CDEBUG(D_NET, "Finalize %s pool\n", pool->po_owner->ps_name); } -static void kiblnd_init_pool(kib_poolset_t *ps, kib_pool_t *pool, int size) +static void kiblnd_init_pool(struct kib_poolset *ps, struct kib_pool *pool, int size) { CDEBUG(D_NET, "Initialize %s pool\n", ps->ps_name); @@ -1801,10 +1801,10 @@ static void kiblnd_init_pool(kib_poolset_t *ps, kib_pool_t *pool, int size) static void kiblnd_destroy_pool_list(struct list_head *head) { - kib_pool_t *pool; + struct kib_pool *pool; while (!list_empty(head)) { - pool = list_entry(head->next, kib_pool_t, po_list); + pool = list_entry(head->next, struct kib_pool, po_list); list_del(&pool->po_list); LASSERT(pool->po_owner); @@ -1812,15 +1812,15 @@ static void kiblnd_destroy_pool_list(struct list_head *head) } } -static void kiblnd_fail_poolset(kib_poolset_t *ps, struct list_head *zombies) +static void kiblnd_fail_poolset(struct kib_poolset *ps, struct list_head *zombies) { if (!ps->ps_net) /* intialized? */ return; spin_lock(&ps->ps_lock); while (!list_empty(&ps->ps_pool_list)) { - kib_pool_t *po = list_entry(ps->ps_pool_list.next, - kib_pool_t, po_list); + struct kib_pool *po = list_entry(ps->ps_pool_list.next, + struct kib_pool, po_list); po->po_failed = 1; list_del(&po->po_list); if (!po->po_allocated) @@ -1831,7 +1831,7 @@ static void kiblnd_fail_poolset(kib_poolset_t *ps, struct list_head *zombies) spin_unlock(&ps->ps_lock); } -static void kiblnd_fini_poolset(kib_poolset_t *ps) +static void kiblnd_fini_poolset(struct kib_poolset *ps) { if (ps->ps_net) { /* initialized? */ kiblnd_destroy_pool_list(&ps->ps_failed_pool_list); @@ -1839,14 +1839,14 @@ static void kiblnd_fini_poolset(kib_poolset_t *ps) } } -static int kiblnd_init_poolset(kib_poolset_t *ps, int cpt, - kib_net_t *net, char *name, int size, +static int kiblnd_init_poolset(struct kib_poolset *ps, int cpt, + struct kib_net *net, char *name, int size, kib_ps_pool_create_t po_create, kib_ps_pool_destroy_t po_destroy, kib_ps_node_init_t nd_init, kib_ps_node_fini_t nd_fini) { - kib_pool_t *pool; + struct kib_pool *pool; int rc; memset(ps, 0, sizeof(*ps)); @@ -1874,7 +1874,7 @@ static int kiblnd_init_poolset(kib_poolset_t *ps, int cpt, return rc; } -static int kiblnd_pool_is_idle(kib_pool_t *pool, unsigned long now) +static int kiblnd_pool_is_idle(struct kib_pool *pool, unsigned long now) { if (pool->po_allocated) /* still in use */ return 0; @@ -1883,11 +1883,11 @@ static int kiblnd_pool_is_idle(kib_pool_t *pool, unsigned long now) return cfs_time_aftereq(now, pool->po_deadline); } -void kiblnd_pool_free_node(kib_pool_t *pool, struct list_head *node) +void kiblnd_pool_free_node(struct kib_pool *pool, struct list_head *node) { LIST_HEAD(zombies); - kib_poolset_t *ps = pool->po_owner; - kib_pool_t *tmp; + struct kib_poolset *ps = pool->po_owner; + struct kib_pool *tmp; unsigned long now = cfs_time_current(); spin_lock(&ps->ps_lock); @@ -1913,10 +1913,10 @@ void kiblnd_pool_free_node(kib_pool_t *pool, struct list_head *node) kiblnd_destroy_pool_list(&zombies); } -struct list_head *kiblnd_pool_alloc_node(kib_poolset_t *ps) +struct list_head *kiblnd_pool_alloc_node(struct kib_poolset *ps) { struct list_head *node; - kib_pool_t *pool; + struct kib_pool *pool; unsigned int interval = 1; unsigned long time_before; unsigned int trips = 0; @@ -1986,9 +1986,9 @@ struct list_head *kiblnd_pool_alloc_node(kib_poolset_t *ps) goto again; } -static void kiblnd_destroy_tx_pool(kib_pool_t *pool) +static void kiblnd_destroy_tx_pool(struct kib_pool *pool) { - kib_tx_pool_t *tpo = container_of(pool, kib_tx_pool_t, tpo_pool); + struct kib_tx_pool *tpo = container_of(pool, struct kib_tx_pool, tpo_pool); int i; LASSERT(!pool->po_allocated); @@ -2002,7 +2002,7 @@ static void kiblnd_destroy_tx_pool(kib_pool_t *pool) goto out; for (i = 0; i < pool->po_size; i++) { - kib_tx_t *tx = &tpo->tpo_tx_descs[i]; + struct kib_tx *tx = &tpo->tpo_tx_descs[i]; list_del(&tx->tx_list); if (tx->tx_pages) @@ -2023,12 +2023,12 @@ static void kiblnd_destroy_tx_pool(kib_pool_t *pool) sizeof(*tx->tx_sge)); if (tx->tx_rd) LIBCFS_FREE(tx->tx_rd, - offsetof(kib_rdma_desc_t, + offsetof(struct kib_rdma_desc, rd_frags[IBLND_MAX_RDMA_FRAGS])); } LIBCFS_FREE(tpo->tpo_tx_descs, - pool->po_size * sizeof(kib_tx_t)); + pool->po_size * sizeof(struct kib_tx)); out: kiblnd_fini_pool(pool); LIBCFS_FREE(tpo, sizeof(*tpo)); @@ -2041,13 +2041,13 @@ static int kiblnd_tx_pool_size(int ncpts) return max(IBLND_TX_POOL, ntx); } -static int kiblnd_create_tx_pool(kib_poolset_t *ps, int size, - kib_pool_t **pp_po) +static int kiblnd_create_tx_pool(struct kib_poolset *ps, int size, + struct kib_pool **pp_po) { int i; int npg; - kib_pool_t *pool; - kib_tx_pool_t *tpo; + struct kib_pool *pool; + struct kib_tx_pool *tpo; LIBCFS_CPT_ALLOC(tpo, lnet_cpt_table(), ps->ps_cpt, sizeof(*tpo)); if (!tpo) { @@ -2068,17 +2068,17 @@ static int kiblnd_create_tx_pool(kib_poolset_t *ps, int size, } LIBCFS_CPT_ALLOC(tpo->tpo_tx_descs, lnet_cpt_table(), ps->ps_cpt, - size * sizeof(kib_tx_t)); + size * sizeof(struct kib_tx)); if (!tpo->tpo_tx_descs) { CERROR("Can't allocate %d tx descriptors\n", size); ps->ps_pool_destroy(pool); return -ENOMEM; } - memset(tpo->tpo_tx_descs, 0, size * sizeof(kib_tx_t)); + memset(tpo->tpo_tx_descs, 0, size * sizeof(struct kib_tx)); for (i = 0; i < size; i++) { - kib_tx_t *tx = &tpo->tpo_tx_descs[i]; + struct kib_tx *tx = &tpo->tpo_tx_descs[i]; tx->tx_pool = tpo; if (ps->ps_net->ibn_fmr_ps) { @@ -2110,7 +2110,7 @@ static int kiblnd_create_tx_pool(kib_poolset_t *ps, int size, break; LIBCFS_CPT_ALLOC(tx->tx_rd, lnet_cpt_table(), ps->ps_cpt, - offsetof(kib_rdma_desc_t, + offsetof(struct kib_rdma_desc, rd_frags[IBLND_MAX_RDMA_FRAGS])); if (!tx->tx_rd) break; @@ -2126,22 +2126,23 @@ static int kiblnd_create_tx_pool(kib_poolset_t *ps, int size, return -ENOMEM; } -static void kiblnd_tx_init(kib_pool_t *pool, struct list_head *node) +static void kiblnd_tx_init(struct kib_pool *pool, struct list_head *node) { - kib_tx_poolset_t *tps = container_of(pool->po_owner, kib_tx_poolset_t, - tps_poolset); - kib_tx_t *tx = list_entry(node, kib_tx_t, tx_list); + struct kib_tx_poolset *tps = container_of(pool->po_owner, + struct kib_tx_poolset, + tps_poolset); + struct kib_tx *tx = list_entry(node, struct kib_tx, tx_list); tx->tx_cookie = tps->tps_next_tx_cookie++; } -static void kiblnd_net_fini_pools(kib_net_t *net) +static void kiblnd_net_fini_pools(struct kib_net *net) { int i; cfs_cpt_for_each(i, lnet_cpt_table()) { - kib_tx_poolset_t *tps; - kib_fmr_poolset_t *fps; + struct kib_tx_poolset *tps; + struct kib_fmr_poolset *fps; if (net->ibn_tx_ps) { tps = net->ibn_tx_ps[i]; @@ -2165,7 +2166,7 @@ static void kiblnd_net_fini_pools(kib_net_t *net) } } -static int kiblnd_net_init_pools(kib_net_t *net, lnet_ni_t *ni, __u32 *cpts, +static int kiblnd_net_init_pools(struct kib_net *net, lnet_ni_t *ni, __u32 *cpts, int ncpts) { struct lnet_ioctl_config_o2iblnd_tunables *tunables; @@ -2207,7 +2208,7 @@ static int kiblnd_net_init_pools(kib_net_t *net, lnet_ni_t *ni, __u32 *cpts, * number of CPTs that exist, i.e net->ibn_fmr_ps[cpt]. */ net->ibn_fmr_ps = cfs_percpt_alloc(lnet_cpt_table(), - sizeof(kib_fmr_poolset_t)); + sizeof(struct kib_fmr_poolset)); if (!net->ibn_fmr_ps) { CERROR("Failed to allocate FMR pool array\n"); rc = -ENOMEM; @@ -2235,7 +2236,7 @@ static int kiblnd_net_init_pools(kib_net_t *net, lnet_ni_t *ni, __u32 *cpts, * number of CPTs that exist, i.e net->ibn_tx_ps[cpt]. */ net->ibn_tx_ps = cfs_percpt_alloc(lnet_cpt_table(), - sizeof(kib_tx_poolset_t)); + sizeof(struct kib_tx_poolset)); if (!net->ibn_tx_ps) { CERROR("Failed to allocate tx pool array\n"); rc = -ENOMEM; @@ -2264,7 +2265,7 @@ static int kiblnd_net_init_pools(kib_net_t *net, lnet_ni_t *ni, __u32 *cpts, return rc; } -static int kiblnd_hdev_get_attr(kib_hca_dev_t *hdev) +static int kiblnd_hdev_get_attr(struct kib_hca_dev *hdev) { /* * It's safe to assume a HCA can handle a page size @@ -2284,7 +2285,7 @@ static int kiblnd_hdev_get_attr(kib_hca_dev_t *hdev) return -EINVAL; } -static void kiblnd_hdev_cleanup_mrs(kib_hca_dev_t *hdev) +static void kiblnd_hdev_cleanup_mrs(struct kib_hca_dev *hdev) { if (!hdev->ibh_mrs) return; @@ -2294,7 +2295,7 @@ static void kiblnd_hdev_cleanup_mrs(kib_hca_dev_t *hdev) hdev->ibh_mrs = NULL; } -void kiblnd_hdev_destroy(kib_hca_dev_t *hdev) +void kiblnd_hdev_destroy(struct kib_hca_dev *hdev) { kiblnd_hdev_cleanup_mrs(hdev); @@ -2307,7 +2308,7 @@ void kiblnd_hdev_destroy(kib_hca_dev_t *hdev) LIBCFS_FREE(hdev, sizeof(*hdev)); } -static int kiblnd_hdev_setup_mrs(kib_hca_dev_t *hdev) +static int kiblnd_hdev_setup_mrs(struct kib_hca_dev *hdev) { struct ib_mr *mr; int rc; @@ -2336,7 +2337,7 @@ static int kiblnd_dummy_callback(struct rdma_cm_id *cmid, return 0; } -static int kiblnd_dev_need_failover(kib_dev_t *dev) +static int kiblnd_dev_need_failover(struct kib_dev *dev) { struct rdma_cm_id *cmid; struct sockaddr_in srcaddr; @@ -2390,15 +2391,15 @@ static int kiblnd_dev_need_failover(kib_dev_t *dev) return rc; } -int kiblnd_dev_failover(kib_dev_t *dev) +int kiblnd_dev_failover(struct kib_dev *dev) { LIST_HEAD(zombie_tpo); LIST_HEAD(zombie_ppo); LIST_HEAD(zombie_fpo); struct rdma_cm_id *cmid = NULL; - kib_hca_dev_t *hdev = NULL; + struct kib_hca_dev *hdev = NULL; struct ib_pd *pd; - kib_net_t *net; + struct kib_net *net; struct sockaddr_in addr; unsigned long flags; int rc = 0; @@ -2523,7 +2524,7 @@ int kiblnd_dev_failover(kib_dev_t *dev) return rc; } -void kiblnd_destroy_dev(kib_dev_t *dev) +void kiblnd_destroy_dev(struct kib_dev *dev) { LASSERT(!dev->ibd_nnets); LASSERT(list_empty(&dev->ibd_nets)); @@ -2537,10 +2538,10 @@ void kiblnd_destroy_dev(kib_dev_t *dev) LIBCFS_FREE(dev, sizeof(*dev)); } -static kib_dev_t *kiblnd_create_dev(char *ifname) +static struct kib_dev *kiblnd_create_dev(char *ifname) { struct net_device *netdev; - kib_dev_t *dev; + struct kib_dev *dev; __u32 netmask; __u32 ip; int up; @@ -2655,7 +2656,7 @@ static void kiblnd_base_shutdown(void) static void kiblnd_shutdown(lnet_ni_t *ni) { - kib_net_t *net = ni->ni_data; + struct kib_net *net = ni->ni_data; rwlock_t *g_lock = &kiblnd_data.kib_global_lock; int i; unsigned long flags; @@ -2852,7 +2853,7 @@ static int kiblnd_start_schedulers(struct kib_sched_info *sched) return rc; } -static int kiblnd_dev_start_threads(kib_dev_t *dev, int newdev, __u32 *cpts, +static int kiblnd_dev_start_threads(struct kib_dev *dev, int newdev, __u32 *cpts, int ncpts) { int cpt; @@ -2878,10 +2879,10 @@ static int kiblnd_dev_start_threads(kib_dev_t *dev, int newdev, __u32 *cpts, return 0; } -static kib_dev_t *kiblnd_dev_search(char *ifname) +static struct kib_dev *kiblnd_dev_search(char *ifname) { - kib_dev_t *alias = NULL; - kib_dev_t *dev; + struct kib_dev *alias = NULL; + struct kib_dev *dev; char *colon; char *colon2; @@ -2913,8 +2914,8 @@ static kib_dev_t *kiblnd_dev_search(char *ifname) static int kiblnd_startup(lnet_ni_t *ni) { char *ifname; - kib_dev_t *ibdev = NULL; - kib_net_t *net; + struct kib_dev *ibdev = NULL; + struct kib_net *net; struct timespec64 tv; unsigned long flags; int rc; @@ -3021,11 +3022,11 @@ static void __exit ko2iblnd_exit(void) static int __init ko2iblnd_init(void) { - CLASSERT(sizeof(kib_msg_t) <= IBLND_MSG_SIZE); - CLASSERT(offsetof(kib_msg_t, + CLASSERT(sizeof(struct kib_msg) <= IBLND_MSG_SIZE); + CLASSERT(offsetof(struct kib_msg, ibm_u.get.ibgm_rd.rd_frags[IBLND_MAX_RDMA_FRAGS]) <= IBLND_MSG_SIZE); - CLASSERT(offsetof(kib_msg_t, + CLASSERT(offsetof(struct kib_msg, ibm_u.putack.ibpam_rd.rd_frags[IBLND_MAX_RDMA_FRAGS]) <= IBLND_MSG_SIZE); diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h index 45bbe93..4bac2b7 100644 --- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h +++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h @@ -78,12 +78,12 @@ #define IBLND_N_SCHED 2 #define IBLND_N_SCHED_HIGH 4 -typedef struct { +struct kib_tunables { int *kib_dev_failover; /* HCA failover */ unsigned int *kib_service; /* IB service number */ int *kib_min_reconnect_interval; /* first failed connection retry... */ int *kib_max_reconnect_interval; /* exponentially increasing to this */ - int *kib_cksum; /* checksum kib_msg_t? */ + int *kib_cksum; /* checksum struct kib_msg? */ int *kib_timeout; /* comms timeout (seconds) */ int *kib_keepalive; /* keepalive timeout (seconds) */ int *kib_ntx; /* # tx descs */ @@ -94,15 +94,15 @@ typedef struct { int *kib_require_priv_port; /* accept only privileged ports */ int *kib_use_priv_port; /* use privileged port for active connect */ int *kib_nscheds; /* # threads on each CPT */ -} kib_tunables_t; +}; -extern kib_tunables_t kiblnd_tunables; +extern struct kib_tunables kiblnd_tunables; #define IBLND_MSG_QUEUE_SIZE_V1 8 /* V1 only : # messages/RDMAs in-flight */ #define IBLND_CREDIT_HIGHWATER_V1 7 /* V1 only : when eagerly to return credits */ #define IBLND_CREDITS_DEFAULT 8 /* default # of peer credits */ -#define IBLND_CREDITS_MAX ((typeof(((kib_msg_t *) 0)->ibm_credits)) - 1) /* Max # of peer credits */ +#define IBLND_CREDITS_MAX ((typeof(((struct kib_msg *) 0)->ibm_credits)) - 1) /* Max # of peer credits */ /* when eagerly to return credits */ #define IBLND_CREDITS_HIGHWATER(t, v) ((v) == IBLND_MSG_VERSION_1 ? \ @@ -150,7 +150,7 @@ struct kib_hca_dev; #define KIB_IFNAME_SIZE 256 #endif -typedef struct { +struct kib_dev { struct list_head ibd_list; /* chain on kib_devs */ struct list_head ibd_fail_list; /* chain on kib_failed_devs */ __u32 ibd_ifip; /* IPoIB interface IP */ @@ -165,9 +165,9 @@ typedef struct { unsigned int ibd_can_failover; /* IPoIB interface is a bonding master */ struct list_head ibd_nets; struct kib_hca_dev *ibd_hdev; -} kib_dev_t; +}; -typedef struct kib_hca_dev { +struct kib_hca_dev { struct rdma_cm_id *ibh_cmid; /* listener cmid */ struct ib_device *ibh_ibdev; /* IB device */ int ibh_page_shift; /* page shift of current HCA */ @@ -177,19 +177,19 @@ typedef struct kib_hca_dev { __u64 ibh_mr_size; /* size of MR */ struct ib_mr *ibh_mrs; /* global MR */ struct ib_pd *ibh_pd; /* PD */ - kib_dev_t *ibh_dev; /* owner */ + struct kib_dev *ibh_dev; /* owner */ atomic_t ibh_ref; /* refcount */ -} kib_hca_dev_t; +}; /** # of seconds to keep pool alive */ #define IBLND_POOL_DEADLINE 300 /** # of seconds to retry if allocation failed */ #define IBLND_POOL_RETRY 1 -typedef struct { +struct kib_pages { int ibp_npages; /* # pages */ struct page *ibp_pages[0]; /* page array */ -} kib_pages_t; +}; struct kib_pool; struct kib_poolset; @@ -204,7 +204,7 @@ struct kib_net; #define IBLND_POOL_NAME_LEN 32 -typedef struct kib_poolset { +struct kib_poolset { spinlock_t ps_lock; /* serialize */ struct kib_net *ps_net; /* network it belongs to */ char ps_name[IBLND_POOL_NAME_LEN]; /* pool set name */ @@ -220,31 +220,31 @@ typedef struct kib_poolset { kib_ps_pool_destroy_t ps_pool_destroy; /* destroy a pool */ kib_ps_node_init_t ps_node_init; /* initialize new allocated node */ kib_ps_node_fini_t ps_node_fini; /* finalize node */ -} kib_poolset_t; +}; -typedef struct kib_pool { +struct kib_pool { struct list_head po_list; /* chain on pool list */ struct list_head po_free_list; /* pre-allocated node */ - kib_poolset_t *po_owner; /* pool_set of this pool */ + struct kib_poolset *po_owner; /* pool_set of this pool */ unsigned long po_deadline; /* deadline of this pool */ int po_allocated; /* # of elements in use */ int po_failed; /* pool is created on failed HCA */ int po_size; /* # of pre-allocated elements */ -} kib_pool_t; +}; -typedef struct { - kib_poolset_t tps_poolset; /* pool-set */ +struct kib_tx_poolset { + struct kib_poolset tps_poolset; /* pool-set */ __u64 tps_next_tx_cookie; /* cookie of TX */ -} kib_tx_poolset_t; +}; -typedef struct { - kib_pool_t tpo_pool; /* pool */ - struct kib_hca_dev *tpo_hdev; /* device for this pool */ - struct kib_tx *tpo_tx_descs; /* all the tx descriptors */ - kib_pages_t *tpo_tx_pages; /* premapped tx msg pages */ -} kib_tx_pool_t; +struct kib_tx_pool { + struct kib_pool tpo_pool; /* pool */ + struct kib_hca_dev *tpo_hdev; /* device for this pool */ + struct kib_tx *tpo_tx_descs; /* all the tx descriptors */ + struct kib_pages *tpo_tx_pages; /* premapped tx msg pages */ +}; -typedef struct { +struct kib_fmr_poolset { spinlock_t fps_lock; /* serialize */ struct kib_net *fps_net; /* IB network */ struct list_head fps_pool_list; /* FMR pool list */ @@ -257,7 +257,7 @@ typedef struct { int fps_increasing; /* is allocating new pool */ unsigned long fps_next_retry; /* time stamp for retry if*/ /* failed to allocate */ -} kib_fmr_poolset_t; +}; struct kib_fast_reg_descriptor { /* For fast registration */ struct list_head frd_list; @@ -267,10 +267,10 @@ struct kib_fast_reg_descriptor { /* For fast registration */ bool frd_valid; }; -typedef struct { - struct list_head fpo_list; /* chain on pool list */ - struct kib_hca_dev *fpo_hdev; /* device for this pool */ - kib_fmr_poolset_t *fpo_owner; /* owner of this pool */ +struct kib_fmr_pool { + struct list_head fpo_list; /* chain on pool list */ + struct kib_hca_dev *fpo_hdev; /* device for this pool */ + struct kib_fmr_poolset *fpo_owner; /* owner of this pool */ union { struct { struct ib_fmr_pool *fpo_fmr_pool; /* IB FMR pool */ @@ -284,17 +284,17 @@ typedef struct { int fpo_failed; /* fmr pool is failed */ int fpo_map_count; /* # of mapped FMR */ int fpo_is_fmr; -} kib_fmr_pool_t; +}; -typedef struct { - kib_fmr_pool_t *fmr_pool; /* pool of FMR */ +struct kib_fmr { + struct kib_fmr_pool *fmr_pool; /* pool of FMR */ struct ib_pool_fmr *fmr_pfmr; /* IB pool fmr */ struct kib_fast_reg_descriptor *fmr_frd; u32 fmr_key; -} kib_fmr_t; +}; -typedef struct kib_net { - struct list_head ibn_list; /* chain on kib_dev_t::ibd_nets */ +struct kib_net { + struct list_head ibn_list; /* chain on struct kib_dev::ibd_nets */ __u64 ibn_incarnation;/* my epoch */ int ibn_init; /* initialisation state */ int ibn_shutdown; /* shutting down? */ @@ -302,11 +302,11 @@ typedef struct kib_net { atomic_t ibn_npeers; /* # peers extant */ atomic_t ibn_nconns; /* # connections extant */ - kib_tx_poolset_t **ibn_tx_ps; /* tx pool-set */ - kib_fmr_poolset_t **ibn_fmr_ps; /* fmr pool-set */ + struct kib_tx_poolset **ibn_tx_ps; /* tx pool-set */ + struct kib_fmr_poolset **ibn_fmr_ps; /* fmr pool-set */ - kib_dev_t *ibn_dev; /* underlying IB device */ -} kib_net_t; + struct kib_dev *ibn_dev; /* underlying IB device */ +}; #define KIB_THREAD_SHIFT 16 #define KIB_THREAD_ID(cpt, tid) ((cpt) << KIB_THREAD_SHIFT | (tid)) @@ -322,7 +322,7 @@ struct kib_sched_info { int ibs_cpt; /* CPT id */ }; -typedef struct { +struct kib_data { int kib_init; /* initialisation state */ int kib_shutdown; /* shut down? */ struct list_head kib_devs; /* IB devices extant */ @@ -349,7 +349,7 @@ typedef struct { spinlock_t kib_connd_lock; /* serialise */ struct ib_qp_attr kib_error_qpa; /* QP->ERROR */ struct kib_sched_info **kib_scheds; /* percpt data for schedulers */ -} kib_data_t; +}; #define IBLND_INIT_NOTHING 0 #define IBLND_INIT_DATA 1 @@ -360,51 +360,51 @@ typedef struct { * These are sent in sender's byte order (i.e. receiver flips). */ -typedef struct kib_connparams { +struct kib_connparams { __u16 ibcp_queue_depth; __u16 ibcp_max_frags; __u32 ibcp_max_msg_size; -} WIRE_ATTR kib_connparams_t; +} WIRE_ATTR; -typedef struct { +struct kib_immediate_msg { lnet_hdr_t ibim_hdr; /* portals header */ char ibim_payload[0]; /* piggy-backed payload */ -} WIRE_ATTR kib_immediate_msg_t; +} WIRE_ATTR; -typedef struct { +struct kib_rdma_frag { __u32 rf_nob; /* # bytes this frag */ __u64 rf_addr; /* CAVEAT EMPTOR: misaligned!! */ -} WIRE_ATTR kib_rdma_frag_t; +} WIRE_ATTR; -typedef struct { +struct kib_rdma_desc { __u32 rd_key; /* local/remote key */ __u32 rd_nfrags; /* # fragments */ - kib_rdma_frag_t rd_frags[0]; /* buffer frags */ -} WIRE_ATTR kib_rdma_desc_t; + struct kib_rdma_frag rd_frags[0]; /* buffer frags */ +} WIRE_ATTR; -typedef struct { +struct kib_putreq_msg { lnet_hdr_t ibprm_hdr; /* portals header */ __u64 ibprm_cookie; /* opaque completion cookie */ -} WIRE_ATTR kib_putreq_msg_t; +} WIRE_ATTR; -typedef struct { +struct kib_putack_msg { __u64 ibpam_src_cookie; /* reflected completion cookie */ __u64 ibpam_dst_cookie; /* opaque completion cookie */ - kib_rdma_desc_t ibpam_rd; /* sender's sink buffer */ -} WIRE_ATTR kib_putack_msg_t; + struct kib_rdma_desc ibpam_rd; /* sender's sink buffer */ +} WIRE_ATTR; -typedef struct { +struct kib_get_msg { lnet_hdr_t ibgm_hdr; /* portals header */ __u64 ibgm_cookie; /* opaque completion cookie */ - kib_rdma_desc_t ibgm_rd; /* rdma descriptor */ -} WIRE_ATTR kib_get_msg_t; + struct kib_rdma_desc ibgm_rd; /* rdma descriptor */ +} WIRE_ATTR; -typedef struct { +struct kib_completion_msg { __u64 ibcm_cookie; /* opaque completion cookie */ __s32 ibcm_status; /* < 0 failure: >= 0 length */ -} WIRE_ATTR kib_completion_msg_t; +} WIRE_ATTR; -typedef struct { +struct kib_msg { /* First 2 fields fixed FOR ALL TIME */ __u32 ibm_magic; /* I'm an ibnal message */ __u16 ibm_version; /* this is my version number */ @@ -419,14 +419,14 @@ typedef struct { __u64 ibm_dststamp; /* destination's incarnation */ union { - kib_connparams_t connparams; - kib_immediate_msg_t immediate; - kib_putreq_msg_t putreq; - kib_putack_msg_t putack; - kib_get_msg_t get; - kib_completion_msg_t completion; + struct kib_connparams connparams; + struct kib_immediate_msg immediate; + struct kib_putreq_msg putreq; + struct kib_putack_msg putack; + struct kib_get_msg get; + struct kib_completion_msg completion; } WIRE_ATTR ibm_u; -} WIRE_ATTR kib_msg_t; +} WIRE_ATTR; #define IBLND_MSG_MAGIC LNET_PROTO_IB_MAGIC /* unique magic */ @@ -445,14 +445,14 @@ typedef struct { #define IBLND_MSG_GET_REQ 0xd6 /* getreq (sink->src) */ #define IBLND_MSG_GET_DONE 0xd7 /* completion (src->sink: all OK) */ -typedef struct { +struct kib_rej { __u32 ibr_magic; /* sender's magic */ __u16 ibr_version; /* sender's version */ __u8 ibr_why; /* reject reason */ __u8 ibr_padding; /* padding */ __u64 ibr_incarnation; /* incarnation of peer */ - kib_connparams_t ibr_cp; /* connection parameters */ -} WIRE_ATTR kib_rej_t; + struct kib_connparams ibr_cp; /* connection parameters */ +} WIRE_ATTR; /* connection rejection reasons */ #define IBLND_REJECT_CONN_RACE 1 /* You lost connection race */ @@ -467,28 +467,26 @@ typedef struct { /***********************************************************************/ -typedef struct kib_rx /* receive message */ -{ +struct kib_rx { /* receive message */ struct list_head rx_list; /* queue for attention */ struct kib_conn *rx_conn; /* owning conn */ int rx_nob; /* # bytes received (-1 while posted) */ enum ib_wc_status rx_status; /* completion status */ - kib_msg_t *rx_msg; /* message buffer (host vaddr) */ + struct kib_msg *rx_msg; /* message buffer (host vaddr) */ __u64 rx_msgaddr; /* message buffer (I/O addr) */ DECLARE_PCI_UNMAP_ADDR(rx_msgunmap); /* for dma_unmap_single() */ struct ib_recv_wr rx_wrq; /* receive work item... */ struct ib_sge rx_sge; /* ...and its memory */ -} kib_rx_t; +}; #define IBLND_POSTRX_DONT_POST 0 /* don't post */ #define IBLND_POSTRX_NO_CREDIT 1 /* post: no credits */ #define IBLND_POSTRX_PEER_CREDIT 2 /* post: give peer back 1 credit */ #define IBLND_POSTRX_RSRVD_CREDIT 3 /* post: give self back 1 reserved credit */ -typedef struct kib_tx /* transmit message */ -{ +struct kib_tx { /* transmit message */ struct list_head tx_list; /* queue on idle_txs ibc_tx_queue etc. */ - kib_tx_pool_t *tx_pool; /* pool I'm from */ + struct kib_tx_pool *tx_pool; /* pool I'm from */ struct kib_conn *tx_conn; /* owning conn */ short tx_sending; /* # tx callbacks outstanding */ short tx_queued; /* queued for sending */ @@ -497,28 +495,28 @@ typedef struct kib_tx /* transmit message */ unsigned long tx_deadline; /* completion deadline */ __u64 tx_cookie; /* completion cookie */ lnet_msg_t *tx_lntmsg[2]; /* lnet msgs to finalize on completion */ - kib_msg_t *tx_msg; /* message buffer (host vaddr) */ + struct kib_msg *tx_msg; /* message buffer (host vaddr) */ __u64 tx_msgaddr; /* message buffer (I/O addr) */ DECLARE_PCI_UNMAP_ADDR(tx_msgunmap); /* for dma_unmap_single() */ int tx_nwrq; /* # send work items */ struct ib_rdma_wr *tx_wrq; /* send work items... */ struct ib_sge *tx_sge; /* ...and their memory */ - kib_rdma_desc_t *tx_rd; /* rdma descriptor */ + struct kib_rdma_desc *tx_rd; /* rdma descriptor */ int tx_nfrags; /* # entries in... */ struct scatterlist *tx_frags; /* dma_map_sg descriptor */ __u64 *tx_pages; /* rdma phys page addrs */ - kib_fmr_t fmr; /* FMR */ + struct kib_fmr fmr; /* FMR */ int tx_dmadir; /* dma direction */ -} kib_tx_t; +}; -typedef struct kib_connvars { - kib_msg_t cv_msg; /* connection-in-progress variables */ -} kib_connvars_t; +struct kib_connvars { + struct kib_msg cv_msg; /* connection-in-progress variables */ +}; -typedef struct kib_conn { +struct kib_conn { struct kib_sched_info *ibc_sched; /* scheduler information */ struct kib_peer *ibc_peer; /* owning peer */ - kib_hca_dev_t *ibc_hdev; /* HCA bound on */ + struct kib_hca_dev *ibc_hdev; /* HCA bound on */ struct list_head ibc_list; /* stash on peer's conn list */ struct list_head ibc_sched_list; /* schedule for attention */ __u16 ibc_version; /* version of connection */ @@ -553,14 +551,14 @@ typedef struct kib_conn { /* reserve an ACK/DONE msg */ struct list_head ibc_active_txs; /* active tx awaiting completion */ spinlock_t ibc_lock; /* serialise */ - kib_rx_t *ibc_rxs; /* the rx descs */ - kib_pages_t *ibc_rx_pages; /* premapped rx msg pages */ + struct kib_rx *ibc_rxs; /* the rx descs */ + struct kib_pages *ibc_rx_pages; /* premapped rx msg pages */ struct rdma_cm_id *ibc_cmid; /* CM id */ struct ib_cq *ibc_cq; /* completion queue */ - kib_connvars_t *ibc_connvars; /* in-progress connection state */ -} kib_conn_t; + struct kib_connvars *ibc_connvars; /* in-progress connection state */ +}; #define IBLND_CONN_INIT 0 /* being initialised */ #define IBLND_CONN_ACTIVE_CONNECT 1 /* active sending req */ @@ -569,7 +567,7 @@ typedef struct kib_conn { #define IBLND_CONN_CLOSING 4 /* being closed */ #define IBLND_CONN_DISCONNECTED 5 /* disconnected */ -typedef struct kib_peer { +struct kib_peer { struct list_head ibp_list; /* stash on global peer list */ lnet_nid_t ibp_nid; /* who's on the other end(s) */ lnet_ni_t *ibp_ni; /* LNet interface */ @@ -596,11 +594,11 @@ typedef struct kib_peer { __u16 ibp_max_frags; /* max_peer_credits */ __u16 ibp_queue_depth; -} kib_peer_t; +}; -extern kib_data_t kiblnd_data; +extern struct kib_data kiblnd_data; -void kiblnd_hdev_destroy(kib_hca_dev_t *hdev); +void kiblnd_hdev_destroy(struct kib_hca_dev *hdev); int kiblnd_msg_queue_size(int version, struct lnet_ni *ni); @@ -645,14 +643,14 @@ kiblnd_concurrent_sends(int version, struct lnet_ni *ni) } static inline void -kiblnd_hdev_addref_locked(kib_hca_dev_t *hdev) +kiblnd_hdev_addref_locked(struct kib_hca_dev *hdev) { LASSERT(atomic_read(&hdev->ibh_ref) > 0); atomic_inc(&hdev->ibh_ref); } static inline void -kiblnd_hdev_decref(kib_hca_dev_t *hdev) +kiblnd_hdev_decref(struct kib_hca_dev *hdev) { LASSERT(atomic_read(&hdev->ibh_ref) > 0); if (atomic_dec_and_test(&hdev->ibh_ref)) @@ -660,7 +658,7 @@ kiblnd_hdev_decref(kib_hca_dev_t *hdev) } static inline int -kiblnd_dev_can_failover(kib_dev_t *dev) +kiblnd_dev_can_failover(struct kib_dev *dev) { if (!list_empty(&dev->ibd_fail_list)) /* already scheduled */ return 0; @@ -716,7 +714,7 @@ do { \ } while (0) static inline bool -kiblnd_peer_connecting(kib_peer_t *peer) +kiblnd_peer_connecting(struct kib_peer *peer) { return peer->ibp_connecting || peer->ibp_reconnecting || @@ -724,7 +722,7 @@ kiblnd_peer_connecting(kib_peer_t *peer) } static inline bool -kiblnd_peer_idle(kib_peer_t *peer) +kiblnd_peer_idle(struct kib_peer *peer) { return !kiblnd_peer_connecting(peer) && list_empty(&peer->ibp_conns); } @@ -739,23 +737,23 @@ kiblnd_nid2peerlist(lnet_nid_t nid) } static inline int -kiblnd_peer_active(kib_peer_t *peer) +kiblnd_peer_active(struct kib_peer *peer) { /* Am I in the peer hash table? */ return !list_empty(&peer->ibp_list); } -static inline kib_conn_t * -kiblnd_get_conn_locked(kib_peer_t *peer) +static inline struct kib_conn * +kiblnd_get_conn_locked(struct kib_peer *peer) { LASSERT(!list_empty(&peer->ibp_conns)); /* just return the first connection */ - return list_entry(peer->ibp_conns.next, kib_conn_t, ibc_list); + return list_entry(peer->ibp_conns.next, struct kib_conn, ibc_list); } static inline int -kiblnd_send_keepalive(kib_conn_t *conn) +kiblnd_send_keepalive(struct kib_conn *conn) { return (*kiblnd_tunables.kib_keepalive > 0) && cfs_time_after(jiffies, conn->ibc_last_send + @@ -764,7 +762,7 @@ kiblnd_send_keepalive(kib_conn_t *conn) } static inline int -kiblnd_need_noop(kib_conn_t *conn) +kiblnd_need_noop(struct kib_conn *conn) { struct lnet_ioctl_config_o2iblnd_tunables *tunables; lnet_ni_t *ni = conn->ibc_peer->ibp_ni; @@ -800,14 +798,14 @@ kiblnd_need_noop(kib_conn_t *conn) } static inline void -kiblnd_abort_receives(kib_conn_t *conn) +kiblnd_abort_receives(struct kib_conn *conn) { ib_modify_qp(conn->ibc_cmid->qp, &kiblnd_data.kib_error_qpa, IB_QP_STATE); } static inline const char * -kiblnd_queue2str(kib_conn_t *conn, struct list_head *q) +kiblnd_queue2str(struct kib_conn *conn, struct list_head *q) { if (q == &conn->ibc_tx_queue) return "tx_queue"; @@ -858,21 +856,21 @@ kiblnd_wreqid2type(__u64 wreqid) } static inline void -kiblnd_set_conn_state(kib_conn_t *conn, int state) +kiblnd_set_conn_state(struct kib_conn *conn, int state) { conn->ibc_state = state; mb(); } static inline void -kiblnd_init_msg(kib_msg_t *msg, int type, int body_nob) +kiblnd_init_msg(struct kib_msg *msg, int type, int body_nob) { msg->ibm_type = type; - msg->ibm_nob = offsetof(kib_msg_t, ibm_u) + body_nob; + msg->ibm_nob = offsetof(struct kib_msg, ibm_u) + body_nob; } static inline int -kiblnd_rd_size(kib_rdma_desc_t *rd) +kiblnd_rd_size(struct kib_rdma_desc *rd) { int i; int size; @@ -884,25 +882,25 @@ kiblnd_rd_size(kib_rdma_desc_t *rd) } static inline __u64 -kiblnd_rd_frag_addr(kib_rdma_desc_t *rd, int index) +kiblnd_rd_frag_addr(struct kib_rdma_desc *rd, int index) { return rd->rd_frags[index].rf_addr; } static inline __u32 -kiblnd_rd_frag_size(kib_rdma_desc_t *rd, int index) +kiblnd_rd_frag_size(struct kib_rdma_desc *rd, int index) { return rd->rd_frags[index].rf_nob; } static inline __u32 -kiblnd_rd_frag_key(kib_rdma_desc_t *rd, int index) +kiblnd_rd_frag_key(struct kib_rdma_desc *rd, int index) { return rd->rd_key; } static inline int -kiblnd_rd_consume_frag(kib_rdma_desc_t *rd, int index, __u32 nob) +kiblnd_rd_consume_frag(struct kib_rdma_desc *rd, int index, __u32 nob) { if (nob < rd->rd_frags[index].rf_nob) { rd->rd_frags[index].rf_addr += nob; @@ -915,14 +913,14 @@ kiblnd_rd_consume_frag(kib_rdma_desc_t *rd, int index, __u32 nob) } static inline int -kiblnd_rd_msg_size(kib_rdma_desc_t *rd, int msgtype, int n) +kiblnd_rd_msg_size(struct kib_rdma_desc *rd, int msgtype, int n) { LASSERT(msgtype == IBLND_MSG_GET_REQ || msgtype == IBLND_MSG_PUT_ACK); return msgtype == IBLND_MSG_GET_REQ ? - offsetof(kib_get_msg_t, ibgm_rd.rd_frags[n]) : - offsetof(kib_putack_msg_t, ibpam_rd.rd_frags[n]); + offsetof(struct kib_get_msg, ibgm_rd.rd_frags[n]) : + offsetof(struct kib_putack_msg, ibpam_rd.rd_frags[n]); } static inline __u64 @@ -981,17 +979,17 @@ static inline unsigned int kiblnd_sg_dma_len(struct ib_device *dev, #define KIBLND_CONN_PARAM(e) ((e)->param.conn.private_data) #define KIBLND_CONN_PARAM_LEN(e) ((e)->param.conn.private_data_len) -struct ib_mr *kiblnd_find_rd_dma_mr(struct lnet_ni *ni, kib_rdma_desc_t *rd, +struct ib_mr *kiblnd_find_rd_dma_mr(struct lnet_ni *ni, struct kib_rdma_desc *rd, int negotiated_nfrags); -void kiblnd_map_rx_descs(kib_conn_t *conn); -void kiblnd_unmap_rx_descs(kib_conn_t *conn); -void kiblnd_pool_free_node(kib_pool_t *pool, struct list_head *node); -struct list_head *kiblnd_pool_alloc_node(kib_poolset_t *ps); +void kiblnd_map_rx_descs(struct kib_conn *conn); +void kiblnd_unmap_rx_descs(struct kib_conn *conn); +void kiblnd_pool_free_node(struct kib_pool *pool, struct list_head *node); +struct list_head *kiblnd_pool_alloc_node(struct kib_poolset *ps); -int kiblnd_fmr_pool_map(kib_fmr_poolset_t *fps, kib_tx_t *tx, - kib_rdma_desc_t *rd, __u32 nob, __u64 iov, - kib_fmr_t *fmr); -void kiblnd_fmr_pool_unmap(kib_fmr_t *fmr, int status); +int kiblnd_fmr_pool_map(struct kib_fmr_poolset *fps, struct kib_tx *tx, + struct kib_rdma_desc *rd, __u32 nob, __u64 iov, + struct kib_fmr *fmr); +void kiblnd_fmr_pool_unmap(struct kib_fmr *fmr, int status); int kiblnd_tunables_setup(struct lnet_ni *ni); void kiblnd_tunables_init(void); @@ -1001,30 +999,31 @@ int kiblnd_scheduler(void *arg); int kiblnd_thread_start(int (*fn)(void *arg), void *arg, char *name); int kiblnd_failover_thread(void *arg); -int kiblnd_alloc_pages(kib_pages_t **pp, int cpt, int npages); +int kiblnd_alloc_pages(struct kib_pages **pp, int cpt, int npages); int kiblnd_cm_callback(struct rdma_cm_id *cmid, struct rdma_cm_event *event); int kiblnd_translate_mtu(int value); -int kiblnd_dev_failover(kib_dev_t *dev); -int kiblnd_create_peer(lnet_ni_t *ni, kib_peer_t **peerp, lnet_nid_t nid); -void kiblnd_destroy_peer(kib_peer_t *peer); -bool kiblnd_reconnect_peer(kib_peer_t *peer); -void kiblnd_destroy_dev(kib_dev_t *dev); -void kiblnd_unlink_peer_locked(kib_peer_t *peer); -kib_peer_t *kiblnd_find_peer_locked(lnet_nid_t nid); -int kiblnd_close_stale_conns_locked(kib_peer_t *peer, +int kiblnd_dev_failover(struct kib_dev *dev); +int kiblnd_create_peer(lnet_ni_t *ni, struct kib_peer **peerp, lnet_nid_t nid); +void kiblnd_destroy_peer(struct kib_peer *peer); +bool kiblnd_reconnect_peer(struct kib_peer *peer); +void kiblnd_destroy_dev(struct kib_dev *dev); +void kiblnd_unlink_peer_locked(struct kib_peer *peer); +struct kib_peer *kiblnd_find_peer_locked(lnet_nid_t nid); +int kiblnd_close_stale_conns_locked(struct kib_peer *peer, int version, __u64 incarnation); -int kiblnd_close_peer_conns_locked(kib_peer_t *peer, int why); +int kiblnd_close_peer_conns_locked(struct kib_peer *peer, int why); -kib_conn_t *kiblnd_create_conn(kib_peer_t *peer, struct rdma_cm_id *cmid, - int state, int version); -void kiblnd_destroy_conn(kib_conn_t *conn, bool free_conn); -void kiblnd_close_conn(kib_conn_t *conn, int error); -void kiblnd_close_conn_locked(kib_conn_t *conn, int error); +struct kib_conn *kiblnd_create_conn(struct kib_peer *peer, + struct rdma_cm_id *cmid, + int state, int version); +void kiblnd_destroy_conn(struct kib_conn *conn, bool free_conn); +void kiblnd_close_conn(struct kib_conn *conn, int error); +void kiblnd_close_conn_locked(struct kib_conn *conn, int error); -void kiblnd_launch_tx(lnet_ni_t *ni, kib_tx_t *tx, lnet_nid_t nid); +void kiblnd_launch_tx(lnet_ni_t *ni, struct kib_tx *tx, lnet_nid_t nid); void kiblnd_txlist_done(lnet_ni_t *ni, struct list_head *txlist, int status); @@ -1032,10 +1031,10 @@ void kiblnd_qp_event(struct ib_event *event, void *arg); void kiblnd_cq_event(struct ib_event *event, void *arg); void kiblnd_cq_completion(struct ib_cq *cq, void *arg); -void kiblnd_pack_msg(lnet_ni_t *ni, kib_msg_t *msg, int version, +void kiblnd_pack_msg(lnet_ni_t *ni, struct kib_msg *msg, int version, int credits, lnet_nid_t dstnid, __u64 dststamp); -int kiblnd_unpack_msg(kib_msg_t *msg, int nob); -int kiblnd_post_rx(kib_rx_t *rx, int credit); +int kiblnd_unpack_msg(struct kib_msg *msg, int nob); +int kiblnd_post_rx(struct kib_rx *rx, int credit); int kiblnd_send(lnet_ni_t *ni, void *private, lnet_msg_t *lntmsg); int kiblnd_recv(lnet_ni_t *ni, void *private, lnet_msg_t *lntmsg, int delayed, diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c index 0f7e3a1..b3cf62f 100644 --- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c +++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c @@ -40,22 +40,22 @@ #include "o2iblnd.h" -static void kiblnd_peer_alive(kib_peer_t *peer); -static void kiblnd_peer_connect_failed(kib_peer_t *peer, int active, int error); -static void kiblnd_check_sends(kib_conn_t *conn); -static void kiblnd_init_tx_msg(lnet_ni_t *ni, kib_tx_t *tx, +static void kiblnd_peer_alive(struct kib_peer *peer); +static void kiblnd_peer_connect_failed(struct kib_peer *peer, int active, int error); +static void kiblnd_check_sends(struct kib_conn *conn); +static void kiblnd_init_tx_msg(lnet_ni_t *ni, struct kib_tx *tx, int type, int body_nob); -static int kiblnd_init_rdma(kib_conn_t *conn, kib_tx_t *tx, int type, - int resid, kib_rdma_desc_t *dstrd, __u64 dstcookie); -static void kiblnd_queue_tx_locked(kib_tx_t *tx, kib_conn_t *conn); -static void kiblnd_queue_tx(kib_tx_t *tx, kib_conn_t *conn); -static void kiblnd_unmap_tx(lnet_ni_t *ni, kib_tx_t *tx); +static int kiblnd_init_rdma(struct kib_conn *conn, struct kib_tx *tx, int type, + int resid, struct kib_rdma_desc *dstrd, __u64 dstcookie); +static void kiblnd_queue_tx_locked(struct kib_tx *tx, struct kib_conn *conn); +static void kiblnd_queue_tx(struct kib_tx *tx, struct kib_conn *conn); +static void kiblnd_unmap_tx(lnet_ni_t *ni, struct kib_tx *tx); static void -kiblnd_tx_done(lnet_ni_t *ni, kib_tx_t *tx) +kiblnd_tx_done(lnet_ni_t *ni, struct kib_tx *tx) { lnet_msg_t *lntmsg[2]; - kib_net_t *net = ni->ni_data; + struct kib_net *net = ni->ni_data; int rc; int i; @@ -97,10 +97,10 @@ kiblnd_tx_done(lnet_ni_t *ni, kib_tx_t *tx) void kiblnd_txlist_done(lnet_ni_t *ni, struct list_head *txlist, int status) { - kib_tx_t *tx; + struct kib_tx *tx; while (!list_empty(txlist)) { - tx = list_entry(txlist->next, kib_tx_t, tx_list); + tx = list_entry(txlist->next, struct kib_tx, tx_list); list_del(&tx->tx_list); /* complete now */ @@ -110,19 +110,19 @@ kiblnd_txlist_done(lnet_ni_t *ni, struct list_head *txlist, int status) } } -static kib_tx_t * +static struct kib_tx * kiblnd_get_idle_tx(lnet_ni_t *ni, lnet_nid_t target) { - kib_net_t *net = (kib_net_t *)ni->ni_data; + struct kib_net *net = (struct kib_net *)ni->ni_data; struct list_head *node; - kib_tx_t *tx; - kib_tx_poolset_t *tps; + struct kib_tx *tx; + struct kib_tx_poolset *tps; tps = net->ibn_tx_ps[lnet_cpt_of_nid(target)]; node = kiblnd_pool_alloc_node(&tps->tps_poolset); if (!node) return NULL; - tx = list_entry(node, kib_tx_t, tx_list); + tx = list_entry(node, struct kib_tx, tx_list); LASSERT(!tx->tx_nwrq); LASSERT(!tx->tx_queued); @@ -138,9 +138,9 @@ kiblnd_get_idle_tx(lnet_ni_t *ni, lnet_nid_t target) } static void -kiblnd_drop_rx(kib_rx_t *rx) +kiblnd_drop_rx(struct kib_rx *rx) { - kib_conn_t *conn = rx->rx_conn; + struct kib_conn *conn = rx->rx_conn; struct kib_sched_info *sched = conn->ibc_sched; unsigned long flags; @@ -153,10 +153,10 @@ kiblnd_drop_rx(kib_rx_t *rx) } int -kiblnd_post_rx(kib_rx_t *rx, int credit) +kiblnd_post_rx(struct kib_rx *rx, int credit) { - kib_conn_t *conn = rx->rx_conn; - kib_net_t *net = conn->ibc_peer->ibp_ni->ni_data; + struct kib_conn *conn = rx->rx_conn; + struct kib_net *net = conn->ibc_peer->ibp_ni->ni_data; struct ib_recv_wr *bad_wrq = NULL; struct ib_mr *mr = conn->ibc_hdev->ibh_mrs; int rc; @@ -223,13 +223,13 @@ out: return rc; } -static kib_tx_t * -kiblnd_find_waiting_tx_locked(kib_conn_t *conn, int txtype, __u64 cookie) +static struct kib_tx * +kiblnd_find_waiting_tx_locked(struct kib_conn *conn, int txtype, __u64 cookie) { struct list_head *tmp; list_for_each(tmp, &conn->ibc_active_txs) { - kib_tx_t *tx = list_entry(tmp, kib_tx_t, tx_list); + struct kib_tx *tx = list_entry(tmp, struct kib_tx, tx_list); LASSERT(!tx->tx_queued); LASSERT(tx->tx_sending || tx->tx_waiting); @@ -249,9 +249,9 @@ kiblnd_find_waiting_tx_locked(kib_conn_t *conn, int txtype, __u64 cookie) } static void -kiblnd_handle_completion(kib_conn_t *conn, int txtype, int status, __u64 cookie) +kiblnd_handle_completion(struct kib_conn *conn, int txtype, int status, __u64 cookie) { - kib_tx_t *tx; + struct kib_tx *tx; lnet_ni_t *ni = conn->ibc_peer->ibp_ni; int idle; @@ -287,10 +287,10 @@ kiblnd_handle_completion(kib_conn_t *conn, int txtype, int status, __u64 cookie) } static void -kiblnd_send_completion(kib_conn_t *conn, int type, int status, __u64 cookie) +kiblnd_send_completion(struct kib_conn *conn, int type, int status, __u64 cookie) { lnet_ni_t *ni = conn->ibc_peer->ibp_ni; - kib_tx_t *tx = kiblnd_get_idle_tx(ni, conn->ibc_peer->ibp_nid); + struct kib_tx *tx = kiblnd_get_idle_tx(ni, conn->ibc_peer->ibp_nid); if (!tx) { CERROR("Can't get tx for completion %x for %s\n", @@ -300,19 +300,19 @@ kiblnd_send_completion(kib_conn_t *conn, int type, int status, __u64 cookie) tx->tx_msg->ibm_u.completion.ibcm_status = status; tx->tx_msg->ibm_u.completion.ibcm_cookie = cookie; - kiblnd_init_tx_msg(ni, tx, type, sizeof(kib_completion_msg_t)); + kiblnd_init_tx_msg(ni, tx, type, sizeof(struct kib_completion_msg)); kiblnd_queue_tx(tx, conn); } static void -kiblnd_handle_rx(kib_rx_t *rx) +kiblnd_handle_rx(struct kib_rx *rx) { - kib_msg_t *msg = rx->rx_msg; - kib_conn_t *conn = rx->rx_conn; + struct kib_msg *msg = rx->rx_msg; + struct kib_conn *conn = rx->rx_conn; lnet_ni_t *ni = conn->ibc_peer->ibp_ni; int credits = msg->ibm_credits; - kib_tx_t *tx; + struct kib_tx *tx; int rc = 0; int rc2; int post_credit; @@ -467,12 +467,12 @@ kiblnd_handle_rx(kib_rx_t *rx) } static void -kiblnd_rx_complete(kib_rx_t *rx, int status, int nob) +kiblnd_rx_complete(struct kib_rx *rx, int status, int nob) { - kib_msg_t *msg = rx->rx_msg; - kib_conn_t *conn = rx->rx_conn; + struct kib_msg *msg = rx->rx_msg; + struct kib_conn *conn = rx->rx_conn; lnet_ni_t *ni = conn->ibc_peer->ibp_ni; - kib_net_t *net = ni->ni_data; + struct kib_net *net = ni->ni_data; int rc; int err = -EIO; @@ -561,10 +561,10 @@ kiblnd_kvaddr_to_page(unsigned long vaddr) } static int -kiblnd_fmr_map_tx(kib_net_t *net, kib_tx_t *tx, kib_rdma_desc_t *rd, __u32 nob) +kiblnd_fmr_map_tx(struct kib_net *net, struct kib_tx *tx, struct kib_rdma_desc *rd, __u32 nob) { - kib_hca_dev_t *hdev; - kib_fmr_poolset_t *fps; + struct kib_hca_dev *hdev; + struct kib_fmr_poolset *fps; int cpt; int rc; @@ -593,9 +593,9 @@ kiblnd_fmr_map_tx(kib_net_t *net, kib_tx_t *tx, kib_rdma_desc_t *rd, __u32 nob) return 0; } -static void kiblnd_unmap_tx(lnet_ni_t *ni, kib_tx_t *tx) +static void kiblnd_unmap_tx(lnet_ni_t *ni, struct kib_tx *tx) { - kib_net_t *net = ni->ni_data; + struct kib_net *net = ni->ni_data; LASSERT(net); @@ -609,11 +609,11 @@ static void kiblnd_unmap_tx(lnet_ni_t *ni, kib_tx_t *tx) } } -static int kiblnd_map_tx(lnet_ni_t *ni, kib_tx_t *tx, kib_rdma_desc_t *rd, +static int kiblnd_map_tx(lnet_ni_t *ni, struct kib_tx *tx, struct kib_rdma_desc *rd, int nfrags) { - kib_net_t *net = ni->ni_data; - kib_hca_dev_t *hdev = net->ibn_dev->ibd_hdev; + struct kib_net *net = ni->ni_data; + struct kib_hca_dev *hdev = net->ibn_dev->ibd_hdev; struct ib_mr *mr = NULL; __u32 nob; int i; @@ -651,10 +651,10 @@ static int kiblnd_map_tx(lnet_ni_t *ni, kib_tx_t *tx, kib_rdma_desc_t *rd, } static int -kiblnd_setup_rd_iov(lnet_ni_t *ni, kib_tx_t *tx, kib_rdma_desc_t *rd, +kiblnd_setup_rd_iov(lnet_ni_t *ni, struct kib_tx *tx, struct kib_rdma_desc *rd, unsigned int niov, struct kvec *iov, int offset, int nob) { - kib_net_t *net = ni->ni_data; + struct kib_net *net = ni->ni_data; struct page *page; struct scatterlist *sg; unsigned long vaddr; @@ -708,10 +708,10 @@ kiblnd_setup_rd_iov(lnet_ni_t *ni, kib_tx_t *tx, kib_rdma_desc_t *rd, } static int -kiblnd_setup_rd_kiov(lnet_ni_t *ni, kib_tx_t *tx, kib_rdma_desc_t *rd, +kiblnd_setup_rd_kiov(lnet_ni_t *ni, struct kib_tx *tx, struct kib_rdma_desc *rd, int nkiov, lnet_kiov_t *kiov, int offset, int nob) { - kib_net_t *net = ni->ni_data; + struct kib_net *net = ni->ni_data; struct scatterlist *sg; int fragnob; @@ -752,11 +752,11 @@ kiblnd_setup_rd_kiov(lnet_ni_t *ni, kib_tx_t *tx, kib_rdma_desc_t *rd, } static int -kiblnd_post_tx_locked(kib_conn_t *conn, kib_tx_t *tx, int credit) +kiblnd_post_tx_locked(struct kib_conn *conn, struct kib_tx *tx, int credit) __must_hold(&conn->ibc_lock) { - kib_msg_t *msg = tx->tx_msg; - kib_peer_t *peer = conn->ibc_peer; + struct kib_msg *msg = tx->tx_msg; + struct kib_peer *peer = conn->ibc_peer; struct lnet_ni *ni = peer->ibp_ni; int ver = conn->ibc_version; int rc; @@ -909,11 +909,11 @@ kiblnd_post_tx_locked(kib_conn_t *conn, kib_tx_t *tx, int credit) } static void -kiblnd_check_sends(kib_conn_t *conn) +kiblnd_check_sends(struct kib_conn *conn) { int ver = conn->ibc_version; lnet_ni_t *ni = conn->ibc_peer->ibp_ni; - kib_tx_t *tx; + struct kib_tx *tx; /* Don't send anything until after the connection is established */ if (conn->ibc_state < IBLND_CONN_ESTABLISHED) { @@ -932,7 +932,7 @@ kiblnd_check_sends(kib_conn_t *conn) while (conn->ibc_reserved_credits > 0 && !list_empty(&conn->ibc_tx_queue_rsrvd)) { tx = list_entry(conn->ibc_tx_queue_rsrvd.next, - kib_tx_t, tx_list); + struct kib_tx, tx_list); list_del(&tx->tx_list); list_add_tail(&tx->tx_list, &conn->ibc_tx_queue); conn->ibc_reserved_credits--; @@ -956,16 +956,16 @@ kiblnd_check_sends(kib_conn_t *conn) if (!list_empty(&conn->ibc_tx_queue_nocred)) { credit = 0; tx = list_entry(conn->ibc_tx_queue_nocred.next, - kib_tx_t, tx_list); + struct kib_tx, tx_list); } else if (!list_empty(&conn->ibc_tx_noops)) { LASSERT(!IBLND_OOB_CAPABLE(ver)); credit = 1; tx = list_entry(conn->ibc_tx_noops.next, - kib_tx_t, tx_list); + struct kib_tx, tx_list); } else if (!list_empty(&conn->ibc_tx_queue)) { credit = 1; tx = list_entry(conn->ibc_tx_queue.next, - kib_tx_t, tx_list); + struct kib_tx, tx_list); } else { break; } @@ -978,10 +978,10 @@ kiblnd_check_sends(kib_conn_t *conn) } static void -kiblnd_tx_complete(kib_tx_t *tx, int status) +kiblnd_tx_complete(struct kib_tx *tx, int status) { int failed = (status != IB_WC_SUCCESS); - kib_conn_t *conn = tx->tx_conn; + struct kib_conn *conn = tx->tx_conn; int idle; LASSERT(tx->tx_sending > 0); @@ -1033,12 +1033,12 @@ kiblnd_tx_complete(kib_tx_t *tx, int status) } static void -kiblnd_init_tx_msg(lnet_ni_t *ni, kib_tx_t *tx, int type, int body_nob) +kiblnd_init_tx_msg(lnet_ni_t *ni, struct kib_tx *tx, int type, int body_nob) { - kib_hca_dev_t *hdev = tx->tx_pool->tpo_hdev; + struct kib_hca_dev *hdev = tx->tx_pool->tpo_hdev; struct ib_sge *sge = &tx->tx_sge[tx->tx_nwrq]; struct ib_rdma_wr *wrq = &tx->tx_wrq[tx->tx_nwrq]; - int nob = offsetof(kib_msg_t, ibm_u) + body_nob; + int nob = offsetof(struct kib_msg, ibm_u) + body_nob; struct ib_mr *mr = hdev->ibh_mrs; LASSERT(tx->tx_nwrq >= 0); @@ -1065,11 +1065,11 @@ kiblnd_init_tx_msg(lnet_ni_t *ni, kib_tx_t *tx, int type, int body_nob) } static int -kiblnd_init_rdma(kib_conn_t *conn, kib_tx_t *tx, int type, - int resid, kib_rdma_desc_t *dstrd, __u64 dstcookie) +kiblnd_init_rdma(struct kib_conn *conn, struct kib_tx *tx, int type, + int resid, struct kib_rdma_desc *dstrd, __u64 dstcookie) { - kib_msg_t *ibmsg = tx->tx_msg; - kib_rdma_desc_t *srcrd = tx->tx_rd; + struct kib_msg *ibmsg = tx->tx_msg; + struct kib_rdma_desc *srcrd = tx->tx_rd; struct ib_sge *sge = &tx->tx_sge[0]; struct ib_rdma_wr *wrq, *next; int rc = resid; @@ -1143,13 +1143,13 @@ kiblnd_init_rdma(kib_conn_t *conn, kib_tx_t *tx, int type, ibmsg->ibm_u.completion.ibcm_status = rc; ibmsg->ibm_u.completion.ibcm_cookie = dstcookie; kiblnd_init_tx_msg(conn->ibc_peer->ibp_ni, tx, - type, sizeof(kib_completion_msg_t)); + type, sizeof(struct kib_completion_msg)); return rc; } static void -kiblnd_queue_tx_locked(kib_tx_t *tx, kib_conn_t *conn) +kiblnd_queue_tx_locked(struct kib_tx *tx, struct kib_conn *conn) { struct list_head *q; @@ -1204,7 +1204,7 @@ kiblnd_queue_tx_locked(kib_tx_t *tx, kib_conn_t *conn) } static void -kiblnd_queue_tx(kib_tx_t *tx, kib_conn_t *conn) +kiblnd_queue_tx(struct kib_tx *tx, struct kib_conn *conn) { spin_lock(&conn->ibc_lock); kiblnd_queue_tx_locked(tx, conn); @@ -1251,11 +1251,11 @@ static int kiblnd_resolve_addr(struct rdma_cm_id *cmid, } static void -kiblnd_connect_peer(kib_peer_t *peer) +kiblnd_connect_peer(struct kib_peer *peer) { struct rdma_cm_id *cmid; - kib_dev_t *dev; - kib_net_t *net = peer->ibp_ni->ni_data; + struct kib_dev *dev; + struct kib_net *net = peer->ibp_ni->ni_data; struct sockaddr_in srcaddr; struct sockaddr_in dstaddr; int rc; @@ -1319,7 +1319,7 @@ kiblnd_connect_peer(kib_peer_t *peer) } bool -kiblnd_reconnect_peer(kib_peer_t *peer) +kiblnd_reconnect_peer(struct kib_peer *peer) { rwlock_t *glock = &kiblnd_data.kib_global_lock; char *reason = NULL; @@ -1369,11 +1369,11 @@ no_reconnect: } void -kiblnd_launch_tx(lnet_ni_t *ni, kib_tx_t *tx, lnet_nid_t nid) +kiblnd_launch_tx(lnet_ni_t *ni, struct kib_tx *tx, lnet_nid_t nid) { - kib_peer_t *peer; - kib_peer_t *peer2; - kib_conn_t *conn; + struct kib_peer *peer; + struct kib_peer *peer2; + struct kib_conn *conn; rwlock_t *g_lock = &kiblnd_data.kib_global_lock; unsigned long flags; int rc; @@ -1476,7 +1476,7 @@ kiblnd_launch_tx(lnet_ni_t *ni, kib_tx_t *tx, lnet_nid_t nid) peer->ibp_connecting = 1; /* always called with a ref on ni, which prevents ni being shutdown */ - LASSERT(!((kib_net_t *)ni->ni_data)->ibn_shutdown); + LASSERT(!((struct kib_net *)ni->ni_data)->ibn_shutdown); if (tx) list_add_tail(&tx->tx_list, &peer->ibp_tx_queue); @@ -1503,9 +1503,9 @@ kiblnd_send(lnet_ni_t *ni, void *private, lnet_msg_t *lntmsg) lnet_kiov_t *payload_kiov = lntmsg->msg_kiov; unsigned int payload_offset = lntmsg->msg_offset; unsigned int payload_nob = lntmsg->msg_len; - kib_msg_t *ibmsg; - kib_rdma_desc_t *rd; - kib_tx_t *tx; + struct kib_msg *ibmsg; + struct kib_rdma_desc *rd; + struct kib_tx *tx; int nob; int rc; @@ -1536,7 +1536,7 @@ kiblnd_send(lnet_ni_t *ni, void *private, lnet_msg_t *lntmsg) break; /* send IMMEDIATE */ /* is the REPLY message too small for RDMA? */ - nob = offsetof(kib_msg_t, ibm_u.immediate.ibim_payload[lntmsg->msg_md->md_length]); + nob = offsetof(struct kib_msg, ibm_u.immediate.ibim_payload[lntmsg->msg_md->md_length]); if (nob <= IBLND_MSG_SIZE) break; /* send IMMEDIATE */ @@ -1566,7 +1566,7 @@ kiblnd_send(lnet_ni_t *ni, void *private, lnet_msg_t *lntmsg) return -EIO; } - nob = offsetof(kib_get_msg_t, ibgm_rd.rd_frags[rd->rd_nfrags]); + nob = offsetof(struct kib_get_msg, ibgm_rd.rd_frags[rd->rd_nfrags]); ibmsg->ibm_u.get.ibgm_cookie = tx->tx_cookie; ibmsg->ibm_u.get.ibgm_hdr = *hdr; @@ -1588,7 +1588,7 @@ kiblnd_send(lnet_ni_t *ni, void *private, lnet_msg_t *lntmsg) case LNET_MSG_REPLY: case LNET_MSG_PUT: /* Is the payload small enough not to need RDMA? */ - nob = offsetof(kib_msg_t, ibm_u.immediate.ibim_payload[payload_nob]); + nob = offsetof(struct kib_msg, ibm_u.immediate.ibim_payload[payload_nob]); if (nob <= IBLND_MSG_SIZE) break; /* send IMMEDIATE */ @@ -1618,7 +1618,7 @@ kiblnd_send(lnet_ni_t *ni, void *private, lnet_msg_t *lntmsg) ibmsg = tx->tx_msg; ibmsg->ibm_u.putreq.ibprm_hdr = *hdr; ibmsg->ibm_u.putreq.ibprm_cookie = tx->tx_cookie; - kiblnd_init_tx_msg(ni, tx, IBLND_MSG_PUT_REQ, sizeof(kib_putreq_msg_t)); + kiblnd_init_tx_msg(ni, tx, IBLND_MSG_PUT_REQ, sizeof(struct kib_putreq_msg)); tx->tx_lntmsg[0] = lntmsg; /* finalise lntmsg on completion */ tx->tx_waiting = 1; /* waiting for PUT_{ACK,NAK} */ @@ -1628,7 +1628,7 @@ kiblnd_send(lnet_ni_t *ni, void *private, lnet_msg_t *lntmsg) /* send IMMEDIATE */ - LASSERT(offsetof(kib_msg_t, ibm_u.immediate.ibim_payload[payload_nob]) + LASSERT(offsetof(struct kib_msg, ibm_u.immediate.ibim_payload[payload_nob]) <= IBLND_MSG_SIZE); tx = kiblnd_get_idle_tx(ni, target.nid); @@ -1643,16 +1643,16 @@ kiblnd_send(lnet_ni_t *ni, void *private, lnet_msg_t *lntmsg) if (payload_kiov) lnet_copy_kiov2flat(IBLND_MSG_SIZE, ibmsg, - offsetof(kib_msg_t, ibm_u.immediate.ibim_payload), + offsetof(struct kib_msg, ibm_u.immediate.ibim_payload), payload_niov, payload_kiov, payload_offset, payload_nob); else lnet_copy_iov2flat(IBLND_MSG_SIZE, ibmsg, - offsetof(kib_msg_t, ibm_u.immediate.ibim_payload), + offsetof(struct kib_msg, ibm_u.immediate.ibim_payload), payload_niov, payload_iov, payload_offset, payload_nob); - nob = offsetof(kib_immediate_msg_t, ibim_payload[payload_nob]); + nob = offsetof(struct kib_immediate_msg, ibim_payload[payload_nob]); kiblnd_init_tx_msg(ni, tx, IBLND_MSG_IMMEDIATE, nob); tx->tx_lntmsg[0] = lntmsg; /* finalise lntmsg on completion */ @@ -1661,7 +1661,7 @@ kiblnd_send(lnet_ni_t *ni, void *private, lnet_msg_t *lntmsg) } static void -kiblnd_reply(lnet_ni_t *ni, kib_rx_t *rx, lnet_msg_t *lntmsg) +kiblnd_reply(lnet_ni_t *ni, struct kib_rx *rx, lnet_msg_t *lntmsg) { lnet_process_id_t target = lntmsg->msg_target; unsigned int niov = lntmsg->msg_niov; @@ -1669,7 +1669,7 @@ kiblnd_reply(lnet_ni_t *ni, kib_rx_t *rx, lnet_msg_t *lntmsg) lnet_kiov_t *kiov = lntmsg->msg_kiov; unsigned int offset = lntmsg->msg_offset; unsigned int nob = lntmsg->msg_len; - kib_tx_t *tx; + struct kib_tx *tx; int rc; tx = kiblnd_get_idle_tx(ni, rx->rx_conn->ibc_peer->ibp_nid); @@ -1726,10 +1726,10 @@ kiblnd_recv(lnet_ni_t *ni, void *private, lnet_msg_t *lntmsg, int delayed, unsigned int niov, struct kvec *iov, lnet_kiov_t *kiov, unsigned int offset, unsigned int mlen, unsigned int rlen) { - kib_rx_t *rx = private; - kib_msg_t *rxmsg = rx->rx_msg; - kib_conn_t *conn = rx->rx_conn; - kib_tx_t *tx; + struct kib_rx *rx = private; + struct kib_msg *rxmsg = rx->rx_msg; + struct kib_conn *conn = rx->rx_conn; + struct kib_tx *tx; int nob; int post_credit = IBLND_POSTRX_PEER_CREDIT; int rc = 0; @@ -1744,7 +1744,7 @@ kiblnd_recv(lnet_ni_t *ni, void *private, lnet_msg_t *lntmsg, int delayed, LBUG(); case IBLND_MSG_IMMEDIATE: - nob = offsetof(kib_msg_t, ibm_u.immediate.ibim_payload[rlen]); + nob = offsetof(struct kib_msg, ibm_u.immediate.ibim_payload[rlen]); if (nob > rx->rx_nob) { CERROR("Immediate message from %s too big: %d(%d)\n", libcfs_nid2str(rxmsg->ibm_u.immediate.ibim_hdr.src_nid), @@ -1756,19 +1756,19 @@ kiblnd_recv(lnet_ni_t *ni, void *private, lnet_msg_t *lntmsg, int delayed, if (kiov) lnet_copy_flat2kiov(niov, kiov, offset, IBLND_MSG_SIZE, rxmsg, - offsetof(kib_msg_t, ibm_u.immediate.ibim_payload), + offsetof(struct kib_msg, ibm_u.immediate.ibim_payload), mlen); else lnet_copy_flat2iov(niov, iov, offset, IBLND_MSG_SIZE, rxmsg, - offsetof(kib_msg_t, ibm_u.immediate.ibim_payload), + offsetof(struct kib_msg, ibm_u.immediate.ibim_payload), mlen); lnet_finalize(ni, lntmsg, 0); break; case IBLND_MSG_PUT_REQ: { - kib_msg_t *txmsg; - kib_rdma_desc_t *rd; + struct kib_msg *txmsg; + struct kib_rdma_desc *rd; if (!mlen) { lnet_finalize(ni, lntmsg, 0); @@ -1804,7 +1804,7 @@ kiblnd_recv(lnet_ni_t *ni, void *private, lnet_msg_t *lntmsg, int delayed, break; } - nob = offsetof(kib_putack_msg_t, ibpam_rd.rd_frags[rd->rd_nfrags]); + nob = offsetof(struct kib_putack_msg, ibpam_rd.rd_frags[rd->rd_nfrags]); txmsg->ibm_u.putack.ibpam_src_cookie = rxmsg->ibm_u.putreq.ibprm_cookie; txmsg->ibm_u.putack.ibpam_dst_cookie = tx->tx_cookie; @@ -1855,7 +1855,7 @@ kiblnd_thread_fini(void) } static void -kiblnd_peer_alive(kib_peer_t *peer) +kiblnd_peer_alive(struct kib_peer *peer) { /* This is racy, but everyone's only writing cfs_time_current() */ peer->ibp_last_alive = cfs_time_current(); @@ -1863,7 +1863,7 @@ kiblnd_peer_alive(kib_peer_t *peer) } static void -kiblnd_peer_notify(kib_peer_t *peer) +kiblnd_peer_notify(struct kib_peer *peer) { int error = 0; unsigned long last_alive = 0; @@ -1886,7 +1886,7 @@ kiblnd_peer_notify(kib_peer_t *peer) } void -kiblnd_close_conn_locked(kib_conn_t *conn, int error) +kiblnd_close_conn_locked(struct kib_conn *conn, int error) { /* * This just does the immediate housekeeping. 'error' is zero for a @@ -1896,8 +1896,8 @@ kiblnd_close_conn_locked(kib_conn_t *conn, int error) * already dealing with it (either to set it up or tear it down). * Caller holds kib_global_lock exclusively in irq context */ - kib_peer_t *peer = conn->ibc_peer; - kib_dev_t *dev; + struct kib_peer *peer = conn->ibc_peer; + struct kib_dev *dev; unsigned long flags; LASSERT(error || conn->ibc_state >= IBLND_CONN_ESTABLISHED); @@ -1926,7 +1926,7 @@ kiblnd_close_conn_locked(kib_conn_t *conn, int error) list_empty(&conn->ibc_active_txs) ? "" : "(waiting)"); } - dev = ((kib_net_t *)peer->ibp_ni->ni_data)->ibn_dev; + dev = ((struct kib_net *)peer->ibp_ni->ni_data)->ibn_dev; list_del(&conn->ibc_list); /* connd (see below) takes over ibc_list's ref */ @@ -1956,7 +1956,7 @@ kiblnd_close_conn_locked(kib_conn_t *conn, int error) } void -kiblnd_close_conn(kib_conn_t *conn, int error) +kiblnd_close_conn(struct kib_conn *conn, int error) { unsigned long flags; @@ -1968,11 +1968,11 @@ kiblnd_close_conn(kib_conn_t *conn, int error) } static void -kiblnd_handle_early_rxs(kib_conn_t *conn) +kiblnd_handle_early_rxs(struct kib_conn *conn) { unsigned long flags; - kib_rx_t *rx; - kib_rx_t *tmp; + struct kib_rx *rx; + struct kib_rx *tmp; LASSERT(!in_interrupt()); LASSERT(conn->ibc_state >= IBLND_CONN_ESTABLISHED); @@ -1990,17 +1990,17 @@ kiblnd_handle_early_rxs(kib_conn_t *conn) } static void -kiblnd_abort_txs(kib_conn_t *conn, struct list_head *txs) +kiblnd_abort_txs(struct kib_conn *conn, struct list_head *txs) { LIST_HEAD(zombies); struct list_head *tmp; struct list_head *nxt; - kib_tx_t *tx; + struct kib_tx *tx; spin_lock(&conn->ibc_lock); list_for_each_safe(tmp, nxt, txs) { - tx = list_entry(tmp, kib_tx_t, tx_list); + tx = list_entry(tmp, struct kib_tx, tx_list); if (txs == &conn->ibc_active_txs) { LASSERT(!tx->tx_queued); @@ -2025,7 +2025,7 @@ kiblnd_abort_txs(kib_conn_t *conn, struct list_head *txs) } static void -kiblnd_finalise_conn(kib_conn_t *conn) +kiblnd_finalise_conn(struct kib_conn *conn) { LASSERT(!in_interrupt()); LASSERT(conn->ibc_state > IBLND_CONN_INIT); @@ -2053,7 +2053,7 @@ kiblnd_finalise_conn(kib_conn_t *conn) } static void -kiblnd_peer_connect_failed(kib_peer_t *peer, int active, int error) +kiblnd_peer_connect_failed(struct kib_peer *peer, int active, int error) { LIST_HEAD(zombies); unsigned long flags; @@ -2107,11 +2107,11 @@ kiblnd_peer_connect_failed(kib_peer_t *peer, int active, int error) } static void -kiblnd_connreq_done(kib_conn_t *conn, int status) +kiblnd_connreq_done(struct kib_conn *conn, int status) { - kib_peer_t *peer = conn->ibc_peer; - kib_tx_t *tx; - kib_tx_t *tmp; + struct kib_peer *peer = conn->ibc_peer; + struct kib_tx *tx; + struct kib_tx *tmp; struct list_head txs; unsigned long flags; int active; @@ -2217,7 +2217,7 @@ kiblnd_connreq_done(kib_conn_t *conn, int status) } static void -kiblnd_reject(struct rdma_cm_id *cmid, kib_rej_t *rej) +kiblnd_reject(struct rdma_cm_id *cmid, struct kib_rej *rej) { int rc; @@ -2231,17 +2231,17 @@ static int kiblnd_passive_connect(struct rdma_cm_id *cmid, void *priv, int priv_nob) { rwlock_t *g_lock = &kiblnd_data.kib_global_lock; - kib_msg_t *reqmsg = priv; - kib_msg_t *ackmsg; - kib_dev_t *ibdev; - kib_peer_t *peer; - kib_peer_t *peer2; - kib_conn_t *conn; + struct kib_msg *reqmsg = priv; + struct kib_msg *ackmsg; + struct kib_dev *ibdev; + struct kib_peer *peer; + struct kib_peer *peer2; + struct kib_conn *conn; lnet_ni_t *ni = NULL; - kib_net_t *net = NULL; + struct kib_net *net = NULL; lnet_nid_t nid; struct rdma_conn_param cp; - kib_rej_t rej; + struct kib_rej rej; int version = IBLND_MSG_VERSION; unsigned long flags; int rc; @@ -2250,7 +2250,7 @@ kiblnd_passive_connect(struct rdma_cm_id *cmid, void *priv, int priv_nob) LASSERT(!in_interrupt()); /* cmid inherits 'context' from the corresponding listener id */ - ibdev = (kib_dev_t *)cmid->context; + ibdev = (struct kib_dev *)cmid->context; LASSERT(ibdev); memset(&rej, 0, sizeof(rej)); @@ -2268,7 +2268,7 @@ kiblnd_passive_connect(struct rdma_cm_id *cmid, void *priv, int priv_nob) goto failed; } - if (priv_nob < offsetof(kib_msg_t, ibm_type)) { + if (priv_nob < offsetof(struct kib_msg, ibm_type)) { CERROR("Short connection request\n"); goto failed; } @@ -2303,7 +2303,7 @@ kiblnd_passive_connect(struct rdma_cm_id *cmid, void *priv, int priv_nob) ni = lnet_net2ni(LNET_NIDNET(reqmsg->ibm_dstnid)); if (ni) { - net = (kib_net_t *)ni->ni_data; + net = (struct kib_net *)ni->ni_data; rej.ibr_incarnation = net->ibn_incarnation; } @@ -2541,11 +2541,11 @@ kiblnd_passive_connect(struct rdma_cm_id *cmid, void *priv, int priv_nob) } static void -kiblnd_check_reconnect(kib_conn_t *conn, int version, - __u64 incarnation, int why, kib_connparams_t *cp) +kiblnd_check_reconnect(struct kib_conn *conn, int version, + __u64 incarnation, int why, struct kib_connparams *cp) { rwlock_t *glock = &kiblnd_data.kib_global_lock; - kib_peer_t *peer = conn->ibc_peer; + struct kib_peer *peer = conn->ibc_peer; char *reason; int msg_size = IBLND_MSG_SIZE; int frag_num = -1; @@ -2654,9 +2654,9 @@ out: } static void -kiblnd_rejected(kib_conn_t *conn, int reason, void *priv, int priv_nob) +kiblnd_rejected(struct kib_conn *conn, int reason, void *priv, int priv_nob) { - kib_peer_t *peer = conn->ibc_peer; + struct kib_peer *peer = conn->ibc_peer; LASSERT(!in_interrupt()); LASSERT(conn->ibc_state == IBLND_CONN_ACTIVE_CONNECT); @@ -2674,9 +2674,9 @@ kiblnd_rejected(kib_conn_t *conn, int reason, void *priv, int priv_nob) break; case IB_CM_REJ_CONSUMER_DEFINED: - if (priv_nob >= offsetof(kib_rej_t, ibr_padding)) { - kib_rej_t *rej = priv; - kib_connparams_t *cp = NULL; + if (priv_nob >= offsetof(struct kib_rej, ibr_padding)) { + struct kib_rej *rej = priv; + struct kib_connparams *cp = NULL; int flip = 0; __u64 incarnation = -1; @@ -2699,7 +2699,7 @@ kiblnd_rejected(kib_conn_t *conn, int reason, void *priv, int priv_nob) flip = 1; } - if (priv_nob >= sizeof(kib_rej_t) && + if (priv_nob >= sizeof(struct kib_rej) && rej->ibr_version > IBLND_MSG_VERSION_1) { /* * priv_nob is always 148 in current version @@ -2782,12 +2782,12 @@ kiblnd_rejected(kib_conn_t *conn, int reason, void *priv, int priv_nob) } static void -kiblnd_check_connreply(kib_conn_t *conn, void *priv, int priv_nob) +kiblnd_check_connreply(struct kib_conn *conn, void *priv, int priv_nob) { - kib_peer_t *peer = conn->ibc_peer; + struct kib_peer *peer = conn->ibc_peer; lnet_ni_t *ni = peer->ibp_ni; - kib_net_t *net = ni->ni_data; - kib_msg_t *msg = priv; + struct kib_net *net = ni->ni_data; + struct kib_msg *msg = priv; int ver = conn->ibc_version; int rc = kiblnd_unpack_msg(msg, priv_nob); unsigned long flags; @@ -2884,9 +2884,9 @@ kiblnd_check_connreply(kib_conn_t *conn, void *priv, int priv_nob) static int kiblnd_active_connect(struct rdma_cm_id *cmid) { - kib_peer_t *peer = (kib_peer_t *)cmid->context; - kib_conn_t *conn; - kib_msg_t *msg; + struct kib_peer *peer = (struct kib_peer *)cmid->context; + struct kib_conn *conn; + struct kib_msg *msg; struct rdma_conn_param cp; int version; __u64 incarnation; @@ -2951,8 +2951,8 @@ kiblnd_active_connect(struct rdma_cm_id *cmid) int kiblnd_cm_callback(struct rdma_cm_id *cmid, struct rdma_cm_event *event) { - kib_peer_t *peer; - kib_conn_t *conn; + struct kib_peer *peer; + struct kib_conn *conn; int rc; switch (event->event) { @@ -2970,7 +2970,7 @@ kiblnd_cm_callback(struct rdma_cm_id *cmid, struct rdma_cm_event *event) return rc; case RDMA_CM_EVENT_ADDR_ERROR: - peer = (kib_peer_t *)cmid->context; + peer = (struct kib_peer *)cmid->context; CNETERR("%s: ADDR ERROR %d\n", libcfs_nid2str(peer->ibp_nid), event->status); kiblnd_peer_connect_failed(peer, 1, -EHOSTUNREACH); @@ -2978,7 +2978,7 @@ kiblnd_cm_callback(struct rdma_cm_id *cmid, struct rdma_cm_event *event) return -EHOSTUNREACH; /* rc destroys cmid */ case RDMA_CM_EVENT_ADDR_RESOLVED: - peer = (kib_peer_t *)cmid->context; + peer = (struct kib_peer *)cmid->context; CDEBUG(D_NET, "%s Addr resolved: %d\n", libcfs_nid2str(peer->ibp_nid), event->status); @@ -3001,7 +3001,7 @@ kiblnd_cm_callback(struct rdma_cm_id *cmid, struct rdma_cm_event *event) return rc; /* rc destroys cmid */ case RDMA_CM_EVENT_ROUTE_ERROR: - peer = (kib_peer_t *)cmid->context; + peer = (struct kib_peer *)cmid->context; CNETERR("%s: ROUTE ERROR %d\n", libcfs_nid2str(peer->ibp_nid), event->status); kiblnd_peer_connect_failed(peer, 1, -EHOSTUNREACH); @@ -3009,7 +3009,7 @@ kiblnd_cm_callback(struct rdma_cm_id *cmid, struct rdma_cm_event *event) return -EHOSTUNREACH; /* rc destroys cmid */ case RDMA_CM_EVENT_ROUTE_RESOLVED: - peer = (kib_peer_t *)cmid->context; + peer = (struct kib_peer *)cmid->context; CDEBUG(D_NET, "%s Route resolved: %d\n", libcfs_nid2str(peer->ibp_nid), event->status); @@ -3023,7 +3023,7 @@ kiblnd_cm_callback(struct rdma_cm_id *cmid, struct rdma_cm_event *event) return event->status; /* rc destroys cmid */ case RDMA_CM_EVENT_UNREACHABLE: - conn = (kib_conn_t *)cmid->context; + conn = (struct kib_conn *)cmid->context; LASSERT(conn->ibc_state == IBLND_CONN_ACTIVE_CONNECT || conn->ibc_state == IBLND_CONN_PASSIVE_WAIT); CNETERR("%s: UNREACHABLE %d\n", @@ -3033,7 +3033,7 @@ kiblnd_cm_callback(struct rdma_cm_id *cmid, struct rdma_cm_event *event) return 0; case RDMA_CM_EVENT_CONNECT_ERROR: - conn = (kib_conn_t *)cmid->context; + conn = (struct kib_conn *)cmid->context; LASSERT(conn->ibc_state == IBLND_CONN_ACTIVE_CONNECT || conn->ibc_state == IBLND_CONN_PASSIVE_WAIT); CNETERR("%s: CONNECT ERROR %d\n", @@ -3043,7 +3043,7 @@ kiblnd_cm_callback(struct rdma_cm_id *cmid, struct rdma_cm_event *event) return 0; case RDMA_CM_EVENT_REJECTED: - conn = (kib_conn_t *)cmid->context; + conn = (struct kib_conn *)cmid->context; switch (conn->ibc_state) { default: LBUG(); @@ -3065,7 +3065,7 @@ kiblnd_cm_callback(struct rdma_cm_id *cmid, struct rdma_cm_event *event) return 0; case RDMA_CM_EVENT_ESTABLISHED: - conn = (kib_conn_t *)cmid->context; + conn = (struct kib_conn *)cmid->context; switch (conn->ibc_state) { default: LBUG(); @@ -3091,7 +3091,7 @@ kiblnd_cm_callback(struct rdma_cm_id *cmid, struct rdma_cm_event *event) CDEBUG(D_NET, "Ignore TIMEWAIT_EXIT event\n"); return 0; case RDMA_CM_EVENT_DISCONNECTED: - conn = (kib_conn_t *)cmid->context; + conn = (struct kib_conn *)cmid->context; if (conn->ibc_state < IBLND_CONN_ESTABLISHED) { CERROR("%s DISCONNECTED\n", libcfs_nid2str(conn->ibc_peer->ibp_nid)); @@ -3120,13 +3120,13 @@ kiblnd_cm_callback(struct rdma_cm_id *cmid, struct rdma_cm_event *event) } static int -kiblnd_check_txs_locked(kib_conn_t *conn, struct list_head *txs) +kiblnd_check_txs_locked(struct kib_conn *conn, struct list_head *txs) { - kib_tx_t *tx; + struct kib_tx *tx; struct list_head *ttmp; list_for_each(ttmp, txs) { - tx = list_entry(ttmp, kib_tx_t, tx_list); + tx = list_entry(ttmp, struct kib_tx, tx_list); if (txs != &conn->ibc_active_txs) { LASSERT(tx->tx_queued); @@ -3147,7 +3147,7 @@ kiblnd_check_txs_locked(kib_conn_t *conn, struct list_head *txs) } static int -kiblnd_conn_timed_out_locked(kib_conn_t *conn) +kiblnd_conn_timed_out_locked(struct kib_conn *conn) { return kiblnd_check_txs_locked(conn, &conn->ibc_tx_queue) || kiblnd_check_txs_locked(conn, &conn->ibc_tx_noops) || @@ -3163,10 +3163,10 @@ kiblnd_check_conns(int idx) LIST_HEAD(checksends); struct list_head *peers = &kiblnd_data.kib_peers[idx]; struct list_head *ptmp; - kib_peer_t *peer; - kib_conn_t *conn; - kib_conn_t *temp; - kib_conn_t *tmp; + struct kib_peer *peer; + struct kib_conn *conn; + struct kib_conn *temp; + struct kib_conn *tmp; struct list_head *ctmp; unsigned long flags; @@ -3178,13 +3178,13 @@ kiblnd_check_conns(int idx) read_lock_irqsave(&kiblnd_data.kib_global_lock, flags); list_for_each(ptmp, peers) { - peer = list_entry(ptmp, kib_peer_t, ibp_list); + peer = list_entry(ptmp, struct kib_peer, ibp_list); list_for_each(ctmp, &peer->ibp_conns) { int timedout; int sendnoop; - conn = list_entry(ctmp, kib_conn_t, ibc_list); + conn = list_entry(ctmp, struct kib_conn, ibc_list); LASSERT(conn->ibc_state == IBLND_CONN_ESTABLISHED); @@ -3242,7 +3242,7 @@ kiblnd_check_conns(int idx) } static void -kiblnd_disconnect_conn(kib_conn_t *conn) +kiblnd_disconnect_conn(struct kib_conn *conn) { LASSERT(!in_interrupt()); LASSERT(current == kiblnd_data.kib_connd); @@ -3271,7 +3271,7 @@ kiblnd_connd(void *arg) spinlock_t *lock= &kiblnd_data.kib_connd_lock; wait_queue_t wait; unsigned long flags; - kib_conn_t *conn; + struct kib_conn *conn; int timeout; int i; int dropped_lock; @@ -3291,10 +3291,10 @@ kiblnd_connd(void *arg) dropped_lock = 0; if (!list_empty(&kiblnd_data.kib_connd_zombies)) { - kib_peer_t *peer = NULL; + struct kib_peer *peer = NULL; conn = list_entry(kiblnd_data.kib_connd_zombies.next, - kib_conn_t, ibc_list); + struct kib_conn, ibc_list); list_del(&conn->ibc_list); if (conn->ibc_reconnect) { peer = conn->ibc_peer; @@ -3321,7 +3321,7 @@ kiblnd_connd(void *arg) if (!list_empty(&kiblnd_data.kib_connd_conns)) { conn = list_entry(kiblnd_data.kib_connd_conns.next, - kib_conn_t, ibc_list); + struct kib_conn, ibc_list); list_del(&conn->ibc_list); spin_unlock_irqrestore(lock, flags); @@ -3345,7 +3345,7 @@ kiblnd_connd(void *arg) break; conn = list_entry(kiblnd_data.kib_reconn_list.next, - kib_conn_t, ibc_list); + struct kib_conn, ibc_list); list_del(&conn->ibc_list); spin_unlock_irqrestore(lock, flags); @@ -3416,7 +3416,7 @@ kiblnd_connd(void *arg) void kiblnd_qp_event(struct ib_event *event, void *arg) { - kib_conn_t *conn = arg; + struct kib_conn *conn = arg; switch (event->event) { case IB_EVENT_COMM_EST: @@ -3478,7 +3478,7 @@ kiblnd_cq_completion(struct ib_cq *cq, void *arg) * occurred. But in this case, !ibc_nrx && !ibc_nsends_posted * and this CQ is about to be destroyed so I NOOP. */ - kib_conn_t *conn = arg; + struct kib_conn *conn = arg; struct kib_sched_info *sched = conn->ibc_sched; unsigned long flags; @@ -3505,7 +3505,7 @@ kiblnd_cq_completion(struct ib_cq *cq, void *arg) void kiblnd_cq_event(struct ib_event *event, void *arg) { - kib_conn_t *conn = arg; + struct kib_conn *conn = arg; CERROR("%s: async CQ event type %d\n", libcfs_nid2str(conn->ibc_peer->ibp_nid), event->event); @@ -3516,7 +3516,7 @@ kiblnd_scheduler(void *arg) { long id = (long)arg; struct kib_sched_info *sched; - kib_conn_t *conn; + struct kib_conn *conn; wait_queue_t wait; unsigned long flags; struct ib_wc wc; @@ -3551,7 +3551,7 @@ kiblnd_scheduler(void *arg) did_something = 0; if (!list_empty(&sched->ibs_conns)) { - conn = list_entry(sched->ibs_conns.next, kib_conn_t, + conn = list_entry(sched->ibs_conns.next, struct kib_conn, ibc_sched_list); /* take over kib_sched_conns' ref on conn... */ LASSERT(conn->ibc_scheduled); @@ -3651,7 +3651,7 @@ int kiblnd_failover_thread(void *arg) { rwlock_t *glock = &kiblnd_data.kib_global_lock; - kib_dev_t *dev; + struct kib_dev *dev; wait_queue_t wait; unsigned long flags; int rc; diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_modparams.c b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_modparams.c index f8fdd4a..fdc2f3b 100644 --- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_modparams.c +++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_modparams.c @@ -145,7 +145,7 @@ static int use_privileged_port = 1; module_param(use_privileged_port, int, 0644); MODULE_PARM_DESC(use_privileged_port, "use privileged port when initiating connection"); -kib_tunables_t kiblnd_tunables = { +struct kib_tunables kiblnd_tunables = { .kib_dev_failover = &dev_failover, .kib_service = &service, .kib_cksum = &cksum, -- 1.7.1 From jsimmons at infradead.org Fri Jun 10 20:14:23 2016 From: jsimmons at infradead.org (James Simmons) Date: Fri, 10 Jun 2016 16:14:23 -0400 Subject: [lustre-devel] [PATCH] staging: lustre: socklnd: remove typedefs Message-ID: <1465589663-22408-1-git-send-email-jsimmons@infradead.org> Remove all remaining typedefs in socklnd driver. Signed-off-by: James Simmons --- .../staging/lustre/lnet/klnds/socklnd/socklnd.c | 302 ++++++++++---------- .../staging/lustre/lnet/klnds/socklnd/socklnd.h | 209 +++++++------- .../staging/lustre/lnet/klnds/socklnd/socklnd_cb.c | 200 +++++++------- .../lustre/lnet/klnds/socklnd/socklnd_lib.c | 34 ++-- .../lustre/lnet/klnds/socklnd/socklnd_modparams.c | 2 +- .../lustre/lnet/klnds/socklnd/socklnd_proto.c | 68 +++--- 6 files changed, 406 insertions(+), 409 deletions(-) diff --git a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c index 406c0e7..0fdc37c 100644 --- a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c +++ b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c @@ -44,14 +44,14 @@ #include "socklnd.h" static lnd_t the_ksocklnd; -ksock_nal_data_t ksocknal_data; +struct ksock_nal_data ksocknal_data; -static ksock_interface_t * +static struct ksock_interface * ksocknal_ip2iface(lnet_ni_t *ni, __u32 ip) { - ksock_net_t *net = ni->ni_data; + struct ksock_net *net = ni->ni_data; int i; - ksock_interface_t *iface; + struct ksock_interface *iface; for (i = 0; i < net->ksnn_ninterfaces; i++) { LASSERT(i < LNET_MAX_INTERFACES); @@ -64,10 +64,10 @@ ksocknal_ip2iface(lnet_ni_t *ni, __u32 ip) return NULL; } -static ksock_route_t * +static struct ksock_route * ksocknal_create_route(__u32 ipaddr, int port) { - ksock_route_t *route; + struct ksock_route *route; LIBCFS_ALLOC(route, sizeof(*route)); if (!route) @@ -89,7 +89,7 @@ ksocknal_create_route(__u32 ipaddr, int port) } void -ksocknal_destroy_route(ksock_route_t *route) +ksocknal_destroy_route(struct ksock_route *route) { LASSERT(!atomic_read(&route->ksnr_refcount)); @@ -100,11 +100,11 @@ ksocknal_destroy_route(ksock_route_t *route) } static int -ksocknal_create_peer(ksock_peer_t **peerp, lnet_ni_t *ni, lnet_process_id_t id) +ksocknal_create_peer(struct ksock_peer **peerp, lnet_ni_t *ni, lnet_process_id_t id) { int cpt = lnet_cpt_of_nid(id.nid); - ksock_net_t *net = ni->ni_data; - ksock_peer_t *peer; + struct ksock_net *net = ni->ni_data; + struct ksock_peer *peer; LASSERT(id.nid != LNET_NID_ANY); LASSERT(id.pid != LNET_PID_ANY); @@ -148,9 +148,9 @@ ksocknal_create_peer(ksock_peer_t **peerp, lnet_ni_t *ni, lnet_process_id_t id) } void -ksocknal_destroy_peer(ksock_peer_t *peer) +ksocknal_destroy_peer(struct ksock_peer *peer) { - ksock_net_t *net = peer->ksnp_ni->ni_data; + struct ksock_net *net = peer->ksnp_ni->ni_data; CDEBUG(D_NET, "peer %s %p deleted\n", libcfs_id2str(peer->ksnp_id), peer); @@ -175,15 +175,15 @@ ksocknal_destroy_peer(ksock_peer_t *peer) spin_unlock_bh(&net->ksnn_lock); } -ksock_peer_t * +struct ksock_peer * ksocknal_find_peer_locked(lnet_ni_t *ni, lnet_process_id_t id) { struct list_head *peer_list = ksocknal_nid2peerlist(id.nid); struct list_head *tmp; - ksock_peer_t *peer; + struct ksock_peer *peer; list_for_each(tmp, peer_list) { - peer = list_entry(tmp, ksock_peer_t, ksnp_list); + peer = list_entry(tmp, struct ksock_peer, ksnp_list); LASSERT(!peer->ksnp_closing); @@ -202,10 +202,10 @@ ksocknal_find_peer_locked(lnet_ni_t *ni, lnet_process_id_t id) return NULL; } -ksock_peer_t * +struct ksock_peer * ksocknal_find_peer(lnet_ni_t *ni, lnet_process_id_t id) { - ksock_peer_t *peer; + struct ksock_peer *peer; read_lock(&ksocknal_data.ksnd_global_lock); peer = ksocknal_find_peer_locked(ni, id); @@ -217,11 +217,11 @@ ksocknal_find_peer(lnet_ni_t *ni, lnet_process_id_t id) } static void -ksocknal_unlink_peer_locked(ksock_peer_t *peer) +ksocknal_unlink_peer_locked(struct ksock_peer *peer) { int i; __u32 ip; - ksock_interface_t *iface; + struct ksock_interface *iface; for (i = 0; i < peer->ksnp_n_passive_ips; i++) { LASSERT(i < LNET_MAX_INTERFACES); @@ -253,9 +253,9 @@ ksocknal_get_peer_info(lnet_ni_t *ni, int index, lnet_process_id_t *id, __u32 *myip, __u32 *peer_ip, int *port, int *conn_count, int *share_count) { - ksock_peer_t *peer; + struct ksock_peer *peer; struct list_head *ptmp; - ksock_route_t *route; + struct ksock_route *route; struct list_head *rtmp; int i; int j; @@ -265,7 +265,7 @@ ksocknal_get_peer_info(lnet_ni_t *ni, int index, for (i = 0; i < ksocknal_data.ksnd_peer_hash_size; i++) { list_for_each(ptmp, &ksocknal_data.ksnd_peers[i]) { - peer = list_entry(ptmp, ksock_peer_t, ksnp_list); + peer = list_entry(ptmp, struct ksock_peer, ksnp_list); if (peer->ksnp_ni != ni) continue; @@ -303,7 +303,7 @@ ksocknal_get_peer_info(lnet_ni_t *ni, int index, if (index-- > 0) continue; - route = list_entry(rtmp, ksock_route_t, + route = list_entry(rtmp, struct ksock_route, ksnr_list); *id = peer->ksnp_id; @@ -323,11 +323,11 @@ ksocknal_get_peer_info(lnet_ni_t *ni, int index, } static void -ksocknal_associate_route_conn_locked(ksock_route_t *route, ksock_conn_t *conn) +ksocknal_associate_route_conn_locked(struct ksock_route *route, struct ksock_conn *conn) { - ksock_peer_t *peer = route->ksnr_peer; + struct ksock_peer *peer = route->ksnr_peer; int type = conn->ksnc_type; - ksock_interface_t *iface; + struct ksock_interface *iface; conn->ksnc_route = route; ksocknal_route_addref(route); @@ -369,11 +369,11 @@ ksocknal_associate_route_conn_locked(ksock_route_t *route, ksock_conn_t *conn) } static void -ksocknal_add_route_locked(ksock_peer_t *peer, ksock_route_t *route) +ksocknal_add_route_locked(struct ksock_peer *peer, struct ksock_route *route) { struct list_head *tmp; - ksock_conn_t *conn; - ksock_route_t *route2; + struct ksock_conn *conn; + struct ksock_route *route2; LASSERT(!peer->ksnp_closing); LASSERT(!route->ksnr_peer); @@ -383,7 +383,7 @@ ksocknal_add_route_locked(ksock_peer_t *peer, ksock_route_t *route) /* LASSERT(unique) */ list_for_each(tmp, &peer->ksnp_routes) { - route2 = list_entry(tmp, ksock_route_t, ksnr_list); + route2 = list_entry(tmp, struct ksock_route, ksnr_list); if (route2->ksnr_ipaddr == route->ksnr_ipaddr) { CERROR("Duplicate route %s %pI4h\n", @@ -399,7 +399,7 @@ ksocknal_add_route_locked(ksock_peer_t *peer, ksock_route_t *route) list_add_tail(&route->ksnr_list, &peer->ksnp_routes); list_for_each(tmp, &peer->ksnp_conns) { - conn = list_entry(tmp, ksock_conn_t, ksnc_list); + conn = list_entry(tmp, struct ksock_conn, ksnc_list); if (conn->ksnc_ipaddr != route->ksnr_ipaddr) continue; @@ -410,11 +410,11 @@ ksocknal_add_route_locked(ksock_peer_t *peer, ksock_route_t *route) } static void -ksocknal_del_route_locked(ksock_route_t *route) +ksocknal_del_route_locked(struct ksock_route *route) { - ksock_peer_t *peer = route->ksnr_peer; - ksock_interface_t *iface; - ksock_conn_t *conn; + struct ksock_peer *peer = route->ksnr_peer; + struct ksock_interface *iface; + struct ksock_conn *conn; struct list_head *ctmp; struct list_head *cnxt; @@ -422,7 +422,7 @@ ksocknal_del_route_locked(ksock_route_t *route) /* Close associated conns */ list_for_each_safe(ctmp, cnxt, &peer->ksnp_conns) { - conn = list_entry(ctmp, ksock_conn_t, ksnc_list); + conn = list_entry(ctmp, struct ksock_conn, ksnc_list); if (conn->ksnc_route != route) continue; @@ -455,10 +455,10 @@ int ksocknal_add_peer(lnet_ni_t *ni, lnet_process_id_t id, __u32 ipaddr, int port) { struct list_head *tmp; - ksock_peer_t *peer; - ksock_peer_t *peer2; - ksock_route_t *route; - ksock_route_t *route2; + struct ksock_peer *peer; + struct ksock_peer *peer2; + struct ksock_route *route; + struct ksock_route *route2; int rc; if (id.nid == LNET_NID_ANY || @@ -479,7 +479,7 @@ ksocknal_add_peer(lnet_ni_t *ni, lnet_process_id_t id, __u32 ipaddr, int port) write_lock_bh(&ksocknal_data.ksnd_global_lock); /* always called with a ref on ni, so shutdown can't have started */ - LASSERT(!((ksock_net_t *) ni->ni_data)->ksnn_shutdown); + LASSERT(!((struct ksock_net *) ni->ni_data)->ksnn_shutdown); peer2 = ksocknal_find_peer_locked(ni, id); if (peer2) { @@ -493,7 +493,7 @@ ksocknal_add_peer(lnet_ni_t *ni, lnet_process_id_t id, __u32 ipaddr, int port) route2 = NULL; list_for_each(tmp, &peer->ksnp_routes) { - route2 = list_entry(tmp, ksock_route_t, ksnr_list); + route2 = list_entry(tmp, struct ksock_route, ksnr_list); if (route2->ksnr_ipaddr == ipaddr) break; @@ -514,10 +514,10 @@ ksocknal_add_peer(lnet_ni_t *ni, lnet_process_id_t id, __u32 ipaddr, int port) } static void -ksocknal_del_peer_locked(ksock_peer_t *peer, __u32 ip) +ksocknal_del_peer_locked(struct ksock_peer *peer, __u32 ip) { - ksock_conn_t *conn; - ksock_route_t *route; + struct ksock_conn *conn; + struct ksock_route *route; struct list_head *tmp; struct list_head *nxt; int nshared; @@ -528,7 +528,7 @@ ksocknal_del_peer_locked(ksock_peer_t *peer, __u32 ip) ksocknal_peer_addref(peer); list_for_each_safe(tmp, nxt, &peer->ksnp_routes) { - route = list_entry(tmp, ksock_route_t, ksnr_list); + route = list_entry(tmp, struct ksock_route, ksnr_list); /* no match */ if (!(!ip || route->ksnr_ipaddr == ip)) @@ -541,7 +541,7 @@ ksocknal_del_peer_locked(ksock_peer_t *peer, __u32 ip) nshared = 0; list_for_each_safe(tmp, nxt, &peer->ksnp_routes) { - route = list_entry(tmp, ksock_route_t, ksnr_list); + route = list_entry(tmp, struct ksock_route, ksnr_list); nshared += route->ksnr_share_count; } @@ -551,7 +551,7 @@ ksocknal_del_peer_locked(ksock_peer_t *peer, __u32 ip) * left */ list_for_each_safe(tmp, nxt, &peer->ksnp_routes) { - route = list_entry(tmp, ksock_route_t, ksnr_list); + route = list_entry(tmp, struct ksock_route, ksnr_list); /* we should only be removing auto-entries */ LASSERT(!route->ksnr_share_count); @@ -559,7 +559,7 @@ ksocknal_del_peer_locked(ksock_peer_t *peer, __u32 ip) } list_for_each_safe(tmp, nxt, &peer->ksnp_conns) { - conn = list_entry(tmp, ksock_conn_t, ksnc_list); + conn = list_entry(tmp, struct ksock_conn, ksnc_list); ksocknal_close_conn_locked(conn, 0); } @@ -575,7 +575,7 @@ ksocknal_del_peer(lnet_ni_t *ni, lnet_process_id_t id, __u32 ip) LIST_HEAD(zombies); struct list_head *ptmp; struct list_head *pnxt; - ksock_peer_t *peer; + struct ksock_peer *peer; int lo; int hi; int i; @@ -593,7 +593,7 @@ ksocknal_del_peer(lnet_ni_t *ni, lnet_process_id_t id, __u32 ip) for (i = lo; i <= hi; i++) { list_for_each_safe(ptmp, pnxt, &ksocknal_data.ksnd_peers[i]) { - peer = list_entry(ptmp, ksock_peer_t, ksnp_list); + peer = list_entry(ptmp, struct ksock_peer, ksnp_list); if (peer->ksnp_ni != ni) continue; @@ -628,12 +628,12 @@ ksocknal_del_peer(lnet_ni_t *ni, lnet_process_id_t id, __u32 ip) return rc; } -static ksock_conn_t * +static struct ksock_conn * ksocknal_get_conn_by_idx(lnet_ni_t *ni, int index) { - ksock_peer_t *peer; + struct ksock_peer *peer; struct list_head *ptmp; - ksock_conn_t *conn; + struct ksock_conn *conn; struct list_head *ctmp; int i; @@ -641,7 +641,7 @@ ksocknal_get_conn_by_idx(lnet_ni_t *ni, int index) for (i = 0; i < ksocknal_data.ksnd_peer_hash_size; i++) { list_for_each(ptmp, &ksocknal_data.ksnd_peers[i]) { - peer = list_entry(ptmp, ksock_peer_t, ksnp_list); + peer = list_entry(ptmp, struct ksock_peer, ksnp_list); LASSERT(!peer->ksnp_closing); @@ -652,7 +652,7 @@ ksocknal_get_conn_by_idx(lnet_ni_t *ni, int index) if (index-- > 0) continue; - conn = list_entry(ctmp, ksock_conn_t, + conn = list_entry(ctmp, struct ksock_conn, ksnc_list); ksocknal_conn_addref(conn); read_unlock(&ksocknal_data.ksnd_global_lock); @@ -665,11 +665,11 @@ ksocknal_get_conn_by_idx(lnet_ni_t *ni, int index) return NULL; } -static ksock_sched_t * +static struct ksock_sched * ksocknal_choose_scheduler_locked(unsigned int cpt) { struct ksock_sched_info *info = ksocknal_data.ksnd_sched_info[cpt]; - ksock_sched_t *sched; + struct ksock_sched *sched; int i; LASSERT(info->ksi_nthreads > 0); @@ -691,7 +691,7 @@ ksocknal_choose_scheduler_locked(unsigned int cpt) static int ksocknal_local_ipvec(lnet_ni_t *ni, __u32 *ipaddrs) { - ksock_net_t *net = ni->ni_data; + struct ksock_net *net = ni->ni_data; int i; int nip; @@ -719,7 +719,7 @@ ksocknal_local_ipvec(lnet_ni_t *ni, __u32 *ipaddrs) } static int -ksocknal_match_peerip(ksock_interface_t *iface, __u32 *ips, int nips) +ksocknal_match_peerip(struct ksock_interface *iface, __u32 *ips, int nips) { int best_netmatch = 0; int best_xor = 0; @@ -751,12 +751,12 @@ ksocknal_match_peerip(ksock_interface_t *iface, __u32 *ips, int nips) } static int -ksocknal_select_ips(ksock_peer_t *peer, __u32 *peerips, int n_peerips) +ksocknal_select_ips(struct ksock_peer *peer, __u32 *peerips, int n_peerips) { rwlock_t *global_lock = &ksocknal_data.ksnd_global_lock; - ksock_net_t *net = peer->ksnp_ni->ni_data; - ksock_interface_t *iface; - ksock_interface_t *best_iface; + struct ksock_net *net = peer->ksnp_ni->ni_data; + struct ksock_interface *iface; + struct ksock_interface *best_iface; int n_ips; int i; int j; @@ -862,17 +862,17 @@ ksocknal_select_ips(ksock_peer_t *peer, __u32 *peerips, int n_peerips) } static void -ksocknal_create_routes(ksock_peer_t *peer, int port, +ksocknal_create_routes(struct ksock_peer *peer, int port, __u32 *peer_ipaddrs, int npeer_ipaddrs) { - ksock_route_t *newroute = NULL; + struct ksock_route *newroute = NULL; rwlock_t *global_lock = &ksocknal_data.ksnd_global_lock; lnet_ni_t *ni = peer->ksnp_ni; - ksock_net_t *net = ni->ni_data; + struct ksock_net *net = ni->ni_data; struct list_head *rtmp; - ksock_route_t *route; - ksock_interface_t *iface; - ksock_interface_t *best_iface; + struct ksock_route *route; + struct ksock_interface *iface; + struct ksock_interface *best_iface; int best_netmatch; int this_netmatch; int best_nroutes; @@ -919,7 +919,7 @@ ksocknal_create_routes(ksock_peer_t *peer, int port, /* Already got a route? */ route = NULL; list_for_each(rtmp, &peer->ksnp_routes) { - route = list_entry(rtmp, ksock_route_t, ksnr_list); + route = list_entry(rtmp, struct ksock_route, ksnr_list); if (route->ksnr_ipaddr == newroute->ksnr_ipaddr) break; @@ -941,7 +941,7 @@ ksocknal_create_routes(ksock_peer_t *peer, int port, /* Using this interface already? */ list_for_each(rtmp, &peer->ksnp_routes) { - route = list_entry(rtmp, ksock_route_t, + route = list_entry(rtmp, struct ksock_route, ksnr_list); if (route->ksnr_myipaddr == iface->ksni_ipaddr) @@ -985,7 +985,7 @@ ksocknal_create_routes(ksock_peer_t *peer, int port, int ksocknal_accept(lnet_ni_t *ni, struct socket *sock) { - ksock_connreq_t *cr; + struct ksock_connreq *cr; int rc; __u32 peer_ip; int peer_port; @@ -1014,9 +1014,9 @@ ksocknal_accept(lnet_ni_t *ni, struct socket *sock) } static int -ksocknal_connecting(ksock_peer_t *peer, __u32 ipaddr) +ksocknal_connecting(struct ksock_peer *peer, __u32 ipaddr) { - ksock_route_t *route; + struct ksock_route *route; list_for_each_entry(route, &peer->ksnp_routes, ksnr_list) { if (route->ksnr_ipaddr == ipaddr) @@ -1026,7 +1026,7 @@ ksocknal_connecting(ksock_peer_t *peer, __u32 ipaddr) } int -ksocknal_create_conn(lnet_ni_t *ni, ksock_route_t *route, +ksocknal_create_conn(lnet_ni_t *ni, struct ksock_route *route, struct socket *sock, int type) { rwlock_t *global_lock = &ksocknal_data.ksnd_global_lock; @@ -1034,15 +1034,15 @@ ksocknal_create_conn(lnet_ni_t *ni, ksock_route_t *route, lnet_process_id_t peerid; struct list_head *tmp; __u64 incarnation; - ksock_conn_t *conn; - ksock_conn_t *conn2; - ksock_peer_t *peer = NULL; - ksock_peer_t *peer2; - ksock_sched_t *sched; + struct ksock_conn *conn; + struct ksock_conn *conn2; + struct ksock_peer *peer = NULL; + struct ksock_peer *peer2; + struct ksock_sched *sched; ksock_hello_msg_t *hello; int cpt; - ksock_tx_t *tx; - ksock_tx_t *txtmp; + struct ksock_tx *tx; + struct ksock_tx *txtmp; int rc; int active; char *warn = NULL; @@ -1150,7 +1150,7 @@ ksocknal_create_conn(lnet_ni_t *ni, ksock_route_t *route, write_lock_bh(global_lock); /* called with a ref on ni, so shutdown can't have started */ - LASSERT(!((ksock_net_t *) ni->ni_data)->ksnn_shutdown); + LASSERT(!((struct ksock_net *) ni->ni_data)->ksnn_shutdown); peer2 = ksocknal_find_peer_locked(ni, peerid); if (!peer2) { @@ -1233,7 +1233,7 @@ ksocknal_create_conn(lnet_ni_t *ni, ksock_route_t *route, */ if (conn->ksnc_ipaddr != conn->ksnc_myipaddr) { list_for_each(tmp, &peer->ksnp_conns) { - conn2 = list_entry(tmp, ksock_conn_t, ksnc_list); + conn2 = list_entry(tmp, struct ksock_conn, ksnc_list); if (conn2->ksnc_ipaddr != conn->ksnc_ipaddr || conn2->ksnc_myipaddr != conn->ksnc_myipaddr || @@ -1273,7 +1273,7 @@ ksocknal_create_conn(lnet_ni_t *ni, ksock_route_t *route, * continually create duplicate routes. */ list_for_each(tmp, &peer->ksnp_routes) { - route = list_entry(tmp, ksock_route_t, ksnr_list); + route = list_entry(tmp, struct ksock_route, ksnr_list); if (route->ksnr_ipaddr != conn->ksnc_ipaddr) continue; @@ -1432,16 +1432,16 @@ failed_0: } void -ksocknal_close_conn_locked(ksock_conn_t *conn, int error) +ksocknal_close_conn_locked(struct ksock_conn *conn, int error) { /* * This just does the immmediate housekeeping, and queues the * connection for the reaper to terminate. * Caller holds ksnd_global_lock exclusively in irq context */ - ksock_peer_t *peer = conn->ksnc_peer; - ksock_route_t *route; - ksock_conn_t *conn2; + struct ksock_peer *peer = conn->ksnc_peer; + struct ksock_route *route; + struct ksock_conn *conn2; struct list_head *tmp; LASSERT(!peer->ksnp_error); @@ -1459,7 +1459,7 @@ ksocknal_close_conn_locked(ksock_conn_t *conn, int error) conn2 = NULL; list_for_each(tmp, &peer->ksnp_conns) { - conn2 = list_entry(tmp, ksock_conn_t, ksnc_list); + conn2 = list_entry(tmp, struct ksock_conn, ksnc_list); if (conn2->ksnc_route == route && conn2->ksnc_type == conn->ksnc_type) @@ -1484,7 +1484,7 @@ ksocknal_close_conn_locked(ksock_conn_t *conn, int error) /* No more connections to this peer */ if (!list_empty(&peer->ksnp_tx_queue)) { - ksock_tx_t *tx; + struct ksock_tx *tx; LASSERT(conn->ksnc_proto == &ksocknal_protocol_v3x); @@ -1524,7 +1524,7 @@ ksocknal_close_conn_locked(ksock_conn_t *conn, int error) } void -ksocknal_peer_failed(ksock_peer_t *peer) +ksocknal_peer_failed(struct ksock_peer *peer) { int notify = 0; unsigned long last_alive = 0; @@ -1552,12 +1552,12 @@ ksocknal_peer_failed(ksock_peer_t *peer) } void -ksocknal_finalize_zcreq(ksock_conn_t *conn) +ksocknal_finalize_zcreq(struct ksock_conn *conn) { - ksock_peer_t *peer = conn->ksnc_peer; - ksock_tx_t *tx; - ksock_tx_t *temp; - ksock_tx_t *tmp; + struct ksock_peer *peer = conn->ksnc_peer; + struct ksock_tx *tx; + struct ksock_tx *temp; + struct ksock_tx *tmp; LIST_HEAD(zlist); /* @@ -1589,7 +1589,7 @@ ksocknal_finalize_zcreq(ksock_conn_t *conn) } void -ksocknal_terminate_conn(ksock_conn_t *conn) +ksocknal_terminate_conn(struct ksock_conn *conn) { /* * This gets called by the reaper (guaranteed thread context) to @@ -1597,8 +1597,8 @@ ksocknal_terminate_conn(ksock_conn_t *conn) * ksnc_refcount will eventually hit zero, and then the reaper will * destroy it. */ - ksock_peer_t *peer = conn->ksnc_peer; - ksock_sched_t *sched = conn->ksnc_scheduler; + struct ksock_peer *peer = conn->ksnc_peer; + struct ksock_sched *sched = conn->ksnc_scheduler; int failed = 0; LASSERT(conn->ksnc_closing); @@ -1656,7 +1656,7 @@ ksocknal_terminate_conn(ksock_conn_t *conn) } void -ksocknal_queue_zombie_conn(ksock_conn_t *conn) +ksocknal_queue_zombie_conn(struct ksock_conn *conn) { /* Queue the conn for the reaper to destroy */ @@ -1670,7 +1670,7 @@ ksocknal_queue_zombie_conn(ksock_conn_t *conn) } void -ksocknal_destroy_conn(ksock_conn_t *conn) +ksocknal_destroy_conn(struct ksock_conn *conn) { unsigned long last_rcv; @@ -1730,15 +1730,15 @@ ksocknal_destroy_conn(ksock_conn_t *conn) } int -ksocknal_close_peer_conns_locked(ksock_peer_t *peer, __u32 ipaddr, int why) +ksocknal_close_peer_conns_locked(struct ksock_peer *peer, __u32 ipaddr, int why) { - ksock_conn_t *conn; + struct ksock_conn *conn; struct list_head *ctmp; struct list_head *cnxt; int count = 0; list_for_each_safe(ctmp, cnxt, &peer->ksnp_conns) { - conn = list_entry(ctmp, ksock_conn_t, ksnc_list); + conn = list_entry(ctmp, struct ksock_conn, ksnc_list); if (!ipaddr || conn->ksnc_ipaddr == ipaddr) { count++; @@ -1750,9 +1750,9 @@ ksocknal_close_peer_conns_locked(ksock_peer_t *peer, __u32 ipaddr, int why) } int -ksocknal_close_conn_and_siblings(ksock_conn_t *conn, int why) +ksocknal_close_conn_and_siblings(struct ksock_conn *conn, int why) { - ksock_peer_t *peer = conn->ksnc_peer; + struct ksock_peer *peer = conn->ksnc_peer; __u32 ipaddr = conn->ksnc_ipaddr; int count; @@ -1768,7 +1768,7 @@ ksocknal_close_conn_and_siblings(ksock_conn_t *conn, int why) int ksocknal_close_matching_conns(lnet_process_id_t id, __u32 ipaddr) { - ksock_peer_t *peer; + struct ksock_peer *peer; struct list_head *ptmp; struct list_head *pnxt; int lo; @@ -1789,7 +1789,7 @@ ksocknal_close_matching_conns(lnet_process_id_t id, __u32 ipaddr) for (i = lo; i <= hi; i++) { list_for_each_safe(ptmp, pnxt, &ksocknal_data.ksnd_peers[i]) { - peer = list_entry(ptmp, ksock_peer_t, ksnp_list); + peer = list_entry(ptmp, struct ksock_peer, ksnp_list); if (!((id.nid == LNET_NID_ANY || id.nid == peer->ksnp_id.nid) && (id.pid == LNET_PID_ANY || id.pid == peer->ksnp_id.pid))) @@ -1844,7 +1844,7 @@ ksocknal_query(lnet_ni_t *ni, lnet_nid_t nid, unsigned long *when) int connect = 1; unsigned long last_alive = 0; unsigned long now = cfs_time_current(); - ksock_peer_t *peer = NULL; + struct ksock_peer *peer = NULL; rwlock_t *glock = &ksocknal_data.ksnd_global_lock; lnet_process_id_t id = { .nid = nid, @@ -1856,11 +1856,11 @@ ksocknal_query(lnet_ni_t *ni, lnet_nid_t nid, unsigned long *when) peer = ksocknal_find_peer_locked(ni, id); if (peer) { struct list_head *tmp; - ksock_conn_t *conn; + struct ksock_conn *conn; int bufnob; list_for_each(tmp, &peer->ksnp_conns) { - conn = list_entry(tmp, ksock_conn_t, ksnc_list); + conn = list_entry(tmp, struct ksock_conn, ksnc_list); bufnob = conn->ksnc_sock->sk->sk_wmem_queued; if (bufnob < conn->ksnc_tx_bufnob) { @@ -1902,12 +1902,12 @@ ksocknal_query(lnet_ni_t *ni, lnet_nid_t nid, unsigned long *when) } static void -ksocknal_push_peer(ksock_peer_t *peer) +ksocknal_push_peer(struct ksock_peer *peer) { int index; int i; struct list_head *tmp; - ksock_conn_t *conn; + struct ksock_conn *conn; for (index = 0; ; index++) { read_lock(&ksocknal_data.ksnd_global_lock); @@ -1917,7 +1917,7 @@ ksocknal_push_peer(ksock_peer_t *peer) list_for_each(tmp, &peer->ksnp_conns) { if (i++ == index) { - conn = list_entry(tmp, ksock_conn_t, + conn = list_entry(tmp, struct ksock_conn, ksnc_list); ksocknal_conn_addref(conn); break; @@ -1954,7 +1954,7 @@ static int ksocknal_push(lnet_ni_t *ni, lnet_process_id_t id) int peer_off; /* searching offset in peer hash table */ for (peer_off = 0; ; peer_off++) { - ksock_peer_t *peer; + struct ksock_peer *peer; int i = 0; read_lock(&ksocknal_data.ksnd_global_lock); @@ -1986,15 +1986,15 @@ static int ksocknal_push(lnet_ni_t *ni, lnet_process_id_t id) static int ksocknal_add_interface(lnet_ni_t *ni, __u32 ipaddress, __u32 netmask) { - ksock_net_t *net = ni->ni_data; - ksock_interface_t *iface; + struct ksock_net *net = ni->ni_data; + struct ksock_interface *iface; int rc; int i; int j; struct list_head *ptmp; - ksock_peer_t *peer; + struct ksock_peer *peer; struct list_head *rtmp; - ksock_route_t *route; + struct ksock_route *route; if (!ipaddress || !netmask) return -EINVAL; @@ -2017,7 +2017,7 @@ ksocknal_add_interface(lnet_ni_t *ni, __u32 ipaddress, __u32 netmask) for (i = 0; i < ksocknal_data.ksnd_peer_hash_size; i++) { list_for_each(ptmp, &ksocknal_data.ksnd_peers[i]) { - peer = list_entry(ptmp, ksock_peer_t, + peer = list_entry(ptmp, struct ksock_peer, ksnp_list); for (j = 0; j < peer->ksnp_n_passive_ips; j++) @@ -2025,7 +2025,7 @@ ksocknal_add_interface(lnet_ni_t *ni, __u32 ipaddress, __u32 netmask) iface->ksni_npeers++; list_for_each(rtmp, &peer->ksnp_routes) { - route = list_entry(rtmp, ksock_route_t, + route = list_entry(rtmp, struct ksock_route, ksnr_list); if (route->ksnr_myipaddr == ipaddress) @@ -2044,12 +2044,12 @@ ksocknal_add_interface(lnet_ni_t *ni, __u32 ipaddress, __u32 netmask) } static void -ksocknal_peer_del_interface_locked(ksock_peer_t *peer, __u32 ipaddr) +ksocknal_peer_del_interface_locked(struct ksock_peer *peer, __u32 ipaddr) { struct list_head *tmp; struct list_head *nxt; - ksock_route_t *route; - ksock_conn_t *conn; + struct ksock_route *route; + struct ksock_conn *conn; int i; int j; @@ -2063,7 +2063,7 @@ ksocknal_peer_del_interface_locked(ksock_peer_t *peer, __u32 ipaddr) } list_for_each_safe(tmp, nxt, &peer->ksnp_routes) { - route = list_entry(tmp, ksock_route_t, ksnr_list); + route = list_entry(tmp, struct ksock_route, ksnr_list); if (route->ksnr_myipaddr != ipaddr) continue; @@ -2077,7 +2077,7 @@ ksocknal_peer_del_interface_locked(ksock_peer_t *peer, __u32 ipaddr) } list_for_each_safe(tmp, nxt, &peer->ksnp_conns) { - conn = list_entry(tmp, ksock_conn_t, ksnc_list); + conn = list_entry(tmp, struct ksock_conn, ksnc_list); if (conn->ksnc_myipaddr == ipaddr) ksocknal_close_conn_locked(conn, 0); @@ -2087,11 +2087,11 @@ ksocknal_peer_del_interface_locked(ksock_peer_t *peer, __u32 ipaddr) static int ksocknal_del_interface(lnet_ni_t *ni, __u32 ipaddress) { - ksock_net_t *net = ni->ni_data; + struct ksock_net *net = ni->ni_data; int rc = -ENOENT; struct list_head *tmp; struct list_head *nxt; - ksock_peer_t *peer; + struct ksock_peer *peer; __u32 this_ip; int i; int j; @@ -2115,7 +2115,7 @@ ksocknal_del_interface(lnet_ni_t *ni, __u32 ipaddress) for (j = 0; j < ksocknal_data.ksnd_peer_hash_size; j++) { list_for_each_safe(tmp, nxt, &ksocknal_data.ksnd_peers[j]) { - peer = list_entry(tmp, ksock_peer_t, ksnp_list); + peer = list_entry(tmp, struct ksock_peer, ksnp_list); if (peer->ksnp_ni != ni) continue; @@ -2139,8 +2139,8 @@ ksocknal_ctl(lnet_ni_t *ni, unsigned int cmd, void *arg) switch (cmd) { case IOC_LIBCFS_GET_INTERFACE: { - ksock_net_t *net = ni->ni_data; - ksock_interface_t *iface; + struct ksock_net *net = ni->ni_data; + struct ksock_interface *iface; read_lock(&ksocknal_data.ksnd_global_lock); @@ -2209,7 +2209,7 @@ ksocknal_ctl(lnet_ni_t *ni, unsigned int cmd, void *arg) int txmem; int rxmem; int nagle; - ksock_conn_t *conn = ksocknal_get_conn_by_idx(ni, data->ioc_count); + struct ksock_conn *conn = ksocknal_get_conn_by_idx(ni, data->ioc_count); if (!conn) return -ENOENT; @@ -2284,8 +2284,8 @@ ksocknal_free_buffers(void) if (!list_empty(&ksocknal_data.ksnd_idle_noop_txs)) { struct list_head zlist; - ksock_tx_t *tx; - ksock_tx_t *temp; + struct ksock_tx *tx; + struct ksock_tx *temp; list_add(&zlist, &ksocknal_data.ksnd_idle_noop_txs); list_del_init(&ksocknal_data.ksnd_idle_noop_txs); @@ -2304,7 +2304,7 @@ static void ksocknal_base_shutdown(void) { struct ksock_sched_info *info; - ksock_sched_t *sched; + struct ksock_sched *sched; int i; int j; @@ -2446,7 +2446,7 @@ ksocknal_base_startup(void) goto failed; cfs_percpt_for_each(info, i, ksocknal_data.ksnd_sched_info) { - ksock_sched_t *sched; + struct ksock_sched *sched; int nthrs; nthrs = cfs_cpt_weight(lnet_cpt_table(), i); @@ -2534,7 +2534,7 @@ ksocknal_base_startup(void) static void ksocknal_debug_peerhash(lnet_ni_t *ni) { - ksock_peer_t *peer = NULL; + struct ksock_peer *peer = NULL; struct list_head *tmp; int i; @@ -2542,7 +2542,7 @@ ksocknal_debug_peerhash(lnet_ni_t *ni) for (i = 0; i < ksocknal_data.ksnd_peer_hash_size; i++) { list_for_each(tmp, &ksocknal_data.ksnd_peers[i]) { - peer = list_entry(tmp, ksock_peer_t, ksnp_list); + peer = list_entry(tmp, struct ksock_peer, ksnp_list); if (peer->ksnp_ni == ni) break; @@ -2552,8 +2552,8 @@ ksocknal_debug_peerhash(lnet_ni_t *ni) } if (peer) { - ksock_route_t *route; - ksock_conn_t *conn; + struct ksock_route *route; + struct ksock_conn *conn; CWARN("Active peer on shutdown: %s, ref %d, scnt %d, closing %d, accepting %d, err %d, zcookie %llu, txq %d, zc_req %d\n", libcfs_id2str(peer->ksnp_id), @@ -2565,7 +2565,7 @@ ksocknal_debug_peerhash(lnet_ni_t *ni) !list_empty(&peer->ksnp_zc_req_list)); list_for_each(tmp, &peer->ksnp_routes) { - route = list_entry(tmp, ksock_route_t, ksnr_list); + route = list_entry(tmp, struct ksock_route, ksnr_list); CWARN("Route: ref %d, schd %d, conn %d, cnted %d, del %d\n", atomic_read(&route->ksnr_refcount), route->ksnr_scheduled, route->ksnr_connecting, @@ -2573,7 +2573,7 @@ ksocknal_debug_peerhash(lnet_ni_t *ni) } list_for_each(tmp, &peer->ksnp_conns) { - conn = list_entry(tmp, ksock_conn_t, ksnc_list); + conn = list_entry(tmp, struct ksock_conn, ksnc_list); CWARN("Conn: ref %d, sref %d, t %d, c %d\n", atomic_read(&conn->ksnc_conn_refcount), atomic_read(&conn->ksnc_sock_refcount), @@ -2587,7 +2587,7 @@ ksocknal_debug_peerhash(lnet_ni_t *ni) void ksocknal_shutdown(lnet_ni_t *ni) { - ksock_net_t *net = ni->ni_data; + struct ksock_net *net = ni->ni_data; int i; lnet_process_id_t anyid = {0}; @@ -2637,7 +2637,7 @@ ksocknal_shutdown(lnet_ni_t *ni) } static int -ksocknal_enumerate_interfaces(ksock_net_t *net) +ksocknal_enumerate_interfaces(struct ksock_net *net) { char **names; int i; @@ -2694,7 +2694,7 @@ ksocknal_enumerate_interfaces(ksock_net_t *net) } static int -ksocknal_search_new_ipif(ksock_net_t *net) +ksocknal_search_new_ipif(struct ksock_net *net) { int new_ipif = 0; int i; @@ -2703,7 +2703,7 @@ ksocknal_search_new_ipif(ksock_net_t *net) char *ifnam = &net->ksnn_interfaces[i].ksni_name[0]; char *colon = strchr(ifnam, ':'); int found = 0; - ksock_net_t *tmp; + struct ksock_net *tmp; int j; if (colon) /* ignore alias device */ @@ -2760,7 +2760,7 @@ ksocknal_start_schedulers(struct ksock_sched_info *info) for (i = 0; i < nthrs; i++) { long id; char name[20]; - ksock_sched_t *sched; + struct ksock_sched *sched; id = KSOCK_THREAD_ID(info->ksi_cpt, info->ksi_nthreads + i); sched = &info->ksi_scheds[KSOCK_THREAD_SID(id)]; @@ -2782,7 +2782,7 @@ ksocknal_start_schedulers(struct ksock_sched_info *info) } static int -ksocknal_net_start_threads(ksock_net_t *net, __u32 *cpts, int ncpts) +ksocknal_net_start_threads(struct ksock_net *net, __u32 *cpts, int ncpts) { int newif = ksocknal_search_new_ipif(net); int rc; @@ -2810,7 +2810,7 @@ ksocknal_net_start_threads(ksock_net_t *net, __u32 *cpts, int ncpts) int ksocknal_startup(lnet_ni_t *ni) { - ksock_net_t *net; + struct ksock_net *net; int rc; int i; diff --git a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h index a60d72f..a56632b 100644 --- a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h +++ b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.h @@ -77,8 +77,7 @@ struct ksock_sched_info; -typedef struct /* per scheduler state */ -{ +struct ksock_sched { /* per scheduler state */ spinlock_t kss_lock; /* serialise */ struct list_head kss_rx_conns; /* conn waiting to be read */ struct list_head kss_tx_conns; /* conn waiting to be written */ @@ -89,13 +88,13 @@ typedef struct /* per scheduler state */ struct ksock_sched_info *kss_info; /* owner of it */ struct page *kss_rx_scratch_pgs[LNET_MAX_IOV]; struct kvec kss_scratch_iov[LNET_MAX_IOV]; -} ksock_sched_t; +}; struct ksock_sched_info { int ksi_nthreads_max; /* max allowed threads */ int ksi_nthreads; /* number of threads */ int ksi_cpt; /* CPT id */ - ksock_sched_t *ksi_scheds; /* array of schedulers */ + struct ksock_sched *ksi_scheds; /* array of schedulers */ }; #define KSOCK_CPT_SHIFT 16 @@ -103,16 +102,15 @@ struct ksock_sched_info { #define KSOCK_THREAD_CPT(id) ((id) >> KSOCK_CPT_SHIFT) #define KSOCK_THREAD_SID(id) ((id) & ((1UL << KSOCK_CPT_SHIFT) - 1)) -typedef struct /* in-use interface */ -{ +struct ksock_interface { /* in-use interface */ __u32 ksni_ipaddr; /* interface's IP address */ __u32 ksni_netmask; /* interface's network mask */ int ksni_nroutes; /* # routes using (active) */ int ksni_npeers; /* # peers using (passive) */ char ksni_name[IFNAMSIZ]; /* interface name */ -} ksock_interface_t; +}; -typedef struct { +struct ksock_tunables { int *ksnd_timeout; /* "stuck" socket timeout * (seconds) */ int *ksnd_nscheds; /* # scheduler threads in each @@ -155,24 +153,24 @@ typedef struct { * Chelsio TOE) */ int *ksnd_zc_recv_min_nfrags; /* minimum # of fragments to * enable ZC receive */ -} ksock_tunables_t; +}; -typedef struct { +struct ksock_net { __u64 ksnn_incarnation; /* my epoch */ spinlock_t ksnn_lock; /* serialise */ struct list_head ksnn_list; /* chain on global list */ int ksnn_npeers; /* # peers */ int ksnn_shutdown; /* shutting down? */ int ksnn_ninterfaces; /* IP interfaces */ - ksock_interface_t ksnn_interfaces[LNET_MAX_INTERFACES]; -} ksock_net_t; + struct ksock_interface ksnn_interfaces[LNET_MAX_INTERFACES]; +}; /** connd timeout */ #define SOCKNAL_CONND_TIMEOUT 120 /** reserved thread for accepting & creating new connd */ #define SOCKNAL_CONND_RESV 1 -typedef struct { +struct ksock_nal_data { int ksnd_init; /* initialisation state */ int ksnd_nnets; /* # networks set up */ @@ -229,7 +227,7 @@ typedef struct { spinlock_t ksnd_tx_lock; /* serialise, g_lock * unsafe */ -} ksock_nal_data_t; +}; #define SOCKNAL_INIT_NOTHING 0 #define SOCKNAL_INIT_DATA 1 @@ -250,8 +248,7 @@ struct ksock_peer; /* forward ref */ struct ksock_route; /* forward ref */ struct ksock_proto; /* forward ref */ -typedef struct /* transmit packet */ -{ +struct ksock_tx { /* transmit packet */ struct list_head tx_list; /* queue on conn for transmission etc */ struct list_head tx_zc_list; /* queue on peer for ZC request */ @@ -281,20 +278,20 @@ typedef struct /* transmit packet */ struct kvec iov[1]; /* virt hdr + payload */ } virt; } tx_frags; -} ksock_tx_t; +}; -#define KSOCK_NOOP_TX_SIZE (offsetof(ksock_tx_t, tx_frags.paged.kiov[0])) +#define KSOCK_NOOP_TX_SIZE (offsetof(struct ksock_tx, tx_frags.paged.kiov[0])) -/* network zero copy callback descriptor embedded in ksock_tx_t */ +/* network zero copy callback descriptor embedded in struct ksock_tx */ /* * space for the rx frag descriptors; we either read a single contiguous * header, or up to LNET_MAX_IOV frags of payload of either type. */ -typedef union { +union ksock_rxiovspace { struct kvec iov[LNET_MAX_IOV]; lnet_kiov_t kiov[LNET_MAX_IOV]; -} ksock_rxiovspace_t; +}; #define SOCKNAL_RX_KSM_HEADER 1 /* reading ksock message header */ #define SOCKNAL_RX_LNET_HEADER 2 /* reading lnet message header */ @@ -303,7 +300,7 @@ typedef union { #define SOCKNAL_RX_LNET_PAYLOAD 5 /* reading lnet payload (to deliver here) */ #define SOCKNAL_RX_SLOP 6 /* skipping body */ -typedef struct ksock_conn { +struct ksock_conn { struct ksock_peer *ksnc_peer; /* owning peer */ struct ksock_route *ksnc_route; /* owning route */ struct list_head ksnc_list; /* stash on peer's conn list */ @@ -314,8 +311,8 @@ typedef struct ksock_conn { * write_space() callback */ atomic_t ksnc_conn_refcount;/* conn refcount */ atomic_t ksnc_sock_refcount;/* sock refcount */ - ksock_sched_t *ksnc_scheduler; /* who schedules this connection - */ + struct ksock_sched *ksnc_scheduler; /* who schedules this connection + */ __u32 ksnc_myipaddr; /* my IP */ __u32 ksnc_ipaddr; /* peer's IP */ int ksnc_port; /* peer's port */ @@ -341,7 +338,7 @@ typedef struct ksock_conn { struct kvec *ksnc_rx_iov; /* the iovec frags */ int ksnc_rx_nkiov; /* # page frags */ lnet_kiov_t *ksnc_rx_kiov; /* the page frags */ - ksock_rxiovspace_t ksnc_rx_iov_space; /* space for frag descriptors */ + union ksock_rxiovspace ksnc_rx_iov_space; /* space for frag descriptors */ __u32 ksnc_rx_csum; /* partial checksum for incoming * data */ void *ksnc_cookie; /* rx lnet_finalize passthru arg @@ -357,7 +354,7 @@ typedef struct ksock_conn { struct list_head ksnc_tx_list; /* where I enq waiting for output * space */ struct list_head ksnc_tx_queue; /* packets waiting to be sent */ - ksock_tx_t *ksnc_tx_carrier; /* next TX that can carry a LNet + struct ksock_tx *ksnc_tx_carrier; /* next TX that can carry a LNet * message or ZC-ACK */ unsigned long ksnc_tx_deadline; /* when (in jiffies) tx times out */ @@ -367,9 +364,9 @@ typedef struct ksock_conn { int ksnc_tx_scheduled; /* being progressed */ unsigned long ksnc_tx_last_post; /* time stamp of the last posted * TX */ -} ksock_conn_t; +}; -typedef struct ksock_route { +struct ksock_route { struct list_head ksnr_list; /* chain on peer route list */ struct list_head ksnr_connd_list; /* chain on ksnr_connd_routes */ struct ksock_peer *ksnr_peer; /* owning peer */ @@ -389,11 +386,11 @@ typedef struct ksock_route { unsigned int ksnr_share_count; /* created explicitly? */ int ksnr_conn_count; /* # conns established by this * route */ -} ksock_route_t; +}; #define SOCKNAL_KEEPALIVE_PING 1 /* cookie for keepalive ping */ -typedef struct ksock_peer { +struct ksock_peer { struct list_head ksnp_list; /* stash on global peer list */ unsigned long ksnp_last_alive; /* when (in jiffies) I was last * alive */ @@ -420,49 +417,49 @@ typedef struct ksock_peer { /* preferred local interfaces */ __u32 ksnp_passive_ips[LNET_MAX_INTERFACES]; -} ksock_peer_t; +}; -typedef struct ksock_connreq { +struct ksock_connreq { struct list_head ksncr_list; /* stash on ksnd_connd_connreqs */ lnet_ni_t *ksncr_ni; /* chosen NI */ struct socket *ksncr_sock; /* accepted socket */ -} ksock_connreq_t; +}; -extern ksock_nal_data_t ksocknal_data; -extern ksock_tunables_t ksocknal_tunables; +extern struct ksock_nal_data ksocknal_data; +extern struct ksock_tunables ksocknal_tunables; #define SOCKNAL_MATCH_NO 0 /* TX can't match type of connection */ #define SOCKNAL_MATCH_YES 1 /* TX matches type of connection */ #define SOCKNAL_MATCH_MAY 2 /* TX can be sent on the connection, but not * preferred */ -typedef struct ksock_proto { +struct ksock_proto { /* version number of protocol */ int pro_version; /* handshake function */ - int (*pro_send_hello)(ksock_conn_t *, ksock_hello_msg_t *); + int (*pro_send_hello)(struct ksock_conn *, ksock_hello_msg_t *); /* handshake function */ - int (*pro_recv_hello)(ksock_conn_t *, ksock_hello_msg_t *, int); + int (*pro_recv_hello)(struct ksock_conn *, ksock_hello_msg_t *, int); /* message pack */ - void (*pro_pack)(ksock_tx_t *); + void (*pro_pack)(struct ksock_tx *); /* message unpack */ void (*pro_unpack)(ksock_msg_t *); /* queue tx on the connection */ - ksock_tx_t *(*pro_queue_tx_msg)(ksock_conn_t *, ksock_tx_t *); + struct ksock_tx *(*pro_queue_tx_msg)(struct ksock_conn *, struct ksock_tx *); /* queue ZC ack on the connection */ - int (*pro_queue_tx_zcack)(ksock_conn_t *, ksock_tx_t *, __u64); + int (*pro_queue_tx_zcack)(struct ksock_conn *, struct ksock_tx *, __u64); /* handle ZC request */ - int (*pro_handle_zcreq)(ksock_conn_t *, __u64, int); + int (*pro_handle_zcreq)(struct ksock_conn *, __u64, int); /* handle ZC ACK */ - int (*pro_handle_zcack)(ksock_conn_t *, __u64, __u64); + int (*pro_handle_zcack)(struct ksock_conn *, __u64, __u64); /* * msg type matches the connection type: @@ -471,12 +468,12 @@ typedef struct ksock_proto { * return MATCH_YES : matching type * return MATCH_MAY : can be backup */ - int (*pro_match_tx)(ksock_conn_t *, ksock_tx_t *, int); -} ksock_proto_t; + int (*pro_match_tx)(struct ksock_conn *, struct ksock_tx *, int); +}; -extern ksock_proto_t ksocknal_protocol_v1x; -extern ksock_proto_t ksocknal_protocol_v2x; -extern ksock_proto_t ksocknal_protocol_v3x; +extern struct ksock_proto ksocknal_protocol_v1x; +extern struct ksock_proto ksocknal_protocol_v2x; +extern struct ksock_proto ksocknal_protocol_v3x; #define KSOCK_PROTO_V1_MAJOR LNET_PROTO_TCP_VERSION_MAJOR #define KSOCK_PROTO_V1_MINOR LNET_PROTO_TCP_VERSION_MINOR @@ -517,17 +514,17 @@ ksocknal_nid2peerlist(lnet_nid_t nid) } static inline void -ksocknal_conn_addref(ksock_conn_t *conn) +ksocknal_conn_addref(struct ksock_conn *conn) { LASSERT(atomic_read(&conn->ksnc_conn_refcount) > 0); atomic_inc(&conn->ksnc_conn_refcount); } -void ksocknal_queue_zombie_conn(ksock_conn_t *conn); -void ksocknal_finalize_zcreq(ksock_conn_t *conn); +void ksocknal_queue_zombie_conn(struct ksock_conn *conn); +void ksocknal_finalize_zcreq(struct ksock_conn *conn); static inline void -ksocknal_conn_decref(ksock_conn_t *conn) +ksocknal_conn_decref(struct ksock_conn *conn) { LASSERT(atomic_read(&conn->ksnc_conn_refcount) > 0); if (atomic_dec_and_test(&conn->ksnc_conn_refcount)) @@ -535,7 +532,7 @@ ksocknal_conn_decref(ksock_conn_t *conn) } static inline int -ksocknal_connsock_addref(ksock_conn_t *conn) +ksocknal_connsock_addref(struct ksock_conn *conn) { int rc = -ESHUTDOWN; @@ -551,7 +548,7 @@ ksocknal_connsock_addref(ksock_conn_t *conn) } static inline void -ksocknal_connsock_decref(ksock_conn_t *conn) +ksocknal_connsock_decref(struct ksock_conn *conn) { LASSERT(atomic_read(&conn->ksnc_sock_refcount) > 0); if (atomic_dec_and_test(&conn->ksnc_sock_refcount)) { @@ -563,17 +560,17 @@ ksocknal_connsock_decref(ksock_conn_t *conn) } static inline void -ksocknal_tx_addref(ksock_tx_t *tx) +ksocknal_tx_addref(struct ksock_tx *tx) { LASSERT(atomic_read(&tx->tx_refcount) > 0); atomic_inc(&tx->tx_refcount); } -void ksocknal_tx_prep(ksock_conn_t *, ksock_tx_t *tx); -void ksocknal_tx_done(lnet_ni_t *ni, ksock_tx_t *tx); +void ksocknal_tx_prep(struct ksock_conn *, struct ksock_tx *tx); +void ksocknal_tx_done(lnet_ni_t *ni, struct ksock_tx *tx); static inline void -ksocknal_tx_decref(ksock_tx_t *tx) +ksocknal_tx_decref(struct ksock_tx *tx) { LASSERT(atomic_read(&tx->tx_refcount) > 0); if (atomic_dec_and_test(&tx->tx_refcount)) @@ -581,16 +578,16 @@ ksocknal_tx_decref(ksock_tx_t *tx) } static inline void -ksocknal_route_addref(ksock_route_t *route) +ksocknal_route_addref(struct ksock_route *route) { LASSERT(atomic_read(&route->ksnr_refcount) > 0); atomic_inc(&route->ksnr_refcount); } -void ksocknal_destroy_route(ksock_route_t *route); +void ksocknal_destroy_route(struct ksock_route *route); static inline void -ksocknal_route_decref(ksock_route_t *route) +ksocknal_route_decref(struct ksock_route *route) { LASSERT(atomic_read(&route->ksnr_refcount) > 0); if (atomic_dec_and_test(&route->ksnr_refcount)) @@ -598,16 +595,16 @@ ksocknal_route_decref(ksock_route_t *route) } static inline void -ksocknal_peer_addref(ksock_peer_t *peer) +ksocknal_peer_addref(struct ksock_peer *peer) { LASSERT(atomic_read(&peer->ksnp_refcount) > 0); atomic_inc(&peer->ksnp_refcount); } -void ksocknal_destroy_peer(ksock_peer_t *peer); +void ksocknal_destroy_peer(struct ksock_peer *peer); static inline void -ksocknal_peer_decref(ksock_peer_t *peer) +ksocknal_peer_decref(struct ksock_peer *peer) { LASSERT(atomic_read(&peer->ksnp_refcount) > 0); if (atomic_dec_and_test(&peer->ksnp_refcount)) @@ -625,71 +622,71 @@ int ksocknal_recv(lnet_ni_t *ni, void *private, lnet_msg_t *lntmsg, int ksocknal_accept(lnet_ni_t *ni, struct socket *sock); int ksocknal_add_peer(lnet_ni_t *ni, lnet_process_id_t id, __u32 ip, int port); -ksock_peer_t *ksocknal_find_peer_locked(lnet_ni_t *ni, lnet_process_id_t id); -ksock_peer_t *ksocknal_find_peer(lnet_ni_t *ni, lnet_process_id_t id); -void ksocknal_peer_failed(ksock_peer_t *peer); -int ksocknal_create_conn(lnet_ni_t *ni, ksock_route_t *route, +struct ksock_peer *ksocknal_find_peer_locked(lnet_ni_t *ni, lnet_process_id_t id); +struct ksock_peer *ksocknal_find_peer(lnet_ni_t *ni, lnet_process_id_t id); +void ksocknal_peer_failed(struct ksock_peer *peer); +int ksocknal_create_conn(lnet_ni_t *ni, struct ksock_route *route, struct socket *sock, int type); -void ksocknal_close_conn_locked(ksock_conn_t *conn, int why); -void ksocknal_terminate_conn(ksock_conn_t *conn); -void ksocknal_destroy_conn(ksock_conn_t *conn); -int ksocknal_close_peer_conns_locked(ksock_peer_t *peer, +void ksocknal_close_conn_locked(struct ksock_conn *conn, int why); +void ksocknal_terminate_conn(struct ksock_conn *conn); +void ksocknal_destroy_conn(struct ksock_conn *conn); +int ksocknal_close_peer_conns_locked(struct ksock_peer *peer, __u32 ipaddr, int why); -int ksocknal_close_conn_and_siblings(ksock_conn_t *conn, int why); +int ksocknal_close_conn_and_siblings(struct ksock_conn *conn, int why); int ksocknal_close_matching_conns(lnet_process_id_t id, __u32 ipaddr); -ksock_conn_t *ksocknal_find_conn_locked(ksock_peer_t *peer, - ksock_tx_t *tx, int nonblk); +struct ksock_conn *ksocknal_find_conn_locked(struct ksock_peer *peer, + struct ksock_tx *tx, int nonblk); -int ksocknal_launch_packet(lnet_ni_t *ni, ksock_tx_t *tx, +int ksocknal_launch_packet(lnet_ni_t *ni, struct ksock_tx *tx, lnet_process_id_t id); -ksock_tx_t *ksocknal_alloc_tx(int type, int size); -void ksocknal_free_tx(ksock_tx_t *tx); -ksock_tx_t *ksocknal_alloc_tx_noop(__u64 cookie, int nonblk); -void ksocknal_next_tx_carrier(ksock_conn_t *conn); -void ksocknal_queue_tx_locked(ksock_tx_t *tx, ksock_conn_t *conn); +struct ksock_tx *ksocknal_alloc_tx(int type, int size); +void ksocknal_free_tx(struct ksock_tx *tx); +struct ksock_tx *ksocknal_alloc_tx_noop(__u64 cookie, int nonblk); +void ksocknal_next_tx_carrier(struct ksock_conn *conn); +void ksocknal_queue_tx_locked(struct ksock_tx *tx, struct ksock_conn *conn); void ksocknal_txlist_done(lnet_ni_t *ni, struct list_head *txlist, int error); void ksocknal_notify(lnet_ni_t *ni, lnet_nid_t gw_nid, int alive); void ksocknal_query(struct lnet_ni *ni, lnet_nid_t nid, unsigned long *when); int ksocknal_thread_start(int (*fn)(void *arg), void *arg, char *name); void ksocknal_thread_fini(void); -void ksocknal_launch_all_connections_locked(ksock_peer_t *peer); -ksock_route_t *ksocknal_find_connectable_route_locked(ksock_peer_t *peer); -ksock_route_t *ksocknal_find_connecting_route_locked(ksock_peer_t *peer); -int ksocknal_new_packet(ksock_conn_t *conn, int skip); +void ksocknal_launch_all_connections_locked(struct ksock_peer *peer); +struct ksock_route *ksocknal_find_connectable_route_locked(struct ksock_peer *peer); +struct ksock_route *ksocknal_find_connecting_route_locked(struct ksock_peer *peer); +int ksocknal_new_packet(struct ksock_conn *conn, int skip); int ksocknal_scheduler(void *arg); int ksocknal_connd(void *arg); int ksocknal_reaper(void *arg); -int ksocknal_send_hello(lnet_ni_t *ni, ksock_conn_t *conn, +int ksocknal_send_hello(lnet_ni_t *ni, struct ksock_conn *conn, lnet_nid_t peer_nid, ksock_hello_msg_t *hello); -int ksocknal_recv_hello(lnet_ni_t *ni, ksock_conn_t *conn, +int ksocknal_recv_hello(lnet_ni_t *ni, struct ksock_conn *conn, ksock_hello_msg_t *hello, lnet_process_id_t *id, __u64 *incarnation); -void ksocknal_read_callback(ksock_conn_t *conn); -void ksocknal_write_callback(ksock_conn_t *conn); - -int ksocknal_lib_zc_capable(ksock_conn_t *conn); -void ksocknal_lib_save_callback(struct socket *sock, ksock_conn_t *conn); -void ksocknal_lib_set_callback(struct socket *sock, ksock_conn_t *conn); -void ksocknal_lib_reset_callback(struct socket *sock, ksock_conn_t *conn); -void ksocknal_lib_push_conn(ksock_conn_t *conn); -int ksocknal_lib_get_conn_addrs(ksock_conn_t *conn); +void ksocknal_read_callback(struct ksock_conn *conn); +void ksocknal_write_callback(struct ksock_conn *conn); + +int ksocknal_lib_zc_capable(struct ksock_conn *conn); +void ksocknal_lib_save_callback(struct socket *sock, struct ksock_conn *conn); +void ksocknal_lib_set_callback(struct socket *sock, struct ksock_conn *conn); +void ksocknal_lib_reset_callback(struct socket *sock, struct ksock_conn *conn); +void ksocknal_lib_push_conn(struct ksock_conn *conn); +int ksocknal_lib_get_conn_addrs(struct ksock_conn *conn); int ksocknal_lib_setup_sock(struct socket *so); -int ksocknal_lib_send_iov(ksock_conn_t *conn, ksock_tx_t *tx); -int ksocknal_lib_send_kiov(ksock_conn_t *conn, ksock_tx_t *tx); -void ksocknal_lib_eager_ack(ksock_conn_t *conn); -int ksocknal_lib_recv_iov(ksock_conn_t *conn); -int ksocknal_lib_recv_kiov(ksock_conn_t *conn); -int ksocknal_lib_get_conn_tunables(ksock_conn_t *conn, int *txmem, +int ksocknal_lib_send_iov(struct ksock_conn *conn, struct ksock_tx *tx); +int ksocknal_lib_send_kiov(struct ksock_conn *conn, struct ksock_tx *tx); +void ksocknal_lib_eager_ack(struct ksock_conn *conn); +int ksocknal_lib_recv_iov(struct ksock_conn *conn); +int ksocknal_lib_recv_kiov(struct ksock_conn *conn); +int ksocknal_lib_get_conn_tunables(struct ksock_conn *conn, int *txmem, int *rxmem, int *nagle); -void ksocknal_read_callback(ksock_conn_t *conn); -void ksocknal_write_callback(ksock_conn_t *conn); +void ksocknal_read_callback(struct ksock_conn *conn); +void ksocknal_write_callback(struct ksock_conn *conn); int ksocknal_tunables_init(void); -void ksocknal_lib_csum_tx(ksock_tx_t *tx); +void ksocknal_lib_csum_tx(struct ksock_tx *tx); -int ksocknal_lib_memory_pressure(ksock_conn_t *conn); +int ksocknal_lib_memory_pressure(struct ksock_conn *conn); int ksocknal_lib_bind_thread_to_cpu(int id); #endif /* _SOCKLND_SOCKLND_H_ */ diff --git a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c index 976fd78..e63d29b 100644 --- a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c +++ b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c @@ -23,10 +23,10 @@ #include "socklnd.h" -ksock_tx_t * +struct ksock_tx * ksocknal_alloc_tx(int type, int size) { - ksock_tx_t *tx = NULL; + struct ksock_tx *tx = NULL; if (type == KSOCK_MSG_NOOP) { LASSERT(size == KSOCK_NOOP_TX_SIZE); @@ -36,7 +36,7 @@ ksocknal_alloc_tx(int type, int size) if (!list_empty(&ksocknal_data.ksnd_idle_noop_txs)) { tx = list_entry(ksocknal_data.ksnd_idle_noop_txs. \ - next, ksock_tx_t, tx_list); + next, struct ksock_tx, tx_list); LASSERT(tx->tx_desc_size == size); list_del(&tx->tx_list); } @@ -61,10 +61,10 @@ ksocknal_alloc_tx(int type, int size) return tx; } -ksock_tx_t * +struct ksock_tx * ksocknal_alloc_tx_noop(__u64 cookie, int nonblk) { - ksock_tx_t *tx; + struct ksock_tx *tx; tx = ksocknal_alloc_tx(KSOCK_MSG_NOOP, KSOCK_NOOP_TX_SIZE); if (!tx) { @@ -87,7 +87,7 @@ ksocknal_alloc_tx_noop(__u64 cookie, int nonblk) } void -ksocknal_free_tx(ksock_tx_t *tx) +ksocknal_free_tx(struct ksock_tx *tx) { atomic_dec(&ksocknal_data.ksnd_nactive_txs); @@ -104,7 +104,7 @@ ksocknal_free_tx(ksock_tx_t *tx) } static int -ksocknal_send_iov(ksock_conn_t *conn, ksock_tx_t *tx) +ksocknal_send_iov(struct ksock_conn *conn, struct ksock_tx *tx) { struct kvec *iov = tx->tx_iov; int nob; @@ -141,7 +141,7 @@ ksocknal_send_iov(ksock_conn_t *conn, ksock_tx_t *tx) } static int -ksocknal_send_kiov(ksock_conn_t *conn, ksock_tx_t *tx) +ksocknal_send_kiov(struct ksock_conn *conn, struct ksock_tx *tx) { lnet_kiov_t *kiov = tx->tx_kiov; int nob; @@ -179,7 +179,7 @@ ksocknal_send_kiov(ksock_conn_t *conn, ksock_tx_t *tx) } static int -ksocknal_transmit(ksock_conn_t *conn, ksock_tx_t *tx) +ksocknal_transmit(struct ksock_conn *conn, struct ksock_tx *tx) { int rc; int bufnob; @@ -247,7 +247,7 @@ ksocknal_transmit(ksock_conn_t *conn, ksock_tx_t *tx) } static int -ksocknal_recv_iov(ksock_conn_t *conn) +ksocknal_recv_iov(struct ksock_conn *conn) { struct kvec *iov = conn->ksnc_rx_iov; int nob; @@ -294,7 +294,7 @@ ksocknal_recv_iov(ksock_conn_t *conn) } static int -ksocknal_recv_kiov(ksock_conn_t *conn) +ksocknal_recv_kiov(struct ksock_conn *conn) { lnet_kiov_t *kiov = conn->ksnc_rx_kiov; int nob; @@ -341,7 +341,7 @@ ksocknal_recv_kiov(ksock_conn_t *conn) } static int -ksocknal_receive(ksock_conn_t *conn) +ksocknal_receive(struct ksock_conn *conn) { /* * Return 1 on success, 0 on EOF, < 0 on error. @@ -391,7 +391,7 @@ ksocknal_receive(ksock_conn_t *conn) } void -ksocknal_tx_done(lnet_ni_t *ni, ksock_tx_t *tx) +ksocknal_tx_done(lnet_ni_t *ni, struct ksock_tx *tx) { lnet_msg_t *lnetmsg = tx->tx_lnetmsg; int rc = (!tx->tx_resid && !tx->tx_zc_aborted) ? 0 : -EIO; @@ -412,10 +412,10 @@ ksocknal_tx_done(lnet_ni_t *ni, ksock_tx_t *tx) void ksocknal_txlist_done(lnet_ni_t *ni, struct list_head *txlist, int error) { - ksock_tx_t *tx; + struct ksock_tx *tx; while (!list_empty(txlist)) { - tx = list_entry(txlist->next, ksock_tx_t, tx_list); + tx = list_entry(txlist->next, struct ksock_tx, tx_list); if (error && tx->tx_lnetmsg) { CNETERR("Deleting packet type %d len %d %s->%s\n", @@ -435,10 +435,10 @@ ksocknal_txlist_done(lnet_ni_t *ni, struct list_head *txlist, int error) } static void -ksocknal_check_zc_req(ksock_tx_t *tx) +ksocknal_check_zc_req(struct ksock_tx *tx) { - ksock_conn_t *conn = tx->tx_conn; - ksock_peer_t *peer = conn->ksnc_peer; + struct ksock_conn *conn = tx->tx_conn; + struct ksock_peer *peer = conn->ksnc_peer; /* * Set tx_msg.ksm_zc_cookies[0] to a unique non-zero cookie and add tx @@ -482,9 +482,9 @@ ksocknal_check_zc_req(ksock_tx_t *tx) } static void -ksocknal_uncheck_zc_req(ksock_tx_t *tx) +ksocknal_uncheck_zc_req(struct ksock_tx *tx) { - ksock_peer_t *peer = tx->tx_conn->ksnc_peer; + struct ksock_peer *peer = tx->tx_conn->ksnc_peer; LASSERT(tx->tx_msg.ksm_type != KSOCK_MSG_NOOP); LASSERT(tx->tx_zc_capable); @@ -508,7 +508,7 @@ ksocknal_uncheck_zc_req(ksock_tx_t *tx) } static int -ksocknal_process_transmit(ksock_conn_t *conn, ksock_tx_t *tx) +ksocknal_process_transmit(struct ksock_conn *conn, struct ksock_tx *tx) { int rc; @@ -583,7 +583,7 @@ ksocknal_process_transmit(ksock_conn_t *conn, ksock_tx_t *tx) } static void -ksocknal_launch_connection_locked(ksock_route_t *route) +ksocknal_launch_connection_locked(struct ksock_route *route) { /* called holding write lock on ksnd_global_lock */ @@ -604,9 +604,9 @@ ksocknal_launch_connection_locked(ksock_route_t *route) } void -ksocknal_launch_all_connections_locked(ksock_peer_t *peer) +ksocknal_launch_all_connections_locked(struct ksock_peer *peer) { - ksock_route_t *route; + struct ksock_route *route; /* called holding write lock on ksnd_global_lock */ for (;;) { @@ -619,18 +619,18 @@ ksocknal_launch_all_connections_locked(ksock_peer_t *peer) } } -ksock_conn_t * -ksocknal_find_conn_locked(ksock_peer_t *peer, ksock_tx_t *tx, int nonblk) +struct ksock_conn * +ksocknal_find_conn_locked(struct ksock_peer *peer, struct ksock_tx *tx, int nonblk) { struct list_head *tmp; - ksock_conn_t *conn; - ksock_conn_t *typed = NULL; - ksock_conn_t *fallback = NULL; + struct ksock_conn *conn; + struct ksock_conn *typed = NULL; + struct ksock_conn *fallback = NULL; int tnob = 0; int fnob = 0; list_for_each(tmp, &peer->ksnp_conns) { - ksock_conn_t *c = list_entry(tmp, ksock_conn_t, ksnc_list); + struct ksock_conn *c = list_entry(tmp, struct ksock_conn, ksnc_list); int nob = atomic_read(&c->ksnc_tx_nob) + c->ksnc_sock->sk->sk_wmem_queued; int rc; @@ -677,7 +677,7 @@ ksocknal_find_conn_locked(ksock_peer_t *peer, ksock_tx_t *tx, int nonblk) } void -ksocknal_tx_prep(ksock_conn_t *conn, ksock_tx_t *tx) +ksocknal_tx_prep(struct ksock_conn *conn, struct ksock_tx *tx) { conn->ksnc_proto->pro_pack(tx); @@ -687,11 +687,11 @@ ksocknal_tx_prep(ksock_conn_t *conn, ksock_tx_t *tx) } void -ksocknal_queue_tx_locked(ksock_tx_t *tx, ksock_conn_t *conn) +ksocknal_queue_tx_locked(struct ksock_tx *tx, struct ksock_conn *conn) { - ksock_sched_t *sched = conn->ksnc_scheduler; + struct ksock_sched *sched = conn->ksnc_scheduler; ksock_msg_t *msg = &tx->tx_msg; - ksock_tx_t *ztx = NULL; + struct ksock_tx *ztx = NULL; int bufnob = 0; /* @@ -784,15 +784,15 @@ ksocknal_queue_tx_locked(ksock_tx_t *tx, ksock_conn_t *conn) spin_unlock_bh(&sched->kss_lock); } -ksock_route_t * -ksocknal_find_connectable_route_locked(ksock_peer_t *peer) +struct ksock_route * +ksocknal_find_connectable_route_locked(struct ksock_peer *peer) { unsigned long now = cfs_time_current(); struct list_head *tmp; - ksock_route_t *route; + struct ksock_route *route; list_for_each(tmp, &peer->ksnp_routes) { - route = list_entry(tmp, ksock_route_t, ksnr_list); + route = list_entry(tmp, struct ksock_route, ksnr_list); LASSERT(!route->ksnr_connecting || route->ksnr_scheduled); @@ -820,14 +820,14 @@ ksocknal_find_connectable_route_locked(ksock_peer_t *peer) return NULL; } -ksock_route_t * -ksocknal_find_connecting_route_locked(ksock_peer_t *peer) +struct ksock_route * +ksocknal_find_connecting_route_locked(struct ksock_peer *peer) { struct list_head *tmp; - ksock_route_t *route; + struct ksock_route *route; list_for_each(tmp, &peer->ksnp_routes) { - route = list_entry(tmp, ksock_route_t, ksnr_list); + route = list_entry(tmp, struct ksock_route, ksnr_list); LASSERT(!route->ksnr_connecting || route->ksnr_scheduled); @@ -839,10 +839,10 @@ ksocknal_find_connecting_route_locked(ksock_peer_t *peer) } int -ksocknal_launch_packet(lnet_ni_t *ni, ksock_tx_t *tx, lnet_process_id_t id) +ksocknal_launch_packet(lnet_ni_t *ni, struct ksock_tx *tx, lnet_process_id_t id) { - ksock_peer_t *peer; - ksock_conn_t *conn; + struct ksock_peer *peer; + struct ksock_conn *conn; rwlock_t *g_lock; int retry; int rc; @@ -942,7 +942,7 @@ ksocknal_send(lnet_ni_t *ni, void *private, lnet_msg_t *lntmsg) lnet_kiov_t *payload_kiov = lntmsg->msg_kiov; unsigned int payload_offset = lntmsg->msg_offset; unsigned int payload_nob = lntmsg->msg_len; - ksock_tx_t *tx; + struct ksock_tx *tx; int desc_size; int rc; @@ -960,10 +960,10 @@ ksocknal_send(lnet_ni_t *ni, void *private, lnet_msg_t *lntmsg) LASSERT(!in_interrupt()); if (payload_iov) - desc_size = offsetof(ksock_tx_t, + desc_size = offsetof(struct ksock_tx, tx_frags.virt.iov[1 + payload_niov]); else - desc_size = offsetof(ksock_tx_t, + desc_size = offsetof(struct ksock_tx, tx_frags.paged.kiov[payload_niov]); if (lntmsg->msg_vmflush) @@ -1037,7 +1037,7 @@ ksocknal_thread_fini(void) } int -ksocknal_new_packet(ksock_conn_t *conn, int nob_to_skip) +ksocknal_new_packet(struct ksock_conn *conn, int nob_to_skip) { static char ksocknal_slop_buffer[4096]; @@ -1120,7 +1120,7 @@ ksocknal_new_packet(ksock_conn_t *conn, int nob_to_skip) } static int -ksocknal_process_receive(ksock_conn_t *conn) +ksocknal_process_receive(struct ksock_conn *conn) { lnet_hdr_t *lhdr; lnet_process_id_t *id; @@ -1328,8 +1328,8 @@ ksocknal_recv(lnet_ni_t *ni, void *private, lnet_msg_t *msg, int delayed, unsigned int niov, struct kvec *iov, lnet_kiov_t *kiov, unsigned int offset, unsigned int mlen, unsigned int rlen) { - ksock_conn_t *conn = private; - ksock_sched_t *sched = conn->ksnc_scheduler; + struct ksock_conn *conn = private; + struct ksock_sched *sched = conn->ksnc_scheduler; LASSERT(mlen <= rlen); LASSERT(niov <= LNET_MAX_IOV); @@ -1382,7 +1382,7 @@ ksocknal_recv(lnet_ni_t *ni, void *private, lnet_msg_t *msg, int delayed, } static inline int -ksocknal_sched_cansleep(ksock_sched_t *sched) +ksocknal_sched_cansleep(struct ksock_sched *sched) { int rc; @@ -1399,9 +1399,9 @@ ksocknal_sched_cansleep(ksock_sched_t *sched) int ksocknal_scheduler(void *arg) { struct ksock_sched_info *info; - ksock_sched_t *sched; - ksock_conn_t *conn; - ksock_tx_t *tx; + struct ksock_sched *sched; + struct ksock_conn *conn; + struct ksock_tx *tx; int rc; int nloops = 0; long id = (long)arg; @@ -1426,7 +1426,7 @@ int ksocknal_scheduler(void *arg) if (!list_empty(&sched->kss_rx_conns)) { conn = list_entry(sched->kss_rx_conns.next, - ksock_conn_t, ksnc_rx_list); + struct ksock_conn, ksnc_rx_list); list_del(&conn->ksnc_rx_list); LASSERT(conn->ksnc_rx_scheduled); @@ -1481,7 +1481,7 @@ int ksocknal_scheduler(void *arg) } conn = list_entry(sched->kss_tx_conns.next, - ksock_conn_t, ksnc_tx_list); + struct ksock_conn, ksnc_tx_list); list_del(&conn->ksnc_tx_list); LASSERT(conn->ksnc_tx_scheduled); @@ -1489,7 +1489,7 @@ int ksocknal_scheduler(void *arg) LASSERT(!list_empty(&conn->ksnc_tx_queue)); tx = list_entry(conn->ksnc_tx_queue.next, - ksock_tx_t, tx_list); + struct ksock_tx, tx_list); if (conn->ksnc_tx_carrier == tx) ksocknal_next_tx_carrier(conn); @@ -1575,9 +1575,9 @@ int ksocknal_scheduler(void *arg) * Add connection to kss_rx_conns of scheduler * and wakeup the scheduler. */ -void ksocknal_read_callback(ksock_conn_t *conn) +void ksocknal_read_callback(struct ksock_conn *conn) { - ksock_sched_t *sched; + struct ksock_sched *sched; sched = conn->ksnc_scheduler; @@ -1600,9 +1600,9 @@ void ksocknal_read_callback(ksock_conn_t *conn) * Add connection to kss_tx_conns of scheduler * and wakeup the scheduler. */ -void ksocknal_write_callback(ksock_conn_t *conn) +void ksocknal_write_callback(struct ksock_conn *conn) { - ksock_sched_t *sched; + struct ksock_sched *sched; sched = conn->ksnc_scheduler; @@ -1623,7 +1623,7 @@ void ksocknal_write_callback(ksock_conn_t *conn) spin_unlock_bh(&sched->kss_lock); } -static ksock_proto_t * +static struct ksock_proto * ksocknal_parse_proto_version(ksock_hello_msg_t *hello) { __u32 version = 0; @@ -1666,11 +1666,11 @@ ksocknal_parse_proto_version(ksock_hello_msg_t *hello) } int -ksocknal_send_hello(lnet_ni_t *ni, ksock_conn_t *conn, +ksocknal_send_hello(lnet_ni_t *ni, struct ksock_conn *conn, lnet_nid_t peer_nid, ksock_hello_msg_t *hello) { /* CAVEAT EMPTOR: this byte flips 'ipaddrs' */ - ksock_net_t *net = (ksock_net_t *)ni->ni_data; + struct ksock_net *net = (struct ksock_net *)ni->ni_data; LASSERT(hello->kshm_nips <= LNET_MAX_INTERFACES); @@ -1704,7 +1704,7 @@ ksocknal_invert_type(int type) } int -ksocknal_recv_hello(lnet_ni_t *ni, ksock_conn_t *conn, +ksocknal_recv_hello(lnet_ni_t *ni, struct ksock_conn *conn, ksock_hello_msg_t *hello, lnet_process_id_t *peerid, __u64 *incarnation) { @@ -1718,7 +1718,7 @@ ksocknal_recv_hello(lnet_ni_t *ni, ksock_conn_t *conn, int timeout; int proto_match; int rc; - ksock_proto_t *proto; + struct ksock_proto *proto; lnet_process_id_t recv_id; /* socket type set on active connections - not set on passive */ @@ -1847,10 +1847,10 @@ ksocknal_recv_hello(lnet_ni_t *ni, ksock_conn_t *conn, } static int -ksocknal_connect(ksock_route_t *route) +ksocknal_connect(struct ksock_route *route) { LIST_HEAD(zombies); - ksock_peer_t *peer = route->ksnr_peer; + struct ksock_peer *peer = route->ksnr_peer; int type; int wanted; struct socket *sock; @@ -1989,7 +1989,7 @@ ksocknal_connect(ksock_route_t *route) if (!list_empty(&peer->ksnp_tx_queue) && !peer->ksnp_accepting && !ksocknal_find_connecting_route_locked(peer)) { - ksock_conn_t *conn; + struct ksock_conn *conn; /* * ksnp_tx_queue is queued on a conn on successful @@ -1997,7 +1997,7 @@ ksocknal_connect(ksock_route_t *route) */ if (!list_empty(&peer->ksnp_conns)) { conn = list_entry(peer->ksnp_conns.next, - ksock_conn_t, ksnc_list); + struct ksock_conn, ksnc_list); LASSERT(conn->ksnc_proto == &ksocknal_protocol_v3x); } @@ -2131,10 +2131,10 @@ ksocknal_connd_check_stop(time64_t sec, long *timeout) * Go through connd_routes queue looking for a route that we can process * right now, @timeout_p can be updated if we need to come back later */ -static ksock_route_t * +static struct ksock_route * ksocknal_connd_get_route_locked(signed long *timeout_p) { - ksock_route_t *route; + struct ksock_route *route; unsigned long now; now = cfs_time_current(); @@ -2158,7 +2158,7 @@ int ksocknal_connd(void *arg) { spinlock_t *connd_lock = &ksocknal_data.ksnd_connd_lock; - ksock_connreq_t *cr; + struct ksock_connreq *cr; wait_queue_t wait; int nloops = 0; int cons_retry = 0; @@ -2174,7 +2174,7 @@ ksocknal_connd(void *arg) ksocknal_data.ksnd_connd_running++; while (!ksocknal_data.ksnd_shuttingdown) { - ksock_route_t *route = NULL; + struct ksock_route *route = NULL; time64_t sec = ktime_get_real_seconds(); long timeout = MAX_SCHEDULE_TIMEOUT; int dropped_lock = 0; @@ -2192,8 +2192,8 @@ ksocknal_connd(void *arg) if (!list_empty(&ksocknal_data.ksnd_connd_connreqs)) { /* Connection accepted by the listener */ - cr = list_entry(ksocknal_data.ksnd_connd_connreqs. \ - next, ksock_connreq_t, ksncr_list); + cr = list_entry(ksocknal_data.ksnd_connd_connreqs.next, + struct ksock_connreq, ksncr_list); list_del(&cr->ksncr_list); spin_unlock_bh(connd_lock); @@ -2267,17 +2267,17 @@ ksocknal_connd(void *arg) return 0; } -static ksock_conn_t * -ksocknal_find_timed_out_conn(ksock_peer_t *peer) +static struct ksock_conn * +ksocknal_find_timed_out_conn(struct ksock_peer *peer) { /* We're called with a shared lock on ksnd_global_lock */ - ksock_conn_t *conn; + struct ksock_conn *conn; struct list_head *ctmp; list_for_each(ctmp, &peer->ksnp_conns) { int error; - conn = list_entry(ctmp, ksock_conn_t, ksnc_list); + conn = list_entry(ctmp, struct ksock_conn, ksnc_list); /* Don't need the {get,put}connsock dance to deref ksnc_sock */ LASSERT(!conn->ksnc_closing); @@ -2351,10 +2351,10 @@ ksocknal_find_timed_out_conn(ksock_peer_t *peer) } static inline void -ksocknal_flush_stale_txs(ksock_peer_t *peer) +ksocknal_flush_stale_txs(struct ksock_peer *peer) { - ksock_tx_t *tx; - ksock_tx_t *tmp; + struct ksock_tx *tx; + struct ksock_tx *tmp; LIST_HEAD(stale_txs); write_lock_bh(&ksocknal_data.ksnd_global_lock); @@ -2374,12 +2374,12 @@ ksocknal_flush_stale_txs(ksock_peer_t *peer) } static int -ksocknal_send_keepalive_locked(ksock_peer_t *peer) +ksocknal_send_keepalive_locked(struct ksock_peer *peer) __must_hold(&ksocknal_data.ksnd_global_lock) { - ksock_sched_t *sched; - ksock_conn_t *conn; - ksock_tx_t *tx; + struct ksock_sched *sched; + struct ksock_conn *conn; + struct ksock_tx *tx; if (list_empty(&peer->ksnp_conns)) /* last_alive will be updated by create_conn */ return 0; @@ -2440,9 +2440,9 @@ static void ksocknal_check_peer_timeouts(int idx) { struct list_head *peers = &ksocknal_data.ksnd_peers[idx]; - ksock_peer_t *peer; - ksock_conn_t *conn; - ksock_tx_t *tx; + struct ksock_peer *peer; + struct ksock_conn *conn; + struct ksock_tx *tx; again: /* @@ -2483,8 +2483,8 @@ ksocknal_check_peer_timeouts(int idx) * holding only shared lock */ if (!list_empty(&peer->ksnp_tx_queue)) { - ksock_tx_t *tx = list_entry(peer->ksnp_tx_queue.next, - ksock_tx_t, tx_list); + struct ksock_tx *tx = list_entry(peer->ksnp_tx_queue.next, + struct ksock_tx, tx_list); if (cfs_time_aftereq(cfs_time_current(), tx->tx_deadline)) { @@ -2518,7 +2518,7 @@ ksocknal_check_peer_timeouts(int idx) } tx = list_entry(peer->ksnp_zc_req_list.next, - ksock_tx_t, tx_zc_list); + struct ksock_tx, tx_zc_list); deadline = tx->tx_deadline; resid = tx->tx_resid; conn = tx->tx_conn; @@ -2544,8 +2544,8 @@ int ksocknal_reaper(void *arg) { wait_queue_t wait; - ksock_conn_t *conn; - ksock_sched_t *sched; + struct ksock_conn *conn; + struct ksock_sched *sched; struct list_head enomem_conns; int nenomem_conns; long timeout; @@ -2563,7 +2563,7 @@ ksocknal_reaper(void *arg) while (!ksocknal_data.ksnd_shuttingdown) { if (!list_empty(&ksocknal_data.ksnd_deathrow_conns)) { conn = list_entry(ksocknal_data.ksnd_deathrow_conns.next, - ksock_conn_t, ksnc_list); + struct ksock_conn, ksnc_list); list_del(&conn->ksnc_list); spin_unlock_bh(&ksocknal_data.ksnd_reaper_lock); @@ -2577,7 +2577,7 @@ ksocknal_reaper(void *arg) if (!list_empty(&ksocknal_data.ksnd_zombie_conns)) { conn = list_entry(ksocknal_data.ksnd_zombie_conns.next, - ksock_conn_t, ksnc_list); + struct ksock_conn, ksnc_list); list_del(&conn->ksnc_list); spin_unlock_bh(&ksocknal_data.ksnd_reaper_lock); @@ -2599,7 +2599,7 @@ ksocknal_reaper(void *arg) /* reschedule all the connections that stalled with ENOMEM... */ nenomem_conns = 0; while (!list_empty(&enomem_conns)) { - conn = list_entry(enomem_conns.next, ksock_conn_t, + conn = list_entry(enomem_conns.next, struct ksock_conn, ksnc_tx_list); list_del(&conn->ksnc_tx_list); diff --git a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_lib.c b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_lib.c index 964b4e3..44d417b 100644 --- a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_lib.c +++ b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_lib.c @@ -37,7 +37,7 @@ #include "socklnd.h" int -ksocknal_lib_get_conn_addrs(ksock_conn_t *conn) +ksocknal_lib_get_conn_addrs(struct ksock_conn *conn) { int rc = lnet_sock_getaddr(conn->ksnc_sock, 1, &conn->ksnc_ipaddr, &conn->ksnc_port); @@ -60,7 +60,7 @@ ksocknal_lib_get_conn_addrs(ksock_conn_t *conn) } int -ksocknal_lib_zc_capable(ksock_conn_t *conn) +ksocknal_lib_zc_capable(struct ksock_conn *conn) { int caps = conn->ksnc_sock->sk->sk_route_caps; @@ -75,7 +75,7 @@ ksocknal_lib_zc_capable(ksock_conn_t *conn) } int -ksocknal_lib_send_iov(ksock_conn_t *conn, ksock_tx_t *tx) +ksocknal_lib_send_iov(struct ksock_conn *conn, struct ksock_tx *tx) { struct socket *sock = conn->ksnc_sock; int nob; @@ -118,7 +118,7 @@ ksocknal_lib_send_iov(ksock_conn_t *conn, ksock_tx_t *tx) } int -ksocknal_lib_send_kiov(ksock_conn_t *conn, ksock_tx_t *tx) +ksocknal_lib_send_kiov(struct ksock_conn *conn, struct ksock_tx *tx) { struct socket *sock = conn->ksnc_sock; lnet_kiov_t *kiov = tx->tx_kiov; @@ -187,7 +187,7 @@ ksocknal_lib_send_kiov(ksock_conn_t *conn, ksock_tx_t *tx) } void -ksocknal_lib_eager_ack(ksock_conn_t *conn) +ksocknal_lib_eager_ack(struct ksock_conn *conn) { int opt = 1; struct socket *sock = conn->ksnc_sock; @@ -203,7 +203,7 @@ ksocknal_lib_eager_ack(ksock_conn_t *conn) } int -ksocknal_lib_recv_iov(ksock_conn_t *conn) +ksocknal_lib_recv_iov(struct ksock_conn *conn) { #if SOCKNAL_SINGLE_FRAG_RX struct kvec scratch; @@ -309,7 +309,7 @@ ksocknal_lib_kiov_vmap(lnet_kiov_t *kiov, int niov, } int -ksocknal_lib_recv_kiov(ksock_conn_t *conn) +ksocknal_lib_recv_kiov(struct ksock_conn *conn) { #if SOCKNAL_SINGLE_FRAG_RX || !SOCKNAL_RISK_KMAP_DEADLOCK struct kvec scratch; @@ -393,7 +393,7 @@ ksocknal_lib_recv_kiov(ksock_conn_t *conn) } void -ksocknal_lib_csum_tx(ksock_tx_t *tx) +ksocknal_lib_csum_tx(struct ksock_tx *tx) { int i; __u32 csum; @@ -432,7 +432,7 @@ ksocknal_lib_csum_tx(ksock_tx_t *tx) } int -ksocknal_lib_get_conn_tunables(ksock_conn_t *conn, int *txmem, int *rxmem, int *nagle) +ksocknal_lib_get_conn_tunables(struct ksock_conn *conn, int *txmem, int *rxmem, int *nagle) { struct socket *sock = conn->ksnc_sock; int len; @@ -562,7 +562,7 @@ ksocknal_lib_setup_sock(struct socket *sock) } void -ksocknal_lib_push_conn(ksock_conn_t *conn) +ksocknal_lib_push_conn(struct ksock_conn *conn) { struct sock *sk; struct tcp_sock *tp; @@ -599,7 +599,7 @@ ksocknal_lib_push_conn(ksock_conn_t *conn) static void ksocknal_data_ready(struct sock *sk) { - ksock_conn_t *conn; + struct ksock_conn *conn; /* interleave correctly with closing sockets... */ LASSERT(!in_irq()); @@ -619,7 +619,7 @@ ksocknal_data_ready(struct sock *sk) static void ksocknal_write_space(struct sock *sk) { - ksock_conn_t *conn; + struct ksock_conn *conn; int wspace; int min_wpace; @@ -663,14 +663,14 @@ ksocknal_write_space(struct sock *sk) } void -ksocknal_lib_save_callback(struct socket *sock, ksock_conn_t *conn) +ksocknal_lib_save_callback(struct socket *sock, struct ksock_conn *conn) { conn->ksnc_saved_data_ready = sock->sk->sk_data_ready; conn->ksnc_saved_write_space = sock->sk->sk_write_space; } void -ksocknal_lib_set_callback(struct socket *sock, ksock_conn_t *conn) +ksocknal_lib_set_callback(struct socket *sock, struct ksock_conn *conn) { sock->sk->sk_user_data = conn; sock->sk->sk_data_ready = ksocknal_data_ready; @@ -678,7 +678,7 @@ ksocknal_lib_set_callback(struct socket *sock, ksock_conn_t *conn) } void -ksocknal_lib_reset_callback(struct socket *sock, ksock_conn_t *conn) +ksocknal_lib_reset_callback(struct socket *sock, struct ksock_conn *conn) { /* * Remove conn's network callbacks. @@ -697,10 +697,10 @@ ksocknal_lib_reset_callback(struct socket *sock, ksock_conn_t *conn) } int -ksocknal_lib_memory_pressure(ksock_conn_t *conn) +ksocknal_lib_memory_pressure(struct ksock_conn *conn) { int rc = 0; - ksock_sched_t *sched; + struct ksock_sched *sched; sched = conn->ksnc_scheduler; spin_lock_bh(&sched->kss_lock); diff --git a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_modparams.c b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_modparams.c index 6329cbe..fc7eec8 100644 --- a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_modparams.c +++ b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_modparams.c @@ -139,7 +139,7 @@ module_param(protocol, int, 0644); MODULE_PARM_DESC(protocol, "protocol version"); #endif -ksock_tunables_t ksocknal_tunables; +struct ksock_tunables ksocknal_tunables; int ksocknal_tunables_init(void) { diff --git a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_proto.c b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_proto.c index 32cc31e..e1bf910 100644 --- a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_proto.c +++ b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_proto.c @@ -38,8 +38,8 @@ * pro_match_tx() : Called holding glock */ -static ksock_tx_t * -ksocknal_queue_tx_msg_v1(ksock_conn_t *conn, ksock_tx_t *tx_msg) +static struct ksock_tx * +ksocknal_queue_tx_msg_v1(struct ksock_conn *conn, struct ksock_tx *tx_msg) { /* V1.x, just enqueue it */ list_add_tail(&tx_msg->tx_list, &conn->ksnc_tx_queue); @@ -47,9 +47,9 @@ ksocknal_queue_tx_msg_v1(ksock_conn_t *conn, ksock_tx_t *tx_msg) } void -ksocknal_next_tx_carrier(ksock_conn_t *conn) +ksocknal_next_tx_carrier(struct ksock_conn *conn) { - ksock_tx_t *tx = conn->ksnc_tx_carrier; + struct ksock_tx *tx = conn->ksnc_tx_carrier; /* Called holding BH lock: conn->ksnc_scheduler->kss_lock */ LASSERT(!list_empty(&conn->ksnc_tx_queue)); @@ -66,10 +66,10 @@ ksocknal_next_tx_carrier(ksock_conn_t *conn) } static int -ksocknal_queue_tx_zcack_v2(ksock_conn_t *conn, - ksock_tx_t *tx_ack, __u64 cookie) +ksocknal_queue_tx_zcack_v2(struct ksock_conn *conn, + struct ksock_tx *tx_ack, __u64 cookie) { - ksock_tx_t *tx = conn->ksnc_tx_carrier; + struct ksock_tx *tx = conn->ksnc_tx_carrier; LASSERT(!tx_ack || tx_ack->tx_msg.ksm_type == KSOCK_MSG_NOOP); @@ -112,10 +112,10 @@ ksocknal_queue_tx_zcack_v2(ksock_conn_t *conn, return 1; } -static ksock_tx_t * -ksocknal_queue_tx_msg_v2(ksock_conn_t *conn, ksock_tx_t *tx_msg) +static struct ksock_tx * +ksocknal_queue_tx_msg_v2(struct ksock_conn *conn, struct ksock_tx *tx_msg) { - ksock_tx_t *tx = conn->ksnc_tx_carrier; + struct ksock_tx *tx = conn->ksnc_tx_carrier; /* * Enqueue tx_msg: @@ -149,10 +149,10 @@ ksocknal_queue_tx_msg_v2(ksock_conn_t *conn, ksock_tx_t *tx_msg) } static int -ksocknal_queue_tx_zcack_v3(ksock_conn_t *conn, - ksock_tx_t *tx_ack, __u64 cookie) +ksocknal_queue_tx_zcack_v3(struct ksock_conn *conn, + struct ksock_tx *tx_ack, __u64 cookie) { - ksock_tx_t *tx; + struct ksock_tx *tx; if (conn->ksnc_type != SOCKLND_CONN_ACK) return ksocknal_queue_tx_zcack_v2(conn, tx_ack, cookie); @@ -267,7 +267,7 @@ ksocknal_queue_tx_zcack_v3(ksock_conn_t *conn, } static int -ksocknal_match_tx(ksock_conn_t *conn, ksock_tx_t *tx, int nonblk) +ksocknal_match_tx(struct ksock_conn *conn, struct ksock_tx *tx, int nonblk) { int nob; @@ -311,7 +311,7 @@ ksocknal_match_tx(ksock_conn_t *conn, ksock_tx_t *tx, int nonblk) } static int -ksocknal_match_tx_v3(ksock_conn_t *conn, ksock_tx_t *tx, int nonblk) +ksocknal_match_tx_v3(struct ksock_conn *conn, struct ksock_tx *tx, int nonblk) { int nob; @@ -355,18 +355,18 @@ ksocknal_match_tx_v3(ksock_conn_t *conn, ksock_tx_t *tx, int nonblk) /* (Sink) handle incoming ZC request from sender */ static int -ksocknal_handle_zcreq(ksock_conn_t *c, __u64 cookie, int remote) +ksocknal_handle_zcreq(struct ksock_conn *c, __u64 cookie, int remote) { - ksock_peer_t *peer = c->ksnc_peer; - ksock_conn_t *conn; - ksock_tx_t *tx; + struct ksock_peer *peer = c->ksnc_peer; + struct ksock_conn *conn; + struct ksock_tx *tx; int rc; read_lock(&ksocknal_data.ksnd_global_lock); conn = ksocknal_find_conn_locked(peer, NULL, !!remote); if (conn) { - ksock_sched_t *sched = conn->ksnc_scheduler; + struct ksock_sched *sched = conn->ksnc_scheduler; LASSERT(conn->ksnc_proto->pro_queue_tx_zcack); @@ -399,12 +399,12 @@ ksocknal_handle_zcreq(ksock_conn_t *c, __u64 cookie, int remote) /* (Sender) handle ZC_ACK from sink */ static int -ksocknal_handle_zcack(ksock_conn_t *conn, __u64 cookie1, __u64 cookie2) +ksocknal_handle_zcack(struct ksock_conn *conn, __u64 cookie1, __u64 cookie2) { - ksock_peer_t *peer = conn->ksnc_peer; - ksock_tx_t *tx; - ksock_tx_t *temp; - ksock_tx_t *tmp; + struct ksock_peer *peer = conn->ksnc_peer; + struct ksock_tx *tx; + struct ksock_tx *temp; + struct ksock_tx *tmp; LIST_HEAD(zlist); int count; @@ -446,7 +446,7 @@ ksocknal_handle_zcack(ksock_conn_t *conn, __u64 cookie1, __u64 cookie2) } static int -ksocknal_send_hello_v1(ksock_conn_t *conn, ksock_hello_msg_t *hello) +ksocknal_send_hello_v1(struct ksock_conn *conn, ksock_hello_msg_t *hello) { struct socket *sock = conn->ksnc_sock; lnet_hdr_t *hdr; @@ -521,7 +521,7 @@ out: } static int -ksocknal_send_hello_v2(ksock_conn_t *conn, ksock_hello_msg_t *hello) +ksocknal_send_hello_v2(struct ksock_conn *conn, ksock_hello_msg_t *hello) { struct socket *sock = conn->ksnc_sock; int rc; @@ -563,7 +563,7 @@ ksocknal_send_hello_v2(ksock_conn_t *conn, ksock_hello_msg_t *hello) } static int -ksocknal_recv_hello_v1(ksock_conn_t *conn, ksock_hello_msg_t *hello, +ksocknal_recv_hello_v1(struct ksock_conn *conn, ksock_hello_msg_t *hello, int timeout) { struct socket *sock = conn->ksnc_sock; @@ -639,7 +639,7 @@ out: } static int -ksocknal_recv_hello_v2(ksock_conn_t *conn, ksock_hello_msg_t *hello, int timeout) +ksocknal_recv_hello_v2(struct ksock_conn *conn, ksock_hello_msg_t *hello, int timeout) { struct socket *sock = conn->ksnc_sock; int rc; @@ -705,7 +705,7 @@ ksocknal_recv_hello_v2(ksock_conn_t *conn, ksock_hello_msg_t *hello, int timeout } static void -ksocknal_pack_msg_v1(ksock_tx_t *tx) +ksocknal_pack_msg_v1(struct ksock_tx *tx) { /* V1.x has no KSOCK_MSG_NOOP */ LASSERT(tx->tx_msg.ksm_type != KSOCK_MSG_NOOP); @@ -719,7 +719,7 @@ ksocknal_pack_msg_v1(ksock_tx_t *tx) } static void -ksocknal_pack_msg_v2(ksock_tx_t *tx) +ksocknal_pack_msg_v2(struct ksock_tx *tx) { tx->tx_iov[0].iov_base = &tx->tx_msg; @@ -755,7 +755,7 @@ ksocknal_unpack_msg_v2(ksock_msg_t *msg) return; /* Do nothing */ } -ksock_proto_t ksocknal_protocol_v1x = { +struct ksock_proto ksocknal_protocol_v1x = { .pro_version = KSOCK_PROTO_V1, .pro_send_hello = ksocknal_send_hello_v1, .pro_recv_hello = ksocknal_recv_hello_v1, @@ -768,7 +768,7 @@ ksock_proto_t ksocknal_protocol_v1x = { .pro_match_tx = ksocknal_match_tx }; -ksock_proto_t ksocknal_protocol_v2x = { +struct ksock_proto ksocknal_protocol_v2x = { .pro_version = KSOCK_PROTO_V2, .pro_send_hello = ksocknal_send_hello_v2, .pro_recv_hello = ksocknal_recv_hello_v2, @@ -781,7 +781,7 @@ ksock_proto_t ksocknal_protocol_v2x = { .pro_match_tx = ksocknal_match_tx }; -ksock_proto_t ksocknal_protocol_v3x = { +struct ksock_proto ksocknal_protocol_v3x = { .pro_version = KSOCK_PROTO_V3, .pro_send_hello = ksocknal_send_hello_v2, .pro_recv_hello = ksocknal_recv_hello_v2, -- 1.7.1 From jsimmons at infradead.org Sat Jun 11 00:36:06 2016 From: jsimmons at infradead.org (James Simmons) Date: Sat, 11 Jun 2016 01:36:06 +0100 (BST) Subject: [lustre-devel] [PATCH 11/21] drivers: staging: lustre: Replace CURRENT_TIME with current_fs_time() In-Reply-To: <1465448705-25055-12-git-send-email-deepa.kernel@gmail.com> References: <1465448705-25055-1-git-send-email-deepa.kernel@gmail.com> <1465448705-25055-12-git-send-email-deepa.kernel@gmail.com> Message-ID: > CURRENT_TIME macro is not appropriate for filesystems as it > doesn't use the right granularity for filesystem timestamps. > Use current_fs_time() instead. > > This is also in preparation for the patch that transitions > vfs timestamps to use 64 bit time and hence make them > y2038 safe. As part of the effort current_fs_time() will be > extended to do range checks. Hence, it is necessary for all > file system timestamps to use current_fs_time(). > > Also change format string for prints so that these are valid > when vfs is transitioned to use 64 bit timestamps. Acked-by: James Simmons > Signed-off-by: Deepa Dinamani > Cc: Greg Kroah-Hartman > Cc: lustre-devel at lists.lustre.org > --- > drivers/staging/lustre/lustre/llite/llite_lib.c | 17 +++++++++-------- > drivers/staging/lustre/lustre/llite/namei.c | 4 ++-- > drivers/staging/lustre/lustre/mdc/mdc_reint.c | 6 +++--- > .../staging/lustre/lustre/obdclass/linux/linux-obdo.c | 6 +++--- > drivers/staging/lustre/lustre/obdclass/obdo.c | 6 +++--- > drivers/staging/lustre/lustre/osc/osc_io.c | 2 +- > 6 files changed, 21 insertions(+), 20 deletions(-) > > diff --git a/drivers/staging/lustre/lustre/llite/llite_lib.c b/drivers/staging/lustre/lustre/llite/llite_lib.c > index 96c7e9f..919748f 100644 > --- a/drivers/staging/lustre/lustre/llite/llite_lib.c > +++ b/drivers/staging/lustre/lustre/llite/llite_lib.c > @@ -1219,6 +1219,7 @@ static int ll_setattr_done_writing(struct inode *inode, > int ll_setattr_raw(struct dentry *dentry, struct iattr *attr, bool hsm_import) > { > struct inode *inode = d_inode(dentry); > + struct super_block *sb = inode->i_sb; > struct ll_inode_info *lli = ll_i2info(inode); > struct md_op_data *op_data = NULL; > struct md_open_data *mod = NULL; > @@ -1258,23 +1259,23 @@ int ll_setattr_raw(struct dentry *dentry, struct iattr *attr, bool hsm_import) > > /* We mark all of the fields "set" so MDS/OST does not re-set them */ > if (attr->ia_valid & ATTR_CTIME) { > - attr->ia_ctime = CURRENT_TIME; > + attr->ia_ctime = current_fs_time(sb); > attr->ia_valid |= ATTR_CTIME_SET; > } > if (!(attr->ia_valid & ATTR_ATIME_SET) && > (attr->ia_valid & ATTR_ATIME)) { > - attr->ia_atime = CURRENT_TIME; > + attr->ia_atime = current_fs_time(sb); > attr->ia_valid |= ATTR_ATIME_SET; > } > if (!(attr->ia_valid & ATTR_MTIME_SET) && > (attr->ia_valid & ATTR_MTIME)) { > - attr->ia_mtime = CURRENT_TIME; > + attr->ia_mtime = current_fs_time(sb); > attr->ia_valid |= ATTR_MTIME_SET; > } > > if (attr->ia_valid & (ATTR_MTIME | ATTR_CTIME)) > - CDEBUG(D_INODE, "setting mtime %lu, ctime %lu, now = %llu\n", > - LTIME_S(attr->ia_mtime), LTIME_S(attr->ia_ctime), > + CDEBUG(D_INODE, "setting mtime %llu, ctime %llu, now = %llu\n", > + (long long)LTIME_S(attr->ia_mtime), (long long)LTIME_S(attr->ia_ctime), > (s64)ktime_get_real_seconds()); > > /* We always do an MDS RPC, even if we're only changing the size; > @@ -1564,9 +1565,9 @@ void ll_update_inode(struct inode *inode, struct lustre_md *md) > } > if (body->valid & OBD_MD_FLMTIME) { > if (body->mtime > LTIME_S(inode->i_mtime)) { > - CDEBUG(D_INODE, "setting ino %lu mtime from %lu to %llu\n", > - inode->i_ino, LTIME_S(inode->i_mtime), > - body->mtime); > + CDEBUG(D_INODE, "setting ino %lu mtime from %llu to %llu\n", > + inode->i_ino, (unsigned long long)LTIME_S(inode->i_mtime), > + (unsigned long long)body->mtime); > LTIME_S(inode->i_mtime) = body->mtime; > } > lli->lli_mtime = body->mtime; > diff --git a/drivers/staging/lustre/lustre/llite/namei.c b/drivers/staging/lustre/lustre/llite/namei.c > index 5eba0eb..48ed1ce 100644 > --- a/drivers/staging/lustre/lustre/llite/namei.c > +++ b/drivers/staging/lustre/lustre/llite/namei.c > @@ -731,8 +731,8 @@ static void ll_update_times(struct ptlrpc_request *request, > LASSERT(body); > if (body->valid & OBD_MD_FLMTIME && > body->mtime > LTIME_S(inode->i_mtime)) { > - CDEBUG(D_INODE, "setting fid "DFID" mtime from %lu to %llu\n", > - PFID(ll_inode2fid(inode)), LTIME_S(inode->i_mtime), > + CDEBUG(D_INODE, "setting fid "DFID" mtime from %llu to %llu\n", > + PFID(ll_inode2fid(inode)), (unsigned long long)LTIME_S(inode->i_mtime), > body->mtime); > LTIME_S(inode->i_mtime) = body->mtime; > } > diff --git a/drivers/staging/lustre/lustre/mdc/mdc_reint.c b/drivers/staging/lustre/lustre/mdc/mdc_reint.c > index 4ef3db1..9980f3a 100644 > --- a/drivers/staging/lustre/lustre/mdc/mdc_reint.c > +++ b/drivers/staging/lustre/lustre/mdc/mdc_reint.c > @@ -143,9 +143,9 @@ int mdc_setattr(struct obd_export *exp, struct md_op_data *op_data, > rpc_lock = obd->u.cli.cl_rpc_lock; > > if (op_data->op_attr.ia_valid & (ATTR_MTIME | ATTR_CTIME)) > - CDEBUG(D_INODE, "setting mtime %ld, ctime %ld\n", > - LTIME_S(op_data->op_attr.ia_mtime), > - LTIME_S(op_data->op_attr.ia_ctime)); > + CDEBUG(D_INODE, "setting mtime %lld, ctime %lld\n", > + (long long)LTIME_S(op_data->op_attr.ia_mtime), > + (long long)LTIME_S(op_data->op_attr.ia_ctime)); > mdc_setattr_pack(req, op_data, ea, ealen, ea2, ea2len); > > ptlrpc_request_set_replen(req); > diff --git a/drivers/staging/lustre/lustre/obdclass/linux/linux-obdo.c b/drivers/staging/lustre/lustre/obdclass/linux/linux-obdo.c > index b41b65e..ccd2b7b 100644 > --- a/drivers/staging/lustre/lustre/obdclass/linux/linux-obdo.c > +++ b/drivers/staging/lustre/lustre/obdclass/linux/linux-obdo.c > @@ -54,9 +54,9 @@ void obdo_refresh_inode(struct inode *dst, struct obdo *src, u32 valid) > > if (valid & (OBD_MD_FLCTIME | OBD_MD_FLMTIME)) > CDEBUG(D_INODE, > - "valid %#llx, cur time %lu/%lu, new %llu/%llu\n", > - src->o_valid, LTIME_S(dst->i_mtime), > - LTIME_S(dst->i_ctime), src->o_mtime, src->o_ctime); > + "valid %#llx, cur time %llu/%llu, new %llu/%llu\n", > + src->o_valid, (unsigned long long)LTIME_S(dst->i_mtime), > + (unsigned long long)LTIME_S(dst->i_ctime), src->o_mtime, src->o_ctime); > > if (valid & OBD_MD_FLATIME && src->o_atime > LTIME_S(dst->i_atime)) > LTIME_S(dst->i_atime) = src->o_atime; > diff --git a/drivers/staging/lustre/lustre/obdclass/obdo.c b/drivers/staging/lustre/lustre/obdclass/obdo.c > index 748e33f..973fa4c 100644 > --- a/drivers/staging/lustre/lustre/obdclass/obdo.c > +++ b/drivers/staging/lustre/lustre/obdclass/obdo.c > @@ -62,9 +62,9 @@ void obdo_from_inode(struct obdo *dst, struct inode *src, u32 valid) > u32 newvalid = 0; > > if (valid & (OBD_MD_FLCTIME | OBD_MD_FLMTIME)) > - CDEBUG(D_INODE, "valid %x, new time %lu/%lu\n", > - valid, LTIME_S(src->i_mtime), > - LTIME_S(src->i_ctime)); > + CDEBUG(D_INODE, "valid %x, new time %llu/%llu\n", > + valid, (unsigned long long)LTIME_S(src->i_mtime), > + (unsigned long long)LTIME_S(src->i_ctime)); > > if (valid & OBD_MD_FLATIME) { > dst->o_atime = LTIME_S(src->i_atime); > diff --git a/drivers/staging/lustre/lustre/osc/osc_io.c b/drivers/staging/lustre/lustre/osc/osc_io.c > index d534b0e..99f69bb 100644 > --- a/drivers/staging/lustre/lustre/osc/osc_io.c > +++ b/drivers/staging/lustre/lustre/osc/osc_io.c > @@ -221,7 +221,7 @@ static void osc_page_touch_at(const struct lu_env *env, > kms > loi->loi_kms ? "" : "not ", loi->loi_kms, kms, > loi->loi_lvb.lvb_size); > > - attr->cat_mtime = attr->cat_ctime = LTIME_S(CURRENT_TIME); > + attr->cat_mtime = attr->cat_ctime = ktime_get_real_seconds(); > valid = CAT_MTIME | CAT_CTIME; > if (kms > loi->loi_kms) { > attr->cat_kms = kms; > -- > 1.9.1 > > _______________________________________________ > lustre-devel mailing list > lustre-devel at lists.lustre.org > http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org > From adilger at dilger.ca Sat Jun 11 01:53:50 2016 From: adilger at dilger.ca (Andreas Dilger) Date: Fri, 10 Jun 2016 19:53:50 -0600 Subject: [lustre-devel] [PATCH 11/21] drivers: staging: lustre: Replace CURRENT_TIME with current_fs_time() In-Reply-To: References: <1465448705-25055-1-git-send-email-deepa.kernel@gmail.com> <1465448705-25055-12-git-send-email-deepa.kernel@gmail.com> Message-ID: On Jun 10, 2016, at 6:36 PM, James Simmons wrote: > > >> CURRENT_TIME macro is not appropriate for filesystems as it >> doesn't use the right granularity for filesystem timestamps. >> Use current_fs_time() instead. >> >> This is also in preparation for the patch that transitions >> vfs timestamps to use 64 bit time and hence make them >> y2038 safe. As part of the effort current_fs_time() will be >> extended to do range checks. Hence, it is necessary for all >> file system timestamps to use current_fs_time(). >> >> Also change format string for prints so that these are valid >> when vfs is transitioned to use 64 bit timestamps. > > Acked-by: James Simmons Actually, Linus NAK'd the base patch so there isn't any point in this one landing. Cheers, Andreas >> Signed-off-by: Deepa Dinamani >> Cc: Greg Kroah-Hartman >> Cc: lustre-devel at lists.lustre.org >> --- >> drivers/staging/lustre/lustre/llite/llite_lib.c | 17 +++++++++-------- >> drivers/staging/lustre/lustre/llite/namei.c | 4 ++-- >> drivers/staging/lustre/lustre/mdc/mdc_reint.c | 6 +++--- >> .../staging/lustre/lustre/obdclass/linux/linux-obdo.c | 6 +++--- >> drivers/staging/lustre/lustre/obdclass/obdo.c | 6 +++--- >> drivers/staging/lustre/lustre/osc/osc_io.c | 2 +- >> 6 files changed, 21 insertions(+), 20 deletions(-) >> >> diff --git a/drivers/staging/lustre/lustre/llite/llite_lib.c b/drivers/staging/lustre/lustre/llite/llite_lib.c >> index 96c7e9f..919748f 100644 >> --- a/drivers/staging/lustre/lustre/llite/llite_lib.c >> +++ b/drivers/staging/lustre/lustre/llite/llite_lib.c >> @@ -1219,6 +1219,7 @@ static int ll_setattr_done_writing(struct inode *inode, >> int ll_setattr_raw(struct dentry *dentry, struct iattr *attr, bool hsm_import) >> { >> struct inode *inode = d_inode(dentry); >> + struct super_block *sb = inode->i_sb; >> struct ll_inode_info *lli = ll_i2info(inode); >> struct md_op_data *op_data = NULL; >> struct md_open_data *mod = NULL; >> @@ -1258,23 +1259,23 @@ int ll_setattr_raw(struct dentry *dentry, struct iattr *attr, bool hsm_import) >> >> /* We mark all of the fields "set" so MDS/OST does not re-set them */ >> if (attr->ia_valid & ATTR_CTIME) { >> - attr->ia_ctime = CURRENT_TIME; >> + attr->ia_ctime = current_fs_time(sb); >> attr->ia_valid |= ATTR_CTIME_SET; >> } >> if (!(attr->ia_valid & ATTR_ATIME_SET) && >> (attr->ia_valid & ATTR_ATIME)) { >> - attr->ia_atime = CURRENT_TIME; >> + attr->ia_atime = current_fs_time(sb); >> attr->ia_valid |= ATTR_ATIME_SET; >> } >> if (!(attr->ia_valid & ATTR_MTIME_SET) && >> (attr->ia_valid & ATTR_MTIME)) { >> - attr->ia_mtime = CURRENT_TIME; >> + attr->ia_mtime = current_fs_time(sb); >> attr->ia_valid |= ATTR_MTIME_SET; >> } >> >> if (attr->ia_valid & (ATTR_MTIME | ATTR_CTIME)) >> - CDEBUG(D_INODE, "setting mtime %lu, ctime %lu, now = %llu\n", >> - LTIME_S(attr->ia_mtime), LTIME_S(attr->ia_ctime), >> + CDEBUG(D_INODE, "setting mtime %llu, ctime %llu, now = %llu\n", >> + (long long)LTIME_S(attr->ia_mtime), (long long)LTIME_S(attr->ia_ctime), >> (s64)ktime_get_real_seconds()); >> >> /* We always do an MDS RPC, even if we're only changing the size; >> @@ -1564,9 +1565,9 @@ void ll_update_inode(struct inode *inode, struct lustre_md *md) >> } >> if (body->valid & OBD_MD_FLMTIME) { >> if (body->mtime > LTIME_S(inode->i_mtime)) { >> - CDEBUG(D_INODE, "setting ino %lu mtime from %lu to %llu\n", >> - inode->i_ino, LTIME_S(inode->i_mtime), >> - body->mtime); >> + CDEBUG(D_INODE, "setting ino %lu mtime from %llu to %llu\n", >> + inode->i_ino, (unsigned long long)LTIME_S(inode->i_mtime), >> + (unsigned long long)body->mtime); >> LTIME_S(inode->i_mtime) = body->mtime; >> } >> lli->lli_mtime = body->mtime; >> diff --git a/drivers/staging/lustre/lustre/llite/namei.c b/drivers/staging/lustre/lustre/llite/namei.c >> index 5eba0eb..48ed1ce 100644 >> --- a/drivers/staging/lustre/lustre/llite/namei.c >> +++ b/drivers/staging/lustre/lustre/llite/namei.c >> @@ -731,8 +731,8 @@ static void ll_update_times(struct ptlrpc_request *request, >> LASSERT(body); >> if (body->valid & OBD_MD_FLMTIME && >> body->mtime > LTIME_S(inode->i_mtime)) { >> - CDEBUG(D_INODE, "setting fid "DFID" mtime from %lu to %llu\n", >> - PFID(ll_inode2fid(inode)), LTIME_S(inode->i_mtime), >> + CDEBUG(D_INODE, "setting fid "DFID" mtime from %llu to %llu\n", >> + PFID(ll_inode2fid(inode)), (unsigned long long)LTIME_S(inode->i_mtime), >> body->mtime); >> LTIME_S(inode->i_mtime) = body->mtime; >> } >> diff --git a/drivers/staging/lustre/lustre/mdc/mdc_reint.c b/drivers/staging/lustre/lustre/mdc/mdc_reint.c >> index 4ef3db1..9980f3a 100644 >> --- a/drivers/staging/lustre/lustre/mdc/mdc_reint.c >> +++ b/drivers/staging/lustre/lustre/mdc/mdc_reint.c >> @@ -143,9 +143,9 @@ int mdc_setattr(struct obd_export *exp, struct md_op_data *op_data, >> rpc_lock = obd->u.cli.cl_rpc_lock; >> >> if (op_data->op_attr.ia_valid & (ATTR_MTIME | ATTR_CTIME)) >> - CDEBUG(D_INODE, "setting mtime %ld, ctime %ld\n", >> - LTIME_S(op_data->op_attr.ia_mtime), >> - LTIME_S(op_data->op_attr.ia_ctime)); >> + CDEBUG(D_INODE, "setting mtime %lld, ctime %lld\n", >> + (long long)LTIME_S(op_data->op_attr.ia_mtime), >> + (long long)LTIME_S(op_data->op_attr.ia_ctime)); >> mdc_setattr_pack(req, op_data, ea, ealen, ea2, ea2len); >> >> ptlrpc_request_set_replen(req); >> diff --git a/drivers/staging/lustre/lustre/obdclass/linux/linux-obdo.c b/drivers/staging/lustre/lustre/obdclass/linux/linux-obdo.c >> index b41b65e..ccd2b7b 100644 >> --- a/drivers/staging/lustre/lustre/obdclass/linux/linux-obdo.c >> +++ b/drivers/staging/lustre/lustre/obdclass/linux/linux-obdo.c >> @@ -54,9 +54,9 @@ void obdo_refresh_inode(struct inode *dst, struct obdo *src, u32 valid) >> >> if (valid & (OBD_MD_FLCTIME | OBD_MD_FLMTIME)) >> CDEBUG(D_INODE, >> - "valid %#llx, cur time %lu/%lu, new %llu/%llu\n", >> - src->o_valid, LTIME_S(dst->i_mtime), >> - LTIME_S(dst->i_ctime), src->o_mtime, src->o_ctime); >> + "valid %#llx, cur time %llu/%llu, new %llu/%llu\n", >> + src->o_valid, (unsigned long long)LTIME_S(dst->i_mtime), >> + (unsigned long long)LTIME_S(dst->i_ctime), src->o_mtime, src->o_ctime); >> >> if (valid & OBD_MD_FLATIME && src->o_atime > LTIME_S(dst->i_atime)) >> LTIME_S(dst->i_atime) = src->o_atime; >> diff --git a/drivers/staging/lustre/lustre/obdclass/obdo.c b/drivers/staging/lustre/lustre/obdclass/obdo.c >> index 748e33f..973fa4c 100644 >> --- a/drivers/staging/lustre/lustre/obdclass/obdo.c >> +++ b/drivers/staging/lustre/lustre/obdclass/obdo.c >> @@ -62,9 +62,9 @@ void obdo_from_inode(struct obdo *dst, struct inode *src, u32 valid) >> u32 newvalid = 0; >> >> if (valid & (OBD_MD_FLCTIME | OBD_MD_FLMTIME)) >> - CDEBUG(D_INODE, "valid %x, new time %lu/%lu\n", >> - valid, LTIME_S(src->i_mtime), >> - LTIME_S(src->i_ctime)); >> + CDEBUG(D_INODE, "valid %x, new time %llu/%llu\n", >> + valid, (unsigned long long)LTIME_S(src->i_mtime), >> + (unsigned long long)LTIME_S(src->i_ctime)); >> >> if (valid & OBD_MD_FLATIME) { >> dst->o_atime = LTIME_S(src->i_atime); >> diff --git a/drivers/staging/lustre/lustre/osc/osc_io.c b/drivers/staging/lustre/lustre/osc/osc_io.c >> index d534b0e..99f69bb 100644 >> --- a/drivers/staging/lustre/lustre/osc/osc_io.c >> +++ b/drivers/staging/lustre/lustre/osc/osc_io.c >> @@ -221,7 +221,7 @@ static void osc_page_touch_at(const struct lu_env *env, >> kms > loi->loi_kms ? "" : "not ", loi->loi_kms, kms, >> loi->loi_lvb.lvb_size); >> >> - attr->cat_mtime = attr->cat_ctime = LTIME_S(CURRENT_TIME); >> + attr->cat_mtime = attr->cat_ctime = ktime_get_real_seconds(); >> valid = CAT_MTIME | CAT_CTIME; >> if (kms > loi->loi_kms) { >> attr->cat_kms = kms; >> -- >> 1.9.1 >> >> _______________________________________________ >> lustre-devel mailing list >> lustre-devel at lists.lustre.org >> http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org >> > -- > To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in > the body of a message to majordomo at vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html Cheers, Andreas -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 833 bytes Desc: Message signed with OpenPGP using GPGMail URL: From arnd at arndb.de Mon Jun 13 20:44:57 2016 From: arnd at arndb.de (Arnd Bergmann) Date: Mon, 13 Jun 2016 22:44:57 +0200 Subject: [lustre-devel] [PATCH] lustre: hide call to Posix ACL in ifdef Message-ID: <1465850722-3534417-1-git-send-email-arnd@arndb.de> A call to forget_cached_acl() was recently added to the lustre file system, but this is only available when CONFIG_FS_POSIX_ACL is enabled, otherwise the build now fails with: lustre/llite/file.c: In function 'll_get_acl': lustre/llite/file.c:3134:2: error: implicit declaration of function 'forget_cached_acl' [-Werror=implicit-function-declaration] forget_cached_acl(inode, type); This adds one more #ifdef for this call, corresponding to the other 22 such checks for ACL in lustre. Signed-off-by: Arnd Bergmann Fixes: b788dc51e425 ("staging: lustre: llite: drop acl from cache") --- drivers/staging/lustre/lustre/llite/file.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/lustre/lustre/llite/file.c b/drivers/staging/lustre/lustre/llite/file.c index bafa0b701e87..26c6cd60ae1d 100644 --- a/drivers/staging/lustre/lustre/llite/file.c +++ b/drivers/staging/lustre/lustre/llite/file.c @@ -3131,7 +3131,9 @@ struct posix_acl *ll_get_acl(struct inode *inode, int type) spin_lock(&lli->lli_lock); /* VFS' acl_permission_check->check_acl will release the refcount */ acl = posix_acl_dup(lli->lli_posix_acl); +#ifdef CONFIG_FS_POSIX_ACL forget_cached_acl(inode, type); +#endif spin_unlock(&lli->lli_lock); return acl; -- 2.7.0 From xose.vazquez at gmail.com Tue Jun 14 22:25:17 2016 From: xose.vazquez at gmail.com (Xose Vazquez Perez) Date: Wed, 15 Jun 2016 00:25:17 +0200 Subject: [lustre-devel] staging: lustre headers include outdated and wrong (c) information Message-ID: It should be resolved ASAP. This wrong/outdated info is in every staging/lustre file. > /* > * GPL HEADER START > * > * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. > * > * This program is free software; you can redistribute it and/or modify > * it under the terms of the GNU General Public License version 2 only, > * as published by the Free Software Foundation. > * > * This program is distributed in the hope that it will be useful, but > * WITHOUT ANY WARRANTY; without even the implied warranty of > * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > * General Public License version 2 for more details (a copy is included > * in the LICENSE file that accompanied this code). > * > * You should have received a copy of the GNU General Public License > * version 2 along with this program; If not, see That's OK. > * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf > * > * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, > * CA 95054 USA or visit www.sun.com if you need additional information or > * have any questions. But this must be removed/replaced. > * > * GPL HEADER END > */ - > /* > * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. > * Use is subject to license terms. And this must be replaced by the current (C) owner. > * > * Copyright (c) 2011, 2015, Intel Corporation. > */ > /* > * This file is part of Lustre, http://www.lustre.org/ > * Lustre is a trademark of Sun Microsystems, Inc. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ << ------ Also outdated. References: - http://www.oracle.com/us/corporate/press/018363 Oracle Buys Sun - https://www.xyratex.com/news/press-releases/xyratex-advances-lustre%C2%AE-initiative-assumes-ownership-related-assets "[...] Xyratex has recently acquired the original Lustre trademark, logo, website and associated intellectual property from Oracle, and will assume responsibility for providing support to Lustre customers going forward. [...]" - https://www.xyratex.com/news/press-releases/seagate-completes-acquisition-xyratex "Seagate Completes Acquisition of Xyratex" - http://lustre.org/about/ "Lustre is a registered trademark of Seagate Technology LLC in the United States." Thank you. From gregkh at linuxfoundation.org Tue Jun 14 22:55:28 2016 From: gregkh at linuxfoundation.org (Greg KH) Date: Tue, 14 Jun 2016 15:55:28 -0700 Subject: [lustre-devel] staging: lustre headers include outdated and wrong (c) information In-Reply-To: References: Message-ID: <20160614225528.GA26206@kroah.com> On Wed, Jun 15, 2016 at 12:25:17AM +0200, Xose Vazquez Perez wrote: > It should be resolved ASAP. Why? What's the rush, let the people who work for the companies involved change this, no one else has the right to do so. sorry, greg k-h From xose.vazquez at gmail.com Tue Jun 14 23:20:45 2016 From: xose.vazquez at gmail.com (Xose Vazquez Perez) Date: Wed, 15 Jun 2016 01:20:45 +0200 Subject: [lustre-devel] staging: lustre headers include outdated and wrong (c) information In-Reply-To: <20160614225528.GA26206@kroah.com> References: <20160614225528.GA26206@kroah.com> Message-ID: <0d33b6f1-060d-9738-59dd-6d7bc7e17b27@gmail.com> On 06/15/2016 12:55 AM, Greg KH wrote: > On Wed, Jun 15, 2016 at 12:25:17AM +0200, Xose Vazquez Perez wrote: >> It should be resolved ASAP. > > Why? What's the rush, let the people who work for the companies > involved change this, no one else has the right to do so. ASAP means as soon *as possible* And check out this eight months old thread: https://marc.info/?t=144563048400009 Anyway, you are the BOSS. From oleg.drokin at intel.com Tue Jun 14 23:45:46 2016 From: oleg.drokin at intel.com (Oleg Drokin) Date: Tue, 14 Jun 2016 19:45:46 -0400 Subject: [lustre-devel] staging: lustre headers include outdated and wrong (c) information In-Reply-To: <0d33b6f1-060d-9738-59dd-6d7bc7e17b27@gmail.com> References: <20160614225528.GA26206@kroah.com> <0d33b6f1-060d-9738-59dd-6d7bc7e17b27@gmail.com> Message-ID: On Jun 14, 2016, at 7:20 PM, Xose Vazquez Perez wrote: > On 06/15/2016 12:55 AM, Greg KH wrote: > >> On Wed, Jun 15, 2016 at 12:25:17AM +0200, Xose Vazquez Perez wrote: >>> It should be resolved ASAP. >> >> Why? What's the rush, let the people who work for the companies >> involved change this, no one else has the right to do so. > > ASAP means as soon *as possible* > And check out this eight months old thread: https://marc.info/?t=144563048400009 Yes, I'll do the "Contact sun Microsystems" removal patch right away. That one we really need to do. As for trademark/copyright changing, it's kind of a never-ending chase, I suspect. From gregkh at linuxfoundation.org Tue Jun 14 23:58:07 2016 From: gregkh at linuxfoundation.org (Greg KH) Date: Tue, 14 Jun 2016 16:58:07 -0700 Subject: [lustre-devel] staging: lustre headers include outdated and wrong (c) information In-Reply-To: <0d33b6f1-060d-9738-59dd-6d7bc7e17b27@gmail.com> References: <20160614225528.GA26206@kroah.com> <0d33b6f1-060d-9738-59dd-6d7bc7e17b27@gmail.com> Message-ID: <20160614235807.GA31337@kroah.com> On Wed, Jun 15, 2016 at 01:20:45AM +0200, Xose Vazquez Perez wrote: > On 06/15/2016 12:55 AM, Greg KH wrote: > > > On Wed, Jun 15, 2016 at 12:25:17AM +0200, Xose Vazquez Perez wrote: > >> It should be resolved ASAP. > > > > Why? What's the rush, let the people who work for the companies > > involved change this, no one else has the right to do so. > > ASAP means as soon *as possible* I know what it means, but again, only the copyright holders can do this, which I'm guessing you aren't, so it doesn't really matter, as they are the only ones that care about this. > And check out this eight months old thread: https://marc.info/?t=144563048400009 No one ever sent me such a patch, so I guess they don't care :( From green at linuxhacker.ru Wed Jun 15 00:44:13 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Tue, 14 Jun 2016 20:44:13 -0400 Subject: [lustre-devel] [PATCH 0/5] Lustre: Remove defunct SUN addresses Message-ID: <1465951458-847547-1-git-send-email-green@linuxhacker.ru> This patch removes a paragraph about contacting SUN Microsystems from a lot of Lustre files since there's no more SUN Microsystems. A pointer to GPLv2 URL is also switched from defunct sun.com to gnu.org. For a good measure a couple of places that refer to "Please contact Oracle" are also removed since Oracle has nothing to do with Lustre anymore. This patchset does not switch any trademarks or copyrights around since I don't really work for the (assumed) current trademark holder and if they care, they can submit a corrective patch themselves. The copyrights are an even bigger mess I assume. Oleg Drokin (5): staging/lustre: Remove the "Please contact SUN for GPL" from headers staging/lustre: Replace sun.com GPLv2 URL with gnu.org one. staging/lustre/lov: Fix gpl URL in lov_pool.c staging/lustre: Remove stray line from selftest/selftest.h staging/lustre/libcfs: Remove "Please contact Oracle" from header drivers/staging/lustre/include/linux/libcfs/curproc.h | 6 +----- drivers/staging/lustre/include/linux/libcfs/libcfs.h | 6 +----- drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h | 6 +----- drivers/staging/lustre/include/linux/libcfs/libcfs_fail.h | 4 ---- drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h | 6 +----- drivers/staging/lustre/include/linux/libcfs/libcfs_ioctl.h | 6 +----- drivers/staging/lustre/include/linux/libcfs/libcfs_prim.h | 6 +----- drivers/staging/lustre/include/linux/libcfs/libcfs_private.h | 6 +----- drivers/staging/lustre/include/linux/libcfs/libcfs_string.h | 6 +----- drivers/staging/lustre/include/linux/libcfs/libcfs_time.h | 6 +----- drivers/staging/lustre/include/linux/libcfs/libcfs_workitem.h | 6 +----- drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h | 6 +----- drivers/staging/lustre/include/linux/libcfs/linux/linux-time.h | 6 +----- drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c | 6 +----- drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h | 6 +----- drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c | 6 +----- drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_modparams.c | 6 +----- drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c | 6 +----- drivers/staging/lustre/lnet/klnds/socklnd/socklnd_lib.c | 6 +----- drivers/staging/lustre/lnet/libcfs/debug.c | 6 +----- drivers/staging/lustre/lnet/libcfs/fail.c | 4 ---- drivers/staging/lustre/lnet/libcfs/hash.c | 6 +----- drivers/staging/lustre/lnet/libcfs/libcfs_string.c | 6 +----- drivers/staging/lustre/lnet/libcfs/linux/linux-curproc.c | 6 +----- drivers/staging/lustre/lnet/libcfs/linux/linux-debug.c | 6 +----- drivers/staging/lustre/lnet/libcfs/linux/linux-mem.c | 2 +- drivers/staging/lustre/lnet/libcfs/linux/linux-module.c | 6 +----- drivers/staging/lustre/lnet/libcfs/linux/linux-prim.c | 6 +----- drivers/staging/lustre/lnet/libcfs/linux/linux-tracefile.c | 6 +----- drivers/staging/lustre/lnet/libcfs/module.c | 6 +----- drivers/staging/lustre/lnet/libcfs/prng.c | 6 +----- drivers/staging/lustre/lnet/libcfs/tracefile.c | 6 +----- drivers/staging/lustre/lnet/libcfs/tracefile.h | 6 +----- drivers/staging/lustre/lnet/libcfs/workitem.c | 6 +----- drivers/staging/lustre/lnet/lnet/acceptor.c | 6 +----- drivers/staging/lustre/lnet/lnet/api-ni.c | 6 +----- drivers/staging/lustre/lnet/lnet/config.c | 6 +----- drivers/staging/lustre/lnet/lnet/lib-eq.c | 6 +----- drivers/staging/lustre/lnet/lnet/lib-md.c | 6 +----- drivers/staging/lustre/lnet/lnet/lib-me.c | 6 +----- drivers/staging/lustre/lnet/lnet/lib-move.c | 6 +----- drivers/staging/lustre/lnet/lnet/lib-msg.c | 6 +----- drivers/staging/lustre/lnet/lnet/lo.c | 6 +----- drivers/staging/lustre/lnet/lnet/module.c | 6 +----- drivers/staging/lustre/lnet/lnet/nidstrings.c | 6 +----- drivers/staging/lustre/lnet/lnet/peer.c | 6 +----- drivers/staging/lustre/lnet/selftest/brw_test.c | 6 +----- drivers/staging/lustre/lnet/selftest/conctl.c | 6 +----- drivers/staging/lustre/lnet/selftest/conrpc.c | 6 +----- drivers/staging/lustre/lnet/selftest/conrpc.h | 6 +----- drivers/staging/lustre/lnet/selftest/console.c | 6 +----- drivers/staging/lustre/lnet/selftest/console.h | 6 +----- drivers/staging/lustre/lnet/selftest/framework.c | 6 +----- drivers/staging/lustre/lnet/selftest/module.c | 6 +----- drivers/staging/lustre/lnet/selftest/ping_test.c | 6 +----- drivers/staging/lustre/lnet/selftest/rpc.c | 6 +----- drivers/staging/lustre/lnet/selftest/rpc.h | 6 +----- drivers/staging/lustre/lnet/selftest/selftest.h | 7 +------ drivers/staging/lustre/lnet/selftest/timer.c | 6 +----- drivers/staging/lustre/lnet/selftest/timer.h | 6 +----- drivers/staging/lustre/lustre/fid/fid_internal.h | 6 +----- drivers/staging/lustre/lustre/fid/fid_lib.c | 6 +----- drivers/staging/lustre/lustre/fid/fid_request.c | 6 +----- drivers/staging/lustre/lustre/fid/lproc_fid.c | 6 +----- drivers/staging/lustre/lustre/fld/fld_cache.c | 6 +----- drivers/staging/lustre/lustre/fld/fld_internal.h | 6 +----- drivers/staging/lustre/lustre/fld/fld_request.c | 6 +----- drivers/staging/lustre/lustre/fld/lproc_fld.c | 6 +----- drivers/staging/lustre/lustre/include/cl_object.h | 6 +----- drivers/staging/lustre/lustre/include/interval_tree.h | 6 +----- drivers/staging/lustre/lustre/include/linux/lustre_compat25.h | 6 +----- drivers/staging/lustre/lustre/include/linux/lustre_lite.h | 6 +----- .../staging/lustre/lustre/include/linux/lustre_patchless_compat.h | 6 +----- drivers/staging/lustre/lustre/include/linux/lustre_user.h | 6 +----- drivers/staging/lustre/lustre/include/lprocfs_status.h | 6 +----- drivers/staging/lustre/lustre/include/lu_object.h | 6 +----- drivers/staging/lustre/lustre/include/lustre/ll_fiemap.h | 6 +----- drivers/staging/lustre/lustre/include/lustre/lustre_idl.h | 6 +----- drivers/staging/lustre/lustre/include/lustre/lustre_user.h | 6 +----- drivers/staging/lustre/lustre/include/lustre_acl.h | 6 +----- drivers/staging/lustre/lustre/include/lustre_cfg.h | 6 +----- drivers/staging/lustre/lustre/include/lustre_debug.h | 6 +----- drivers/staging/lustre/lustre/include/lustre_disk.h | 6 +----- drivers/staging/lustre/lustre/include/lustre_dlm.h | 6 +----- drivers/staging/lustre/lustre/include/lustre_eacl.h | 6 +----- drivers/staging/lustre/lustre/include/lustre_export.h | 6 +----- drivers/staging/lustre/lustre/include/lustre_fid.h | 6 +----- drivers/staging/lustre/lustre/include/lustre_fld.h | 6 +----- drivers/staging/lustre/lustre/include/lustre_ha.h | 6 +----- drivers/staging/lustre/lustre/include/lustre_handles.h | 6 +----- drivers/staging/lustre/lustre/include/lustre_import.h | 6 +----- drivers/staging/lustre/lustre/include/lustre_intent.h | 6 +----- drivers/staging/lustre/lustre/include/lustre_lib.h | 6 +----- drivers/staging/lustre/lustre/include/lustre_lite.h | 6 +----- drivers/staging/lustre/lustre/include/lustre_log.h | 6 +----- drivers/staging/lustre/lustre/include/lustre_mdc.h | 6 +----- drivers/staging/lustre/lustre/include/lustre_mds.h | 6 +----- drivers/staging/lustre/lustre/include/lustre_net.h | 6 +----- drivers/staging/lustre/lustre/include/lustre_param.h | 6 +----- drivers/staging/lustre/lustre/include/lustre_req_layout.h | 6 +----- drivers/staging/lustre/lustre/include/lustre_sec.h | 6 +----- drivers/staging/lustre/lustre/include/obd.h | 6 +----- drivers/staging/lustre/lustre/include/obd_cksum.h | 6 +----- drivers/staging/lustre/lustre/include/obd_class.h | 6 +----- drivers/staging/lustre/lustre/include/obd_support.h | 6 +----- drivers/staging/lustre/lustre/ldlm/interval_tree.c | 6 +----- drivers/staging/lustre/lustre/ldlm/l_lock.c | 6 +----- drivers/staging/lustre/lustre/ldlm/ldlm_extent.c | 6 +----- drivers/staging/lustre/lustre/ldlm/ldlm_flock.c | 6 +----- drivers/staging/lustre/lustre/ldlm/ldlm_inodebits.c | 6 +----- drivers/staging/lustre/lustre/ldlm/ldlm_internal.h | 6 +----- drivers/staging/lustre/lustre/ldlm/ldlm_lib.c | 6 +----- drivers/staging/lustre/lustre/ldlm/ldlm_lock.c | 6 +----- drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c | 6 +----- drivers/staging/lustre/lustre/ldlm/ldlm_plain.c | 6 +----- drivers/staging/lustre/lustre/ldlm/ldlm_pool.c | 6 +----- drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 6 +----- drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | 6 +----- drivers/staging/lustre/lustre/llite/dcache.c | 6 +----- drivers/staging/lustre/lustre/llite/dir.c | 6 +----- drivers/staging/lustre/lustre/llite/file.c | 6 +----- drivers/staging/lustre/lustre/llite/glimpse.c | 6 +----- drivers/staging/lustre/lustre/llite/lcommon_cl.c | 6 +----- drivers/staging/lustre/lustre/llite/lcommon_misc.c | 6 +----- drivers/staging/lustre/lustre/llite/llite_close.c | 6 +----- drivers/staging/lustre/lustre/llite/llite_internal.h | 6 +----- drivers/staging/lustre/lustre/llite/llite_lib.c | 6 +----- drivers/staging/lustre/lustre/llite/llite_mmap.c | 6 +----- drivers/staging/lustre/lustre/llite/llite_nfs.c | 6 +----- drivers/staging/lustre/lustre/llite/llite_rmtacl.c | 6 +----- drivers/staging/lustre/lustre/llite/lproc_llite.c | 6 +----- drivers/staging/lustre/lustre/llite/namei.c | 6 +----- drivers/staging/lustre/lustre/llite/remote_perm.c | 6 +----- drivers/staging/lustre/lustre/llite/rw.c | 6 +----- drivers/staging/lustre/lustre/llite/rw26.c | 6 +----- drivers/staging/lustre/lustre/llite/statahead.c | 6 +----- drivers/staging/lustre/lustre/llite/super25.c | 6 +----- drivers/staging/lustre/lustre/llite/symlink.c | 6 +----- drivers/staging/lustre/lustre/llite/vvp_dev.c | 6 +----- drivers/staging/lustre/lustre/llite/vvp_internal.h | 6 +----- drivers/staging/lustre/lustre/llite/vvp_io.c | 6 +----- drivers/staging/lustre/lustre/llite/vvp_lock.c | 6 +----- drivers/staging/lustre/lustre/llite/vvp_object.c | 6 +----- drivers/staging/lustre/lustre/llite/vvp_page.c | 6 +----- drivers/staging/lustre/lustre/llite/xattr.c | 6 +----- drivers/staging/lustre/lustre/lmv/lmv_fld.c | 6 +----- drivers/staging/lustre/lustre/lmv/lmv_intent.c | 6 +----- drivers/staging/lustre/lustre/lmv/lmv_internal.h | 6 +----- drivers/staging/lustre/lustre/lmv/lmv_obd.c | 6 +----- drivers/staging/lustre/lustre/lmv/lproc_lmv.c | 6 +----- drivers/staging/lustre/lustre/lov/lov_cl_internal.h | 6 +----- drivers/staging/lustre/lustre/lov/lov_dev.c | 6 +----- drivers/staging/lustre/lustre/lov/lov_ea.c | 6 +----- drivers/staging/lustre/lustre/lov/lov_internal.h | 6 +----- drivers/staging/lustre/lustre/lov/lov_io.c | 6 +----- drivers/staging/lustre/lustre/lov/lov_lock.c | 6 +----- drivers/staging/lustre/lustre/lov/lov_merge.c | 6 +----- drivers/staging/lustre/lustre/lov/lov_obd.c | 6 +----- drivers/staging/lustre/lustre/lov/lov_object.c | 6 +----- drivers/staging/lustre/lustre/lov/lov_offset.c | 6 +----- drivers/staging/lustre/lustre/lov/lov_pack.c | 6 +----- drivers/staging/lustre/lustre/lov/lov_page.c | 6 +----- drivers/staging/lustre/lustre/lov/lov_pool.c | 8 ++------ drivers/staging/lustre/lustre/lov/lov_request.c | 6 +----- drivers/staging/lustre/lustre/lov/lovsub_dev.c | 6 +----- drivers/staging/lustre/lustre/lov/lovsub_io.c | 6 +----- drivers/staging/lustre/lustre/lov/lovsub_lock.c | 6 +----- drivers/staging/lustre/lustre/lov/lovsub_object.c | 6 +----- drivers/staging/lustre/lustre/lov/lovsub_page.c | 6 +----- drivers/staging/lustre/lustre/lov/lproc_lov.c | 6 +----- drivers/staging/lustre/lustre/mdc/lproc_mdc.c | 6 +----- drivers/staging/lustre/lustre/mdc/mdc_internal.h | 6 +----- drivers/staging/lustre/lustre/mdc/mdc_lib.c | 6 +----- drivers/staging/lustre/lustre/mdc/mdc_locks.c | 6 +----- drivers/staging/lustre/lustre/mdc/mdc_reint.c | 6 +----- drivers/staging/lustre/lustre/mdc/mdc_request.c | 6 +----- drivers/staging/lustre/lustre/mgc/lproc_mgc.c | 6 +----- drivers/staging/lustre/lustre/mgc/mgc_internal.h | 6 +----- drivers/staging/lustre/lustre/mgc/mgc_request.c | 6 +----- drivers/staging/lustre/lustre/obdclass/acl.c | 6 +----- drivers/staging/lustre/lustre/obdclass/cl_internal.h | 6 +----- drivers/staging/lustre/lustre/obdclass/cl_io.c | 6 +----- drivers/staging/lustre/lustre/obdclass/cl_lock.c | 6 +----- drivers/staging/lustre/lustre/obdclass/cl_object.c | 6 +----- drivers/staging/lustre/lustre/obdclass/cl_page.c | 6 +----- drivers/staging/lustre/lustre/obdclass/class_obd.c | 6 +----- drivers/staging/lustre/lustre/obdclass/debug.c | 6 +----- drivers/staging/lustre/lustre/obdclass/genops.c | 6 +----- drivers/staging/lustre/lustre/obdclass/kernelcomm.c | 6 +----- drivers/staging/lustre/lustre/obdclass/linux/linux-module.c | 6 +----- drivers/staging/lustre/lustre/obdclass/linux/linux-obdo.c | 6 +----- drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c | 6 +----- drivers/staging/lustre/lustre/obdclass/llog.c | 6 +----- drivers/staging/lustre/lustre/obdclass/llog_cat.c | 6 +----- drivers/staging/lustre/lustre/obdclass/llog_internal.h | 6 +----- drivers/staging/lustre/lustre/obdclass/llog_obd.c | 6 +----- drivers/staging/lustre/lustre/obdclass/llog_swab.c | 6 +----- drivers/staging/lustre/lustre/obdclass/lprocfs_status.c | 6 +----- drivers/staging/lustre/lustre/obdclass/lu_object.c | 6 +----- drivers/staging/lustre/lustre/obdclass/lu_ref.c | 6 +----- drivers/staging/lustre/lustre/obdclass/lustre_handles.c | 6 +----- drivers/staging/lustre/lustre/obdclass/lustre_peer.c | 6 +----- drivers/staging/lustre/lustre/obdclass/obd_config.c | 6 +----- drivers/staging/lustre/lustre/obdclass/obd_mount.c | 6 +----- drivers/staging/lustre/lustre/obdclass/obdo.c | 6 +----- drivers/staging/lustre/lustre/obdclass/statfs_pack.c | 6 +----- drivers/staging/lustre/lustre/obdclass/uuid.c | 6 +----- drivers/staging/lustre/lustre/obdecho/echo_client.c | 6 +----- drivers/staging/lustre/lustre/osc/lproc_osc.c | 6 +----- drivers/staging/lustre/lustre/osc/osc_cache.c | 6 +----- drivers/staging/lustre/lustre/osc/osc_cl_internal.h | 6 +----- drivers/staging/lustre/lustre/osc/osc_dev.c | 6 +----- drivers/staging/lustre/lustre/osc/osc_internal.h | 6 +----- drivers/staging/lustre/lustre/osc/osc_io.c | 6 +----- drivers/staging/lustre/lustre/osc/osc_lock.c | 6 +----- drivers/staging/lustre/lustre/osc/osc_object.c | 6 +----- drivers/staging/lustre/lustre/osc/osc_page.c | 6 +----- drivers/staging/lustre/lustre/osc/osc_request.c | 6 +----- drivers/staging/lustre/lustre/ptlrpc/client.c | 6 +----- drivers/staging/lustre/lustre/ptlrpc/connection.c | 6 +----- drivers/staging/lustre/lustre/ptlrpc/events.c | 6 +----- drivers/staging/lustre/lustre/ptlrpc/import.c | 6 +----- drivers/staging/lustre/lustre/ptlrpc/layout.c | 6 +----- drivers/staging/lustre/lustre/ptlrpc/llog_client.c | 6 +----- drivers/staging/lustre/lustre/ptlrpc/llog_net.c | 6 +----- drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c | 6 +----- drivers/staging/lustre/lustre/ptlrpc/niobuf.c | 6 +----- drivers/staging/lustre/lustre/ptlrpc/pack_generic.c | 6 +----- drivers/staging/lustre/lustre/ptlrpc/pers.c | 6 +----- drivers/staging/lustre/lustre/ptlrpc/pinger.c | 6 +----- drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h | 6 +----- drivers/staging/lustre/lustre/ptlrpc/ptlrpc_module.c | 6 +----- drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c | 6 +----- drivers/staging/lustre/lustre/ptlrpc/recover.c | 6 +----- drivers/staging/lustre/lustre/ptlrpc/sec.c | 6 +----- drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c | 6 +----- drivers/staging/lustre/lustre/ptlrpc/sec_config.c | 6 +----- drivers/staging/lustre/lustre/ptlrpc/sec_gc.c | 6 +----- drivers/staging/lustre/lustre/ptlrpc/sec_lproc.c | 6 +----- drivers/staging/lustre/lustre/ptlrpc/sec_null.c | 6 +----- drivers/staging/lustre/lustre/ptlrpc/sec_plain.c | 6 +----- drivers/staging/lustre/lustre/ptlrpc/service.c | 6 +----- drivers/staging/lustre/lustre/ptlrpc/wiretest.c | 6 +----- 243 files changed, 242 insertions(+), 1211 deletions(-) -- 2.7.4 From green at linuxhacker.ru Wed Jun 15 00:44:16 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Tue, 14 Jun 2016 20:44:16 -0400 Subject: [lustre-devel] [PATCH 3/5] staging/lustre/lov: Fix gpl URL in lov_pool.c In-Reply-To: <1465951458-847547-1-git-send-email-green@linuxhacker.ru> References: <1465951458-847547-1-git-send-email-green@linuxhacker.ru> Message-ID: <1465951458-847547-4-git-send-email-green@linuxhacker.ru> There's no longer a matching sun.com URL, so refer to gnu.org copy. Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/lov/lov_pool.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lustre/lov/lov_pool.c b/drivers/staging/lustre/lustre/lov/lov_pool.c index 75660c5..4c2d217 100644 --- a/drivers/staging/lustre/lustre/lov/lov_pool.c +++ b/drivers/staging/lustre/lustre/lov/lov_pool.c @@ -14,8 +14,8 @@ * in the LICENSE file that accompanied this code). * * You should have received a copy of the GNU General Public License - * version 2 along with this program; If not, see [sun.com URL with a - * copy of GPLv2]. + * version 2 along with this program; If not, see + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ -- 2.7.4 From green at linuxhacker.ru Wed Jun 15 00:44:18 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Tue, 14 Jun 2016 20:44:18 -0400 Subject: [lustre-devel] [PATCH 5/5] staging/lustre/libcfs: Remove "Please contact Oracle" from header In-Reply-To: <1465951458-847547-1-git-send-email-green@linuxhacker.ru> References: <1465951458-847547-1-git-send-email-green@linuxhacker.ru> Message-ID: <1465951458-847547-6-git-send-email-green@linuxhacker.ru> The "Please contact Oracle Corporation" lines are removed since not only Oracle has nothing to do with Lustre anymore, there's a pointer to GPL already that's independent of any particular company. Signed-off-by: Oleg Drokin --- drivers/staging/lustre/include/linux/libcfs/libcfs_fail.h | 4 ---- drivers/staging/lustre/lnet/libcfs/fail.c | 4 ---- 2 files changed, 8 deletions(-) diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_fail.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_fail.h index 2e008bf..d3f9a60 100644 --- a/drivers/staging/lustre/include/linux/libcfs/libcfs_fail.h +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_fail.h @@ -16,10 +16,6 @@ * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see http://www.gnu.org/licenses * - * Please contact Oracle Corporation, Inc., 500 Oracle Parkway, Redwood Shores, - * CA 94065 USA or visit www.oracle.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lnet/libcfs/fail.c b/drivers/staging/lustre/lnet/libcfs/fail.c index 086e690..9288ee0 100644 --- a/drivers/staging/lustre/lnet/libcfs/fail.c +++ b/drivers/staging/lustre/lnet/libcfs/fail.c @@ -16,10 +16,6 @@ * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see http://www.gnu.org/licenses * - * Please contact Oracle Corporation, Inc., 500 Oracle Parkway, Redwood Shores, - * CA 94065 USA or visit www.oracle.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* -- 2.7.4 From green at linuxhacker.ru Wed Jun 15 00:44:17 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Tue, 14 Jun 2016 20:44:17 -0400 Subject: [lustre-devel] [PATCH 4/5] staging/lustre: Remove stray line from selftest/selftest.h In-Reply-To: <1465951458-847547-1-git-send-email-green@linuxhacker.ru> References: <1465951458-847547-1-git-send-email-green@linuxhacker.ru> Message-ID: <1465951458-847547-5-git-send-email-green@linuxhacker.ru> The 'copy of GPLv2]' is an ending from template that's no longer needed, so remove it to avoid any extra confusion. Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lnet/selftest/selftest.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/lustre/lnet/selftest/selftest.h b/drivers/staging/lustre/lnet/selftest/selftest.h index 8f47082..b10fce6 100644 --- a/drivers/staging/lustre/lnet/selftest/selftest.h +++ b/drivers/staging/lustre/lnet/selftest/selftest.h @@ -16,7 +16,6 @@ * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see * http://http://www.gnu.org/licenses/gpl-2.0.html - * copy of GPLv2]. * * GPL HEADER END */ -- 2.7.4 From green at linuxhacker.ru Wed Jun 15 00:44:15 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Tue, 14 Jun 2016 20:44:15 -0400 Subject: [lustre-devel] [PATCH 2/5] staging/lustre: Replace sun.com GPLv2 URL with gnu.org one. In-Reply-To: <1465951458-847547-1-git-send-email-green@linuxhacker.ru> References: <1465951458-847547-1-git-send-email-green@linuxhacker.ru> Message-ID: <1465951458-847547-3-git-send-email-green@linuxhacker.ru> http://www.sun.com/software/products/lustre/docs/GPLv2.pdf is no longer around, so replace it with (hopefully more permanent) http://http://www.gnu.org/licenses/gpl-2.0.html Signed-off-by: Oleg Drokin Reported-by: Xose Vazquez Perez --- drivers/staging/lustre/include/linux/libcfs/curproc.h | 2 +- drivers/staging/lustre/include/linux/libcfs/libcfs.h | 2 +- drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h | 2 +- drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h | 2 +- drivers/staging/lustre/include/linux/libcfs/libcfs_ioctl.h | 2 +- drivers/staging/lustre/include/linux/libcfs/libcfs_prim.h | 2 +- drivers/staging/lustre/include/linux/libcfs/libcfs_private.h | 2 +- drivers/staging/lustre/include/linux/libcfs/libcfs_string.h | 2 +- drivers/staging/lustre/include/linux/libcfs/libcfs_time.h | 2 +- drivers/staging/lustre/include/linux/libcfs/libcfs_workitem.h | 2 +- drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h | 2 +- drivers/staging/lustre/include/linux/libcfs/linux/linux-time.h | 2 +- drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c | 2 +- drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h | 2 +- drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c | 2 +- drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_modparams.c | 2 +- drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c | 2 +- drivers/staging/lustre/lnet/klnds/socklnd/socklnd_lib.c | 2 +- drivers/staging/lustre/lnet/libcfs/debug.c | 2 +- drivers/staging/lustre/lnet/libcfs/hash.c | 2 +- drivers/staging/lustre/lnet/libcfs/libcfs_string.c | 2 +- drivers/staging/lustre/lnet/libcfs/linux/linux-curproc.c | 2 +- drivers/staging/lustre/lnet/libcfs/linux/linux-debug.c | 2 +- drivers/staging/lustre/lnet/libcfs/linux/linux-mem.c | 2 +- drivers/staging/lustre/lnet/libcfs/linux/linux-module.c | 2 +- drivers/staging/lustre/lnet/libcfs/linux/linux-prim.c | 2 +- drivers/staging/lustre/lnet/libcfs/linux/linux-tracefile.c | 2 +- drivers/staging/lustre/lnet/libcfs/module.c | 2 +- drivers/staging/lustre/lnet/libcfs/prng.c | 2 +- drivers/staging/lustre/lnet/libcfs/tracefile.c | 2 +- drivers/staging/lustre/lnet/libcfs/tracefile.h | 2 +- drivers/staging/lustre/lnet/libcfs/workitem.c | 2 +- drivers/staging/lustre/lnet/lnet/acceptor.c | 2 +- drivers/staging/lustre/lnet/lnet/api-ni.c | 2 +- drivers/staging/lustre/lnet/lnet/config.c | 2 +- drivers/staging/lustre/lnet/lnet/lib-eq.c | 2 +- drivers/staging/lustre/lnet/lnet/lib-md.c | 2 +- drivers/staging/lustre/lnet/lnet/lib-me.c | 2 +- drivers/staging/lustre/lnet/lnet/lib-move.c | 2 +- drivers/staging/lustre/lnet/lnet/lib-msg.c | 2 +- drivers/staging/lustre/lnet/lnet/lo.c | 2 +- drivers/staging/lustre/lnet/lnet/module.c | 2 +- drivers/staging/lustre/lnet/lnet/nidstrings.c | 2 +- drivers/staging/lustre/lnet/lnet/peer.c | 2 +- drivers/staging/lustre/lnet/selftest/brw_test.c | 2 +- drivers/staging/lustre/lnet/selftest/conctl.c | 2 +- drivers/staging/lustre/lnet/selftest/conrpc.c | 2 +- drivers/staging/lustre/lnet/selftest/conrpc.h | 2 +- drivers/staging/lustre/lnet/selftest/console.c | 2 +- drivers/staging/lustre/lnet/selftest/console.h | 2 +- drivers/staging/lustre/lnet/selftest/framework.c | 2 +- drivers/staging/lustre/lnet/selftest/module.c | 2 +- drivers/staging/lustre/lnet/selftest/ping_test.c | 2 +- drivers/staging/lustre/lnet/selftest/rpc.c | 2 +- drivers/staging/lustre/lnet/selftest/rpc.h | 2 +- drivers/staging/lustre/lnet/selftest/selftest.h | 2 +- drivers/staging/lustre/lnet/selftest/timer.c | 2 +- drivers/staging/lustre/lnet/selftest/timer.h | 2 +- drivers/staging/lustre/lustre/fid/fid_internal.h | 2 +- drivers/staging/lustre/lustre/fid/fid_lib.c | 2 +- drivers/staging/lustre/lustre/fid/fid_request.c | 2 +- drivers/staging/lustre/lustre/fid/lproc_fid.c | 2 +- drivers/staging/lustre/lustre/fld/fld_cache.c | 2 +- drivers/staging/lustre/lustre/fld/fld_internal.h | 2 +- drivers/staging/lustre/lustre/fld/fld_request.c | 2 +- drivers/staging/lustre/lustre/fld/lproc_fld.c | 2 +- drivers/staging/lustre/lustre/include/cl_object.h | 2 +- drivers/staging/lustre/lustre/include/interval_tree.h | 2 +- drivers/staging/lustre/lustre/include/linux/lustre_compat25.h | 2 +- drivers/staging/lustre/lustre/include/linux/lustre_lite.h | 2 +- drivers/staging/lustre/lustre/include/linux/lustre_patchless_compat.h | 2 +- drivers/staging/lustre/lustre/include/linux/lustre_user.h | 2 +- drivers/staging/lustre/lustre/include/lprocfs_status.h | 2 +- drivers/staging/lustre/lustre/include/lu_object.h | 2 +- drivers/staging/lustre/lustre/include/lustre/ll_fiemap.h | 2 +- drivers/staging/lustre/lustre/include/lustre/lustre_idl.h | 2 +- drivers/staging/lustre/lustre/include/lustre/lustre_user.h | 2 +- drivers/staging/lustre/lustre/include/lustre_acl.h | 2 +- drivers/staging/lustre/lustre/include/lustre_cfg.h | 2 +- drivers/staging/lustre/lustre/include/lustre_debug.h | 2 +- drivers/staging/lustre/lustre/include/lustre_disk.h | 2 +- drivers/staging/lustre/lustre/include/lustre_dlm.h | 2 +- drivers/staging/lustre/lustre/include/lustre_eacl.h | 2 +- drivers/staging/lustre/lustre/include/lustre_export.h | 2 +- drivers/staging/lustre/lustre/include/lustre_fid.h | 2 +- drivers/staging/lustre/lustre/include/lustre_fld.h | 2 +- drivers/staging/lustre/lustre/include/lustre_ha.h | 2 +- drivers/staging/lustre/lustre/include/lustre_handles.h | 2 +- drivers/staging/lustre/lustre/include/lustre_import.h | 2 +- drivers/staging/lustre/lustre/include/lustre_intent.h | 2 +- drivers/staging/lustre/lustre/include/lustre_lib.h | 2 +- drivers/staging/lustre/lustre/include/lustre_lite.h | 2 +- drivers/staging/lustre/lustre/include/lustre_log.h | 2 +- drivers/staging/lustre/lustre/include/lustre_mdc.h | 2 +- drivers/staging/lustre/lustre/include/lustre_mds.h | 2 +- drivers/staging/lustre/lustre/include/lustre_net.h | 2 +- drivers/staging/lustre/lustre/include/lustre_param.h | 2 +- drivers/staging/lustre/lustre/include/lustre_req_layout.h | 2 +- drivers/staging/lustre/lustre/include/lustre_sec.h | 2 +- drivers/staging/lustre/lustre/include/obd.h | 2 +- drivers/staging/lustre/lustre/include/obd_cksum.h | 2 +- drivers/staging/lustre/lustre/include/obd_class.h | 2 +- drivers/staging/lustre/lustre/include/obd_support.h | 2 +- drivers/staging/lustre/lustre/ldlm/interval_tree.c | 2 +- drivers/staging/lustre/lustre/ldlm/l_lock.c | 2 +- drivers/staging/lustre/lustre/ldlm/ldlm_extent.c | 2 +- drivers/staging/lustre/lustre/ldlm/ldlm_flock.c | 2 +- drivers/staging/lustre/lustre/ldlm/ldlm_inodebits.c | 2 +- drivers/staging/lustre/lustre/ldlm/ldlm_internal.h | 2 +- drivers/staging/lustre/lustre/ldlm/ldlm_lib.c | 2 +- drivers/staging/lustre/lustre/ldlm/ldlm_lock.c | 2 +- drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c | 2 +- drivers/staging/lustre/lustre/ldlm/ldlm_plain.c | 2 +- drivers/staging/lustre/lustre/ldlm/ldlm_pool.c | 2 +- drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 2 +- drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | 2 +- drivers/staging/lustre/lustre/llite/dcache.c | 2 +- drivers/staging/lustre/lustre/llite/dir.c | 2 +- drivers/staging/lustre/lustre/llite/file.c | 2 +- drivers/staging/lustre/lustre/llite/glimpse.c | 2 +- drivers/staging/lustre/lustre/llite/lcommon_cl.c | 2 +- drivers/staging/lustre/lustre/llite/lcommon_misc.c | 2 +- drivers/staging/lustre/lustre/llite/llite_close.c | 2 +- drivers/staging/lustre/lustre/llite/llite_internal.h | 2 +- drivers/staging/lustre/lustre/llite/llite_lib.c | 2 +- drivers/staging/lustre/lustre/llite/llite_mmap.c | 2 +- drivers/staging/lustre/lustre/llite/llite_nfs.c | 2 +- drivers/staging/lustre/lustre/llite/llite_rmtacl.c | 2 +- drivers/staging/lustre/lustre/llite/lproc_llite.c | 2 +- drivers/staging/lustre/lustre/llite/namei.c | 2 +- drivers/staging/lustre/lustre/llite/remote_perm.c | 2 +- drivers/staging/lustre/lustre/llite/rw.c | 2 +- drivers/staging/lustre/lustre/llite/rw26.c | 2 +- drivers/staging/lustre/lustre/llite/statahead.c | 2 +- drivers/staging/lustre/lustre/llite/super25.c | 2 +- drivers/staging/lustre/lustre/llite/symlink.c | 2 +- drivers/staging/lustre/lustre/llite/vvp_dev.c | 2 +- drivers/staging/lustre/lustre/llite/vvp_internal.h | 2 +- drivers/staging/lustre/lustre/llite/vvp_io.c | 2 +- drivers/staging/lustre/lustre/llite/vvp_lock.c | 2 +- drivers/staging/lustre/lustre/llite/vvp_object.c | 2 +- drivers/staging/lustre/lustre/llite/vvp_page.c | 2 +- drivers/staging/lustre/lustre/llite/xattr.c | 2 +- drivers/staging/lustre/lustre/lmv/lmv_fld.c | 2 +- drivers/staging/lustre/lustre/lmv/lmv_intent.c | 2 +- drivers/staging/lustre/lustre/lmv/lmv_internal.h | 2 +- drivers/staging/lustre/lustre/lmv/lmv_obd.c | 2 +- drivers/staging/lustre/lustre/lmv/lproc_lmv.c | 2 +- drivers/staging/lustre/lustre/lov/lov_cl_internal.h | 2 +- drivers/staging/lustre/lustre/lov/lov_dev.c | 2 +- drivers/staging/lustre/lustre/lov/lov_ea.c | 2 +- drivers/staging/lustre/lustre/lov/lov_internal.h | 2 +- drivers/staging/lustre/lustre/lov/lov_io.c | 2 +- drivers/staging/lustre/lustre/lov/lov_lock.c | 2 +- drivers/staging/lustre/lustre/lov/lov_merge.c | 2 +- drivers/staging/lustre/lustre/lov/lov_obd.c | 2 +- drivers/staging/lustre/lustre/lov/lov_object.c | 2 +- drivers/staging/lustre/lustre/lov/lov_offset.c | 2 +- drivers/staging/lustre/lustre/lov/lov_pack.c | 2 +- drivers/staging/lustre/lustre/lov/lov_page.c | 2 +- drivers/staging/lustre/lustre/lov/lov_request.c | 2 +- drivers/staging/lustre/lustre/lov/lovsub_dev.c | 2 +- drivers/staging/lustre/lustre/lov/lovsub_io.c | 2 +- drivers/staging/lustre/lustre/lov/lovsub_lock.c | 2 +- drivers/staging/lustre/lustre/lov/lovsub_object.c | 2 +- drivers/staging/lustre/lustre/lov/lovsub_page.c | 2 +- drivers/staging/lustre/lustre/lov/lproc_lov.c | 2 +- drivers/staging/lustre/lustre/mdc/lproc_mdc.c | 2 +- drivers/staging/lustre/lustre/mdc/mdc_internal.h | 2 +- drivers/staging/lustre/lustre/mdc/mdc_lib.c | 2 +- drivers/staging/lustre/lustre/mdc/mdc_locks.c | 2 +- drivers/staging/lustre/lustre/mdc/mdc_reint.c | 2 +- drivers/staging/lustre/lustre/mdc/mdc_request.c | 2 +- drivers/staging/lustre/lustre/mgc/lproc_mgc.c | 2 +- drivers/staging/lustre/lustre/mgc/mgc_internal.h | 2 +- drivers/staging/lustre/lustre/mgc/mgc_request.c | 2 +- drivers/staging/lustre/lustre/obdclass/acl.c | 2 +- drivers/staging/lustre/lustre/obdclass/cl_internal.h | 2 +- drivers/staging/lustre/lustre/obdclass/cl_io.c | 2 +- drivers/staging/lustre/lustre/obdclass/cl_lock.c | 2 +- drivers/staging/lustre/lustre/obdclass/cl_object.c | 2 +- drivers/staging/lustre/lustre/obdclass/cl_page.c | 2 +- drivers/staging/lustre/lustre/obdclass/class_obd.c | 2 +- drivers/staging/lustre/lustre/obdclass/debug.c | 2 +- drivers/staging/lustre/lustre/obdclass/genops.c | 2 +- drivers/staging/lustre/lustre/obdclass/kernelcomm.c | 2 +- drivers/staging/lustre/lustre/obdclass/linux/linux-module.c | 2 +- drivers/staging/lustre/lustre/obdclass/linux/linux-obdo.c | 2 +- drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c | 2 +- drivers/staging/lustre/lustre/obdclass/llog.c | 2 +- drivers/staging/lustre/lustre/obdclass/llog_cat.c | 2 +- drivers/staging/lustre/lustre/obdclass/llog_internal.h | 2 +- drivers/staging/lustre/lustre/obdclass/llog_obd.c | 2 +- drivers/staging/lustre/lustre/obdclass/llog_swab.c | 2 +- drivers/staging/lustre/lustre/obdclass/lprocfs_status.c | 2 +- drivers/staging/lustre/lustre/obdclass/lu_object.c | 2 +- drivers/staging/lustre/lustre/obdclass/lu_ref.c | 2 +- drivers/staging/lustre/lustre/obdclass/lustre_handles.c | 2 +- drivers/staging/lustre/lustre/obdclass/lustre_peer.c | 2 +- drivers/staging/lustre/lustre/obdclass/obd_config.c | 2 +- drivers/staging/lustre/lustre/obdclass/obd_mount.c | 2 +- drivers/staging/lustre/lustre/obdclass/obdo.c | 2 +- drivers/staging/lustre/lustre/obdclass/statfs_pack.c | 2 +- drivers/staging/lustre/lustre/obdclass/uuid.c | 2 +- drivers/staging/lustre/lustre/obdecho/echo_client.c | 2 +- drivers/staging/lustre/lustre/osc/lproc_osc.c | 2 +- drivers/staging/lustre/lustre/osc/osc_cache.c | 2 +- drivers/staging/lustre/lustre/osc/osc_cl_internal.h | 2 +- drivers/staging/lustre/lustre/osc/osc_dev.c | 2 +- drivers/staging/lustre/lustre/osc/osc_internal.h | 2 +- drivers/staging/lustre/lustre/osc/osc_io.c | 2 +- drivers/staging/lustre/lustre/osc/osc_lock.c | 2 +- drivers/staging/lustre/lustre/osc/osc_object.c | 2 +- drivers/staging/lustre/lustre/osc/osc_page.c | 2 +- drivers/staging/lustre/lustre/osc/osc_request.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/client.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/connection.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/events.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/import.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/layout.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/llog_client.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/llog_net.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/niobuf.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/pack_generic.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/pers.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/pinger.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h | 2 +- drivers/staging/lustre/lustre/ptlrpc/ptlrpc_module.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/recover.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/sec.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/sec_config.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/sec_gc.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/sec_lproc.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/sec_null.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/sec_plain.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/service.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/wiretest.c | 2 +- 240 files changed, 240 insertions(+), 240 deletions(-) diff --git a/drivers/staging/lustre/include/linux/libcfs/curproc.h b/drivers/staging/lustre/include/linux/libcfs/curproc.h index c673dfc..2ab5002 100644 --- a/drivers/staging/lustre/include/linux/libcfs/curproc.h +++ b/drivers/staging/lustre/include/linux/libcfs/curproc.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs.h b/drivers/staging/lustre/include/linux/libcfs/libcfs.h index c93d58e..8d6ad6a 100644 --- a/drivers/staging/lustre/include/linux/libcfs/libcfs.h +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h index ae8175c..f6d2433 100644 --- a/drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h index 6a4387b..f1b5ad4 100644 --- a/drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_ioctl.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_ioctl.h index 9bdff3f..589dc83 100644 --- a/drivers/staging/lustre/include/linux/libcfs/libcfs_ioctl.h +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_ioctl.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_prim.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_prim.h index 881aae0..f6a993f 100644 --- a/drivers/staging/lustre/include/linux/libcfs/libcfs_prim.h +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_prim.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_private.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_private.h index c44e11d..509d76f 100644 --- a/drivers/staging/lustre/include/linux/libcfs/libcfs_private.h +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_private.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_string.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_string.h index 03939ce..d963534 100644 --- a/drivers/staging/lustre/include/linux/libcfs/libcfs_string.h +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_string.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_time.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_time.h index 3f0ec7a..c0055b4 100644 --- a/drivers/staging/lustre/include/linux/libcfs/libcfs_time.h +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_time.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_workitem.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_workitem.h index 5ff23bb..4171621 100644 --- a/drivers/staging/lustre/include/linux/libcfs/libcfs_workitem.h +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_workitem.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h b/drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h index 3652119..1aee201 100644 --- a/drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h +++ b/drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/include/linux/libcfs/linux/linux-time.h b/drivers/staging/lustre/include/linux/libcfs/linux/linux-time.h index 887811b..0f8876f 100644 --- a/drivers/staging/lustre/include/linux/libcfs/linux/linux-time.h +++ b/drivers/staging/lustre/include/linux/libcfs/linux/linux-time.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c index ebd1294..ffc4d88 100644 --- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c +++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h index 8567941..da8fa41 100644 --- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h +++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c index ddfda67..7307ec2 100644 --- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c +++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_modparams.c b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_modparams.c index 3e0e3a1..ade4a18 100644 --- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_modparams.c +++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_modparams.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c index e9152a4..0334704 100644 --- a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c +++ b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_lib.c b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_lib.c index d83b5bd..7d6f18d 100644 --- a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_lib.c +++ b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_lib.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lnet/libcfs/debug.c b/drivers/staging/lustre/lnet/libcfs/debug.c index 0079a4c..836acce 100644 --- a/drivers/staging/lustre/lnet/libcfs/debug.c +++ b/drivers/staging/lustre/lnet/libcfs/debug.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lnet/libcfs/hash.c b/drivers/staging/lustre/lnet/libcfs/hash.c index db51124..d913bc3 100644 --- a/drivers/staging/lustre/lnet/libcfs/hash.c +++ b/drivers/staging/lustre/lnet/libcfs/hash.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lnet/libcfs/libcfs_string.c b/drivers/staging/lustre/lnet/libcfs/libcfs_string.c index 750691c..e7b3f42 100644 --- a/drivers/staging/lustre/lnet/libcfs/libcfs_string.c +++ b/drivers/staging/lustre/lnet/libcfs/libcfs_string.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lnet/libcfs/linux/linux-curproc.c b/drivers/staging/lustre/lnet/libcfs/linux/linux-curproc.c index 4fe58dd..b472981 100644 --- a/drivers/staging/lustre/lnet/libcfs/linux/linux-curproc.c +++ b/drivers/staging/lustre/lnet/libcfs/linux/linux-curproc.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lnet/libcfs/linux/linux-debug.c b/drivers/staging/lustre/lnet/libcfs/linux/linux-debug.c index 808d09b..0b02a28 100644 --- a/drivers/staging/lustre/lnet/libcfs/linux/linux-debug.c +++ b/drivers/staging/lustre/lnet/libcfs/linux/linux-debug.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lnet/libcfs/linux/linux-mem.c b/drivers/staging/lustre/lnet/libcfs/linux/linux-mem.c index 86f32ff..9b0c0d4 100644 --- a/drivers/staging/lustre/lnet/libcfs/linux/linux-mem.c +++ b/drivers/staging/lustre/lnet/libcfs/linux/linux-mem.c @@ -11,7 +11,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * */ /* diff --git a/drivers/staging/lustre/lnet/libcfs/linux/linux-module.c b/drivers/staging/lustre/lnet/libcfs/linux/linux-module.c index 8caee5b..79873e0 100644 --- a/drivers/staging/lustre/lnet/libcfs/linux/linux-module.c +++ b/drivers/staging/lustre/lnet/libcfs/linux/linux-module.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lnet/libcfs/linux/linux-prim.c b/drivers/staging/lustre/lnet/libcfs/linux/linux-prim.c index c1152e6..32e12e2 100644 --- a/drivers/staging/lustre/lnet/libcfs/linux/linux-prim.c +++ b/drivers/staging/lustre/lnet/libcfs/linux/linux-prim.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lnet/libcfs/linux/linux-tracefile.c b/drivers/staging/lustre/lnet/libcfs/linux/linux-tracefile.c index 6c9e3976..e3d905f 100644 --- a/drivers/staging/lustre/lnet/libcfs/linux/linux-tracefile.c +++ b/drivers/staging/lustre/lnet/libcfs/linux/linux-tracefile.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lnet/libcfs/module.c b/drivers/staging/lustre/lnet/libcfs/module.c index 065f968..17f71a8 100644 --- a/drivers/staging/lustre/lnet/libcfs/module.c +++ b/drivers/staging/lustre/lnet/libcfs/module.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lnet/libcfs/prng.c b/drivers/staging/lustre/lnet/libcfs/prng.c index f2e8426..c907378 100644 --- a/drivers/staging/lustre/lnet/libcfs/prng.c +++ b/drivers/staging/lustre/lnet/libcfs/prng.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lnet/libcfs/tracefile.c b/drivers/staging/lustre/lnet/libcfs/tracefile.c index ba0e7c3..e8da3e8 100644 --- a/drivers/staging/lustre/lnet/libcfs/tracefile.c +++ b/drivers/staging/lustre/lnet/libcfs/tracefile.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lnet/libcfs/tracefile.h b/drivers/staging/lustre/lnet/libcfs/tracefile.h index ae1c614..95e41de 100644 --- a/drivers/staging/lustre/lnet/libcfs/tracefile.h +++ b/drivers/staging/lustre/lnet/libcfs/tracefile.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lnet/libcfs/workitem.c b/drivers/staging/lustre/lnet/libcfs/workitem.c index c51f389..76517ab 100644 --- a/drivers/staging/lustre/lnet/libcfs/workitem.c +++ b/drivers/staging/lustre/lnet/libcfs/workitem.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lnet/lnet/acceptor.c b/drivers/staging/lustre/lnet/lnet/acceptor.c index 4456286..0c74a1c 100644 --- a/drivers/staging/lustre/lnet/lnet/acceptor.c +++ b/drivers/staging/lustre/lnet/lnet/acceptor.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lnet/lnet/api-ni.c b/drivers/staging/lustre/lnet/lnet/api-ni.c index 7662c3b..5164f59 100644 --- a/drivers/staging/lustre/lnet/lnet/api-ni.c +++ b/drivers/staging/lustre/lnet/lnet/api-ni.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lnet/lnet/config.c b/drivers/staging/lustre/lnet/lnet/config.c index 358e5cf..2882543 100644 --- a/drivers/staging/lustre/lnet/lnet/config.c +++ b/drivers/staging/lustre/lnet/lnet/config.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lnet/lnet/lib-eq.c b/drivers/staging/lustre/lnet/lnet/lib-eq.c index d04c687..6fc35e2 100644 --- a/drivers/staging/lustre/lnet/lnet/lib-eq.c +++ b/drivers/staging/lustre/lnet/lnet/lib-eq.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lnet/lnet/lib-md.c b/drivers/staging/lustre/lnet/lnet/lib-md.c index 51145f1..3460545 100644 --- a/drivers/staging/lustre/lnet/lnet/lib-md.c +++ b/drivers/staging/lustre/lnet/lnet/lib-md.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lnet/lnet/lib-me.c b/drivers/staging/lustre/lnet/lnet/lib-me.c index 1c370f4..f93e57d 100644 --- a/drivers/staging/lustre/lnet/lnet/lib-me.c +++ b/drivers/staging/lustre/lnet/lnet/lib-me.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lnet/lnet/lib-move.c b/drivers/staging/lustre/lnet/lnet/lib-move.c index f5c6eac..c36761a 100644 --- a/drivers/staging/lustre/lnet/lnet/lib-move.c +++ b/drivers/staging/lustre/lnet/lnet/lib-move.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lnet/lnet/lib-msg.c b/drivers/staging/lustre/lnet/lnet/lib-msg.c index 77ae4e6..4c5cd58 100644 --- a/drivers/staging/lustre/lnet/lnet/lib-msg.c +++ b/drivers/staging/lustre/lnet/lnet/lib-msg.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lnet/lnet/lo.c b/drivers/staging/lustre/lnet/lnet/lo.c index 6441ef3..1087cbd 100644 --- a/drivers/staging/lustre/lnet/lnet/lo.c +++ b/drivers/staging/lustre/lnet/lnet/lo.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lnet/lnet/module.c b/drivers/staging/lustre/lnet/lnet/module.c index 40f3c52..6a58726 100644 --- a/drivers/staging/lustre/lnet/lnet/module.c +++ b/drivers/staging/lustre/lnet/lnet/module.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lnet/lnet/nidstrings.c b/drivers/staging/lustre/lnet/lnet/nidstrings.c index 74bfda1..a0d19de 100644 --- a/drivers/staging/lustre/lnet/lnet/nidstrings.c +++ b/drivers/staging/lustre/lnet/lnet/nidstrings.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lnet/lnet/peer.c b/drivers/staging/lustre/lnet/lnet/peer.c index 5fde05a..64ed187 100644 --- a/drivers/staging/lustre/lnet/lnet/peer.c +++ b/drivers/staging/lustre/lnet/lnet/peer.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lnet/selftest/brw_test.c b/drivers/staging/lustre/lnet/selftest/brw_test.c index 6e25e1a..c56b452 100644 --- a/drivers/staging/lustre/lnet/selftest/brw_test.c +++ b/drivers/staging/lustre/lnet/selftest/brw_test.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lnet/selftest/conctl.c b/drivers/staging/lustre/lnet/selftest/conctl.c index 9a22f33..e53aa15 100644 --- a/drivers/staging/lustre/lnet/selftest/conctl.c +++ b/drivers/staging/lustre/lnet/selftest/conctl.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lnet/selftest/conrpc.c b/drivers/staging/lustre/lnet/selftest/conrpc.c index e649d37..bfeaad5 100644 --- a/drivers/staging/lustre/lnet/selftest/conrpc.c +++ b/drivers/staging/lustre/lnet/selftest/conrpc.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lnet/selftest/conrpc.h b/drivers/staging/lustre/lnet/selftest/conrpc.h index 1d8bb63..8d375a2 100644 --- a/drivers/staging/lustre/lnet/selftest/conrpc.h +++ b/drivers/staging/lustre/lnet/selftest/conrpc.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lnet/selftest/console.c b/drivers/staging/lustre/lnet/selftest/console.c index 31001f4..d25aee9 100644 --- a/drivers/staging/lustre/lnet/selftest/console.c +++ b/drivers/staging/lustre/lnet/selftest/console.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lnet/selftest/console.h b/drivers/staging/lustre/lnet/selftest/console.h index b099946..2360c06 100644 --- a/drivers/staging/lustre/lnet/selftest/console.h +++ b/drivers/staging/lustre/lnet/selftest/console.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lnet/selftest/framework.c b/drivers/staging/lustre/lnet/selftest/framework.c index 0d53307..fd466fe 100644 --- a/drivers/staging/lustre/lnet/selftest/framework.c +++ b/drivers/staging/lustre/lnet/selftest/framework.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lnet/selftest/module.c b/drivers/staging/lustre/lnet/selftest/module.c index b6a3bdf..38f93c8 100644 --- a/drivers/staging/lustre/lnet/selftest/module.c +++ b/drivers/staging/lustre/lnet/selftest/module.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lnet/selftest/ping_test.c b/drivers/staging/lustre/lnet/selftest/ping_test.c index 3030c07..7579b1f 100644 --- a/drivers/staging/lustre/lnet/selftest/ping_test.c +++ b/drivers/staging/lustre/lnet/selftest/ping_test.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lnet/selftest/rpc.c b/drivers/staging/lustre/lnet/selftest/rpc.c index e7aba01..08646b1 100644 --- a/drivers/staging/lustre/lnet/selftest/rpc.c +++ b/drivers/staging/lustre/lnet/selftest/rpc.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lnet/selftest/rpc.h b/drivers/staging/lustre/lnet/selftest/rpc.h index 3254f5d..360fd23 100644 --- a/drivers/staging/lustre/lnet/selftest/rpc.h +++ b/drivers/staging/lustre/lnet/selftest/rpc.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lnet/selftest/selftest.h b/drivers/staging/lustre/lnet/selftest/selftest.h index 4a1d2b2..8f47082 100644 --- a/drivers/staging/lustre/lnet/selftest/selftest.h +++ b/drivers/staging/lustre/lnet/selftest/selftest.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * copy of GPLv2]. * * GPL HEADER END diff --git a/drivers/staging/lustre/lnet/selftest/timer.c b/drivers/staging/lustre/lnet/selftest/timer.c index c73ded9..445ee32 100644 --- a/drivers/staging/lustre/lnet/selftest/timer.c +++ b/drivers/staging/lustre/lnet/selftest/timer.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lnet/selftest/timer.h b/drivers/staging/lustre/lnet/selftest/timer.h index e86e44e..ef70a64 100644 --- a/drivers/staging/lustre/lnet/selftest/timer.h +++ b/drivers/staging/lustre/lnet/selftest/timer.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/fid/fid_internal.h b/drivers/staging/lustre/lustre/fid/fid_internal.h index d6aebb3..6edb2e5 100644 --- a/drivers/staging/lustre/lustre/fid/fid_internal.h +++ b/drivers/staging/lustre/lustre/fid/fid_internal.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/fid/fid_lib.c b/drivers/staging/lustre/lustre/fid/fid_lib.c index ee7b272..1f96897 100644 --- a/drivers/staging/lustre/lustre/fid/fid_lib.c +++ b/drivers/staging/lustre/lustre/fid/fid_lib.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/fid/fid_request.c b/drivers/staging/lustre/lustre/fid/fid_request.c index 00b19c7..aef4b41 100644 --- a/drivers/staging/lustre/lustre/fid/fid_request.c +++ b/drivers/staging/lustre/lustre/fid/fid_request.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/fid/lproc_fid.c b/drivers/staging/lustre/lustre/fid/lproc_fid.c index 0103af5..0d3757b 100644 --- a/drivers/staging/lustre/lustre/fid/lproc_fid.c +++ b/drivers/staging/lustre/lustre/fid/lproc_fid.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/fld/fld_cache.c b/drivers/staging/lustre/lustre/fld/fld_cache.c index cb33d41..c4b3f97 100644 --- a/drivers/staging/lustre/lustre/fld/fld_cache.c +++ b/drivers/staging/lustre/lustre/fld/fld_cache.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/fld/fld_internal.h b/drivers/staging/lustre/lustre/fld/fld_internal.h index a85d86a..985ad9b 100644 --- a/drivers/staging/lustre/lustre/fld/fld_internal.h +++ b/drivers/staging/lustre/lustre/fld/fld_internal.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/fld/fld_request.c b/drivers/staging/lustre/lustre/fld/fld_request.c index 5f43af4..ca81ae8 100644 --- a/drivers/staging/lustre/lustre/fld/fld_request.c +++ b/drivers/staging/lustre/lustre/fld/fld_request.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/fld/lproc_fld.c b/drivers/staging/lustre/lustre/fld/lproc_fld.c index 1b96880..5547473 100644 --- a/drivers/staging/lustre/lustre/fld/lproc_fld.c +++ b/drivers/staging/lustre/lustre/fld/lproc_fld.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/include/cl_object.h b/drivers/staging/lustre/lustre/include/cl_object.h index a5a28f5..99db296 100644 --- a/drivers/staging/lustre/lustre/include/cl_object.h +++ b/drivers/staging/lustre/lustre/include/cl_object.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/include/interval_tree.h b/drivers/staging/lustre/lustre/include/interval_tree.h index 64cab4b..2d5d047 100644 --- a/drivers/staging/lustre/lustre/include/interval_tree.h +++ b/drivers/staging/lustre/lustre/include/interval_tree.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/include/linux/lustre_compat25.h b/drivers/staging/lustre/lustre/include/linux/lustre_compat25.h index 7690fa7..11160d4 100644 --- a/drivers/staging/lustre/lustre/include/linux/lustre_compat25.h +++ b/drivers/staging/lustre/lustre/include/linux/lustre_compat25.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/include/linux/lustre_lite.h b/drivers/staging/lustre/lustre/include/linux/lustre_lite.h index abefa93..6b7348b 100644 --- a/drivers/staging/lustre/lustre/include/linux/lustre_lite.h +++ b/drivers/staging/lustre/lustre/include/linux/lustre_lite.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/include/linux/lustre_patchless_compat.h b/drivers/staging/lustre/lustre/include/linux/lustre_patchless_compat.h index 6d138b2..d7f3c53 100644 --- a/drivers/staging/lustre/lustre/include/linux/lustre_patchless_compat.h +++ b/drivers/staging/lustre/lustre/include/linux/lustre_patchless_compat.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/include/linux/lustre_user.h b/drivers/staging/lustre/lustre/include/linux/lustre_user.h index 7403139..47a1485 100644 --- a/drivers/staging/lustre/lustre/include/linux/lustre_user.h +++ b/drivers/staging/lustre/lustre/include/linux/lustre_user.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/include/lprocfs_status.h b/drivers/staging/lustre/lustre/include/lprocfs_status.h index 4f5ab54..424d4c7 100644 --- a/drivers/staging/lustre/lustre/include/lprocfs_status.h +++ b/drivers/staging/lustre/lustre/include/lprocfs_status.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/include/lu_object.h b/drivers/staging/lustre/lustre/include/lu_object.h index b7bfe39..5965b17 100644 --- a/drivers/staging/lustre/lustre/include/lu_object.h +++ b/drivers/staging/lustre/lustre/include/lu_object.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/include/lustre/ll_fiemap.h b/drivers/staging/lustre/lustre/include/lustre/ll_fiemap.h index 664f135..1b55b96 100644 --- a/drivers/staging/lustre/lustre/include/lustre/ll_fiemap.h +++ b/drivers/staging/lustre/lustre/include/lustre/ll_fiemap.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h index e5031b1..39037b8 100644 --- a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h +++ b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/include/lustre/lustre_user.h b/drivers/staging/lustre/lustre/include/lustre/lustre_user.h index 3b48ba5..b1be028 100644 --- a/drivers/staging/lustre/lustre/include/lustre/lustre_user.h +++ b/drivers/staging/lustre/lustre/include/lustre/lustre_user.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/include/lustre_acl.h b/drivers/staging/lustre/lustre/include/lustre_acl.h index 9773db7..2103447 100644 --- a/drivers/staging/lustre/lustre/include/lustre_acl.h +++ b/drivers/staging/lustre/lustre/include/lustre_acl.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/include/lustre_cfg.h b/drivers/staging/lustre/lustre/include/lustre_cfg.h index f532af6..9213821 100644 --- a/drivers/staging/lustre/lustre/include/lustre_cfg.h +++ b/drivers/staging/lustre/lustre/include/lustre_cfg.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/include/lustre_debug.h b/drivers/staging/lustre/lustre/include/lustre_debug.h index bd531ff..606b4c0 100644 --- a/drivers/staging/lustre/lustre/include/lustre_debug.h +++ b/drivers/staging/lustre/lustre/include/lustre_debug.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/include/lustre_disk.h b/drivers/staging/lustre/lustre/include/lustre_disk.h index f30c601..4880cbb 100644 --- a/drivers/staging/lustre/lustre/include/lustre_disk.h +++ b/drivers/staging/lustre/lustre/include/lustre_disk.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/include/lustre_dlm.h b/drivers/staging/lustre/lustre/include/lustre_dlm.h index bdc1da7..eb9384a 100644 --- a/drivers/staging/lustre/lustre/include/lustre_dlm.h +++ b/drivers/staging/lustre/lustre/include/lustre_dlm.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/include/lustre_eacl.h b/drivers/staging/lustre/lustre/include/lustre_eacl.h index caab6e3..3a4b63f 100644 --- a/drivers/staging/lustre/lustre/include/lustre_eacl.h +++ b/drivers/staging/lustre/lustre/include/lustre_eacl.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/include/lustre_export.h b/drivers/staging/lustre/lustre/include/lustre_export.h index 41b6a7c..d908ade 100644 --- a/drivers/staging/lustre/lustre/include/lustre_export.h +++ b/drivers/staging/lustre/lustre/include/lustre_export.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/include/lustre_fid.h b/drivers/staging/lustre/lustre/include/lustre_fid.h index e3794d6..d3cd5fa 100644 --- a/drivers/staging/lustre/lustre/include/lustre_fid.h +++ b/drivers/staging/lustre/lustre/include/lustre_fid.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/include/lustre_fld.h b/drivers/staging/lustre/lustre/include/lustre_fld.h index 6a91cbc..c825178 100644 --- a/drivers/staging/lustre/lustre/include/lustre_fld.h +++ b/drivers/staging/lustre/lustre/include/lustre_fld.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/include/lustre_ha.h b/drivers/staging/lustre/lustre/include/lustre_ha.h index 152b0ee..9e6b619 100644 --- a/drivers/staging/lustre/lustre/include/lustre_ha.h +++ b/drivers/staging/lustre/lustre/include/lustre_ha.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/include/lustre_handles.h b/drivers/staging/lustre/lustre/include/lustre_handles.h index c1906c2..26da740 100644 --- a/drivers/staging/lustre/lustre/include/lustre_handles.h +++ b/drivers/staging/lustre/lustre/include/lustre_handles.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/include/lustre_import.h b/drivers/staging/lustre/lustre/include/lustre_import.h index d4f7680..046c925 100644 --- a/drivers/staging/lustre/lustre/include/lustre_import.h +++ b/drivers/staging/lustre/lustre/include/lustre_import.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/include/lustre_intent.h b/drivers/staging/lustre/lustre/include/lustre_intent.h index d5b15a4..bdfe58a 100644 --- a/drivers/staging/lustre/lustre/include/lustre_intent.h +++ b/drivers/staging/lustre/lustre/include/lustre_intent.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/include/lustre_lib.h b/drivers/staging/lustre/lustre/include/lustre_lib.h index f7b0ce8..64a0428 100644 --- a/drivers/staging/lustre/lustre/include/lustre_lib.h +++ b/drivers/staging/lustre/lustre/include/lustre_lib.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/include/lustre_lite.h b/drivers/staging/lustre/lustre/include/lustre_lite.h index bd328e5..e0e6024 100644 --- a/drivers/staging/lustre/lustre/include/lustre_lite.h +++ b/drivers/staging/lustre/lustre/include/lustre_lite.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/include/lustre_log.h b/drivers/staging/lustre/lustre/include/lustre_log.h index 7a3940a..91abf55 100644 --- a/drivers/staging/lustre/lustre/include/lustre_log.h +++ b/drivers/staging/lustre/lustre/include/lustre_log.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/include/lustre_mdc.h b/drivers/staging/lustre/lustre/include/lustre_mdc.h index cc4158c..ba213f5 100644 --- a/drivers/staging/lustre/lustre/include/lustre_mdc.h +++ b/drivers/staging/lustre/lustre/include/lustre_mdc.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/include/lustre_mds.h b/drivers/staging/lustre/lustre/include/lustre_mds.h index 9bcd3cd..690db1b 100644 --- a/drivers/staging/lustre/lustre/include/lustre_mds.h +++ b/drivers/staging/lustre/lustre/include/lustre_mds.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/include/lustre_net.h b/drivers/staging/lustre/lustre/include/lustre_net.h index ce31181..1b2ddd6 100644 --- a/drivers/staging/lustre/lustre/include/lustre_net.h +++ b/drivers/staging/lustre/lustre/include/lustre_net.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/include/lustre_param.h b/drivers/staging/lustre/lustre/include/lustre_param.h index dc6f2b2..73dec02 100644 --- a/drivers/staging/lustre/lustre/include/lustre_param.h +++ b/drivers/staging/lustre/lustre/include/lustre_param.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/include/lustre_req_layout.h b/drivers/staging/lustre/lustre/include/lustre_req_layout.h index acbc310..04270af 100644 --- a/drivers/staging/lustre/lustre/include/lustre_req_layout.h +++ b/drivers/staging/lustre/lustre/include/lustre_req_layout.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/include/lustre_sec.h b/drivers/staging/lustre/lustre/include/lustre_sec.h index 7ca6204..239f84f 100644 --- a/drivers/staging/lustre/lustre/include/lustre_sec.h +++ b/drivers/staging/lustre/lustre/include/lustre_sec.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/include/obd.h b/drivers/staging/lustre/lustre/include/obd.h index 6c94fa4..45c0acc 100644 --- a/drivers/staging/lustre/lustre/include/obd.h +++ b/drivers/staging/lustre/lustre/include/obd.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/include/obd_cksum.h b/drivers/staging/lustre/lustre/include/obd_cksum.h index 02705a5..25e9b1c 100644 --- a/drivers/staging/lustre/lustre/include/obd_cksum.h +++ b/drivers/staging/lustre/lustre/include/obd_cksum.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/include/obd_class.h b/drivers/staging/lustre/lustre/include/obd_class.h index c7a71b2..01415b5 100644 --- a/drivers/staging/lustre/lustre/include/obd_class.h +++ b/drivers/staging/lustre/lustre/include/obd_class.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/include/obd_support.h b/drivers/staging/lustre/lustre/include/obd_support.h index ce5be73..a7243d3 100644 --- a/drivers/staging/lustre/lustre/include/obd_support.h +++ b/drivers/staging/lustre/lustre/include/obd_support.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/ldlm/interval_tree.c b/drivers/staging/lustre/lustre/ldlm/interval_tree.c index 59bb066..d624ca2 100644 --- a/drivers/staging/lustre/lustre/ldlm/interval_tree.c +++ b/drivers/staging/lustre/lustre/ldlm/interval_tree.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/ldlm/l_lock.c b/drivers/staging/lustre/lustre/ldlm/l_lock.c index c6f7dfd..d1ed72b 100644 --- a/drivers/staging/lustre/lustre/ldlm/l_lock.c +++ b/drivers/staging/lustre/lustre/ldlm/l_lock.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_extent.c b/drivers/staging/lustre/lustre/ldlm/ldlm_extent.c index 16c1621..9ac0638 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_extent.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_extent.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c index 6c0dd7a..33d314e 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_inodebits.c b/drivers/staging/lustre/lustre/ldlm/ldlm_inodebits.c index d98243d..997ef8a 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_inodebits.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_inodebits.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_internal.h b/drivers/staging/lustre/lustre/ldlm/ldlm_internal.h index cc5e654..b73e803 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_internal.h +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_internal.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_lib.c b/drivers/staging/lustre/lustre/ldlm/ldlm_lib.c index 1a7eee3..a2678f5 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_lib.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_lib.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c b/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c index 88e9192..af42233 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c b/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c index 1da0eb2..ad3dfcd 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_plain.c b/drivers/staging/lustre/lustre/ldlm/ldlm_plain.c index 621a490..78d3a03 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_plain.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_plain.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_pool.c b/drivers/staging/lustre/lustre/ldlm/ldlm_pool.c index 1d9ca31..0c9383d 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_pool.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_pool.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_request.c b/drivers/staging/lustre/lustre/ldlm/ldlm_request.c index f6b30f6..14261a0 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_request.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_request.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c index 771c1f8..557d31e 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/llite/dcache.c b/drivers/staging/lustre/lustre/llite/dcache.c index 908bdc6..f66cf52 100644 --- a/drivers/staging/lustre/lustre/llite/dcache.c +++ b/drivers/staging/lustre/lustre/llite/dcache.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/llite/dir.c b/drivers/staging/lustre/lustre/llite/dir.c index 8854029a..a4c1c40 100644 --- a/drivers/staging/lustre/lustre/llite/dir.c +++ b/drivers/staging/lustre/lustre/llite/dir.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/llite/file.c b/drivers/staging/lustre/lustre/llite/file.c index 104129b..81fb288 100644 --- a/drivers/staging/lustre/lustre/llite/file.c +++ b/drivers/staging/lustre/lustre/llite/file.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/llite/glimpse.c b/drivers/staging/lustre/lustre/llite/glimpse.c index 8788ee0..b7d6337 100644 --- a/drivers/staging/lustre/lustre/llite/glimpse.c +++ b/drivers/staging/lustre/lustre/llite/glimpse.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/llite/lcommon_cl.c b/drivers/staging/lustre/lustre/llite/lcommon_cl.c index 28b7482..a4f81c3 100644 --- a/drivers/staging/lustre/lustre/llite/lcommon_cl.c +++ b/drivers/staging/lustre/lustre/llite/lcommon_cl.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/llite/lcommon_misc.c b/drivers/staging/lustre/lustre/llite/lcommon_misc.c index e45bd6d..ce0d528 100644 --- a/drivers/staging/lustre/lustre/llite/lcommon_misc.c +++ b/drivers/staging/lustre/lustre/llite/lcommon_misc.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/llite/llite_close.c b/drivers/staging/lustre/lustre/llite/llite_close.c index 2e2abc7..97d73da 100644 --- a/drivers/staging/lustre/lustre/llite/llite_close.c +++ b/drivers/staging/lustre/lustre/llite/llite_close.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/llite/llite_internal.h b/drivers/staging/lustre/lustre/llite/llite_internal.h index f541634..f706971 100644 --- a/drivers/staging/lustre/lustre/llite/llite_internal.h +++ b/drivers/staging/lustre/lustre/llite/llite_internal.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/llite/llite_lib.c b/drivers/staging/lustre/lustre/llite/llite_lib.c index f513b74..0dae3ea 100644 --- a/drivers/staging/lustre/lustre/llite/llite_lib.c +++ b/drivers/staging/lustre/lustre/llite/llite_lib.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/llite/llite_mmap.c b/drivers/staging/lustre/lustre/llite/llite_mmap.c index b569df3..407d2f1 100644 --- a/drivers/staging/lustre/lustre/llite/llite_mmap.c +++ b/drivers/staging/lustre/lustre/llite/llite_mmap.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/llite/llite_nfs.c b/drivers/staging/lustre/lustre/llite/llite_nfs.c index 086e827..d1010dd 100644 --- a/drivers/staging/lustre/lustre/llite/llite_nfs.c +++ b/drivers/staging/lustre/lustre/llite/llite_nfs.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/llite/llite_rmtacl.c b/drivers/staging/lustre/lustre/llite/llite_rmtacl.c index bae3ff0..a9c19b3 100644 --- a/drivers/staging/lustre/lustre/llite/llite_rmtacl.c +++ b/drivers/staging/lustre/lustre/llite/llite_rmtacl.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/llite/lproc_llite.c b/drivers/staging/lustre/lustre/llite/lproc_llite.c index 2b3a777..9063b77 100644 --- a/drivers/staging/lustre/lustre/llite/lproc_llite.c +++ b/drivers/staging/lustre/lustre/llite/lproc_llite.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/llite/namei.c b/drivers/staging/lustre/lustre/llite/namei.c index b7ec512..7d98593 100644 --- a/drivers/staging/lustre/lustre/llite/namei.c +++ b/drivers/staging/lustre/lustre/llite/namei.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/llite/remote_perm.c b/drivers/staging/lustre/lustre/llite/remote_perm.c index 0b96175..4b462a2 100644 --- a/drivers/staging/lustre/lustre/llite/remote_perm.c +++ b/drivers/staging/lustre/lustre/llite/remote_perm.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/llite/rw.c b/drivers/staging/lustre/lustre/llite/rw.c index df6cb54..2c13ec2 100644 --- a/drivers/staging/lustre/lustre/llite/rw.c +++ b/drivers/staging/lustre/lustre/llite/rw.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/llite/rw26.c b/drivers/staging/lustre/lustre/llite/rw26.c index d45fdcb..17a4cf8 100644 --- a/drivers/staging/lustre/lustre/llite/rw26.c +++ b/drivers/staging/lustre/lustre/llite/rw26.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/llite/statahead.c b/drivers/staging/lustre/lustre/llite/statahead.c index d533954..3dda677 100644 --- a/drivers/staging/lustre/lustre/llite/statahead.c +++ b/drivers/staging/lustre/lustre/llite/statahead.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/llite/super25.c b/drivers/staging/lustre/lustre/llite/super25.c index f7f8e23..9ee298a 100644 --- a/drivers/staging/lustre/lustre/llite/super25.c +++ b/drivers/staging/lustre/lustre/llite/super25.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/llite/symlink.c b/drivers/staging/lustre/lustre/llite/symlink.c index 12f945e..1d8d21f 100644 --- a/drivers/staging/lustre/lustre/llite/symlink.c +++ b/drivers/staging/lustre/lustre/llite/symlink.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/llite/vvp_dev.c b/drivers/staging/lustre/lustre/llite/vvp_dev.c index da84d95..0b53b0f 100644 --- a/drivers/staging/lustre/lustre/llite/vvp_dev.c +++ b/drivers/staging/lustre/lustre/llite/vvp_dev.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/llite/vvp_internal.h b/drivers/staging/lustre/lustre/llite/vvp_internal.h index 6708841..db88573 100644 --- a/drivers/staging/lustre/lustre/llite/vvp_internal.h +++ b/drivers/staging/lustre/lustre/llite/vvp_internal.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/llite/vvp_io.c b/drivers/staging/lustre/lustre/llite/vvp_io.c index 2200d57..84dfe06 100644 --- a/drivers/staging/lustre/lustre/llite/vvp_io.c +++ b/drivers/staging/lustre/lustre/llite/vvp_io.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/llite/vvp_lock.c b/drivers/staging/lustre/lustre/llite/vvp_lock.c index b5c307f..9bdc95d 100644 --- a/drivers/staging/lustre/lustre/llite/vvp_lock.c +++ b/drivers/staging/lustre/lustre/llite/vvp_lock.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/llite/vvp_object.c b/drivers/staging/lustre/lustre/llite/vvp_object.c index 11c3004..6a382b8 100644 --- a/drivers/staging/lustre/lustre/llite/vvp_object.c +++ b/drivers/staging/lustre/lustre/llite/vvp_object.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/llite/vvp_page.c b/drivers/staging/lustre/lustre/llite/vvp_page.c index ae36c75..5819ff2 100644 --- a/drivers/staging/lustre/lustre/llite/vvp_page.c +++ b/drivers/staging/lustre/lustre/llite/vvp_page.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/llite/xattr.c b/drivers/staging/lustre/lustre/llite/xattr.c index a286635..de6b166 100644 --- a/drivers/staging/lustre/lustre/llite/xattr.c +++ b/drivers/staging/lustre/lustre/llite/xattr.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/lmv/lmv_fld.c b/drivers/staging/lustre/lustre/lmv/lmv_fld.c index fcf1b1c..d698345 100644 --- a/drivers/staging/lustre/lustre/lmv/lmv_fld.c +++ b/drivers/staging/lustre/lustre/lmv/lmv_fld.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/lmv/lmv_intent.c b/drivers/staging/lustre/lustre/lmv/lmv_intent.c index bdf28cd..6306c4f 100644 --- a/drivers/staging/lustre/lustre/lmv/lmv_intent.c +++ b/drivers/staging/lustre/lustre/lmv/lmv_intent.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/lmv/lmv_internal.h b/drivers/staging/lustre/lustre/lmv/lmv_internal.h index 267deef..2fd4de4 100644 --- a/drivers/staging/lustre/lustre/lmv/lmv_internal.h +++ b/drivers/staging/lustre/lustre/lmv/lmv_internal.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/lmv/lmv_obd.c b/drivers/staging/lustre/lustre/lmv/lmv_obd.c index 800033d..7bbc1f4 100644 --- a/drivers/staging/lustre/lustre/lmv/lmv_obd.c +++ b/drivers/staging/lustre/lustre/lmv/lmv_obd.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/lmv/lproc_lmv.c b/drivers/staging/lustre/lustre/lmv/lproc_lmv.c index aa68623..8038794 100644 --- a/drivers/staging/lustre/lustre/lmv/lproc_lmv.c +++ b/drivers/staging/lustre/lustre/lmv/lproc_lmv.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/lov/lov_cl_internal.h b/drivers/staging/lustre/lustre/lov/lov_cl_internal.h index 9a2e5e2..dbdd21e 100644 --- a/drivers/staging/lustre/lustre/lov/lov_cl_internal.h +++ b/drivers/staging/lustre/lustre/lov/lov_cl_internal.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/lov/lov_dev.c b/drivers/staging/lustre/lustre/lov/lov_dev.c index 21e3054..2fbbe64 100644 --- a/drivers/staging/lustre/lustre/lov/lov_dev.c +++ b/drivers/staging/lustre/lustre/lov/lov_dev.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/lov/lov_ea.c b/drivers/staging/lustre/lustre/lov/lov_ea.c index 2f8972f..79c2ce1 100644 --- a/drivers/staging/lustre/lustre/lov/lov_ea.c +++ b/drivers/staging/lustre/lustre/lov/lov_ea.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/lov/lov_internal.h b/drivers/staging/lustre/lustre/lov/lov_internal.h index 55fb5bf..162e437 100644 --- a/drivers/staging/lustre/lustre/lov/lov_internal.h +++ b/drivers/staging/lustre/lustre/lov/lov_internal.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/lov/lov_io.c b/drivers/staging/lustre/lustre/lov/lov_io.c index cc70eeb..70431e6 100644 --- a/drivers/staging/lustre/lustre/lov/lov_io.c +++ b/drivers/staging/lustre/lustre/lov/lov_io.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/lov/lov_lock.c b/drivers/staging/lustre/lustre/lov/lov_lock.c index 2d87cfa..3591535 100644 --- a/drivers/staging/lustre/lustre/lov/lov_lock.c +++ b/drivers/staging/lustre/lustre/lov/lov_lock.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/lov/lov_merge.c b/drivers/staging/lustre/lustre/lov/lov_merge.c index f020656..b6165ad 100644 --- a/drivers/staging/lustre/lustre/lov/lov_merge.c +++ b/drivers/staging/lustre/lustre/lov/lov_merge.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/lov/lov_obd.c b/drivers/staging/lustre/lustre/lov/lov_obd.c index 9ca7e63..9485423 100644 --- a/drivers/staging/lustre/lustre/lov/lov_obd.c +++ b/drivers/staging/lustre/lustre/lov/lov_obd.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/lov/lov_object.c b/drivers/staging/lustre/lustre/lov/lov_object.c index 08f3d5c..fef4d33 100644 --- a/drivers/staging/lustre/lustre/lov/lov_object.c +++ b/drivers/staging/lustre/lustre/lov/lov_object.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/lov/lov_offset.c b/drivers/staging/lustre/lustre/lov/lov_offset.c index 2f568b5..e4cc0c5 100644 --- a/drivers/staging/lustre/lustre/lov/lov_offset.c +++ b/drivers/staging/lustre/lustre/lov/lov_offset.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/lov/lov_pack.c b/drivers/staging/lustre/lustre/lov/lov_pack.c index 69f4a68..a77ef8f 100644 --- a/drivers/staging/lustre/lustre/lov/lov_pack.c +++ b/drivers/staging/lustre/lustre/lov/lov_pack.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/lov/lov_page.c b/drivers/staging/lustre/lustre/lov/lov_page.c index 6c97e6f..fe29de5 100644 --- a/drivers/staging/lustre/lustre/lov/lov_page.c +++ b/drivers/staging/lustre/lustre/lov/lov_page.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/lov/lov_request.c b/drivers/staging/lustre/lustre/lov/lov_request.c index 83cd6e4..434f949 100644 --- a/drivers/staging/lustre/lustre/lov/lov_request.c +++ b/drivers/staging/lustre/lustre/lov/lov_request.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/lov/lovsub_dev.c b/drivers/staging/lustre/lustre/lov/lovsub_dev.c index cddf3d6..f229ff7 100644 --- a/drivers/staging/lustre/lustre/lov/lovsub_dev.c +++ b/drivers/staging/lustre/lustre/lov/lovsub_dev.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/lov/lovsub_io.c b/drivers/staging/lustre/lustre/lov/lovsub_io.c index c927406..1ee2afd 100644 --- a/drivers/staging/lustre/lustre/lov/lovsub_io.c +++ b/drivers/staging/lustre/lustre/lov/lovsub_io.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/lov/lovsub_lock.c b/drivers/staging/lustre/lustre/lov/lovsub_lock.c index 06bfdf9..9f20b7e 100644 --- a/drivers/staging/lustre/lustre/lov/lovsub_lock.c +++ b/drivers/staging/lustre/lustre/lov/lovsub_lock.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/lov/lovsub_object.c b/drivers/staging/lustre/lustre/lov/lovsub_object.c index a1a0f08..05c92c2 100644 --- a/drivers/staging/lustre/lustre/lov/lovsub_object.c +++ b/drivers/staging/lustre/lustre/lov/lovsub_object.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/lov/lovsub_page.c b/drivers/staging/lustre/lustre/lov/lovsub_page.c index e8e3475..fcd5735 100644 --- a/drivers/staging/lustre/lustre/lov/lovsub_page.c +++ b/drivers/staging/lustre/lustre/lov/lovsub_page.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/lov/lproc_lov.c b/drivers/staging/lustre/lustre/lov/lproc_lov.c index c5f7aac..15de320 100644 --- a/drivers/staging/lustre/lustre/lov/lproc_lov.c +++ b/drivers/staging/lustre/lustre/lov/lproc_lov.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/mdc/lproc_mdc.c b/drivers/staging/lustre/lustre/mdc/lproc_mdc.c index 95a8fcd..5ad1f9f 100644 --- a/drivers/staging/lustre/lustre/mdc/lproc_mdc.c +++ b/drivers/staging/lustre/lustre/mdc/lproc_mdc.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/mdc/mdc_internal.h b/drivers/staging/lustre/lustre/mdc/mdc_internal.h index cd57233..17e663f 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_internal.h +++ b/drivers/staging/lustre/lustre/mdc/mdc_internal.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/mdc/mdc_lib.c b/drivers/staging/lustre/lustre/mdc/mdc_lib.c index 8411729..5e51014 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_lib.c +++ b/drivers/staging/lustre/lustre/mdc/mdc_lib.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/mdc/mdc_locks.c b/drivers/staging/lustre/lustre/mdc/mdc_locks.c index c14c9df..fff10f28 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_locks.c +++ b/drivers/staging/lustre/lustre/mdc/mdc_locks.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/mdc/mdc_reint.c b/drivers/staging/lustre/lustre/mdc/mdc_reint.c index 8380c56..fcf17fc 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_reint.c +++ b/drivers/staging/lustre/lustre/mdc/mdc_reint.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/mdc/mdc_request.c b/drivers/staging/lustre/lustre/mdc/mdc_request.c index e152429..111f2f5 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_request.c +++ b/drivers/staging/lustre/lustre/mdc/mdc_request.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/mgc/lproc_mgc.c b/drivers/staging/lustre/lustre/mgc/lproc_mgc.c index c77e120..503f581 100644 --- a/drivers/staging/lustre/lustre/mgc/lproc_mgc.c +++ b/drivers/staging/lustre/lustre/mgc/lproc_mgc.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/mgc/mgc_internal.h b/drivers/staging/lustre/lustre/mgc/mgc_internal.h index 0eb31cc..dbe8c8b 100644 --- a/drivers/staging/lustre/lustre/mgc/mgc_internal.h +++ b/drivers/staging/lustre/lustre/mgc/mgc_internal.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/mgc/mgc_request.c b/drivers/staging/lustre/lustre/mgc/mgc_request.c index 2a80d85..ae53965 100644 --- a/drivers/staging/lustre/lustre/mgc/mgc_request.c +++ b/drivers/staging/lustre/lustre/mgc/mgc_request.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/obdclass/acl.c b/drivers/staging/lustre/lustre/obdclass/acl.c index 9f4eaba..f969e90 100644 --- a/drivers/staging/lustre/lustre/obdclass/acl.c +++ b/drivers/staging/lustre/lustre/obdclass/acl.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/obdclass/cl_internal.h b/drivers/staging/lustre/lustre/obdclass/cl_internal.h index 09a1884..42a7983 100644 --- a/drivers/staging/lustre/lustre/obdclass/cl_internal.h +++ b/drivers/staging/lustre/lustre/obdclass/cl_internal.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/obdclass/cl_io.c b/drivers/staging/lustre/lustre/obdclass/cl_io.c index dcc1b4e..b623956a 100644 --- a/drivers/staging/lustre/lustre/obdclass/cl_io.c +++ b/drivers/staging/lustre/lustre/obdclass/cl_io.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/obdclass/cl_lock.c b/drivers/staging/lustre/lustre/obdclass/cl_lock.c index 737612a..768be65 100644 --- a/drivers/staging/lustre/lustre/obdclass/cl_lock.c +++ b/drivers/staging/lustre/lustre/obdclass/cl_lock.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/obdclass/cl_object.c b/drivers/staging/lustre/lustre/obdclass/cl_object.c index 14da4b1..27a396e 100644 --- a/drivers/staging/lustre/lustre/obdclass/cl_object.c +++ b/drivers/staging/lustre/lustre/obdclass/cl_object.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/obdclass/cl_page.c b/drivers/staging/lustre/lustre/obdclass/cl_page.c index c014b69..9f51996 100644 --- a/drivers/staging/lustre/lustre/obdclass/cl_page.c +++ b/drivers/staging/lustre/lustre/obdclass/cl_page.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/obdclass/class_obd.c b/drivers/staging/lustre/lustre/obdclass/class_obd.c index b8dd638..d5897a9 100644 --- a/drivers/staging/lustre/lustre/obdclass/class_obd.c +++ b/drivers/staging/lustre/lustre/obdclass/class_obd.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/obdclass/debug.c b/drivers/staging/lustre/lustre/obdclass/debug.c index 0786683..d8734ca 100644 --- a/drivers/staging/lustre/lustre/obdclass/debug.c +++ b/drivers/staging/lustre/lustre/obdclass/debug.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/obdclass/genops.c b/drivers/staging/lustre/lustre/obdclass/genops.c index 2ec9eae..b51d500 100644 --- a/drivers/staging/lustre/lustre/obdclass/genops.c +++ b/drivers/staging/lustre/lustre/obdclass/genops.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/obdclass/kernelcomm.c b/drivers/staging/lustre/lustre/obdclass/kernelcomm.c index 407c41e..016be52 100644 --- a/drivers/staging/lustre/lustre/obdclass/kernelcomm.c +++ b/drivers/staging/lustre/lustre/obdclass/kernelcomm.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c b/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c index e7beee4..f527638 100644 --- a/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c +++ b/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/obdclass/linux/linux-obdo.c b/drivers/staging/lustre/lustre/obdclass/linux/linux-obdo.c index 1d4a8d6..d46bb80 100644 --- a/drivers/staging/lustre/lustre/obdclass/linux/linux-obdo.c +++ b/drivers/staging/lustre/lustre/obdclass/linux/linux-obdo.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c b/drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c index 58d1a44..73e4a73 100644 --- a/drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c +++ b/drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/obdclass/llog.c b/drivers/staging/lustre/lustre/obdclass/llog.c index e100ada..b5198cb 100644 --- a/drivers/staging/lustre/lustre/obdclass/llog.c +++ b/drivers/staging/lustre/lustre/obdclass/llog.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/obdclass/llog_cat.c b/drivers/staging/lustre/lustre/obdclass/llog_cat.c index e64a5e5..319c02d 100644 --- a/drivers/staging/lustre/lustre/obdclass/llog_cat.c +++ b/drivers/staging/lustre/lustre/obdclass/llog_cat.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/obdclass/llog_internal.h b/drivers/staging/lustre/lustre/obdclass/llog_internal.h index bce65fe..99ab947 100644 --- a/drivers/staging/lustre/lustre/obdclass/llog_internal.h +++ b/drivers/staging/lustre/lustre/obdclass/llog_internal.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/obdclass/llog_obd.c b/drivers/staging/lustre/lustre/obdclass/llog_obd.c index b06dfe3..f04502bf 100644 --- a/drivers/staging/lustre/lustre/obdclass/llog_obd.c +++ b/drivers/staging/lustre/lustre/obdclass/llog_obd.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/obdclass/llog_swab.c b/drivers/staging/lustre/lustre/obdclass/llog_swab.c index b5281d8..267e93b 100644 --- a/drivers/staging/lustre/lustre/obdclass/llog_swab.c +++ b/drivers/staging/lustre/lustre/obdclass/llog_swab.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c b/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c index 849deb1..124593f 100644 --- a/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c +++ b/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/obdclass/lu_object.c b/drivers/staging/lustre/lustre/obdclass/lu_object.c index 1deaa2b..5e18f88 100644 --- a/drivers/staging/lustre/lustre/obdclass/lu_object.c +++ b/drivers/staging/lustre/lustre/obdclass/lu_object.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/obdclass/lu_ref.c b/drivers/staging/lustre/lustre/obdclass/lu_ref.c index 6363292..0e6b1ca 100644 --- a/drivers/staging/lustre/lustre/obdclass/lu_ref.c +++ b/drivers/staging/lustre/lustre/obdclass/lu_ref.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/obdclass/lustre_handles.c b/drivers/staging/lustre/lustre/obdclass/lustre_handles.c index 6df2940..b7c15d4 100644 --- a/drivers/staging/lustre/lustre/obdclass/lustre_handles.c +++ b/drivers/staging/lustre/lustre/obdclass/lustre_handles.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/obdclass/lustre_peer.c b/drivers/staging/lustre/lustre/obdclass/lustre_peer.c index e0e3a46..a39efd5 100644 --- a/drivers/staging/lustre/lustre/obdclass/lustre_peer.c +++ b/drivers/staging/lustre/lustre/obdclass/lustre_peer.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/obdclass/obd_config.c b/drivers/staging/lustre/lustre/obdclass/obd_config.c index 39cfbc51..8dc2704 100644 --- a/drivers/staging/lustre/lustre/obdclass/obd_config.c +++ b/drivers/staging/lustre/lustre/obdclass/obd_config.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/obdclass/obd_mount.c b/drivers/staging/lustre/lustre/obdclass/obd_mount.c index 7dbf40e..e3f2020 100644 --- a/drivers/staging/lustre/lustre/obdclass/obd_mount.c +++ b/drivers/staging/lustre/lustre/obdclass/obd_mount.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/obdclass/obdo.c b/drivers/staging/lustre/lustre/obdclass/obdo.c index a62bf2b..77f838b 100644 --- a/drivers/staging/lustre/lustre/obdclass/obdo.c +++ b/drivers/staging/lustre/lustre/obdclass/obdo.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/obdclass/statfs_pack.c b/drivers/staging/lustre/lustre/obdclass/statfs_pack.c index d633e22..3ee0044 100644 --- a/drivers/staging/lustre/lustre/obdclass/statfs_pack.c +++ b/drivers/staging/lustre/lustre/obdclass/statfs_pack.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/obdclass/uuid.c b/drivers/staging/lustre/lustre/obdclass/uuid.c index 0dfa444..b03af35 100644 --- a/drivers/staging/lustre/lustre/obdclass/uuid.c +++ b/drivers/staging/lustre/lustre/obdclass/uuid.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/obdecho/echo_client.c b/drivers/staging/lustre/lustre/obdecho/echo_client.c index d92d85c..dbc4c2e 100644 --- a/drivers/staging/lustre/lustre/obdecho/echo_client.c +++ b/drivers/staging/lustre/lustre/obdecho/echo_client.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/osc/lproc_osc.c b/drivers/staging/lustre/lustre/osc/lproc_osc.c index f7bdd0a..0210f02 100644 --- a/drivers/staging/lustre/lustre/osc/lproc_osc.c +++ b/drivers/staging/lustre/lustre/osc/lproc_osc.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/osc/osc_cache.c b/drivers/staging/lustre/lustre/osc/osc_cache.c index 4eb1f2af..2f9688c 100644 --- a/drivers/staging/lustre/lustre/osc/osc_cache.c +++ b/drivers/staging/lustre/lustre/osc/osc_cache.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/osc/osc_cl_internal.h b/drivers/staging/lustre/lustre/osc/osc_cl_internal.h index 78cab86..34d863b 100644 --- a/drivers/staging/lustre/lustre/osc/osc_cl_internal.h +++ b/drivers/staging/lustre/lustre/osc/osc_cl_internal.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/osc/osc_dev.c b/drivers/staging/lustre/lustre/osc/osc_dev.c index 1d2938d..7121be2 100644 --- a/drivers/staging/lustre/lustre/osc/osc_dev.c +++ b/drivers/staging/lustre/lustre/osc/osc_dev.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/osc/osc_internal.h b/drivers/staging/lustre/lustre/osc/osc_internal.h index 439118a..5e5119c 100644 --- a/drivers/staging/lustre/lustre/osc/osc_internal.h +++ b/drivers/staging/lustre/lustre/osc/osc_internal.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/osc/osc_io.c b/drivers/staging/lustre/lustre/osc/osc_io.c index 79159d9..6bc4c79 100644 --- a/drivers/staging/lustre/lustre/osc/osc_io.c +++ b/drivers/staging/lustre/lustre/osc/osc_io.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/osc/osc_lock.c b/drivers/staging/lustre/lustre/osc/osc_lock.c index fef695b..55fc882 100644 --- a/drivers/staging/lustre/lustre/osc/osc_lock.c +++ b/drivers/staging/lustre/lustre/osc/osc_lock.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/osc/osc_object.c b/drivers/staging/lustre/lustre/osc/osc_object.c index 2a8b3c2..47d71de 100644 --- a/drivers/staging/lustre/lustre/osc/osc_object.c +++ b/drivers/staging/lustre/lustre/osc/osc_object.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/osc/osc_page.c b/drivers/staging/lustre/lustre/osc/osc_page.c index 9ed91c4..07235c9 100644 --- a/drivers/staging/lustre/lustre/osc/osc_page.c +++ b/drivers/staging/lustre/lustre/osc/osc_page.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/osc/osc_request.c b/drivers/staging/lustre/lustre/osc/osc_request.c index 740c362..280a646 100644 --- a/drivers/staging/lustre/lustre/osc/osc_request.c +++ b/drivers/staging/lustre/lustre/osc/osc_request.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/ptlrpc/client.c b/drivers/staging/lustre/lustre/ptlrpc/client.c index 325cce1..85a6c1b 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/client.c +++ b/drivers/staging/lustre/lustre/ptlrpc/client.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/ptlrpc/connection.c b/drivers/staging/lustre/lustre/ptlrpc/connection.c index a1f7d8c..b91e5fb 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/connection.c +++ b/drivers/staging/lustre/lustre/ptlrpc/connection.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/ptlrpc/events.c b/drivers/staging/lustre/lustre/ptlrpc/events.c index af841cc..d26d33c 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/events.c +++ b/drivers/staging/lustre/lustre/ptlrpc/events.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/ptlrpc/import.c b/drivers/staging/lustre/lustre/ptlrpc/import.c index 2930193..22868f4 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/import.c +++ b/drivers/staging/lustre/lustre/ptlrpc/import.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/ptlrpc/layout.c b/drivers/staging/lustre/lustre/ptlrpc/layout.c index f0dca8e..69d1dca 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/layout.c +++ b/drivers/staging/lustre/lustre/ptlrpc/layout.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/ptlrpc/llog_client.c b/drivers/staging/lustre/lustre/ptlrpc/llog_client.c index f335b1f..b33ea3b 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/llog_client.c +++ b/drivers/staging/lustre/lustre/ptlrpc/llog_client.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/ptlrpc/llog_net.c b/drivers/staging/lustre/lustre/ptlrpc/llog_net.c index ed3e88f..9011390 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/llog_net.c +++ b/drivers/staging/lustre/lustre/ptlrpc/llog_net.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c b/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c index 8d67108..82382b9 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c +++ b/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/ptlrpc/niobuf.c b/drivers/staging/lustre/lustre/ptlrpc/niobuf.c index 17dd6ea..620a004 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/niobuf.c +++ b/drivers/staging/lustre/lustre/ptlrpc/niobuf.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c b/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c index e7187a4..ce829a2 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c +++ b/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/ptlrpc/pers.c b/drivers/staging/lustre/lustre/ptlrpc/pers.c index 14608ef..4ad1211 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/pers.c +++ b/drivers/staging/lustre/lustre/ptlrpc/pers.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/ptlrpc/pinger.c b/drivers/staging/lustre/lustre/ptlrpc/pinger.c index 8ae6fd1..2e57065 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/pinger.c +++ b/drivers/staging/lustre/lustre/ptlrpc/pinger.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h b/drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h index 52eda29..c327ff0 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h +++ b/drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/ptlrpc/ptlrpc_module.c b/drivers/staging/lustre/lustre/ptlrpc/ptlrpc_module.c index e7443f3..cf75935 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/ptlrpc_module.c +++ b/drivers/staging/lustre/lustre/ptlrpc/ptlrpc_module.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c b/drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c index fd343819..4b5fd91 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c +++ b/drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/ptlrpc/recover.c b/drivers/staging/lustre/lustre/ptlrpc/recover.c index 5c69309..a4c2da6 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/recover.c +++ b/drivers/staging/lustre/lustre/ptlrpc/recover.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/ptlrpc/sec.c b/drivers/staging/lustre/lustre/ptlrpc/sec.c index 9ec6417..b5143f5 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/sec.c +++ b/drivers/staging/lustre/lustre/ptlrpc/sec.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c b/drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c index 34e2972..c500754 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c +++ b/drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/ptlrpc/sec_config.c b/drivers/staging/lustre/lustre/ptlrpc/sec_config.c index f7210c8..df81c82 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/sec_config.c +++ b/drivers/staging/lustre/lustre/ptlrpc/sec_config.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/ptlrpc/sec_gc.c b/drivers/staging/lustre/lustre/ptlrpc/sec_gc.c index 15d0586..928f7f4 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/sec_gc.c +++ b/drivers/staging/lustre/lustre/ptlrpc/sec_gc.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/ptlrpc/sec_lproc.c b/drivers/staging/lustre/lustre/ptlrpc/sec_lproc.c index bba4adf..27e40a1 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/sec_lproc.c +++ b/drivers/staging/lustre/lustre/ptlrpc/sec_lproc.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/ptlrpc/sec_null.c b/drivers/staging/lustre/lustre/ptlrpc/sec_null.c index 04381af..7b0adaa 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/sec_null.c +++ b/drivers/staging/lustre/lustre/ptlrpc/sec_null.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/ptlrpc/sec_plain.c b/drivers/staging/lustre/lustre/ptlrpc/sec_plain.c index a2dd435..eb32b8c 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/sec_plain.c +++ b/drivers/staging/lustre/lustre/ptlrpc/sec_plain.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/ptlrpc/service.c b/drivers/staging/lustre/lustre/ptlrpc/service.c index f369a5e..33818ac 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/service.c +++ b/drivers/staging/lustre/lustre/ptlrpc/service.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ diff --git a/drivers/staging/lustre/lustre/ptlrpc/wiretest.c b/drivers/staging/lustre/lustre/ptlrpc/wiretest.c index 4b9a23e..f5be068 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/wiretest.c +++ b/drivers/staging/lustre/lustre/ptlrpc/wiretest.c @@ -15,7 +15,7 @@ * * You should have received a copy of the GNU General Public License * version 2 along with this program; If not, see - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf + * http://http://www.gnu.org/licenses/gpl-2.0.html * * GPL HEADER END */ -- 2.7.4 From jsimmons at infradead.org Wed Jun 15 03:02:40 2016 From: jsimmons at infradead.org (James Simmons) Date: Wed, 15 Jun 2016 04:02:40 +0100 (BST) Subject: [lustre-devel] [PATCH 2/3] staging: lustre: lnet: Allocate MEs and small MDs in own kmem_caches In-Reply-To: <20160610163610.GA20291@kroah.com> References: <1465512347-11650-1-git-send-email-jsimmons@infradead.org> <1465512347-11650-3-git-send-email-jsimmons@infradead.org> <20160610012833.GA6804@kroah.com> <20160610163610.GA20291@kroah.com> Message-ID: > > This may also possibly help to save cycles due to high usage and > > contention when using a generic kmem_cache (when they stay separate > > from others, thanks for the precision!). > > Have you measured this? > > This isn't applicable for 4.7-rc at this time, _unless_ it fixes a bug, > which is why I pushed back on this. If you want your own cache for > these variables, fine, I don't care, but that makes it a 4.8-rc1 patch > instead. > > hope that helps explain things better, As a side question when is the window to push patches of this class? Is it when 4.7-rc7 is merged to staging? From xose.vazquez at gmail.com Wed Jun 15 03:11:29 2016 From: xose.vazquez at gmail.com (Xose Vazquez Perez) Date: Wed, 15 Jun 2016 05:11:29 +0200 Subject: [lustre-devel] [PATCH 2/5] staging/lustre: Replace sun.com GPLv2 URL with gnu.org one Message-ID: <4da9baaf-6369-0eb0-850b-87c827d94c3b@gmail.com> Oleg Drokin wrote: > http://www.sun.com/software/products/lustre/docs/GPLv2.pdf is no > longer around, so replace it with (hopefully more permanent) > http://http://www.gnu.org/licenses/gpl-2.0.html ^^^^^^ > [...] > drivers/staging/lustre/lustre/ptlrpc/service.c | 2 +- > drivers/staging/lustre/lustre/ptlrpc/wiretest.c | 2 +- > 240 files changed, 240 insertions(+), 240 deletions(-) > > diff --git a/drivers/staging/lustre/include/linux/libcfs/curproc.h b/drivers/staging/lustre/include/linux/libcfs/curproc.h > index c673dfc..2ab5002 100644 > --- a/drivers/staging/lustre/include/linux/libcfs/curproc.h > +++ b/drivers/staging/lustre/include/linux/libcfs/curproc.h > @@ -15,7 +15,7 @@ > * > * You should have received a copy of the GNU General Public License > * version 2 along with this program; If not, see > - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf > + * http://http://www.gnu.org/licenses/gpl-2.0.html ^^^^^^^ "http://" was repeated. And "http://www.gnu.org/licenses/" is preferred Thank you. From oleg.drokin at intel.com Wed Jun 15 03:15:40 2016 From: oleg.drokin at intel.com (Oleg Drokin) Date: Tue, 14 Jun 2016 23:15:40 -0400 Subject: [lustre-devel] [PATCH 2/5] staging/lustre: Replace sun.com GPLv2 URL with gnu.org one In-Reply-To: <4da9baaf-6369-0eb0-850b-87c827d94c3b@gmail.com> References: <4da9baaf-6369-0eb0-850b-87c827d94c3b@gmail.com> Message-ID: On Jun 14, 2016, at 11:11 PM, Xose Vazquez Perez wrote: > Oleg Drokin wrote: > >> http://www.sun.com/software/products/lustre/docs/GPLv2.pdf is no >> longer around, so replace it with (hopefully more permanent) >> http://http://www.gnu.org/licenses/gpl-2.0.html > ^^^^^^ > >> [...] >> drivers/staging/lustre/lustre/ptlrpc/service.c | 2 +- >> drivers/staging/lustre/lustre/ptlrpc/wiretest.c | 2 +- >> 240 files changed, 240 insertions(+), 240 deletions(-) >> >> diff --git a/drivers/staging/lustre/include/linux/libcfs/curproc.h b/drivers/staging/lustre/include/linux/libcfs/curproc.h >> index c673dfc..2ab5002 100644 >> --- a/drivers/staging/lustre/include/linux/libcfs/curproc.h >> +++ b/drivers/staging/lustre/include/linux/libcfs/curproc.h >> @@ -15,7 +15,7 @@ >> * >> * You should have received a copy of the GNU General Public License >> * version 2 along with this program; If not, see >> - * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf >> + * http://http://www.gnu.org/licenses/gpl-2.0.html > ^^^^^^^ > > "http://" was repeated. duh, oh well. Resend time. > And "http://www.gnu.org/licenses/" is preferred Is it? I don't mind it either way, but since we do "GPLv2 only", seemed to make sense to only link to that? Also: [green at intelbox2 linux]$ git grep gpl-2.0.html | grep -v staging/lustre | wc -l 62 [green at intelbox2 linux]$ git grep www.gnu.org/licenses'$' | grep -v staging/lustre | wc -l 3 So the gpl-2.0.html is used in a lot more places in the kernel code. From xose.vazquez at gmail.com Wed Jun 15 13:04:33 2016 From: xose.vazquez at gmail.com (Xose Vazquez Perez) Date: Wed, 15 Jun 2016 15:04:33 +0200 Subject: [lustre-devel] [PATCH 2/5] staging/lustre: Replace sun.com GPLv2 URL with gnu.org one In-Reply-To: References: <4da9baaf-6369-0eb0-850b-87c827d94c3b@gmail.com> Message-ID: On 06/15/2016 05:15 AM, Oleg Drokin wrote: > On Jun 14, 2016, at 11:11 PM, Xose Vazquez Perez wrote: >> And "http://www.gnu.org/licenses/" is preferred > > Is it? I don't mind it either way, but since we do "GPLv2 only", > seemed to make sense to only link to that? Shorter and less prone to future modification. GPLv3 points exactly to that url: "You should have received a copy of the GNU General Public License along with this program. If not, see ." From luisbg at osg.samsung.com Wed Jun 15 20:15:57 2016 From: luisbg at osg.samsung.com (Luis de Bethencourt) Date: Wed, 15 Jun 2016 21:15:57 +0100 Subject: [lustre-devel] [PATCH 0/8] Lustre: Multiple assignments removal. In-Reply-To: <1465526118-521053-1-git-send-email-green@linuxhacker.ru> References: <1465526118-521053-1-git-send-email-green@linuxhacker.ru> Message-ID: <5761B77D.5090603@osg.samsung.com> On 10/06/16 03:35, Oleg Drokin wrote: > These patches remove multiple assignments in Lustre, that makes > checkpatch (somewhat understandably) unhappy. > > Nathaniel Clark (8): > staging/lustre/osc: Fix Multiple Assignment Warnings > staging/lustre/fid: Fix Multiple Assignments > staging/lustre/ldlm: Fix Multiple Assignments > staging/lustre/llite: Fix Multiple Assignments > staging/lustre/lov: Fix Multiple Assignments > staging/lustre/obdclass: Fix Multiple Assignments > staging/lustre/ptlrpc: Fix Multiple Assignments > staging/lustre/lmv: Fix Multiple Assignments > > drivers/staging/lustre/lustre/fid/fid_request.c | 6 ++++-- > drivers/staging/lustre/lustre/ldlm/ldlm_lib.c | 3 ++- > drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c | 8 +++++--- > drivers/staging/lustre/lustre/llite/llite_lib.c | 3 ++- > drivers/staging/lustre/lustre/llite/namei.c | 3 ++- > drivers/staging/lustre/lustre/llite/vvp_io.c | 3 ++- > drivers/staging/lustre/lustre/lmv/lmv_obd.c | 3 +-- > drivers/staging/lustre/lustre/lov/lov_obd.c | 9 ++++----- > drivers/staging/lustre/lustre/obdclass/llog.c | 6 ++++-- > drivers/staging/lustre/lustre/osc/osc_cache.c | 6 ++++-- > drivers/staging/lustre/lustre/osc/osc_io.c | 12 ++++++++---- > drivers/staging/lustre/lustre/osc/osc_lock.c | 3 ++- > drivers/staging/lustre/lustre/osc/osc_request.c | 6 ++++-- > drivers/staging/lustre/lustre/ptlrpc/client.c | 6 ++++-- > drivers/staging/lustre/lustre/ptlrpc/import.c | 3 ++- > drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c | 3 ++- > drivers/staging/lustre/lustre/ptlrpc/pinger.c | 3 ++- > drivers/staging/lustre/lustre/ptlrpc/sec_null.c | 3 ++- > 18 files changed, 56 insertions(+), 33 deletions(-) > Hi, Documentation/CodingStyle says (in line 65): "Don't put multiple assignments on a single line either. Kernel coding style is super simple. Avoid tricky expressions." This patch set looks good. Luis From gregkh at linuxfoundation.org Thu Jun 16 02:28:34 2016 From: gregkh at linuxfoundation.org (Greg KH) Date: Wed, 15 Jun 2016 19:28:34 -0700 Subject: [lustre-devel] [PATCH 2/5] staging/lustre: Replace sun.com GPLv2 URL with gnu.org one In-Reply-To: References: <4da9baaf-6369-0eb0-850b-87c827d94c3b@gmail.com> Message-ID: <20160616022834.GA14614@kroah.com> On Wed, Jun 15, 2016 at 03:04:33PM +0200, Xose Vazquez Perez wrote: > On 06/15/2016 05:15 AM, Oleg Drokin wrote: > > > On Jun 14, 2016, at 11:11 PM, Xose Vazquez Perez wrote: > > >> And "http://www.gnu.org/licenses/" is preferred > > > > Is it? I don't mind it either way, but since we do "GPLv2 only", > > seemed to make sense to only link to that? > > Shorter and less prone to future modification. > GPLv3 points exactly to that url: > "You should have received a copy of the GNU General Public License > along with this program. If not, see ." That whole paragraph can just be dropped, but really, why are we arguing about this mess? It's up to the copyright holder of the file to put what they want here. greg k-h From bruno.faccini at intel.com Thu Jun 16 14:14:51 2016 From: bruno.faccini at intel.com (Faccini, Bruno) Date: Thu, 16 Jun 2016 14:14:51 +0000 Subject: [lustre-devel] [PATCH 2/3] staging: lustre: lnet: Allocate MEs and small MDs in own kmem_caches In-Reply-To: <20160610163610.GA20291@kroah.com> References: <1465512347-11650-1-git-send-email-jsimmons@infradead.org> <1465512347-11650-3-git-send-email-jsimmons@infradead.org> <20160610012833.GA6804@kroah.com> <20160610163610.GA20291@kroah.com> Message-ID: Le Jun 10, 2016 à 18:36, Greg Kroah-Hartman > a écrit : A: No. Q: Should I include quotations after my reply? http://daringfireball.net/2007/07/on_top Thanks for the email formatting lesson! ;-) New comments/answers inlined … On Fri, Jun 10, 2016 at 03:25:28PM +0000, Faccini, Bruno wrote: Hello, The intent of this patch is not to solve the corruptions for sure, but only to avoid the concerned MEs/small-MDs LNet structs to be quite frequently impacted due to their high allocation/free rate. But that’s not what the patch description said :( True. This is mainly because the original patch text has not been changed, but if this patch (originally to debug kmem_cache corruptions) has been kept to be integrated this comes from our reflexion that this could also be an enhancement. And again, putting them in a separate cache is not going to save much of anything, given that your caches might have been merged together anyway. This may also possibly help to save cycles due to high usage and contention when using a generic kmem_cache (when they stay separate from others, thanks for the precision!). Have you measured this? No, but I will try to measure it. This isn't applicable for 4.7-rc at this time, _unless_ it fixes a bug, which is why I pushed back on this. If you want your own cache for these variables, fine, I don't care, but that makes it a 4.8-rc1 patch instead. I have no problem with that. hope that helps explain things better, Yes, definitely. greg k-h Thanks, Bruno. --------------------------------------------------------------------- Intel Corporation SAS (French simplified joint stock company) Registered headquarters: "Les Montalets"- 2, rue de Paris, 92196 Meudon Cedex, France Registration Number: 302 456 199 R.C.S. NANTERRE Capital: 4,572,000 Euros This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. -------------- next part -------------- An HTML attachment was scrubbed... URL: From peter.a.jones at intel.com Fri Jun 17 00:18:45 2016 From: peter.a.jones at intel.com (Jones, Peter A) Date: Fri, 17 Jun 2016 00:18:45 +0000 Subject: [lustre-devel] Community Release Update In-Reply-To: References: Message-ID: Hi there Apologies for the long overdue update but I wanted to formally let everyone know that the 2.9 feature freeze is in effect and we are in the stabilization period for the release. You can see the details of the features that made it in time on http://wiki.lustre.org/Release_2.9.0 . There still may also be some further enhancements to the builds to come – Chris Morrone and others have been beavering away there. However, from a runtime point of view, the core content is in place and we will be focusing on hardening it ahead of a GA (which is targeted for the end of August) Although it is still some months out (tentatively September) until master opens for feature landings again, we’re already thinking ahead and there is a draft page to start collecting details of candidate features for the community 2.10 release - http://wiki.lustre.org/Release_2.10.0. Naturally the details of supported third party software will change as we get closer to the time and newer versions emerge but the existing “latest and greatest” are there as placeholders and there are also details of features currently in the frame. Please add details of anything that you are working on that you would like to propose for consideration. Regards Peter -------------- next part -------------- An HTML attachment was scrubbed... URL: From andreas.dilger at intel.com Fri Jun 17 18:28:51 2016 From: andreas.dilger at intel.com (Dilger, Andreas) Date: Fri, 17 Jun 2016 18:28:51 +0000 Subject: [lustre-devel] [lustre-discuss] more on lustre striping In-Reply-To: <8a9e4e45-ea99-1147-5c58-94a73d9010a8@iodoctors.com> References: <1ef5a267-334c-be0d-13f4-c0fab917d1bf@iodoctors.com> <38EA9F32-3869-43BA-B215-EB2E5BA62FD5@intel.com> <01EE2B9D-2359-49B5-A50F-E7C2D97E6696@intel.com> <44e2353d-3bef-ddd7-f15e-ad4bfdda040f@iodoctors.com> <9ebe9f4c-d5a2-4c93-4f00-49029850cbbe@iodoctors.com> <575AB28E.7090404@pittman.co.uk> <8a9e4e45-ea99-1147-5c58-94a73d9010a8@iodoctors.com> Message-ID: <444B216F-8A15-4D1D-AED6-9387D4EC0515@intel.com> If I recall correctly from when we implemented liblustre, which hooked into userspace using LD_PRELOAD, we had to capture the __open() call instead of open() (or something similar) to ensure that glibc didn't bypass our LD_PRELOAD from inside of fopen(). You might consider downloading the source for glibc to see what it is doing in fopen(). Cheers, Andreas -- Andreas Dilger Lustre Principal Architect Intel High Performance Data Division On 2016/06/10, 10:04, "lustre-discuss on behalf of John Bauer" on behalf of bauerj at iodoctors.com> wrote: To confirm the point that you can not intercept the open called by fopen by using LD_PRELOAD, I have written a simple test case. Note that the runtime linker never looks for open(). Only fopen() $ cat a.c #include #include #include #include int main(int argc, char ** argv ){ FILE *f = fopen("a", "r" ) ; fprintf(stderr,"f=%p\n",f); fclose(f); } $ file a a: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=dfe043b4ec8cf19d5fd3fab524d7c72ed1453574, not stripped $ cat a.csh #!/bin/csh setenv LD_DEBUG all ./a >&! a.cpr $ ./a.csh $ grep -i open a.cpr 120584: symbol=fopen; lookup in file=./a [0] 120584: symbol=fopen; lookup in file=/lib64/libc.so.6 [0] 120584: binding file ./a [0] to /lib64/libc.so.6 [0]: normal symbol `fopen' [GLIBC_2.2.5] $ On 6/10/2016 7:29 AM, Ashley Pittman wrote: On 22/05/16 02:56, John Bauer wrote: Oleg I can intercept the fopen(), but that does me no good as I can't set the O_LOV_DELAY_CREATE bit. What I can not intercept is the open() downstream of fopen(). If one examines the symbols in libc you will see there are no unsatisfied externals relating to open, which means there is nothing for the runtime linker to find concerning open's. I will have a look at the Lustre 1.8 source, but I seriously doubt that the open beneath fopen() was intercepted with LD_PRELOAD. I would love to find a way to do that. I could throw away a lot of code. Thanks, John Could you not intercept fopen() and implement it with calls to open() and fdopen() yourself which would give you full control over what you're looking for here? Ashley. -- I/O Doctors, LLC 507-766-0378 bauerj at iodoctors.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From gregkh at linuxfoundation.org Sat Jun 18 03:32:03 2016 From: gregkh at linuxfoundation.org (Greg Kroah-Hartman) Date: Fri, 17 Jun 2016 20:32:03 -0700 Subject: [lustre-devel] [PATCH 2/3] staging: lustre: lnet: Allocate MEs and small MDs in own kmem_caches In-Reply-To: References: <1465512347-11650-1-git-send-email-jsimmons@infradead.org> <1465512347-11650-3-git-send-email-jsimmons@infradead.org> <20160610012833.GA6804@kroah.com> <20160610163610.GA20291@kroah.com> Message-ID: <20160618033203.GA13004@kroah.com> On Wed, Jun 15, 2016 at 04:02:40AM +0100, James Simmons wrote: > > > > This may also possibly help to save cycles due to high usage and > > > contention when using a generic kmem_cache (when they stay separate > > > from others, thanks for the precision!). > > > > Have you measured this? > > > > This isn't applicable for 4.7-rc at this time, _unless_ it fixes a bug, > > which is why I pushed back on this. If you want your own cache for > > these variables, fine, I don't care, but that makes it a 4.8-rc1 patch > > instead. > > > > hope that helps explain things better, > > As a side question when is the window to push patches of this class? > Is it when 4.7-rc7 is merged to staging? You can send them to me anytime, I'll queue them up in my "-next" branch to be merged in the next merge window. Like I do for almost all lustre patches that aren't bugfixes or regressions. But I think you have a bigger problem here that you need to debug, using a separate cache isn't going to solve that bug, only postpone you finding it... thanks, greg k-h From xose.vazquez at gmail.com Sat Jun 18 09:50:16 2016 From: xose.vazquez at gmail.com (Xose Vazquez Perez) Date: Sat, 18 Jun 2016 11:50:16 +0200 Subject: [lustre-devel] dead??? URLs in code/comments Message-ID: Hi, Do you want to keep these URLs? include/linux/libcfs/libcfs_crypto.h: * Please visit http://www.xyratex.com/contact if you need additional lnet/libcfs/linux/linux-crypto.c: * Please visit http://www.xyratex.com/contact if you need additional lnet/libcfs/linux/linux-crypto.h: * Please visit http://www.xyratex.com/contact if you need additional lnet/libcfs/linux/linux-crypto-adler.c: * Please visit http://www.xyratex.com/contact if you need additional include/linux/libcfs/libcfs_hash.h: * http://www.citi.umich.edu/techreports/reports/citi-tr-00-1.pdf lnet/lnet/router.c: * http://sourceforge.net/projects/sandiaportals/ lnet/lnet/router_proc.c: * http://sourceforge.net/projects/sandiaportals/ lustre/include/lustre_fid.h: * http://wiki.lustre.org/index.php/Architecture_-_Interoperability_fids_zfs lustre/include/lustre/lustre_idl.h: * http://arch.lustre.org/index.php?title=Interoperability_fids_zfs lustre/include/lustre/lustre_idl.h: * http://arch.lustre.org/index.php?title=Interoperability_fids_zfs#NEW.0 lustre/Kconfig: http://downloads.whamcloud.com/public/lustre/ lustre/Kconfig: http://git.whamcloud.com/?p=fs/lustre-release.git;a=summary lustre/llite/llite_lib.c: "inode="DFID"(%p) nrpages=%lu, see http://jira.whamcloud.com/browse/LU-118\n", lustre/obdecho/echo_client.c: LCONSOLE_INFO("Echo OBD driver; http://www.lustre.org/\n"); lustre/osc/osc_request.c: CWARN("Saw flags 0x%x and 0x%x in the same brw, please report this at http://bugs.whamcloud.com/\n", lustre/ptlrpc/import.c: CERROR("%s went back in time (transno %lld was previously committed, server now claims %lld)! See https://bugzilla.lustre.org/show_bug.cgi?id=9646\n", From oleg.drokin at intel.com Sat Jun 18 16:20:53 2016 From: oleg.drokin at intel.com (Oleg Drokin) Date: Sat, 18 Jun 2016 12:20:53 -0400 Subject: [lustre-devel] dead??? URLs in code/comments In-Reply-To: References: Message-ID: On Jun 18, 2016, at 5:50 AM, Xose Vazquez Perez wrote: > Hi, > > Do you want to keep these URLs? > > include/linux/libcfs/libcfs_crypto.h: * Please visit http://www.xyratex.com/contact if you need additional > lnet/libcfs/linux/linux-crypto.c: * Please visit http://www.xyratex.com/contact if you need additional > lnet/libcfs/linux/linux-crypto.h: * Please visit http://www.xyratex.com/contact if you need additional > lnet/libcfs/linux/linux-crypto-adler.c: * Please visit http://www.xyratex.com/contact if you need additional We can let Seagate deal with that I guess. > include/linux/libcfs/libcfs_hash.h: * http://www.citi.umich.edu/techreports/reports/citi-tr-00-1.pdf This one is still alive, why kill it? > > lnet/lnet/router.c: * http://sourceforge.net/projects/sandiaportals/ > lnet/lnet/router_proc.c: * http://sourceforge.net/projects/sandiaportals/ This one is also alive and it does point to predecessor of the code. > lustre/include/lustre_fid.h: * http://wiki.lustre.org/index.php/Architecture_-_Interoperability_fids_zfs > lustre/include/lustre/lustre_idl.h: * http://arch.lustre.org/index.php?title=Interoperability_fids_zfs > lustre/include/lustre/lustre_idl.h: * http://arch.lustre.org/index.php?title=Interoperability_fids_zfs#NEW.0 Hm, these were moved to, I guess http://wiki.old.lustre.org/index.php/Architecture_-_Interoperability_fids_zfs We can change that. The ZFS is relatively new and sure, it's server side, but there are client implications, that's why the pointer is still useful. > lustre/Kconfig: http://downloads.whamcloud.com/public/lustre/ > > lustre/Kconfig: http://git.whamcloud.com/?p=fs/lustre-release.git;a=summary These two still work just fine. They are pointers to the userspace tools (you know, you need them to operate) and to server side stuff (that I imagine you might want too unless you bought it from a vendor). > lustre/llite/llite_lib.c: "inode="DFID"(%p) nrpages=%lu, see http://jira.whamcloud.com/browse/LU-118\n", > > lustre/obdecho/echo_client.c: LCONSOLE_INFO("Echo OBD driver; http://www.lustre.org/\n"); > > lustre/osc/osc_request.c: CWARN("Saw flags 0x%x and 0x%x in the same brw, please report this at http://bugs.whamcloud.com/\n", > > lustre/ptlrpc/import.c: CERROR("%s went back in time (transno %lld was previously committed, server now claims %lld)! See https://bugzilla.lustre.org/show_bug.cgi?id=9646\n", What's wrong with these, they are essentially pointers to documentation in one way or the other. From lkp at intel.com Sat Jun 18 23:39:07 2016 From: lkp at intel.com (kbuild test robot) Date: Sun, 19 Jun 2016 07:39:07 +0800 Subject: [lustre-devel] [PATCH 2/3] staging: luster: Checkpatch Cleanup In-Reply-To: <109b0da96b67ae70145433b585ada631a5f7c668.1466279901.git.craig@craiginches.com> Message-ID: <201606190749.P22lESms%fengguang.wu@intel.com> Hi, [auto build test WARNING on staging/staging-testing] [also build test WARNING on v4.7-rc3 next-20160617] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Craig-Inches/staging-luster-cl_object-h-Checkpatch-Cleanup/20160619-052805 config: x86_64-allmodconfig (attached as .config) compiler: gcc-6 (Debian 6.1.1-1) 6.1.1 20160430 reproduce: # save the attached .config to linux build tree make ARCH=x86_64 All warnings (new ones prefixed by >>): In file included from drivers/staging/lustre/lustre/obdclass/cl_lock.c:44:0: drivers/staging/lustre/lustre/obdclass/cl_lock.c: In function 'cl_lock_descr_print': >> drivers/staging/lustre/lustre/obdclass/../include/cl_object.h:1206:39: warning: right-hand operand of comma expression has no effect [-Wunused-value] (cl_lock_mode_name((descr)->cld_mode), (descr)->cld_mode, \ ^ >> drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:41: note: in expansion of macro 'PDESCR' (*printer)(env, cookie, DDESCR"@"DFID, PDESCR(descr), PFID(fid)); ^~~~~~ drivers/staging/lustre/lustre/obdclass/../include/cl_object.h:1206:58: warning: right-hand operand of comma expression has no effect [-Wunused-value] (cl_lock_mode_name((descr)->cld_mode), (descr)->cld_mode, \ ^ >> drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:41: note: in expansion of macro 'PDESCR' (*printer)(env, cookie, DDESCR"@"DFID, PDESCR(descr), PFID(fid)); ^~~~~~ drivers/staging/lustre/lustre/obdclass/../include/cl_object.h:1207:20: warning: right-hand operand of comma expression has no effect [-Wunused-value] (descr)->cld_start, (descr)->cld_end, (descr)->cld_enq_flags) ^ >> drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:41: note: in expansion of macro 'PDESCR' (*printer)(env, cookie, DDESCR"@"DFID, PDESCR(descr), PFID(fid)); ^~~~~~ >> drivers/staging/lustre/lustre/obdclass/../include/cl_object.h:1204:16: warning: format '%s' expects argument of type 'char *', but argument 4 has type '__u32 {aka const unsigned int}' [-Wformat=] #define DDESCR "%s(%d):[%lu, %lu]:%x" ^ >> drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:26: note: in expansion of macro 'DDESCR' (*printer)(env, cookie, DDESCR"@"DFID, PDESCR(descr), PFID(fid)); ^~~~~~ >> drivers/staging/lustre/lustre/obdclass/../include/cl_object.h:1204:16: warning: format '%d' expects argument of type 'int', but argument 5 has type '__u64 {aka const long long unsigned int}' [-Wformat=] #define DDESCR "%s(%d):[%lu, %lu]:%x" ^ >> drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:26: note: in expansion of macro 'DDESCR' (*printer)(env, cookie, DDESCR"@"DFID, PDESCR(descr), PFID(fid)); ^~~~~~ >> drivers/staging/lustre/lustre/obdclass/../include/cl_object.h:1204:16: warning: format '%lu' expects argument of type 'long unsigned int', but argument 6 has type '__u32 {aka const unsigned int}' [-Wformat=] #define DDESCR "%s(%d):[%lu, %lu]:%x" ^ >> drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:26: note: in expansion of macro 'DDESCR' (*printer)(env, cookie, DDESCR"@"DFID, PDESCR(descr), PFID(fid)); ^~~~~~ drivers/staging/lustre/lustre/obdclass/../include/cl_object.h:1204:16: warning: format '%lu' expects argument of type 'long unsigned int', but argument 7 has type '__u32 {aka const unsigned int}' [-Wformat=] #define DDESCR "%s(%d):[%lu, %lu]:%x" ^ >> drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:26: note: in expansion of macro 'DDESCR' (*printer)(env, cookie, DDESCR"@"DFID, PDESCR(descr), PFID(fid)); ^~~~~~ >> drivers/staging/lustre/lustre/obdclass/../include/cl_object.h:1204:16: warning: format '%x' expects a matching 'unsigned int' argument [-Wformat=] #define DDESCR "%s(%d):[%lu, %lu]:%x" ^ >> drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:26: note: in expansion of macro 'DDESCR' (*printer)(env, cookie, DDESCR"@"DFID, PDESCR(descr), PFID(fid)); ^~~~~~ >> drivers/staging/lustre/lustre/obdclass/../include/cl_object.h:1204:16: warning: format '%llx' expects a matching 'long long unsigned int' argument [-Wformat=] #define DDESCR "%s(%d):[%lu, %lu]:%x" ^ >> drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:26: note: in expansion of macro 'DDESCR' (*printer)(env, cookie, DDESCR"@"DFID, PDESCR(descr), PFID(fid)); ^~~~~~ >> drivers/staging/lustre/lustre/obdclass/../include/cl_object.h:1204:16: warning: format '%x' expects a matching 'unsigned int' argument [-Wformat=] #define DDESCR "%s(%d):[%lu, %lu]:%x" ^ >> drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:26: note: in expansion of macro 'DDESCR' (*printer)(env, cookie, DDESCR"@"DFID, PDESCR(descr), PFID(fid)); ^~~~~~ >> drivers/staging/lustre/lustre/obdclass/../include/cl_object.h:1204:16: warning: format '%x' expects a matching 'unsigned int' argument [-Wformat=] #define DDESCR "%s(%d):[%lu, %lu]:%x" ^ >> drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:26: note: in expansion of macro 'DDESCR' (*printer)(env, cookie, DDESCR"@"DFID, PDESCR(descr), PFID(fid)); ^~~~~~ vim +1206 drivers/staging/lustre/lustre/obdclass/../include/cl_object.h 1198 * flags to enqueue lock. A combination of bit-flags from 1199 * enum cl_enq_flags. 1200 */ 1201 __u32 cld_enq_flags; 1202 }; 1203 > 1204 #define DDESCR "%s(%d):[%lu, %lu]:%x" 1205 #define PDESCR(descr) \ > 1206 (cl_lock_mode_name((descr)->cld_mode), (descr)->cld_mode, \ > 1207 (descr)->cld_start, (descr)->cld_end, (descr)->cld_enq_flags) 1208 1209 const char *cl_lock_mode_name(const enum cl_lock_mode mode); 1210 --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation -------------- next part -------------- A non-text attachment was scrubbed... Name: .config.gz Type: application/octet-stream Size: 54771 bytes Desc: not available URL: From lkp at intel.com Sun Jun 19 01:19:30 2016 From: lkp at intel.com (kbuild test robot) Date: Sun, 19 Jun 2016 09:19:30 +0800 Subject: [lustre-devel] [PATCH 2/3] staging: luster: Checkpatch Cleanup In-Reply-To: <109b0da96b67ae70145433b585ada631a5f7c668.1466279901.git.craig@craiginches.com> Message-ID: <201606190949.XMOiiUu4%fengguang.wu@intel.com> Hi, [auto build test WARNING on staging/staging-testing] [also build test WARNING on v4.7-rc3 next-20160617] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Craig-Inches/staging-luster-cl_object-h-Checkpatch-Cleanup/20160619-052805 config: i386-allyesconfig (attached as .config) compiler: gcc-6 (Debian 6.1.1-1) 6.1.1 20160430 reproduce: # save the attached .config to linux build tree make ARCH=i386 All warnings (new ones prefixed by >>): drivers/staging/lustre/lustre/obdclass/cl_lock.c: In function 'cl_lock_descr_print': >> drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:113: warning: right-hand operand of comma expression has no effect [-Wunused-value] (*printer)(env, cookie, DDESCR"@"DFID, PDESCR(descr), PFID(fid)); ^ drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:132: warning: right-hand operand of comma expression has no effect [-Wunused-value] (*printer)(env, cookie, DDESCR"@"DFID, PDESCR(descr), PFID(fid)); ^ drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:152: warning: right-hand operand of comma expression has no effect [-Wunused-value] (*printer)(env, cookie, DDESCR"@"DFID, PDESCR(descr), PFID(fid)); ^ >> drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:26: warning: format '%s' expects argument of type 'char *', but argument 4 has type '__u32 {aka const unsigned int}' [-Wformat=] (*printer)(env, cookie, DDESCR"@"DFID, PDESCR(descr), PFID(fid)); ^~~~~~~~~~~~~~~~~~~~~~ >> drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:26: warning: format '%d' expects argument of type 'int', but argument 5 has type '__u64 {aka const long long unsigned int}' [-Wformat=] >> drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:26: warning: format '%lu' expects argument of type 'long unsigned int', but argument 6 has type '__u32 {aka const unsigned int}' [-Wformat=] drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:26: warning: format '%lu' expects argument of type 'long unsigned int', but argument 7 has type '__u32 {aka const unsigned int}' [-Wformat=] >> drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:26: warning: format '%x' expects a matching 'unsigned int' argument [-Wformat=] >> drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:26: warning: format '%llx' expects a matching 'long long unsigned int' argument [-Wformat=] >> drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:26: warning: format '%x' expects a matching 'unsigned int' argument [-Wformat=] >> drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:26: warning: format '%x' expects a matching 'unsigned int' argument [-Wformat=] vim +249 drivers/staging/lustre/lustre/obdclass/cl_lock.c d7e09d039 Peng Tao 2013-05-02 233 return names[mode]; d7e09d039 Peng Tao 2013-05-02 234 else d7e09d039 Peng Tao 2013-05-02 235 return "U"; d7e09d039 Peng Tao 2013-05-02 236 } d7e09d039 Peng Tao 2013-05-02 237 EXPORT_SYMBOL(cl_lock_mode_name); d7e09d039 Peng Tao 2013-05-02 238 d7e09d039 Peng Tao 2013-05-02 239 /** d7e09d039 Peng Tao 2013-05-02 240 * Prints human readable representation of a lock description. d7e09d039 Peng Tao 2013-05-02 241 */ d7e09d039 Peng Tao 2013-05-02 242 void cl_lock_descr_print(const struct lu_env *env, void *cookie, d7e09d039 Peng Tao 2013-05-02 243 lu_printer_t printer, d7e09d039 Peng Tao 2013-05-02 244 const struct cl_lock_descr *descr) d7e09d039 Peng Tao 2013-05-02 245 { d7e09d039 Peng Tao 2013-05-02 246 const struct lu_fid *fid; d7e09d039 Peng Tao 2013-05-02 247 d7e09d039 Peng Tao 2013-05-02 248 fid = lu_object_fid(&descr->cld_obj->co_lu); d7e09d039 Peng Tao 2013-05-02 @249 (*printer)(env, cookie, DDESCR"@"DFID, PDESCR(descr), PFID(fid)); d7e09d039 Peng Tao 2013-05-02 250 } d7e09d039 Peng Tao 2013-05-02 251 EXPORT_SYMBOL(cl_lock_descr_print); d7e09d039 Peng Tao 2013-05-02 252 d7e09d039 Peng Tao 2013-05-02 253 /** d7e09d039 Peng Tao 2013-05-02 254 * Prints human readable representation of \a lock to the \a f. d7e09d039 Peng Tao 2013-05-02 255 */ d7e09d039 Peng Tao 2013-05-02 256 void cl_lock_print(const struct lu_env *env, void *cookie, d7e09d039 Peng Tao 2013-05-02 257 lu_printer_t printer, const struct cl_lock *lock) :::::: The code at line 249 was first introduced by commit :::::: d7e09d0397e84eefbabfd9cb353221f3c6448d83 staging: add Lustre file system client support :::::: TO: Peng Tao :::::: CC: Greg Kroah-Hartman --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation -------------- next part -------------- A non-text attachment was scrubbed... Name: .config.gz Type: application/octet-stream Size: 54411 bytes Desc: not available URL: From lkp at intel.com Sun Jun 19 01:46:29 2016 From: lkp at intel.com (kbuild test robot) Date: Sun, 19 Jun 2016 09:46:29 +0800 Subject: [lustre-devel] [PATCH 2/3] staging: luster: Checkpatch Cleanup In-Reply-To: <109b0da96b67ae70145433b585ada631a5f7c668.1466279901.git.craig@craiginches.com> Message-ID: <201606190956.mZaEp8l4%fengguang.wu@intel.com> Hi, [auto build test WARNING on staging/staging-testing] [also build test WARNING on v4.7-rc3 next-20160617] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commits/Craig-Inches/staging-luster-cl_object-h-Checkpatch-Cleanup/20160619-052805 config: tile-allyesconfig (attached as .config) compiler: tilegx-linux-gcc (GCC) 4.6.2 reproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # save the attached .config to linux build tree make.cross ARCH=tile All warnings (new ones prefixed by >>): drivers/staging/lustre/lustre/obdclass/cl_lock.c: In function 'cl_lock_descr_print': drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:41: warning: value computed is not used [-Wunused-value] drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:41: warning: value computed is not used [-Wunused-value] drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:41: warning: value computed is not used [-Wunused-value] >> drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:2: warning: format '%s' expects argument of type 'char *', but argument 4 has type '__u32' [-Wformat] >> drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:2: warning: format '%d' expects argument of type 'int', but argument 5 has type '__u64' [-Wformat] >> drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:2: warning: format '%lu' expects argument of type 'long unsigned int', but argument 6 has type '__u32' [-Wformat] drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:2: warning: format '%lu' expects argument of type 'long unsigned int', but argument 7 has type '__u32' [-Wformat] drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:2: warning: format '%x' expects a matching 'unsigned int' argument [-Wformat] drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:2: warning: format '%llx' expects a matching 'long long unsigned int' argument [-Wformat] drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:2: warning: format '%x' expects a matching 'unsigned int' argument [-Wformat] drivers/staging/lustre/lustre/obdclass/cl_lock.c:249:2: warning: format '%x' expects a matching 'unsigned int' argument [-Wformat] vim +249 drivers/staging/lustre/lustre/obdclass/cl_lock.c d7e09d039 Peng Tao 2013-05-02 233 return names[mode]; d7e09d039 Peng Tao 2013-05-02 234 else d7e09d039 Peng Tao 2013-05-02 235 return "U"; d7e09d039 Peng Tao 2013-05-02 236 } d7e09d039 Peng Tao 2013-05-02 237 EXPORT_SYMBOL(cl_lock_mode_name); d7e09d039 Peng Tao 2013-05-02 238 d7e09d039 Peng Tao 2013-05-02 239 /** d7e09d039 Peng Tao 2013-05-02 240 * Prints human readable representation of a lock description. d7e09d039 Peng Tao 2013-05-02 241 */ d7e09d039 Peng Tao 2013-05-02 242 void cl_lock_descr_print(const struct lu_env *env, void *cookie, d7e09d039 Peng Tao 2013-05-02 243 lu_printer_t printer, d7e09d039 Peng Tao 2013-05-02 244 const struct cl_lock_descr *descr) d7e09d039 Peng Tao 2013-05-02 245 { d7e09d039 Peng Tao 2013-05-02 246 const struct lu_fid *fid; d7e09d039 Peng Tao 2013-05-02 247 d7e09d039 Peng Tao 2013-05-02 248 fid = lu_object_fid(&descr->cld_obj->co_lu); d7e09d039 Peng Tao 2013-05-02 @249 (*printer)(env, cookie, DDESCR"@"DFID, PDESCR(descr), PFID(fid)); d7e09d039 Peng Tao 2013-05-02 250 } d7e09d039 Peng Tao 2013-05-02 251 EXPORT_SYMBOL(cl_lock_descr_print); d7e09d039 Peng Tao 2013-05-02 252 d7e09d039 Peng Tao 2013-05-02 253 /** d7e09d039 Peng Tao 2013-05-02 254 * Prints human readable representation of \a lock to the \a f. d7e09d039 Peng Tao 2013-05-02 255 */ d7e09d039 Peng Tao 2013-05-02 256 void cl_lock_print(const struct lu_env *env, void *cookie, d7e09d039 Peng Tao 2013-05-02 257 lu_printer_t printer, const struct cl_lock *lock) :::::: The code at line 249 was first introduced by commit :::::: d7e09d0397e84eefbabfd9cb353221f3c6448d83 staging: add Lustre file system client support :::::: TO: Peng Tao :::::: CC: Greg Kroah-Hartman --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation -------------- next part -------------- A non-text attachment was scrubbed... Name: .config.gz Type: application/octet-stream Size: 44884 bytes Desc: not available URL: From gregkh at linuxfoundation.org Sun Jun 19 02:02:35 2016 From: gregkh at linuxfoundation.org (Greg Kroah-Hartman) Date: Sat, 18 Jun 2016 19:02:35 -0700 Subject: [lustre-devel] [PATCH 2/3] staging: luster: Checkpatch Cleanup In-Reply-To: <109b0da96b67ae70145433b585ada631a5f7c668.1466279901.git.craig@craiginches.com> References: <109b0da96b67ae70145433b585ada631a5f7c668.1466279901.git.craig@craiginches.com> Message-ID: <20160619020235.GA18034@kroah.com> On Sat, Jun 18, 2016 at 10:25:55PM +0100, Craig Inches wrote: > Macros with complex values should be enclosed in parenthesis > > Signed-off-by: Craig Inches > --- > drivers/staging/lustre/lustre/include/cl_object.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) ALWAYS test build your patches, to not do so just makes maintainers grumpy... Remember, checkpatch is a _hint_, it's not always right. greg k-h From gregkh at linuxfoundation.org Sun Jun 19 02:03:19 2016 From: gregkh at linuxfoundation.org (Greg Kroah-Hartman) Date: Sat, 18 Jun 2016 19:03:19 -0700 Subject: [lustre-devel] [PATCH 1/3] staging: luster: cl_object.h Checkpatch Cleanup In-Reply-To: <4b26b82c7081f368835365ff18ecc812263b0430.1466279901.git.craig@craiginches.com> References: <4b26b82c7081f368835365ff18ecc812263b0430.1466279901.git.craig@craiginches.com> Message-ID: <20160619020319.GB18034@kroah.com> On Sat, Jun 18, 2016 at 10:25:42PM +0100, Craig Inches wrote: > Line length greater than 80 char. What does that mean? What does your subject mean? Please be more descriptive, again, look at other patches that have been merged for examples... greg k-h From gregkh at linuxfoundation.org Sun Jun 19 02:03:49 2016 From: gregkh at linuxfoundation.org (Greg Kroah-Hartman) Date: Sat, 18 Jun 2016 19:03:49 -0700 Subject: [lustre-devel] [PATCH 3/3] staging: luster: Checkpatch Cleanup In-Reply-To: <34e8b044236880f37be45c5d8fd527071bdfe9f9.1466279901.git.craig@craiginches.com> References: <34e8b044236880f37be45c5d8fd527071bdfe9f9.1466279901.git.craig@craiginches.com> Message-ID: <20160619020349.GC18034@kroah.com> On Sat, Jun 18, 2016 at 10:26:08PM +0100, Craig Inches wrote: > WARNING: Prefer 'unsigned int' to bare use of 'unsigned' You can't send 3 different patches all with the same subject line :( From green at linuxhacker.ru Sun Jun 19 03:53:09 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Sat, 18 Jun 2016 23:53:09 -0400 Subject: [lustre-devel] [PATCH 0/4] Some Lustre style cleanups Message-ID: <1466308393-1183295-1-git-send-email-green@linuxhacker.ru> These are just some more cleanups in Lustre styel and comments Emoly Liu (2): staging/lustre: Fix blank line before EXPORT_SYMBOL() staging/lustre: Keep logical continuations on the previous line Oleg Drokin (2): staging/lustre: Remove unnecessary space after a cast staging/lustre: Update FID documentation link. drivers/staging/lustre/include/linux/lnet/lib-dlc.h | 2 +- drivers/staging/lustre/include/linux/lnet/types.h | 4 ++-- drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h | 2 +- drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c | 2 +- drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c | 4 ++-- drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c | 4 ++-- drivers/staging/lustre/lnet/klnds/socklnd/socklnd_proto.c | 6 +++--- drivers/staging/lustre/lnet/lnet/api-ni.c | 2 +- drivers/staging/lustre/lnet/lnet/module.c | 2 +- drivers/staging/lustre/lustre/include/lustre/lustre_idl.h | 4 ++-- drivers/staging/lustre/lustre/include/lustre_fid.h | 2 +- drivers/staging/lustre/lustre/include/lustre_sec.h | 6 +++--- drivers/staging/lustre/lustre/ldlm/ldlm_flock.c | 9 ++++----- drivers/staging/lustre/lustre/llite/file.c | 2 +- drivers/staging/lustre/lustre/llite/vvp_dev.c | 2 +- drivers/staging/lustre/lustre/mdc/mdc_request.c | 4 ++-- drivers/staging/lustre/lustre/mgc/mgc_request.c | 4 ++-- drivers/staging/lustre/lustre/obdclass/cl_object.c | 6 +++--- drivers/staging/lustre/lustre/obdclass/obd_config.c | 6 +++--- drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c | 1 - drivers/staging/lustre/lustre/ptlrpc/nrs.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/sec.c | 4 ++-- drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/sec_config.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/sec_null.c | 4 ++-- drivers/staging/lustre/lustre/ptlrpc/sec_plain.c | 10 +++++----- 26 files changed, 48 insertions(+), 50 deletions(-) -- 2.7.4 From green at linuxhacker.ru Sun Jun 19 03:53:11 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Sat, 18 Jun 2016 23:53:11 -0400 Subject: [lustre-devel] [PATCH 2/4] staging/lustre: Keep logical continuations on the previous line In-Reply-To: <1466308393-1183295-1-git-send-email-green@linuxhacker.ru> References: <1466308393-1183295-1-git-send-email-green@linuxhacker.ru> Message-ID: <1466308393-1183295-3-git-send-email-green@linuxhacker.ru> From: Emoly Liu This patch fixes all checkpatch occurences of "CHECK: Logical continuations should be on the previous line" in Lustre code. Signed-off-by: Emoly Liu Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/ldlm/ldlm_flock.c | 9 ++++----- drivers/staging/lustre/lustre/obdclass/obd_config.c | 4 ++-- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c index 38c507f..d6b61bc 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c @@ -255,14 +255,13 @@ reprocess: * overflow and underflow. */ if ((new->l_policy_data.l_flock.start > - (lock->l_policy_data.l_flock.end + 1)) - && (lock->l_policy_data.l_flock.end != - OBD_OBJECT_EOF)) + (lock->l_policy_data.l_flock.end + 1)) && + (lock->l_policy_data.l_flock.end != OBD_OBJECT_EOF)) continue; if ((new->l_policy_data.l_flock.end < - (lock->l_policy_data.l_flock.start - 1)) - && (lock->l_policy_data.l_flock.start != 0)) + (lock->l_policy_data.l_flock.start - 1)) && + (lock->l_policy_data.l_flock.start != 0)) break; if (new->l_policy_data.l_flock.start < diff --git a/drivers/staging/lustre/lustre/obdclass/obd_config.c b/drivers/staging/lustre/lustre/obdclass/obd_config.c index 694c58e..f1c41a1 100644 --- a/drivers/staging/lustre/lustre/obdclass/obd_config.c +++ b/drivers/staging/lustre/lustre/obdclass/obd_config.c @@ -1017,8 +1017,8 @@ int class_process_proc_param(char *prefix, struct lprocfs_vars *lvars, /* Search proc entries */ while (lvars[j].name) { var = &lvars[j]; - if (!class_match_param(key, var->name, NULL) - && keylen == strlen(var->name)) { + if (!class_match_param(key, var->name, NULL) && + keylen == strlen(var->name)) { matched++; rc = -EROFS; if (var->fops && var->fops->write) { -- 2.7.4 From green at linuxhacker.ru Sun Jun 19 03:53:10 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Sat, 18 Jun 2016 23:53:10 -0400 Subject: [lustre-devel] [PATCH 1/4] staging/lustre: Fix blank line before EXPORT_SYMBOL() In-Reply-To: <1466308393-1183295-1-git-send-email-green@linuxhacker.ru> References: <1466308393-1183295-1-git-send-email-green@linuxhacker.ru> Message-ID: <1466308393-1183295-2-git-send-email-green@linuxhacker.ru> From: Emoly Liu This patch fixes one checkpatch warning in lustre: WARNING: EXPORT_SYMBOL(foo); should immediately follow its function/variable Signed-off-by: Emoly Liu Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c b/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c index fe6f7a6..bc93b75 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c +++ b/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c @@ -1158,7 +1158,6 @@ void ptlrpc_lprocfs_brw(struct ptlrpc_request *req, int bytes) lprocfs_counter_add(svc_stats, idx, bytes); } - EXPORT_SYMBOL(ptlrpc_lprocfs_brw); void ptlrpc_lprocfs_unregister_service(struct ptlrpc_service *svc) -- 2.7.4 From green at linuxhacker.ru Sun Jun 19 03:53:12 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Sat, 18 Jun 2016 23:53:12 -0400 Subject: [lustre-devel] [PATCH 3/4] staging/lustre: Remove unnecessary space after a cast In-Reply-To: <1466308393-1183295-1-git-send-email-green@linuxhacker.ru> References: <1466308393-1183295-1-git-send-email-green@linuxhacker.ru> Message-ID: <1466308393-1183295-4-git-send-email-green@linuxhacker.ru> This patch fixes all checkpatch occurences of "CHECK: No space is necessary after a cast" in Lustre code. Signed-off-by: Emoly Liu Signed-off-by: Oleg Drokin --- drivers/staging/lustre/include/linux/lnet/lib-dlc.h | 2 +- drivers/staging/lustre/include/linux/lnet/types.h | 4 ++-- drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h | 2 +- drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c | 2 +- drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c | 4 ++-- drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c | 4 ++-- drivers/staging/lustre/lnet/klnds/socklnd/socklnd_proto.c | 6 +++--- drivers/staging/lustre/lnet/lnet/api-ni.c | 2 +- drivers/staging/lustre/lnet/lnet/module.c | 2 +- drivers/staging/lustre/lustre/include/lustre_sec.h | 6 +++--- drivers/staging/lustre/lustre/llite/file.c | 2 +- drivers/staging/lustre/lustre/llite/vvp_dev.c | 2 +- drivers/staging/lustre/lustre/mdc/mdc_request.c | 4 ++-- drivers/staging/lustre/lustre/mgc/mgc_request.c | 4 ++-- drivers/staging/lustre/lustre/obdclass/cl_object.c | 6 +++--- drivers/staging/lustre/lustre/obdclass/obd_config.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/nrs.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/sec.c | 4 ++-- drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/sec_config.c | 2 +- drivers/staging/lustre/lustre/ptlrpc/sec_null.c | 4 ++-- drivers/staging/lustre/lustre/ptlrpc/sec_plain.c | 10 +++++----- 22 files changed, 39 insertions(+), 39 deletions(-) diff --git a/drivers/staging/lustre/include/linux/lnet/lib-dlc.h b/drivers/staging/lustre/include/linux/lnet/lib-dlc.h index 6ce9acc..dfff170 100644 --- a/drivers/staging/lustre/include/linux/lnet/lib-dlc.h +++ b/drivers/staging/lustre/include/linux/lnet/lib-dlc.h @@ -35,7 +35,7 @@ #define MAX_NUM_SHOW_ENTRIES 32 #define LNET_MAX_STR_LEN 128 #define LNET_MAX_SHOW_NUM_CPT 128 -#define LNET_UNDEFINED_HOPS ((__u32) -1) +#define LNET_UNDEFINED_HOPS ((__u32)(-1)) struct lnet_ioctl_config_lnd_cmn_tunables { __u32 lct_version; diff --git a/drivers/staging/lustre/include/linux/lnet/types.h b/drivers/staging/lustre/include/linux/lnet/types.h index 1c679cb..e098b6c 100644 --- a/drivers/staging/lustre/include/linux/lnet/types.h +++ b/drivers/staging/lustre/include/linux/lnet/types.h @@ -68,9 +68,9 @@ typedef __u64 lnet_nid_t; typedef __u32 lnet_pid_t; /** wildcard NID that matches any end-point address */ -#define LNET_NID_ANY ((lnet_nid_t) -1) +#define LNET_NID_ANY ((lnet_nid_t)(-1)) /** wildcard PID that matches any lnet_pid_t */ -#define LNET_PID_ANY ((lnet_pid_t) -1) +#define LNET_PID_ANY ((lnet_pid_t)(-1)) #define LNET_PID_RESERVED 0xf0000000 /* reserved bits in PID */ #define LNET_PID_USERFLAG 0x80000000 /* set in userspace peers */ diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h index b66ab79..078a0c3 100644 --- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h +++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h @@ -98,7 +98,7 @@ extern struct kib_tunables kiblnd_tunables; #define IBLND_CREDIT_HIGHWATER_V1 7 /* V1 only : when eagerly to return credits */ #define IBLND_CREDITS_DEFAULT 8 /* default # of peer credits */ -#define IBLND_CREDITS_MAX ((typeof(((struct kib_msg *) 0)->ibm_credits)) - 1) /* Max # of peer credits */ +#define IBLND_CREDITS_MAX ((typeof(((struct kib_msg *)0)->ibm_credits)) - 1) /* Max # of peer credits */ /* when eagerly to return credits */ #define IBLND_CREDITS_HIGHWATER(t, v) ((v) == IBLND_MSG_VERSION_1 ? \ diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c index adc346a..e32e43b 100644 --- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c +++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c @@ -1103,7 +1103,7 @@ kiblnd_init_rdma(struct kib_conn *conn, struct kib_tx *tx, int type, wrknob = min(min(kiblnd_rd_frag_size(srcrd, srcidx), kiblnd_rd_frag_size(dstrd, dstidx)), - (__u32) resid); + (__u32)resid); sge = &tx->tx_sge[tx->tx_nwrq]; sge->addr = kiblnd_rd_frag_addr(srcrd, srcidx); diff --git a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c index d4e7dae..07ec540 100644 --- a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c +++ b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c @@ -475,7 +475,7 @@ ksocknal_add_peer(lnet_ni_t *ni, lnet_process_id_t id, __u32 ipaddr, int port) write_lock_bh(&ksocknal_data.ksnd_global_lock); /* always called with a ref on ni, so shutdown can't have started */ - LASSERT(!((struct ksock_net *) ni->ni_data)->ksnn_shutdown); + LASSERT(!((struct ksock_net *)ni->ni_data)->ksnn_shutdown); peer2 = ksocknal_find_peer_locked(ni, id); if (peer2) { @@ -1146,7 +1146,7 @@ ksocknal_create_conn(lnet_ni_t *ni, struct ksock_route *route, write_lock_bh(global_lock); /* called with a ref on ni, so shutdown can't have started */ - LASSERT(!((struct ksock_net *) ni->ni_data)->ksnn_shutdown); + LASSERT(!((struct ksock_net *)ni->ni_data)->ksnn_shutdown); peer2 = ksocknal_find_peer_locked(ni, peerid); if (!peer2) { diff --git a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c index e63d29b..303576d 100644 --- a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c +++ b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c @@ -126,7 +126,7 @@ ksocknal_send_iov(struct ksock_conn *conn, struct ksock_tx *tx) do { LASSERT(tx->tx_niov > 0); - if (nob < (int) iov->iov_len) { + if (nob < (int)iov->iov_len) { iov->iov_base = (void *)((char *)iov->iov_base + nob); iov->iov_len -= nob; return rc; @@ -326,7 +326,7 @@ ksocknal_recv_kiov(struct ksock_conn *conn) do { LASSERT(conn->ksnc_rx_nkiov > 0); - if (nob < (int) kiov->kiov_len) { + if (nob < (int)kiov->kiov_len) { kiov->kiov_offset += nob; kiov->kiov_len -= nob; return -EAGAIN; diff --git a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_proto.c b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_proto.c index e1bf910..82e174f 100644 --- a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_proto.c +++ b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_proto.c @@ -503,7 +503,7 @@ ksocknal_send_hello_v1(struct ksock_conn *conn, ksock_hello_msg_t *hello) if (!hello->kshm_nips) goto out; - for (i = 0; i < (int) hello->kshm_nips; i++) + for (i = 0; i < (int)hello->kshm_nips; i++) hello->kshm_ips[i] = __cpu_to_le32(hello->kshm_ips[i]); rc = lnet_sock_write(sock, hello->kshm_ips, @@ -622,7 +622,7 @@ ksocknal_recv_hello_v1(struct ksock_conn *conn, ksock_hello_msg_t *hello, goto out; } - for (i = 0; i < (int) hello->kshm_nips; i++) { + for (i = 0; i < (int)hello->kshm_nips; i++) { hello->kshm_ips[i] = __le32_to_cpu(hello->kshm_ips[i]); if (!hello->kshm_ips[i]) { @@ -690,7 +690,7 @@ ksocknal_recv_hello_v2(struct ksock_conn *conn, ksock_hello_msg_t *hello, int ti return rc; } - for (i = 0; i < (int) hello->kshm_nips; i++) { + for (i = 0; i < (int)hello->kshm_nips; i++) { if (conn->ksnc_flip) __swab32s(&hello->kshm_ips[i]); diff --git a/drivers/staging/lustre/lnet/lnet/api-ni.c b/drivers/staging/lustre/lnet/lnet/api-ni.c index 48327ca..346db89 100644 --- a/drivers/staging/lustre/lnet/lnet/api-ni.c +++ b/drivers/staging/lustre/lnet/lnet/api-ni.c @@ -1673,7 +1673,7 @@ lnet_fill_ni_info(struct lnet_ni *ni, struct lnet_ioctl_config_data *config) if (!ni || !config) return; - net_config = (struct lnet_ioctl_net_config *) config->cfg_bulk; + net_config = (struct lnet_ioctl_net_config *)config->cfg_bulk; if (!net_config) return; diff --git a/drivers/staging/lustre/lnet/lnet/module.c b/drivers/staging/lustre/lnet/lnet/module.c index 58cf246..4ffbd3e 100644 --- a/drivers/staging/lustre/lnet/lnet/module.c +++ b/drivers/staging/lustre/lnet/lnet/module.c @@ -196,7 +196,7 @@ static int __init lnet_init(void) * Have to schedule a separate thread to avoid deadlocking * in modload */ - (void) kthread_run(lnet_configure, NULL, "lnet_initd"); + (void)kthread_run(lnet_configure, NULL, "lnet_initd"); } return 0; diff --git a/drivers/staging/lustre/lustre/include/lustre_sec.h b/drivers/staging/lustre/lustre/include/lustre_sec.h index ed4b4c7..90c1834 100644 --- a/drivers/staging/lustre/lustre/include/lustre_sec.h +++ b/drivers/staging/lustre/lustre/include/lustre_sec.h @@ -217,13 +217,13 @@ enum sptlrpc_bulk_service { #define SPTLRPC_FLVR_DEFAULT SPTLRPC_FLVR_NULL -#define SPTLRPC_FLVR_INVALID ((__u32) 0xFFFFFFFF) -#define SPTLRPC_FLVR_ANY ((__u32) 0xFFF00000) +#define SPTLRPC_FLVR_INVALID ((__u32)0xFFFFFFFF) +#define SPTLRPC_FLVR_ANY ((__u32)0xFFF00000) /** * extract the useful part from wire flavor */ -#define WIRE_FLVR(wflvr) (((__u32) (wflvr)) & 0x000FFFFF) +#define WIRE_FLVR(wflvr) (((__u32)(wflvr)) & 0x000FFFFF) /** @} flavor */ diff --git a/drivers/staging/lustre/lustre/llite/file.c b/drivers/staging/lustre/lustre/llite/file.c index 4602596..b0c4548 100644 --- a/drivers/staging/lustre/lustre/llite/file.c +++ b/drivers/staging/lustre/lustre/llite/file.c @@ -1413,7 +1413,7 @@ out_unlock: out: return rc; out_req_free: - ptlrpc_req_finished((struct ptlrpc_request *) oit.d.lustre.it_data); + ptlrpc_req_finished((struct ptlrpc_request *)oit.d.lustre.it_data); goto out; } diff --git a/drivers/staging/lustre/lustre/llite/vvp_dev.c b/drivers/staging/lustre/lustre/llite/vvp_dev.c index 6c09fb2..e623216 100644 --- a/drivers/staging/lustre/lustre/llite/vvp_dev.c +++ b/drivers/staging/lustre/lustre/llite/vvp_dev.c @@ -560,7 +560,7 @@ static int vvp_pgcache_show(struct seq_file *f, void *v) env = cl_env_get(&refcheck); if (!IS_ERR(env)) { - pos = *(loff_t *) v; + pos = *(loff_t *)v; vvp_pgcache_id_unpack(pos, &id); sbi = f->private; clob = vvp_pgcache_obj(env, &sbi->ll_cl->cd_lu_dev, &id); diff --git a/drivers/staging/lustre/lustre/mdc/mdc_request.c b/drivers/staging/lustre/lustre/mdc/mdc_request.c index 12cb238..f371e1d 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_request.c +++ b/drivers/staging/lustre/lustre/mdc/mdc_request.c @@ -1803,7 +1803,7 @@ static int mdc_iocontrol(unsigned int cmd, struct obd_export *exp, int len, case IOC_OBD_STATFS: { struct obd_statfs stat_buf = {0}; - if (*((__u32 *) data->ioc_inlbuf2) != 0) { + if (*((__u32 *)data->ioc_inlbuf2) != 0) { rc = -ENODEV; goto out; } @@ -1997,7 +1997,7 @@ static int mdc_hsm_copytool_send(int len, void *val) if (len < sizeof(*lh) + sizeof(*hal)) { CERROR("Short HSM message %d < %d\n", len, - (int) (sizeof(*lh) + sizeof(*hal))); + (int)(sizeof(*lh) + sizeof(*hal))); return -EPROTO; } if (lh->kuc_magic == __swab16(KUC_MAGIC)) { diff --git a/drivers/staging/lustre/lustre/mgc/mgc_request.c b/drivers/staging/lustre/lustre/mgc/mgc_request.c index 69f5337..fbbf276 100644 --- a/drivers/staging/lustre/lustre/mgc/mgc_request.c +++ b/drivers/staging/lustre/lustre/mgc/mgc_request.c @@ -1030,7 +1030,7 @@ static int mgc_set_info_async(const struct lu_env *env, struct obd_export *exp, rc = sptlrpc_parse_flavor(val, &flvr); if (rc) { CERROR("invalid sptlrpc flavor %s to MGS\n", - (char *) val); + (char *)val); return rc; } @@ -1046,7 +1046,7 @@ static int mgc_set_info_async(const struct lu_env *env, struct obd_export *exp, sptlrpc_flavor2name(&cli->cl_flvr_mgc, str, sizeof(str)); LCONSOLE_ERROR("asking sptlrpc flavor %s to MGS but currently %s is in use\n", - (char *) val, str); + (char *)val, str); rc = -EPERM; } return rc; diff --git a/drivers/staging/lustre/lustre/obdclass/cl_object.c b/drivers/staging/lustre/lustre/obdclass/cl_object.c index 615158a..91a5806 100644 --- a/drivers/staging/lustre/lustre/obdclass/cl_object.c +++ b/drivers/staging/lustre/lustre/obdclass/cl_object.c @@ -573,7 +573,7 @@ static inline struct cl_env *cl_env_fetch(void) { struct cl_env *cle; - cle = cfs_hash_lookup(cl_env_hash, (void *) (long) current->pid); + cle = cfs_hash_lookup(cl_env_hash, (void *)(long)current->pid); LASSERT(ergo(cle, cle->ce_magic == &cl_env_init0)); return cle; } @@ -584,7 +584,7 @@ static inline void cl_env_attach(struct cl_env *cle) int rc; LASSERT(!cle->ce_owner); - cle->ce_owner = (void *) (long) current->pid; + cle->ce_owner = (void *)(long)current->pid; rc = cfs_hash_add_unique(cl_env_hash, cle->ce_owner, &cle->ce_node); LASSERT(rc == 0); @@ -595,7 +595,7 @@ static inline void cl_env_do_detach(struct cl_env *cle) { void *cookie; - LASSERT(cle->ce_owner == (void *) (long) current->pid); + LASSERT(cle->ce_owner == (void *)(long)current->pid); cookie = cfs_hash_del(cl_env_hash, cle->ce_owner, &cle->ce_node); LASSERT(cookie == cle); diff --git a/drivers/staging/lustre/lustre/obdclass/obd_config.c b/drivers/staging/lustre/lustre/obdclass/obd_config.c index f1c41a1..0eab123 100644 --- a/drivers/staging/lustre/lustre/obdclass/obd_config.c +++ b/drivers/staging/lustre/lustre/obdclass/obd_config.c @@ -1073,7 +1073,7 @@ int class_config_llog_handler(const struct lu_env *env, { struct config_llog_instance *clli = data; int cfg_len = rec->lrh_len; - char *cfg_buf = (char *) (rec + 1); + char *cfg_buf = (char *)(rec + 1); int rc = 0; switch (rec->lrh_type) { diff --git a/drivers/staging/lustre/lustre/ptlrpc/nrs.c b/drivers/staging/lustre/lustre/ptlrpc/nrs.c index c444f51..d88faf6 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/nrs.c +++ b/drivers/staging/lustre/lustre/ptlrpc/nrs.c @@ -769,7 +769,7 @@ static int nrs_policy_register(struct ptlrpc_nrs *nrs, spin_unlock(&nrs->nrs_lock); if (rc != 0) - (void) nrs_policy_unregister(nrs, policy->pol_desc->pd_name); + (void)nrs_policy_unregister(nrs, policy->pol_desc->pd_name); return rc; } diff --git a/drivers/staging/lustre/lustre/ptlrpc/sec.c b/drivers/staging/lustre/lustre/ptlrpc/sec.c index 7ab3ae9..f3b4773 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/sec.c +++ b/drivers/staging/lustre/lustre/ptlrpc/sec.c @@ -1100,7 +1100,7 @@ int sptlrpc_cli_unwrap_early_reply(struct ptlrpc_request *req, early_req->rq_flvr = req->rq_flvr; early_req->rq_repbuf = early_buf; early_req->rq_repbuf_len = early_bufsz; - early_req->rq_repdata = (struct lustre_msg *) early_buf; + early_req->rq_repdata = (struct lustre_msg *)early_buf; early_req->rq_repdata_len = early_size; early_req->rq_early = 1; early_req->rq_reqmsg = req->rq_reqmsg; @@ -1552,7 +1552,7 @@ void _sptlrpc_enlarge_msg_inplace(struct lustre_msg *msg, /* move from segment + 1 to end segment */ LASSERT(msg->lm_magic == LUSTRE_MSG_MAGIC_V2); oldmsg_size = lustre_msg_size_v2(msg->lm_bufcount, msg->lm_buflens); - movesize = oldmsg_size - ((unsigned long) src - (unsigned long) msg); + movesize = oldmsg_size - ((unsigned long)src - (unsigned long)msg); LASSERT(movesize >= 0); if (movesize) diff --git a/drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c b/drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c index b3e3ed9..5f4d797 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c +++ b/drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c @@ -269,7 +269,7 @@ static unsigned long enc_pools_shrink_scan(struct shrinker *s, static inline int npages_to_npools(unsigned long npages) { - return (int) ((npages + PAGES_PER_POOL - 1) / PAGES_PER_POOL); + return (int)((npages + PAGES_PER_POOL - 1) / PAGES_PER_POOL); } /* diff --git a/drivers/staging/lustre/lustre/ptlrpc/sec_config.c b/drivers/staging/lustre/lustre/ptlrpc/sec_config.c index 303bf96..1238c87 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/sec_config.c +++ b/drivers/staging/lustre/lustre/ptlrpc/sec_config.c @@ -644,7 +644,7 @@ static int logname2fsname(const char *logname, char *buf, int buflen) return -EINVAL; } - len = min((int) (ptr - logname), buflen - 1); + len = min((int)(ptr - logname), buflen - 1); memcpy(buf, logname, len); buf[len] = '\0'; diff --git a/drivers/staging/lustre/lustre/ptlrpc/sec_null.c b/drivers/staging/lustre/lustre/ptlrpc/sec_null.c index 3306233..70a61e1 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/sec_null.c +++ b/drivers/staging/lustre/lustre/ptlrpc/sec_null.c @@ -56,7 +56,7 @@ static struct ptlrpc_svc_ctx null_svc_ctx; static inline void null_encode_sec_part(struct lustre_msg *msg, enum lustre_sec_part sp) { - msg->lm_secflvr |= (((__u32) sp) & 0xFF) << 24; + msg->lm_secflvr |= (((__u32)sp) & 0xFF) << 24; } static inline @@ -326,7 +326,7 @@ int null_alloc_rs(struct ptlrpc_request *req, int msgsize) rs->rs_svc_ctx = req->rq_svc_ctx; atomic_inc(&req->rq_svc_ctx->sc_refcount); - rs->rs_repbuf = (struct lustre_msg *) (rs + 1); + rs->rs_repbuf = (struct lustre_msg *)(rs + 1); rs->rs_repbuf_len = rs_size - sizeof(*rs); rs->rs_msg = rs->rs_repbuf; diff --git a/drivers/staging/lustre/lustre/ptlrpc/sec_plain.c b/drivers/staging/lustre/lustre/ptlrpc/sec_plain.c index ea79b15..5c4590b 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/sec_plain.c +++ b/drivers/staging/lustre/lustre/ptlrpc/sec_plain.c @@ -294,7 +294,7 @@ int plain_cli_wrap_bulk(struct ptlrpc_cli_ctx *ctx, LASSERT(req->rq_reqbuf->lm_bufcount == PLAIN_PACK_SEGMENTS); bsd = lustre_msg_buf(req->rq_reqbuf, PLAIN_PACK_BULK_OFF, 0); - token = (struct plain_bulk_token *) bsd->bsd_data; + token = (struct plain_bulk_token *)bsd->bsd_data; bsd->bsd_version = 0; bsd->bsd_flags = 0; @@ -339,7 +339,7 @@ int plain_cli_unwrap_bulk(struct ptlrpc_cli_ctx *ctx, LASSERT(req->rq_repdata->lm_bufcount == PLAIN_PACK_SEGMENTS); bsdv = lustre_msg_buf(req->rq_repdata, PLAIN_PACK_BULK_OFF, 0); - tokenv = (struct plain_bulk_token *) bsdv->bsd_data; + tokenv = (struct plain_bulk_token *)bsdv->bsd_data; if (req->rq_bulk_write) { if (bsdv->bsd_flags & BSD_FL_ERR) @@ -811,7 +811,7 @@ int plain_alloc_rs(struct ptlrpc_request *req, int msgsize) rs->rs_svc_ctx = req->rq_svc_ctx; atomic_inc(&req->rq_svc_ctx->sc_refcount); - rs->rs_repbuf = (struct lustre_msg *) (rs + 1); + rs->rs_repbuf = (struct lustre_msg *)(rs + 1); rs->rs_repbuf_len = rs_size - sizeof(*rs); lustre_init_msg_v2(rs->rs_repbuf, PLAIN_PACK_SEGMENTS, buflens, NULL); @@ -891,7 +891,7 @@ int plain_svc_unwrap_bulk(struct ptlrpc_request *req, LASSERT(req->rq_pack_bulk); bsdr = lustre_msg_buf(req->rq_reqbuf, PLAIN_PACK_BULK_OFF, 0); - tokenr = (struct plain_bulk_token *) bsdr->bsd_data; + tokenr = (struct plain_bulk_token *)bsdr->bsd_data; bsdv = lustre_msg_buf(rs->rs_repbuf, PLAIN_PACK_BULK_OFF, 0); bsdv->bsd_version = 0; @@ -926,7 +926,7 @@ int plain_svc_wrap_bulk(struct ptlrpc_request *req, bsdr = lustre_msg_buf(req->rq_reqbuf, PLAIN_PACK_BULK_OFF, 0); bsdv = lustre_msg_buf(rs->rs_repbuf, PLAIN_PACK_BULK_OFF, 0); - tokenv = (struct plain_bulk_token *) bsdv->bsd_data; + tokenv = (struct plain_bulk_token *)bsdv->bsd_data; bsdv->bsd_version = 0; bsdv->bsd_type = SPTLRPC_BULK_DEFAULT; -- 2.7.4 From green at linuxhacker.ru Sun Jun 19 03:53:13 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Sat, 18 Jun 2016 23:53:13 -0400 Subject: [lustre-devel] [PATCH 4/4] staging/lustre: Update FID documentation link. In-Reply-To: <1466308393-1183295-1-git-send-email-green@linuxhacker.ru> References: <1466308393-1183295-1-git-send-email-green@linuxhacker.ru> Message-ID: <1466308393-1183295-5-git-send-email-green@linuxhacker.ru> When OpenSFS took over lustre.org, there was some reshuffling. FIDs on ZFS document is now at http://wiki.old.lustre.org/index.php/Architecture_-_Interoperability_fids_zfs instead of the old location, so update comments accordingly. Signed-off-by: Oleg Drokin Reported-by: Xose Vazquez Perez --- drivers/staging/lustre/lustre/include/lustre/lustre_idl.h | 4 ++-- drivers/staging/lustre/lustre/include/lustre_fid.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h index bf8a0cd..fac7215 100644 --- a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h +++ b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h @@ -382,7 +382,7 @@ static inline __u64 fid_ver_oid(const struct lu_fid *fid) * used for other purposes and not risk collisions with existing inodes. * * Different FID Format - * http://arch.lustre.org/index.php?title=Interoperability_fids_zfs#NEW.0 + * http://wiki.old.lustre.org/index.php/Architecture_-_Interoperability_fids_zfs */ enum fid_seq { FID_SEQ_OST_MDT0 = 0, @@ -700,7 +700,7 @@ static inline int fid_set_id(struct lu_fid *fid, __u64 oid) * be passed through unchanged. Only legacy OST objects in "group 0" * will be mapped into the IDIF namespace so that they can fit into the * struct lu_fid fields without loss. For reference see: - * http://arch.lustre.org/index.php?title=Interoperability_fids_zfs + * http://wiki.old.lustre.org/index.php/Architecture_-_Interoperability_fids_zfs */ static inline int ostid_to_fid(struct lu_fid *fid, struct ost_id *ostid, __u32 ost_idx) diff --git a/drivers/staging/lustre/lustre/include/lustre_fid.h b/drivers/staging/lustre/lustre/include/lustre_fid.h index cbdd91a..743671a 100644 --- a/drivers/staging/lustre/lustre/include/lustre_fid.h +++ b/drivers/staging/lustre/lustre/include/lustre_fid.h @@ -41,7 +41,7 @@ * * @{ * - * http://wiki.lustre.org/index.php/Architecture_-_Interoperability_fids_zfs + * http://wiki.old.lustre.org/index.php/Architecture_-_Interoperability_fids_zfs * describes the FID namespace and interoperability requirements for FIDs. * The important parts of that document are included here for reference. * -- 2.7.4 From deepa.kernel at gmail.com Mon Jun 20 00:26:59 2016 From: deepa.kernel at gmail.com (Deepa Dinamani) Date: Sun, 19 Jun 2016 17:26:59 -0700 Subject: [lustre-devel] [PATCH v2 00/24] Delete CURRENT_TIME and CURRENT_TIME_SEC macros Message-ID: <1466382443-11063-1-git-send-email-deepa.kernel@gmail.com> The series is aimed at getting rid of CURRENT_TIME and CURRENT_TIME_SEC macros. The macros are not y2038 safe. There is no plan to transition them into being y2038 safe. ktime_get_* api's can be used in their place. And, these are y2038 safe. Thanks to Arnd Bergmann for all the guidance and discussions. Patches 2-4 were mostly generated using coccinelle scripts. All filesystem timestamps use current_fs_time() for right granularity as mentioned in the respective commit texts of patches. This has a changed signature, renamed to current_time() and moved to the fs/inode.c. This series also serves as a preparatory series to transition vfs to 64 bit timestamps as outlined here: https://lkml.org/lkml/2016/2/12/104 . As per Linus's suggestion in https://lkml.org/lkml/2016/5/24/663 , all the inode timestamp changes have been squashed into a single patch. Also, current_time() now is used as a single generic vfs filesystem timestamp api. It also takes struct inode* as argument instead of struct super_block*. Posting all patches together in a bigger series so that the big picture is clear. As per the suggestion in https://lwn.net/Articles/672598/, CURRENT_TIME macro bug fixes are being handled in a series separate from transitioning vfs to use. Changes from v1: * Change current_fs_time(struct super_block *) to current_time(struct inode *) * Note that change to add time64_to_tm() is already part of John's kernel tree: https://lkml.org/lkml/2016/6/17/875 . Deepa Dinamani (24): vfs: Add current_time() api fs: Replace CURRENT_TIME with current_time() for inode timestamps fs: Replace CURRENT_TIME_SEC with current_time() for inode timestamps fs: Replace current_fs_time() with current_time() fs: jfs: Replace CURRENT_TIME_SEC by current_time() fs: ext4: Use current_time() for inode timestamps fs: ubifs: Replace CURRENT_TIME_SEC with current_time fs: btrfs: Use ktime_get_real_ts for root ctime fs: udf: Replace CURRENT_TIME with current_time() fs: cifs: Replace CURRENT_TIME by current_time() fs: cifs: Replace CURRENT_TIME with ktime_get_real_ts() fs: cifs: Replace CURRENT_TIME by get_seconds fs: f2fs: Use ktime_get_real_seconds for sit_info times drivers: staging: lustre: Replace CURRENT_TIME with current_time() fs: ocfs2: Use time64_t to represent orphan scan times fs: ocfs2: Replace CURRENT_TIME with ktime_get_real_seconds() audit: Use timespec64 to represent audit timestamps fs: nfs: Make nfs boot time y2038 safe fnic: Use time64_t to represent trace timestamps block: Replace CURRENT_TIME with ktime_get_real_ts libceph: Replace CURRENT_TIME with ktime_get_real_ts fs: ceph: Replace current_fs_time for request stamp time: Delete CURRENT_TIME_SEC and CURRENT_TIME macro time: Delete current_fs_time() function arch/powerpc/platforms/cell/spufs/inode.c | 2 +- arch/s390/hypfs/inode.c | 4 ++-- drivers/block/rbd.c | 2 +- drivers/char/sonypi.c | 2 +- drivers/infiniband/hw/qib/qib_fs.c | 2 +- drivers/misc/ibmasm/ibmasmfs.c | 2 +- drivers/oprofile/oprofilefs.c | 2 +- drivers/platform/x86/sony-laptop.c | 2 +- drivers/scsi/fnic/fnic_trace.c | 4 ++-- drivers/scsi/fnic/fnic_trace.h | 2 +- drivers/staging/lustre/lustre/llite/llite_lib.c | 16 ++++++------- drivers/staging/lustre/lustre/llite/namei.c | 4 ++-- drivers/staging/lustre/lustre/mdc/mdc_reint.c | 6 ++--- .../lustre/lustre/obdclass/linux/linux-obdo.c | 6 ++--- drivers/staging/lustre/lustre/obdclass/obdo.c | 6 ++--- drivers/staging/lustre/lustre/osc/osc_io.c | 2 +- drivers/usb/core/devio.c | 18 +++++++------- drivers/usb/gadget/function/f_fs.c | 8 +++---- drivers/usb/gadget/legacy/inode.c | 2 +- fs/9p/vfs_inode.c | 2 +- fs/adfs/inode.c | 2 +- fs/affs/amigaffs.c | 6 ++--- fs/affs/inode.c | 2 +- fs/attr.c | 2 +- fs/autofs4/inode.c | 2 +- fs/autofs4/root.c | 6 ++--- fs/bad_inode.c | 2 +- fs/bfs/dir.c | 14 +++++------ fs/binfmt_misc.c | 2 +- fs/btrfs/file.c | 6 ++--- fs/btrfs/inode.c | 22 ++++++++--------- fs/btrfs/ioctl.c | 8 +++---- fs/btrfs/root-tree.c | 3 ++- fs/btrfs/transaction.c | 4 ++-- fs/btrfs/xattr.c | 2 +- fs/ceph/file.c | 4 ++-- fs/ceph/inode.c | 2 +- fs/ceph/mds_client.c | 4 +++- fs/ceph/xattr.c | 2 +- fs/cifs/cifsencrypt.c | 4 +++- fs/cifs/cifssmb.c | 10 ++++---- fs/cifs/file.c | 4 ++-- fs/cifs/inode.c | 28 ++++++++++++---------- fs/coda/dir.c | 2 +- fs/coda/file.c | 2 +- fs/coda/inode.c | 2 +- fs/configfs/inode.c | 6 ++--- fs/debugfs/inode.c | 2 +- fs/devpts/inode.c | 6 ++--- fs/efivarfs/inode.c | 2 +- fs/exofs/dir.c | 6 ++--- fs/exofs/inode.c | 4 ++-- fs/exofs/namei.c | 6 ++--- fs/ext2/acl.c | 2 +- fs/ext2/dir.c | 6 ++--- fs/ext2/ialloc.c | 2 +- fs/ext2/inode.c | 4 ++-- fs/ext2/ioctl.c | 4 ++-- fs/ext2/namei.c | 6 ++--- fs/ext2/super.c | 2 +- fs/ext2/xattr.c | 2 +- fs/ext4/acl.c | 2 +- fs/ext4/ext4.h | 6 ----- fs/ext4/extents.c | 10 ++++---- fs/ext4/ialloc.c | 2 +- fs/ext4/inline.c | 4 ++-- fs/ext4/inode.c | 6 ++--- fs/ext4/ioctl.c | 8 +++---- fs/ext4/namei.c | 24 ++++++++++--------- fs/ext4/super.c | 2 +- fs/ext4/xattr.c | 2 +- fs/f2fs/dir.c | 8 +++---- fs/f2fs/file.c | 8 +++---- fs/f2fs/inline.c | 2 +- fs/f2fs/namei.c | 12 +++++----- fs/f2fs/segment.c | 2 +- fs/f2fs/segment.h | 5 ++-- fs/f2fs/xattr.c | 2 +- fs/fat/dir.c | 2 +- fs/fat/file.c | 6 ++--- fs/fat/inode.c | 2 +- fs/fat/namei_msdos.c | 12 +++++----- fs/fat/namei_vfat.c | 10 ++++---- fs/fuse/control.c | 2 +- fs/fuse/dir.c | 2 +- fs/gfs2/bmap.c | 8 +++---- fs/gfs2/dir.c | 12 +++++----- fs/gfs2/inode.c | 8 +++---- fs/gfs2/quota.c | 2 +- fs/gfs2/xattr.c | 8 +++---- fs/hfs/catalog.c | 8 +++---- fs/hfs/dir.c | 2 +- fs/hfs/inode.c | 2 +- fs/hfsplus/catalog.c | 8 +++---- fs/hfsplus/dir.c | 6 ++--- fs/hfsplus/inode.c | 2 +- fs/hfsplus/ioctl.c | 2 +- fs/hugetlbfs/inode.c | 10 ++++---- fs/inode.c | 21 +++++++++++++--- fs/jffs2/acl.c | 2 +- fs/jffs2/fs.c | 2 +- fs/jfs/acl.c | 2 +- fs/jfs/inode.c | 2 +- fs/jfs/ioctl.c | 2 +- fs/jfs/jfs_inode.c | 2 +- fs/jfs/namei.c | 24 +++++++++---------- fs/jfs/super.c | 2 +- fs/jfs/xattr.c | 2 +- fs/kernfs/inode.c | 2 +- fs/libfs.c | 14 +++++------ fs/locks.c | 2 +- fs/logfs/dir.c | 6 ++--- fs/logfs/file.c | 2 +- fs/logfs/inode.c | 4 ++-- fs/logfs/readwrite.c | 4 ++-- fs/minix/bitmap.c | 2 +- fs/minix/dir.c | 6 ++--- fs/minix/itree_common.c | 4 ++-- fs/minix/namei.c | 4 ++-- fs/nfs/client.c | 2 +- fs/nfs/netns.h | 2 +- fs/nfs/nfs4proc.c | 10 ++++---- fs/nfs/nfs4xdr.c | 2 +- fs/nfsd/blocklayout.c | 2 +- fs/nilfs2/dir.c | 6 ++--- fs/nilfs2/inode.c | 4 ++-- fs/nilfs2/ioctl.c | 2 +- fs/nilfs2/namei.c | 6 ++--- fs/nsfs.c | 2 +- fs/ntfs/inode.c | 2 +- fs/ntfs/mft.c | 2 +- fs/ocfs2/acl.c | 2 +- fs/ocfs2/alloc.c | 2 +- fs/ocfs2/aops.c | 2 +- fs/ocfs2/cluster/heartbeat.c | 2 +- fs/ocfs2/dir.c | 4 ++-- fs/ocfs2/dlmfs/dlmfs.c | 4 ++-- fs/ocfs2/file.c | 12 +++++----- fs/ocfs2/inode.c | 2 +- fs/ocfs2/journal.c | 4 ++-- fs/ocfs2/move_extents.c | 2 +- fs/ocfs2/namei.c | 16 +++++++------ fs/ocfs2/ocfs2.h | 2 +- fs/ocfs2/refcounttree.c | 4 ++-- fs/ocfs2/super.c | 2 +- fs/ocfs2/xattr.c | 2 +- fs/omfs/dir.c | 4 ++-- fs/omfs/inode.c | 2 +- fs/openpromfs/inode.c | 2 +- fs/orangefs/file.c | 2 +- fs/orangefs/inode.c | 2 +- fs/orangefs/namei.c | 10 ++++---- fs/pipe.c | 2 +- fs/posix_acl.c | 2 +- fs/proc/base.c | 2 +- fs/proc/inode.c | 4 ++-- fs/proc/proc_sysctl.c | 2 +- fs/proc/self.c | 2 +- fs/proc/thread_self.c | 2 +- fs/pstore/inode.c | 2 +- fs/ramfs/inode.c | 6 ++--- fs/reiserfs/inode.c | 2 +- fs/reiserfs/ioctl.c | 4 ++-- fs/reiserfs/namei.c | 12 +++++----- fs/reiserfs/stree.c | 8 +++---- fs/reiserfs/super.c | 2 +- fs/reiserfs/xattr.c | 6 ++--- fs/reiserfs/xattr_acl.c | 2 +- fs/sysv/dir.c | 6 ++--- fs/sysv/ialloc.c | 2 +- fs/sysv/itree.c | 4 ++-- fs/sysv/namei.c | 4 ++-- fs/tracefs/inode.c | 2 +- fs/ubifs/dir.c | 10 ++++---- fs/ubifs/file.c | 12 +++++----- fs/ubifs/ioctl.c | 2 +- fs/ubifs/misc.h | 10 -------- fs/ubifs/sb.c | 14 +++++++---- fs/ubifs/xattr.c | 6 ++--- fs/udf/ialloc.c | 2 +- fs/udf/inode.c | 4 ++-- fs/udf/namei.c | 20 ++++++++-------- fs/udf/super.c | 9 +++++-- fs/ufs/dir.c | 6 ++--- fs/ufs/ialloc.c | 8 ++++--- fs/ufs/inode.c | 6 ++--- fs/ufs/namei.c | 6 ++--- fs/xfs/xfs_acl.c | 2 +- fs/xfs/xfs_inode.c | 2 +- fs/xfs/xfs_iops.c | 2 +- fs/xfs/xfs_trans_inode.c | 2 +- include/linux/audit.h | 4 ++-- include/linux/fs.h | 2 +- include/linux/time.h | 3 --- ipc/mqueue.c | 18 +++++++------- kernel/audit.c | 10 ++++---- kernel/audit.h | 2 +- kernel/auditsc.c | 6 ++--- kernel/bpf/inode.c | 2 +- kernel/time/time.c | 14 ----------- mm/shmem.c | 20 ++++++++-------- net/ceph/messenger.c | 6 +++-- net/ceph/osd_client.c | 4 ++-- net/sunrpc/rpc_pipe.c | 2 +- security/inode.c | 2 +- security/selinux/selinuxfs.c | 2 +- 206 files changed, 533 insertions(+), 522 deletions(-) -- 1.9.1 Cc: adilger.kernel at dilger.ca Cc: adrian.hunter at intel.com Cc: anna.schumaker at netapp.com Cc: buchino at cisco.com Cc: ceph-devel at vger.kernel.org Cc: clm at fb.com Cc: cm224.lee at samsung.com Cc: dedekind1 at gmail.com Cc: dsterba at suse.com Cc: elder at kernel.org Cc: eparis at redhat.com Cc: gregkh at linuxfoundation.org Cc: hiralpat at cisco.com Cc: idryomov at gmail.com Cc: jack at suse.com Cc: jaegeuk at kernel.org Cc: jbacik at fb.com Cc: jejb at linux.vnet.ibm.com Cc: jfs-discussion at lists.sourceforge.net Cc: jlbec at evilplan.org Cc: john.stultz at linaro.org Cc: linux-audit at redhat.com Cc: linux-btrfs at vger.kernel.org Cc: linux-ext4 at vger.kernel.org Cc: linux-f2fs-devel at lists.sourceforge.net Cc: linux-mtd at lists.infradead.org Cc: linux-nfs at vger.kernel.org Cc: linux-scsi at vger.kernel.org Cc: lustre-devel at lists.lustre.org Cc: martin.petersen at oracle.com Cc: mfasheh at suse.com Cc: ocfs2-devel at oss.oracle.com Cc: paul at paul-moore.com Cc: sage at redhat.com Cc: sfrench at samba.org Cc: shaggy at kernel.org Cc: sramars at cisco.com Cc: trond.myklebust at primarydata.com Cc: zyan at redhat.com From deepa.kernel at gmail.com Mon Jun 20 00:27:13 2016 From: deepa.kernel at gmail.com (Deepa Dinamani) Date: Sun, 19 Jun 2016 17:27:13 -0700 Subject: [lustre-devel] [PATCH v2 14/24] drivers: staging: lustre: Replace CURRENT_TIME with current_time() In-Reply-To: <1466382443-11063-1-git-send-email-deepa.kernel@gmail.com> References: <1466382443-11063-1-git-send-email-deepa.kernel@gmail.com> Message-ID: <1466382443-11063-15-git-send-email-deepa.kernel@gmail.com> CURRENT_TIME macro is not appropriate for filesystems as it doesn't use the right granularity for filesystem timestamps. Use current_time() instead. This is also in preparation for the patch that transitions vfs timestamps to use 64 bit time and hence make them y2038 safe. As part of the effort current_time() will be extended to do range checks. Hence, it is necessary for all file system timestamps to use current_time(). Also change format string for prints so that these are valid when vfs is transitioned to use 64 bit timestamps. Signed-off-by: Deepa Dinamani Cc: Greg Kroah-Hartman Cc: lustre-devel at lists.lustre.org Acked-by: James Simmons --- drivers/staging/lustre/lustre/llite/llite_lib.c | 16 ++++++++-------- drivers/staging/lustre/lustre/llite/namei.c | 4 ++-- drivers/staging/lustre/lustre/mdc/mdc_reint.c | 6 +++--- .../staging/lustre/lustre/obdclass/linux/linux-obdo.c | 6 +++--- drivers/staging/lustre/lustre/obdclass/obdo.c | 6 +++--- drivers/staging/lustre/lustre/osc/osc_io.c | 2 +- 6 files changed, 20 insertions(+), 20 deletions(-) diff --git a/drivers/staging/lustre/lustre/llite/llite_lib.c b/drivers/staging/lustre/lustre/llite/llite_lib.c index 96c7e9f..e5c44d8 100644 --- a/drivers/staging/lustre/lustre/llite/llite_lib.c +++ b/drivers/staging/lustre/lustre/llite/llite_lib.c @@ -1258,23 +1258,23 @@ int ll_setattr_raw(struct dentry *dentry, struct iattr *attr, bool hsm_import) /* We mark all of the fields "set" so MDS/OST does not re-set them */ if (attr->ia_valid & ATTR_CTIME) { - attr->ia_ctime = CURRENT_TIME; + attr->ia_ctime = current_time(inode); attr->ia_valid |= ATTR_CTIME_SET; } if (!(attr->ia_valid & ATTR_ATIME_SET) && (attr->ia_valid & ATTR_ATIME)) { - attr->ia_atime = CURRENT_TIME; + attr->ia_atime = current_time(inode); attr->ia_valid |= ATTR_ATIME_SET; } if (!(attr->ia_valid & ATTR_MTIME_SET) && (attr->ia_valid & ATTR_MTIME)) { - attr->ia_mtime = CURRENT_TIME; + attr->ia_mtime = current_time(inode); attr->ia_valid |= ATTR_MTIME_SET; } if (attr->ia_valid & (ATTR_MTIME | ATTR_CTIME)) - CDEBUG(D_INODE, "setting mtime %lu, ctime %lu, now = %llu\n", - LTIME_S(attr->ia_mtime), LTIME_S(attr->ia_ctime), + CDEBUG(D_INODE, "setting mtime %llu, ctime %llu, now = %llu\n", + (long long)LTIME_S(attr->ia_mtime), (long long)LTIME_S(attr->ia_ctime), (s64)ktime_get_real_seconds()); /* We always do an MDS RPC, even if we're only changing the size; @@ -1564,9 +1564,9 @@ void ll_update_inode(struct inode *inode, struct lustre_md *md) } if (body->valid & OBD_MD_FLMTIME) { if (body->mtime > LTIME_S(inode->i_mtime)) { - CDEBUG(D_INODE, "setting ino %lu mtime from %lu to %llu\n", - inode->i_ino, LTIME_S(inode->i_mtime), - body->mtime); + CDEBUG(D_INODE, "setting ino %lu mtime from %llu to %llu\n", + inode->i_ino, (unsigned long long)LTIME_S(inode->i_mtime), + (unsigned long long)body->mtime); LTIME_S(inode->i_mtime) = body->mtime; } lli->lli_mtime = body->mtime; diff --git a/drivers/staging/lustre/lustre/llite/namei.c b/drivers/staging/lustre/lustre/llite/namei.c index 5eba0eb..48ed1ce 100644 --- a/drivers/staging/lustre/lustre/llite/namei.c +++ b/drivers/staging/lustre/lustre/llite/namei.c @@ -731,8 +731,8 @@ static void ll_update_times(struct ptlrpc_request *request, LASSERT(body); if (body->valid & OBD_MD_FLMTIME && body->mtime > LTIME_S(inode->i_mtime)) { - CDEBUG(D_INODE, "setting fid "DFID" mtime from %lu to %llu\n", - PFID(ll_inode2fid(inode)), LTIME_S(inode->i_mtime), + CDEBUG(D_INODE, "setting fid "DFID" mtime from %llu to %llu\n", + PFID(ll_inode2fid(inode)), (unsigned long long)LTIME_S(inode->i_mtime), body->mtime); LTIME_S(inode->i_mtime) = body->mtime; } diff --git a/drivers/staging/lustre/lustre/mdc/mdc_reint.c b/drivers/staging/lustre/lustre/mdc/mdc_reint.c index 4ef3db1..9980f3a 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_reint.c +++ b/drivers/staging/lustre/lustre/mdc/mdc_reint.c @@ -143,9 +143,9 @@ int mdc_setattr(struct obd_export *exp, struct md_op_data *op_data, rpc_lock = obd->u.cli.cl_rpc_lock; if (op_data->op_attr.ia_valid & (ATTR_MTIME | ATTR_CTIME)) - CDEBUG(D_INODE, "setting mtime %ld, ctime %ld\n", - LTIME_S(op_data->op_attr.ia_mtime), - LTIME_S(op_data->op_attr.ia_ctime)); + CDEBUG(D_INODE, "setting mtime %lld, ctime %lld\n", + (long long)LTIME_S(op_data->op_attr.ia_mtime), + (long long)LTIME_S(op_data->op_attr.ia_ctime)); mdc_setattr_pack(req, op_data, ea, ealen, ea2, ea2len); ptlrpc_request_set_replen(req); diff --git a/drivers/staging/lustre/lustre/obdclass/linux/linux-obdo.c b/drivers/staging/lustre/lustre/obdclass/linux/linux-obdo.c index b41b65e..ccd2b7b 100644 --- a/drivers/staging/lustre/lustre/obdclass/linux/linux-obdo.c +++ b/drivers/staging/lustre/lustre/obdclass/linux/linux-obdo.c @@ -54,9 +54,9 @@ void obdo_refresh_inode(struct inode *dst, struct obdo *src, u32 valid) if (valid & (OBD_MD_FLCTIME | OBD_MD_FLMTIME)) CDEBUG(D_INODE, - "valid %#llx, cur time %lu/%lu, new %llu/%llu\n", - src->o_valid, LTIME_S(dst->i_mtime), - LTIME_S(dst->i_ctime), src->o_mtime, src->o_ctime); + "valid %#llx, cur time %llu/%llu, new %llu/%llu\n", + src->o_valid, (unsigned long long)LTIME_S(dst->i_mtime), + (unsigned long long)LTIME_S(dst->i_ctime), src->o_mtime, src->o_ctime); if (valid & OBD_MD_FLATIME && src->o_atime > LTIME_S(dst->i_atime)) LTIME_S(dst->i_atime) = src->o_atime; diff --git a/drivers/staging/lustre/lustre/obdclass/obdo.c b/drivers/staging/lustre/lustre/obdclass/obdo.c index 748e33f..973fa4c 100644 --- a/drivers/staging/lustre/lustre/obdclass/obdo.c +++ b/drivers/staging/lustre/lustre/obdclass/obdo.c @@ -62,9 +62,9 @@ void obdo_from_inode(struct obdo *dst, struct inode *src, u32 valid) u32 newvalid = 0; if (valid & (OBD_MD_FLCTIME | OBD_MD_FLMTIME)) - CDEBUG(D_INODE, "valid %x, new time %lu/%lu\n", - valid, LTIME_S(src->i_mtime), - LTIME_S(src->i_ctime)); + CDEBUG(D_INODE, "valid %x, new time %llu/%llu\n", + valid, (unsigned long long)LTIME_S(src->i_mtime), + (unsigned long long)LTIME_S(src->i_ctime)); if (valid & OBD_MD_FLATIME) { dst->o_atime = LTIME_S(src->i_atime); diff --git a/drivers/staging/lustre/lustre/osc/osc_io.c b/drivers/staging/lustre/lustre/osc/osc_io.c index d534b0e..99f69bb 100644 --- a/drivers/staging/lustre/lustre/osc/osc_io.c +++ b/drivers/staging/lustre/lustre/osc/osc_io.c @@ -221,7 +221,7 @@ static void osc_page_touch_at(const struct lu_env *env, kms > loi->loi_kms ? "" : "not ", loi->loi_kms, kms, loi->loi_lvb.lvb_size); - attr->cat_mtime = attr->cat_ctime = LTIME_S(CURRENT_TIME); + attr->cat_mtime = attr->cat_ctime = ktime_get_real_seconds(); valid = CAT_MTIME | CAT_CTIME; if (kms > loi->loi_kms) { attr->cat_kms = kms; -- 1.9.1 From green at linuxhacker.ru Mon Jun 20 02:07:15 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Sun, 19 Jun 2016 22:07:15 -0400 Subject: [lustre-devel] [PATCH 00/28] Lustre fixes Message-ID: <1466388463-1817551-1-git-send-email-green@linuxhacker.ru> These patches represent another round of Lustre fixes and also a few cleanups that some of the fixes were building up upon. Please consider. Alex Zhuravlev (1): staging/lustre: LDLM_DEBUG() shouldn't be passed \n Andriy Skulysh (1): staging/lustre/osc: glimpse lock should match only with granted locks Ben Evans (1): staging/lustre/ptlrpc: Remove __ptlrpc_request_bufs_pack Bob Glossman (1): staging/lustre: Add newline to LU_OBJECT_DEBUG() message Bruno Faccini (1): staging/lustre/llite: lock i_lock before __d_drop() Dmitry Eremin (1): staging/lustre/osc: fix signed one bit field Doug Oucharek (1): staging/lustre/o2ib: Don't access NULL NI on failure path Emoly Liu (1): staging/lustre/llite: allocate and free client cache asynchronously Jinshan Xiong (1): staging/lustre/osc: osc_lock_weight endless loop fix John L. Hammond (4): staging/lustre/llite: correct request handling after ll_lookup_it() staging/lustre/llite: flatten struct lookup_intent staging/lustre/llite: change it_data to it_request staging/lustre/ldlm: const qualify struct lustre_handle * params Liang Zhen (2): staging/lustre/ptlrpc: reorganize ptlrpc_request staging/lustre/ptlrpc: missing wakeup for ptlrpc_check_set Niu Yawei (1): staging/lustre/mdc: Zero atime in close RPC Oleg Drokin (6): staging/lustre/llite: Get rid of ll_lock_dcache/ll_unlock_dcache staging/lustre/osc: Fix reverted condition in osc_lock_weight staging/lustre: Inline Lustre intent disposition functions staging/lustre/llite: Restore proper opencache operations staging/lustre/llite: ll_revalidate_dentry update staging/lustre: Add documentation for unstable_stats in sysfs Patrick Farrell (1): staging/lustre/llite: take trunc_sem only at vvp layer Sergey Cheremencev (1): staging/lustre/llite: don't panic when fid is insane Vitaly Fertman (2): staging/lustre/ptlrpc: Early Reply vs Reply MDunlink staging/lustre/ptlrpc: lost bulk leads to a hang Yang Sheng (1): staging/lustre/llite: ensure obd is effective in onu_upcall akam kumar bharathi (1): staging/lustre/llite: IOC_MDC_GETFILEINFO returns the wrong ino .../staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c | 8 +- drivers/staging/lustre/lustre/include/cl_object.h | 10 +- drivers/staging/lustre/lustre/include/lu_object.h | 2 +- drivers/staging/lustre/lustre/include/lustre_dlm.h | 18 +- .../staging/lustre/lustre/include/lustre_intent.h | 30 +- drivers/staging/lustre/lustre/include/lustre_mdc.h | 3 - drivers/staging/lustre/lustre/include/lustre_net.h | 414 ++++++++++++--------- drivers/staging/lustre/lustre/include/obd.h | 2 +- .../staging/lustre/lustre/include/obd_support.h | 3 + drivers/staging/lustre/lustre/ldlm/ldlm_lock.c | 16 +- drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c | 5 +- drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 6 +- drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | 2 +- drivers/staging/lustre/lustre/llite/dcache.c | 41 +- drivers/staging/lustre/lustre/llite/dir.c | 8 +- drivers/staging/lustre/lustre/llite/file.c | 66 ++-- drivers/staging/lustre/lustre/llite/lcommon_misc.c | 8 +- .../staging/lustre/lustre/llite/llite_internal.h | 27 +- drivers/staging/lustre/lustre/llite/llite_lib.c | 47 +-- drivers/staging/lustre/lustre/llite/llite_mmap.c | 7 - drivers/staging/lustre/lustre/llite/llite_nfs.c | 18 + drivers/staging/lustre/lustre/llite/lproc_llite.c | 6 +- drivers/staging/lustre/lustre/llite/namei.c | 25 +- drivers/staging/lustre/lustre/llite/statahead.c | 10 +- drivers/staging/lustre/lustre/llite/xattr_cache.c | 16 +- drivers/staging/lustre/lustre/lmv/lmv_intent.c | 26 +- drivers/staging/lustre/lustre/lmv/lmv_obd.c | 8 +- drivers/staging/lustre/lustre/lov/lov_obd.c | 7 + drivers/staging/lustre/lustre/lov/lov_object.c | 4 +- drivers/staging/lustre/lustre/mdc/mdc_lib.c | 12 + drivers/staging/lustre/lustre/mdc/mdc_locks.c | 93 ++--- drivers/staging/lustre/lustre/mdc/mdc_request.c | 2 +- drivers/staging/lustre/lustre/obdclass/cl_page.c | 46 +++ drivers/staging/lustre/lustre/osc/osc_cache.c | 4 +- .../staging/lustre/lustre/osc/osc_cl_internal.h | 2 +- drivers/staging/lustre/lustre/osc/osc_lock.c | 18 +- drivers/staging/lustre/lustre/osc/osc_page.c | 4 +- drivers/staging/lustre/lustre/osc/osc_request.c | 12 +- drivers/staging/lustre/lustre/ptlrpc/client.c | 159 ++++---- drivers/staging/lustre/lustre/ptlrpc/events.c | 30 +- drivers/staging/lustre/lustre/ptlrpc/import.c | 3 +- drivers/staging/lustre/lustre/ptlrpc/niobuf.c | 20 +- .../staging/lustre/lustre/ptlrpc/ptlrpc_internal.h | 43 +++ drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c | 4 +- drivers/staging/lustre/lustre/ptlrpc/sec.c | 9 +- drivers/staging/lustre/sysfs-fs-lustre | 8 + 46 files changed, 777 insertions(+), 535 deletions(-) -- 2.7.4 From green at linuxhacker.ru Mon Jun 20 02:07:16 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Sun, 19 Jun 2016 22:07:16 -0400 Subject: [lustre-devel] [PATCH 01/28] staging/lustre/llite: allocate and free client cache asynchronously In-Reply-To: <1466388463-1817551-1-git-send-email-green@linuxhacker.ru> References: <1466388463-1817551-1-git-send-email-green@linuxhacker.ru> Message-ID: <1466388463-1817551-2-git-send-email-green@linuxhacker.ru> From: Emoly Liu Since the inflight request holds import refcount as well as export, sometimes obd_disconnect() in client_common_put_super() can't put the last refcount of OSC import (e.g. due to network disconnection), this will cause cl_cache being accessed after free. To fix this issue, ccc_users is used as cl_cache refcount, and lov/llite/osc all hold one cl_cache refcount respectively, to avoid the race that a new OST is being added into the system when the client is mounted. The following cl_cache functions are added: - cl_cache_init(): allocate and initialize cl_cache - cl_cache_incref(): increase cl_cache refcount - cl_cache_decref(): decrease cl_cache refcount and free the cache if refcount=0. Signed-off-by: Emoly Liu Reviewed-on: http://review.whamcloud.com/13746 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6173 Reviewed-by: Niu Yawei Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/include/cl_object.h | 10 ++++- drivers/staging/lustre/lustre/include/obd.h | 2 +- .../staging/lustre/lustre/llite/llite_internal.h | 2 +- drivers/staging/lustre/lustre/llite/llite_lib.c | 35 +++++++--------- drivers/staging/lustre/lustre/llite/lproc_llite.c | 6 +-- drivers/staging/lustre/lustre/lov/lov_obd.c | 7 ++++ drivers/staging/lustre/lustre/obdclass/cl_page.c | 46 ++++++++++++++++++++++ drivers/staging/lustre/lustre/osc/osc_page.c | 4 +- drivers/staging/lustre/lustre/osc/osc_request.c | 4 +- 9 files changed, 86 insertions(+), 30 deletions(-) diff --git a/drivers/staging/lustre/lustre/include/cl_object.h b/drivers/staging/lustre/lustre/include/cl_object.h index 36ca935..3cd4a25 100644 --- a/drivers/staging/lustre/lustre/include/cl_object.h +++ b/drivers/staging/lustre/lustre/include/cl_object.h @@ -2322,7 +2322,8 @@ void cl_lock_descr_print(const struct lu_env *env, void *cookie, */ struct cl_client_cache { /** - * # of users (OSCs) + * # of client cache refcount + * # of users (OSCs) + 2 (held by llite and lov) */ atomic_t ccc_users; /** @@ -2357,6 +2358,13 @@ struct cl_client_cache { }; +/** + * cl_cache functions + */ +struct cl_client_cache *cl_cache_init(unsigned long lru_page_max); +void cl_cache_incref(struct cl_client_cache *cache); +void cl_cache_decref(struct cl_client_cache *cache); + /** @} cl_page */ /** \defgroup cl_lock cl_lock diff --git a/drivers/staging/lustre/lustre/include/obd.h b/drivers/staging/lustre/lustre/include/obd.h index e654d42..ed1081a 100644 --- a/drivers/staging/lustre/lustre/include/obd.h +++ b/drivers/staging/lustre/lustre/include/obd.h @@ -415,7 +415,7 @@ struct lov_obd { enum lustre_sec_part lov_sp_me; /* Cached LRU and unstable data from upper layer */ - void *lov_cache; + struct cl_client_cache *lov_cache; struct rw_semaphore lov_notify_lock; diff --git a/drivers/staging/lustre/lustre/llite/llite_internal.h b/drivers/staging/lustre/lustre/llite/llite_internal.h index 7c1a3254..74cd241 100644 --- a/drivers/staging/lustre/lustre/llite/llite_internal.h +++ b/drivers/staging/lustre/lustre/llite/llite_internal.h @@ -493,7 +493,7 @@ struct ll_sb_info { * any page which is sent to a server as part of a bulk request, * but is uncommitted to stable storage. */ - struct cl_client_cache ll_cache; + struct cl_client_cache *ll_cache; struct lprocfs_stats *ll_ra_stats; diff --git a/drivers/staging/lustre/lustre/llite/llite_lib.c b/drivers/staging/lustre/lustre/llite/llite_lib.c index ac833db..83f4e1a 100644 --- a/drivers/staging/lustre/lustre/llite/llite_lib.c +++ b/drivers/staging/lustre/lustre/llite/llite_lib.c @@ -83,15 +83,11 @@ static struct ll_sb_info *ll_init_sbi(struct super_block *sb) pages = si.totalram - si.totalhigh; lru_page_max = pages / 2; - /* initialize ll_cache data */ - atomic_set(&sbi->ll_cache.ccc_users, 0); - sbi->ll_cache.ccc_lru_max = lru_page_max; - atomic_set(&sbi->ll_cache.ccc_lru_left, lru_page_max); - spin_lock_init(&sbi->ll_cache.ccc_lru_lock); - INIT_LIST_HEAD(&sbi->ll_cache.ccc_lru); - - atomic_set(&sbi->ll_cache.ccc_unstable_nr, 0); - init_waitqueue_head(&sbi->ll_cache.ccc_unstable_waitq); + sbi->ll_cache = cl_cache_init(lru_page_max); + if (!sbi->ll_cache) { + kfree(sbi); + return NULL; + } sbi->ll_ra_info.ra_max_pages_per_file = min(pages / 32, SBI_DEFAULT_READAHEAD_MAX); @@ -131,6 +127,11 @@ static void ll_free_sbi(struct super_block *sb) { struct ll_sb_info *sbi = ll_s2sbi(sb); + if (sbi->ll_cache) { + cl_cache_decref(sbi->ll_cache); + sbi->ll_cache = NULL; + } + kfree(sbi); } @@ -514,8 +515,8 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt, cl_sb_init(sb); err = obd_set_info_async(NULL, sbi->ll_dt_exp, sizeof(KEY_CACHE_SET), - KEY_CACHE_SET, sizeof(sbi->ll_cache), - &sbi->ll_cache, NULL); + KEY_CACHE_SET, sizeof(*sbi->ll_cache), + sbi->ll_cache, NULL); sb->s_root = d_make_root(root); if (!sb->s_root) { @@ -560,8 +561,6 @@ out_lock_cn_cb: out_dt: obd_disconnect(sbi->ll_dt_exp); sbi->ll_dt_exp = NULL; - /* Make sure all OScs are gone, since cl_cache is accessing sbi. */ - obd_zombie_barrier(); out_md_fid: obd_fid_fini(sbi->ll_md_exp->exp_obd); out_md: @@ -618,10 +617,6 @@ static void client_common_put_super(struct super_block *sb) obd_fid_fini(sbi->ll_dt_exp->exp_obd); obd_disconnect(sbi->ll_dt_exp); sbi->ll_dt_exp = NULL; - /* wait till all OSCs are gone, since cl_cache is accessing sbi. - * see LU-2543. - */ - obd_zombie_barrier(); ldebugfs_unregister_mountpoint(sbi); @@ -962,12 +957,12 @@ void ll_put_super(struct super_block *sb) if (!force) { struct l_wait_info lwi = LWI_INTR(LWI_ON_SIGNAL_NOOP, NULL); - rc = l_wait_event(sbi->ll_cache.ccc_unstable_waitq, - !atomic_read(&sbi->ll_cache.ccc_unstable_nr), + rc = l_wait_event(sbi->ll_cache->ccc_unstable_waitq, + !atomic_read(&sbi->ll_cache->ccc_unstable_nr), &lwi); } - ccc_count = atomic_read(&sbi->ll_cache.ccc_unstable_nr); + ccc_count = atomic_read(&sbi->ll_cache->ccc_unstable_nr); if (!force && rc != -EINTR) LASSERTF(!ccc_count, "count: %i\n", ccc_count); diff --git a/drivers/staging/lustre/lustre/llite/lproc_llite.c b/drivers/staging/lustre/lustre/llite/lproc_llite.c index 6e9a8a5..1f00bce 100644 --- a/drivers/staging/lustre/lustre/llite/lproc_llite.c +++ b/drivers/staging/lustre/lustre/llite/lproc_llite.c @@ -360,7 +360,7 @@ static int ll_max_cached_mb_seq_show(struct seq_file *m, void *v) { struct super_block *sb = m->private; struct ll_sb_info *sbi = ll_s2sbi(sb); - struct cl_client_cache *cache = &sbi->ll_cache; + struct cl_client_cache *cache = sbi->ll_cache; int shift = 20 - PAGE_SHIFT; int max_cached_mb; int unused_mb; @@ -387,7 +387,7 @@ static ssize_t ll_max_cached_mb_seq_write(struct file *file, { struct super_block *sb = ((struct seq_file *)file->private_data)->private; struct ll_sb_info *sbi = ll_s2sbi(sb); - struct cl_client_cache *cache = &sbi->ll_cache; + struct cl_client_cache *cache = sbi->ll_cache; struct lu_env *env; int refcheck; int mult, rc, pages_number; @@ -826,7 +826,7 @@ static ssize_t unstable_stats_show(struct kobject *kobj, { struct ll_sb_info *sbi = container_of(kobj, struct ll_sb_info, ll_kobj); - struct cl_client_cache *cache = &sbi->ll_cache; + struct cl_client_cache *cache = sbi->ll_cache; int pages, mb; pages = atomic_read(&cache->ccc_unstable_nr); diff --git a/drivers/staging/lustre/lustre/lov/lov_obd.c b/drivers/staging/lustre/lustre/lov/lov_obd.c index c87096e..9b92d55 100644 --- a/drivers/staging/lustre/lustre/lov/lov_obd.c +++ b/drivers/staging/lustre/lustre/lov/lov_obd.c @@ -892,6 +892,12 @@ static int lov_cleanup(struct obd_device *obd) kfree(lov->lov_tgts); lov->lov_tgt_size = 0; } + + if (lov->lov_cache) { + cl_cache_decref(lov->lov_cache); + lov->lov_cache = NULL; + } + return 0; } @@ -2121,6 +2127,7 @@ static int lov_set_info_async(const struct lu_env *env, struct obd_export *exp, LASSERT(!lov->lov_cache); lov->lov_cache = val; do_inactive = 1; + cl_cache_incref(lov->lov_cache); } for (i = 0; i < count; i++, val = (char *)val + incr) { diff --git a/drivers/staging/lustre/lustre/obdclass/cl_page.c b/drivers/staging/lustre/lustre/obdclass/cl_page.c index 71bff49..db2dc6b 100644 --- a/drivers/staging/lustre/lustre/obdclass/cl_page.c +++ b/drivers/staging/lustre/lustre/obdclass/cl_page.c @@ -1072,3 +1072,49 @@ void cl_page_slice_add(struct cl_page *page, struct cl_page_slice *slice, slice->cpl_page = page; } EXPORT_SYMBOL(cl_page_slice_add); + +/** + * Allocate and initialize cl_cache, called by ll_init_sbi(). + */ +struct cl_client_cache *cl_cache_init(unsigned long lru_page_max) +{ + struct cl_client_cache *cache = NULL; + + cache = kzalloc(sizeof(*cache), GFP_KERNEL); + if (!cache) + return NULL; + + /* Initialize cache data */ + atomic_set(&cache->ccc_users, 1); + cache->ccc_lru_max = lru_page_max; + atomic_set(&cache->ccc_lru_left, lru_page_max); + spin_lock_init(&cache->ccc_lru_lock); + INIT_LIST_HEAD(&cache->ccc_lru); + + atomic_set(&cache->ccc_unstable_nr, 0); + init_waitqueue_head(&cache->ccc_unstable_waitq); + + return cache; +} +EXPORT_SYMBOL(cl_cache_init); + +/** + * Increase cl_cache refcount + */ +void cl_cache_incref(struct cl_client_cache *cache) +{ + atomic_inc(&cache->ccc_users); +} +EXPORT_SYMBOL(cl_cache_incref); + +/** + * Decrease cl_cache refcount and free the cache if refcount=0. + * Since llite, lov and osc all hold cl_cache refcount, + * the free will not cause race. (LU-6173) + */ +void cl_cache_decref(struct cl_client_cache *cache) +{ + if (atomic_dec_and_test(&cache->ccc_users)) + kfree(cache); +} +EXPORT_SYMBOL(cl_cache_decref); diff --git a/drivers/staging/lustre/lustre/osc/osc_page.c b/drivers/staging/lustre/lustre/osc/osc_page.c index 57d8a5a..c1aa11e 100644 --- a/drivers/staging/lustre/lustre/osc/osc_page.c +++ b/drivers/staging/lustre/lustre/osc/osc_page.c @@ -414,7 +414,7 @@ static int osc_cache_too_much(struct client_obd *cli) int pages = atomic_read(&cli->cl_lru_in_list); unsigned long budget; - budget = cache->ccc_lru_max / atomic_read(&cache->ccc_users); + budget = cache->ccc_lru_max / (atomic_read(&cache->ccc_users) - 2); /* if it's going to run out LRU slots, we should free some, but not * too much to maintain fairness among OSCs. @@ -714,7 +714,7 @@ int osc_lru_reclaim(struct client_obd *cli) cache->ccc_lru_shrinkers++; list_move_tail(&cli->cl_lru_osc, &cache->ccc_lru); - max_scans = atomic_read(&cache->ccc_users); + max_scans = atomic_read(&cache->ccc_users) - 2; while (--max_scans > 0 && !list_empty(&cache->ccc_lru)) { cli = list_entry(cache->ccc_lru.next, struct client_obd, cl_lru_osc); diff --git a/drivers/staging/lustre/lustre/osc/osc_request.c b/drivers/staging/lustre/lustre/osc/osc_request.c index 7260027..9334349 100644 --- a/drivers/staging/lustre/lustre/osc/osc_request.c +++ b/drivers/staging/lustre/lustre/osc/osc_request.c @@ -2913,7 +2913,7 @@ static int osc_set_info_async(const struct lu_env *env, struct obd_export *exp, LASSERT(!cli->cl_cache); /* only once */ cli->cl_cache = val; - atomic_inc(&cli->cl_cache->ccc_users); + cl_cache_incref(cli->cl_cache); cli->cl_lru_left = &cli->cl_cache->ccc_lru_left; /* add this osc into entity list */ @@ -3293,7 +3293,7 @@ static int osc_cleanup(struct obd_device *obd) list_del_init(&cli->cl_lru_osc); spin_unlock(&cli->cl_cache->ccc_lru_lock); cli->cl_lru_left = NULL; - atomic_dec(&cli->cl_cache->ccc_users); + cl_cache_decref(cli->cl_cache); cli->cl_cache = NULL; } -- 2.7.4 From green at linuxhacker.ru Mon Jun 20 02:07:18 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Sun, 19 Jun 2016 22:07:18 -0400 Subject: [lustre-devel] [PATCH 03/28] staging/lustre/llite: Get rid of ll_lock_dcache/ll_unlock_dcache In-Reply-To: <1466388463-1817551-1-git-send-email-green@linuxhacker.ru> References: <1466388463-1817551-1-git-send-email-green@linuxhacker.ru> Message-ID: <1466388463-1817551-4-git-send-email-green@linuxhacker.ru> These are just doing spin_lock/unlock on inode's i_lock, so just do the spinlock directly to make the code more clear Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/llite/dcache.c | 4 ++-- drivers/staging/lustre/lustre/llite/llite_internal.h | 10 ---------- drivers/staging/lustre/lustre/llite/namei.c | 8 ++++---- 3 files changed, 6 insertions(+), 16 deletions(-) diff --git a/drivers/staging/lustre/lustre/llite/dcache.c b/drivers/staging/lustre/lustre/llite/dcache.c index 9d13d5e..f002b3a 100644 --- a/drivers/staging/lustre/lustre/llite/dcache.c +++ b/drivers/staging/lustre/lustre/llite/dcache.c @@ -249,7 +249,7 @@ void ll_invalidate_aliases(struct inode *inode) CDEBUG(D_INODE, "marking dentries for ino "DFID"(%p) invalid\n", PFID(ll_inode2fid(inode)), inode); - ll_lock_dcache(inode); + spin_lock(&inode->i_lock); hlist_for_each_entry(dentry, &inode->i_dentry, d_u.d_alias) { CDEBUG(D_DENTRY, "dentry in drop %pd (%p) parent %p inode %p flags %d\n", dentry, dentry, dentry->d_parent, @@ -257,7 +257,7 @@ void ll_invalidate_aliases(struct inode *inode) d_lustre_invalidate(dentry, 0); } - ll_unlock_dcache(inode); + spin_unlock(&inode->i_lock); } int ll_revalidate_it_finish(struct ptlrpc_request *request, diff --git a/drivers/staging/lustre/lustre/llite/llite_internal.h b/drivers/staging/lustre/lustre/llite/llite_internal.h index 74cd241..098155f 100644 --- a/drivers/staging/lustre/lustre/llite/llite_internal.h +++ b/drivers/staging/lustre/lustre/llite/llite_internal.h @@ -1313,16 +1313,6 @@ static inline void ll_set_lock_data(struct obd_export *exp, struct inode *inode, *bits = it->d.lustre.it_lock_bits; } -static inline void ll_lock_dcache(struct inode *inode) -{ - spin_lock(&inode->i_lock); -} - -static inline void ll_unlock_dcache(struct inode *inode) -{ - spin_unlock(&inode->i_lock); -} - static inline int d_lustre_invalid(const struct dentry *dentry) { struct ll_dentry_data *lld = ll_d2d(dentry); diff --git a/drivers/staging/lustre/lustre/llite/namei.c b/drivers/staging/lustre/lustre/llite/namei.c index 6414d52..e4df510 100644 --- a/drivers/staging/lustre/lustre/llite/namei.c +++ b/drivers/staging/lustre/lustre/llite/namei.c @@ -140,7 +140,7 @@ static void ll_invalidate_negative_children(struct inode *dir) { struct dentry *dentry, *tmp_subdir; - ll_lock_dcache(dir); + spin_lock(&dir->i_lock); hlist_for_each_entry(dentry, &dir->i_dentry, d_u.d_alias) { spin_lock(&dentry->d_lock); if (!list_empty(&dentry->d_subdirs)) { @@ -155,7 +155,7 @@ static void ll_invalidate_negative_children(struct inode *dir) } spin_unlock(&dentry->d_lock); } - ll_unlock_dcache(dir); + spin_unlock(&dir->i_lock); } int ll_md_blocking_ast(struct ldlm_lock *lock, struct ldlm_lock_desc *desc, @@ -317,7 +317,7 @@ static struct dentry *ll_find_alias(struct inode *inode, struct dentry *dentry) discon_alias = NULL; invalid_alias = NULL; - ll_lock_dcache(inode); + spin_lock(&inode->i_lock); hlist_for_each_entry(alias, &inode->i_dentry, d_u.d_alias) { LASSERT(alias != dentry); @@ -342,7 +342,7 @@ static struct dentry *ll_find_alias(struct inode *inode, struct dentry *dentry) dget_dlock(alias); spin_unlock(&alias->d_lock); } - ll_unlock_dcache(inode); + spin_unlock(&inode->i_lock); return alias; } -- 2.7.4 From green at linuxhacker.ru Mon Jun 20 02:07:17 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Sun, 19 Jun 2016 22:07:17 -0400 Subject: [lustre-devel] [PATCH 02/28] staging/lustre/llite: correct request handling after ll_lookup_it() In-Reply-To: <1466388463-1817551-1-git-send-email-green@linuxhacker.ru> References: <1466388463-1817551-1-git-send-email-green@linuxhacker.ru> Message-ID: <1466388463-1817551-3-git-send-email-green@linuxhacker.ru> From: "John L. Hammond" In the FIFO cases of ll_atomic_open() and ll_lookup_nd() remove spurious calls to ptlrpc_req_finished(). Explain that these cases are unreachable in practice anyway. Signed-off-by: John L. Hammond Reviewed-on: http://review.whamcloud.com/17068 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7402 Reviewed-by: Dmitry Eremin Reviewed-by: Lai Siyao Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/llite/namei.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/staging/lustre/lustre/llite/namei.c b/drivers/staging/lustre/lustre/llite/namei.c index d7459bd..6414d52 100644 --- a/drivers/staging/lustre/lustre/llite/namei.c +++ b/drivers/staging/lustre/lustre/llite/namei.c @@ -622,13 +622,10 @@ static int ll_atomic_open(struct inode *dir, struct dentry *dentry, if (d_really_is_positive(dentry) && it_disposition(it, DISP_OPEN_OPEN)) { /* Open dentry. */ if (S_ISFIFO(d_inode(dentry)->i_mode)) { - /* We cannot call open here as it would - * deadlock. + /* We cannot call open here as it might + * deadlock. This case is unreachable in + * practice because of OBD_CONNECT_NODEVOH. */ - if (it_disposition(it, DISP_ENQ_OPEN_REF)) - ptlrpc_req_finished( - (struct ptlrpc_request *) - it->d.lustre.it_data); rc = finish_no_open(file, de); } else { file->private_data = it; -- 2.7.4 From green at linuxhacker.ru Mon Jun 20 02:07:19 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Sun, 19 Jun 2016 22:07:19 -0400 Subject: [lustre-devel] [PATCH 04/28] staging/lustre/llite: lock i_lock before __d_drop() In-Reply-To: <1466388463-1817551-1-git-send-email-green@linuxhacker.ru> References: <1466388463-1817551-1-git-send-email-green@linuxhacker.ru> Message-ID: <1466388463-1817551-5-git-send-email-green@linuxhacker.ru> From: Bruno Faccini There has been several Lustre Client crashes reported by sites running with Lustre versions 2.1/2.5, all showing the same dentry->d_hash->next corrupted pointer cause. This patch fixes a regression that has been introduced since a long time by commit : (LU-506 kernel: FC15 - support dcache scalability changes.) where i_lock protection usage has been removed and that is likely to cause racy condition during dentry [un]hashing and to be the root cause of these crashes. Signed-off-by: Bruno Faccini Reviewed-on: http://review.whamcloud.com/19287 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7973 Reviewed-by: Lai Siyao Reviewed-by: Yang Sheng Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/llite/file.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/llite/file.c b/drivers/staging/lustre/lustre/llite/file.c index b0c4548..5436a54 100644 --- a/drivers/staging/lustre/lustre/llite/file.c +++ b/drivers/staging/lustre/lustre/llite/file.c @@ -2975,8 +2975,11 @@ static int __ll_inode_revalidate(struct dentry *dentry, __u64 ibits) * here to preserve get_cwd functionality on 2.6. * Bug 10503 */ - if (!d_inode(dentry)->i_nlink) + if (!d_inode(dentry)->i_nlink) { + spin_lock(&inode->i_lock); d_lustre_invalidate(dentry, 0); + spin_unlock(&inode->i_lock); + } ll_lookup_finish_locks(&oit, inode); } else if (!ll_have_md_lock(d_inode(dentry), &ibits, LCK_MINMODE)) { -- 2.7.4 From green at linuxhacker.ru Mon Jun 20 02:07:22 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Sun, 19 Jun 2016 22:07:22 -0400 Subject: [lustre-devel] [PATCH 07/28] staging/lustre/ptlrpc: reorganize ptlrpc_request In-Reply-To: <1466388463-1817551-1-git-send-email-green@linuxhacker.ru> References: <1466388463-1817551-1-git-send-email-green@linuxhacker.ru> Message-ID: <1466388463-1817551-8-git-send-email-green@linuxhacker.ru> From: Liang Zhen ptlrpc_request has some structure members are only for client side, and some others are only for server side, this patch moved these members to different structure then putting into an union. By doing this, size of ptlrpc_request is decreased about 300 bytes, besides saving memory, it also can reduce memory footprint while processing. Signed-off-by: Liang Zhen Reviewed-on: http://review.whamcloud.com/8806 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-181 Reviewed-by: Andreas Dilger Reviewed-by: Bobi Jam Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/include/lustre_net.h | 341 ++++++++++++--------- drivers/staging/lustre/lustre/ptlrpc/client.c | 49 +-- drivers/staging/lustre/lustre/ptlrpc/events.c | 5 +- drivers/staging/lustre/lustre/ptlrpc/niobuf.c | 2 +- .../staging/lustre/lustre/ptlrpc/ptlrpc_internal.h | 34 ++ drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c | 4 +- drivers/staging/lustre/lustre/ptlrpc/sec.c | 9 +- 7 files changed, 255 insertions(+), 189 deletions(-) diff --git a/drivers/staging/lustre/lustre/include/lustre_net.h b/drivers/staging/lustre/lustre/include/lustre_net.h index dba4d1d..5968c3c 100644 --- a/drivers/staging/lustre/lustre/include/lustre_net.h +++ b/drivers/staging/lustre/lustre/include/lustre_net.h @@ -266,6 +266,11 @@ /* Macro to hide a typecast. */ #define ptlrpc_req_async_args(req) ((void *)&req->rq_async_args) +struct ptlrpc_replay_async_args { + int praa_old_state; + int praa_old_status; +}; + /** * Structure to single define portal connection. */ @@ -1243,22 +1248,100 @@ struct ptlrpc_hpreq_ops { void (*hpreq_fini)(struct ptlrpc_request *); }; -/** - * Represents remote procedure call. - * - * This is a staple structure used by everybody wanting to send a request - * in Lustre. - */ -struct ptlrpc_request { - /* Request type: one of PTL_RPC_MSG_* */ - int rq_type; - /** Result of request processing */ - int rq_status; +struct ptlrpc_cli_req { + /** For bulk requests on client only: bulk descriptor */ + struct ptlrpc_bulk_desc *cr_bulk; + /** optional time limit for send attempts */ + long cr_delay_limit; + /** time request was first queued */ + time_t cr_queued_time; + /** request sent timeval */ + struct timespec64 cr_sent_tv; + /** time for request really sent out */ + time_t cr_sent_out; + /** when req reply unlink must finish. */ + time_t cr_reply_deadline; + /** when req bulk unlink must finish. */ + time_t cr_bulk_deadline; + /** Portal to which this request would be sent */ + short cr_req_ptl; + /** Portal where to wait for reply and where reply would be sent */ + short cr_rep_ptl; + /** request resending number */ + unsigned int cr_resend_nr; + /** What was import generation when this request was sent */ + int cr_imp_gen; + enum lustre_imp_state cr_send_state; + /** Per-request waitq introduced by bug 21938 for recovery waiting */ + wait_queue_head_t cr_set_waitq; + /** Link item for request set lists */ + struct list_head cr_set_chain; + /** link to waited ctx */ + struct list_head cr_ctx_chain; + + /** client's half ctx */ + struct ptlrpc_cli_ctx *cr_cli_ctx; + /** Link back to the request set */ + struct ptlrpc_request_set *cr_set; + /** outgoing request MD handle */ + lnet_handle_md_t cr_req_md_h; + /** request-out callback parameter */ + struct ptlrpc_cb_id cr_req_cbid; + /** incoming reply MD handle */ + lnet_handle_md_t cr_reply_md_h; + wait_queue_head_t cr_reply_waitq; + /** reply callback parameter */ + struct ptlrpc_cb_id cr_reply_cbid; + /** Async completion handler, called when reply is received */ + ptlrpc_interpterer_t cr_reply_interp; + /** Async completion context */ + union ptlrpc_async_args cr_async_args; + /** Opaq data for replay and commit callbacks. */ + void *cr_cb_data; /** - * Linkage item through which this request is included into - * sending/delayed lists on client and into rqbd list on server + * Commit callback, called when request is committed and about to be + * freed. */ - struct list_head rq_list; + void (*cr_commit_cb)(struct ptlrpc_request *); + /** Replay callback, called after request is replayed at recovery */ + void (*cr_replay_cb)(struct ptlrpc_request *); +}; + +/** client request member alias */ +/* NB: these alias should NOT be used by any new code, instead they should + * be removed step by step to avoid potential abuse + */ +#define rq_bulk rq_cli.cr_bulk +#define rq_delay_limit rq_cli.cr_delay_limit +#define rq_queued_time rq_cli.cr_queued_time +#define rq_sent_tv rq_cli.cr_sent_tv +#define rq_real_sent rq_cli.cr_sent_out +#define rq_reply_deadline rq_cli.cr_reply_deadline +#define rq_bulk_deadline rq_cli.cr_bulk_deadline +#define rq_nr_resend rq_cli.cr_resend_nr +#define rq_request_portal rq_cli.cr_req_ptl +#define rq_reply_portal rq_cli.cr_rep_ptl +#define rq_import_generation rq_cli.cr_imp_gen +#define rq_send_state rq_cli.cr_send_state +#define rq_set_chain rq_cli.cr_set_chain +#define rq_ctx_chain rq_cli.cr_ctx_chain +#define rq_set rq_cli.cr_set +#define rq_set_waitq rq_cli.cr_set_waitq +#define rq_cli_ctx rq_cli.cr_cli_ctx +#define rq_req_md_h rq_cli.cr_req_md_h +#define rq_req_cbid rq_cli.cr_req_cbid +#define rq_reply_md_h rq_cli.cr_reply_md_h +#define rq_reply_waitq rq_cli.cr_reply_waitq +#define rq_reply_cbid rq_cli.cr_reply_cbid +#define rq_interpret_reply rq_cli.cr_reply_interp +#define rq_async_args rq_cli.cr_async_args +#define rq_cb_data rq_cli.cr_cb_data +#define rq_commit_cb rq_cli.cr_commit_cb +#define rq_replay_cb rq_cli.cr_replay_cb + +struct ptlrpc_srv_req { + /** initial thread servicing this request */ + struct ptlrpc_thread *sr_svc_thread; /** * Server side list of incoming unserved requests sorted by arrival * time. Traversed from time to time to notice about to expire @@ -1266,27 +1349,81 @@ struct ptlrpc_request { * know server is alive and well, just very busy to service their * requests in time */ - struct list_head rq_timed_list; - /** server-side history, used for debugging purposes. */ - struct list_head rq_history_list; + struct list_head sr_timed_list; /** server-side per-export list */ - struct list_head rq_exp_list; - /** server-side hp handlers */ - struct ptlrpc_hpreq_ops *rq_ops; - - /** initial thread servicing this request */ - struct ptlrpc_thread *rq_svc_thread; - + struct list_head sr_exp_list; + /** server-side history, used for debuging purposes. */ + struct list_head sr_hist_list; /** history sequence # */ - __u64 rq_history_seq; + __u64 sr_hist_seq; + /** the index of service's srv_at_array into which request is linked */ + time_t sr_at_index; + /** authed uid */ + uid_t sr_auth_uid; + /** authed uid mapped to */ + uid_t sr_auth_mapped_uid; + /** RPC is generated from what part of Lustre */ + enum lustre_sec_part sr_sp_from; + /** request session context */ + struct lu_context sr_ses; /** \addtogroup nrs * @{ */ /** stub for NRS request */ - struct ptlrpc_nrs_request rq_nrq; + struct ptlrpc_nrs_request sr_nrq; /** @} nrs */ - /** the index of service's srv_at_array into which request is linked */ - u32 rq_at_index; + /** request arrival time */ + struct timespec64 sr_arrival_time; + /** server's half ctx */ + struct ptlrpc_svc_ctx *sr_svc_ctx; + /** (server side), pointed directly into req buffer */ + struct ptlrpc_user_desc *sr_user_desc; + /** separated reply state */ + struct ptlrpc_reply_state *sr_reply_state; + /** server-side hp handlers */ + struct ptlrpc_hpreq_ops *sr_ops; + /** incoming request buffer */ + struct ptlrpc_request_buffer_desc *sr_rqbd; +}; + +/** server request member alias */ +/* NB: these alias should NOT be used by any new code, instead they should + * be removed step by step to avoid potential abuse + */ +#define rq_svc_thread rq_srv.sr_svc_thread +#define rq_timed_list rq_srv.sr_timed_list +#define rq_exp_list rq_srv.sr_exp_list +#define rq_history_list rq_srv.sr_hist_list +#define rq_history_seq rq_srv.sr_hist_seq +#define rq_at_index rq_srv.sr_at_index +#define rq_auth_uid rq_srv.sr_auth_uid +#define rq_auth_mapped_uid rq_srv.sr_auth_mapped_uid +#define rq_sp_from rq_srv.sr_sp_from +#define rq_session rq_srv.sr_ses +#define rq_nrq rq_srv.sr_nrq +#define rq_arrival_time rq_srv.sr_arrival_time +#define rq_reply_state rq_srv.sr_reply_state +#define rq_svc_ctx rq_srv.sr_svc_ctx +#define rq_user_desc rq_srv.sr_user_desc +#define rq_ops rq_srv.sr_ops +#define rq_rqbd rq_srv.sr_rqbd + +/** + * Represents remote procedure call. + * + * This is a staple structure used by everybody wanting to send a request + * in Lustre. + */ +struct ptlrpc_request { + /* Request type: one of PTL_RPC_MSG_* */ + int rq_type; + /** Result of request processing */ + int rq_status; + /** + * Linkage item through which this request is included into + * sending/delayed lists on client and into rqbd list on server + */ + struct list_head rq_list; /** Lock to protect request flags and some other important bits, like * rq_list */ @@ -1327,19 +1464,15 @@ struct ptlrpc_request { /* bulk request, sent to server, but uncommitted */ rq_unstable:1; - unsigned int rq_nr_resend; - - enum rq_phase rq_phase; /* one of RQ_PHASE_* */ - enum rq_phase rq_next_phase; /* one of RQ_PHASE_* to be used next */ - atomic_t rq_refcount; /* client-side refcount for SENT race, - * server-side refcount for multiple replies - */ - - /** Portal to which this request would be sent */ - short rq_request_portal; /* XXX FIXME bug 249 */ - /** Portal where to wait for reply and where reply would be sent */ - short rq_reply_portal; /* XXX FIXME bug 249 */ - + /** one of RQ_PHASE_* */ + enum rq_phase rq_phase; + /** one of RQ_PHASE_* to be used next */ + enum rq_phase rq_next_phase; + /** + * client-side refcount for SENT race, server-side refcount + * for multiple replies + */ + atomic_t rq_refcount; /** * client-side: * !rq_truncate : # reply bytes actually received, @@ -1350,6 +1483,8 @@ struct ptlrpc_request { int rq_reqlen; /** Reply length */ int rq_replen; + /** Pool if request is from preallocated list */ + struct ptlrpc_request_pool *rq_pool; /** Request message - what client sent */ struct lustre_msg *rq_reqmsg; /** Reply message - server response */ @@ -1362,19 +1497,20 @@ struct ptlrpc_request { * List item to for replay list. Not yet committed requests get linked * there. * Also see \a rq_replay comment above. + * It's also link chain on obd_export::exp_req_replay_queue */ struct list_head rq_replay_list; - + /** non-shared members for client & server request*/ + union { + struct ptlrpc_cli_req rq_cli; + struct ptlrpc_srv_req rq_srv; + }; /** * security and encryption data * @{ */ - struct ptlrpc_cli_ctx *rq_cli_ctx; /**< client's half ctx */ - struct ptlrpc_svc_ctx *rq_svc_ctx; /**< server's half ctx */ - struct list_head rq_ctx_chain; /**< link to waited ctx */ - - struct sptlrpc_flavor rq_flvr; /**< for client & server */ - enum lustre_sec_part rq_sp_from; + /** description of flavors for client & server */ + struct sptlrpc_flavor rq_flvr; /* client/server security flags */ unsigned int @@ -1393,19 +1529,15 @@ struct ptlrpc_request { rq_pack_bulk:1, /* doesn't expect reply FIXME */ rq_no_reply:1, - rq_pill_init:1; /* pill initialized */ - - uid_t rq_auth_uid; /* authed uid */ - uid_t rq_auth_mapped_uid; /* authed uid mapped to */ - - /* (server side), pointed directly into req buffer */ - struct ptlrpc_user_desc *rq_user_desc; - - /* various buffer pointers */ - struct lustre_msg *rq_reqbuf; /* req wrapper */ - char *rq_repbuf; /* rep buffer */ - struct lustre_msg *rq_repdata; /* rep wrapper msg */ - struct lustre_msg *rq_clrbuf; /* only in priv mode */ + rq_pill_init:1, /* pill initialized */ + rq_srv_req:1; /* server request */ + + /** various buffer pointers */ + struct lustre_msg *rq_reqbuf; /**< req wrapper */ + char *rq_repbuf; /**< rep buffer */ + struct lustre_msg *rq_repdata; /**< rep wrapper msg */ + /** only in priv mode */ + struct lustre_msg *rq_clrbuf; int rq_reqbuf_len; /* req wrapper buf len */ int rq_reqdata_len; /* req wrapper msg len */ int rq_repbuf_len; /* rep buffer len */ @@ -1422,97 +1554,28 @@ struct ptlrpc_request { __u32 rq_req_swab_mask; __u32 rq_rep_swab_mask; - /** What was import generation when this request was sent */ - int rq_import_generation; - enum lustre_imp_state rq_send_state; - /** how many early replies (for stats) */ int rq_early_count; - /** client+server request */ - lnet_handle_md_t rq_req_md_h; - struct ptlrpc_cb_id rq_req_cbid; - /** optional time limit for send attempts */ - long rq_delay_limit; - /** time request was first queued */ - unsigned long rq_queued_time; - - /* server-side... */ - /** request arrival time */ - struct timespec64 rq_arrival_time; - /** separated reply state */ - struct ptlrpc_reply_state *rq_reply_state; - /** incoming request buffer */ - struct ptlrpc_request_buffer_desc *rq_rqbd; - - /** client-only incoming reply */ - lnet_handle_md_t rq_reply_md_h; - wait_queue_head_t rq_reply_waitq; - struct ptlrpc_cb_id rq_reply_cbid; - + /** Server-side, export on which request was received */ + struct obd_export *rq_export; + /** import where request is being sent */ + struct obd_import *rq_import; /** our LNet NID */ lnet_nid_t rq_self; /** Peer description (the other side) */ lnet_process_id_t rq_peer; - /** Server-side, export on which request was received */ - struct obd_export *rq_export; - /** Client side, import where request is being sent */ - struct obd_import *rq_import; - - /** Replay callback, called after request is replayed at recovery */ - void (*rq_replay_cb)(struct ptlrpc_request *); /** - * Commit callback, called when request is committed and about to be - * freed. + * service time estimate (secs) + * If the request is not served by this time, it is marked as timed out. */ - void (*rq_commit_cb)(struct ptlrpc_request *); - /** Opaq data for replay and commit callbacks. */ - void *rq_cb_data; - - /** For bulk requests on client only: bulk descriptor */ - struct ptlrpc_bulk_desc *rq_bulk; - - /** client outgoing req */ + int rq_timeout; /** * when request/reply sent (secs), or time when request should be sent */ time64_t rq_sent; - /** time for request really sent out */ - time64_t rq_real_sent; - - /** when request must finish. volatile - * so that servers' early reply updates to the deadline aren't - * kept in per-cpu cache - */ - volatile time64_t rq_deadline; - /** when req reply unlink must finish. */ - time64_t rq_reply_deadline; - /** when req bulk unlink must finish. */ - time64_t rq_bulk_deadline; - /** - * service time estimate (secs) - * If the requestsis not served by this time, it is marked as timed out. - */ - int rq_timeout; - - /** Multi-rpc bits */ - /** Per-request waitq introduced by bug 21938 for recovery waiting */ - wait_queue_head_t rq_set_waitq; - /** Link item for request set lists */ - struct list_head rq_set_chain; - /** Link back to the request set */ - struct ptlrpc_request_set *rq_set; - /** Async completion handler, called when reply is received */ - ptlrpc_interpterer_t rq_interpret_reply; - /** Async completion context */ - union ptlrpc_async_args rq_async_args; - - /** Pool if request is from preallocated list */ - struct ptlrpc_request_pool *rq_pool; - - struct lu_context rq_session; - struct lu_context rq_recov_session; - + /** when request must finish. */ + time64_t rq_deadline; /** request format description */ struct req_capsule rq_pill; }; diff --git a/drivers/staging/lustre/lustre/ptlrpc/client.c b/drivers/staging/lustre/lustre/ptlrpc/client.c index 22bf893..9abd469 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/client.c +++ b/drivers/staging/lustre/lustre/ptlrpc/client.c @@ -611,7 +611,6 @@ static int __ptlrpc_request_bufs_pack(struct ptlrpc_request *request, lustre_msg_add_version(request->rq_reqmsg, version); request->rq_send_state = LUSTRE_IMP_FULL; request->rq_type = PTL_RPC_MSG_REQUEST; - request->rq_export = NULL; request->rq_req_cbid.cbid_fn = request_out_callback; request->rq_req_cbid.cbid_arg = request; @@ -628,19 +627,7 @@ static int __ptlrpc_request_bufs_pack(struct ptlrpc_request *request, ptlrpc_at_set_req_timeout(request); - spin_lock_init(&request->rq_lock); - INIT_LIST_HEAD(&request->rq_list); - INIT_LIST_HEAD(&request->rq_timed_list); - INIT_LIST_HEAD(&request->rq_replay_list); - INIT_LIST_HEAD(&request->rq_ctx_chain); - INIT_LIST_HEAD(&request->rq_set_chain); - INIT_LIST_HEAD(&request->rq_history_list); - INIT_LIST_HEAD(&request->rq_exp_list); - init_waitqueue_head(&request->rq_reply_waitq); - init_waitqueue_head(&request->rq_set_waitq); request->rq_xid = ptlrpc_next_xid(); - atomic_set(&request->rq_refcount, 1); - lustre_msg_set_opc(request->rq_reqmsg, opcode); return 0; @@ -718,7 +705,9 @@ struct ptlrpc_request *__ptlrpc_request_alloc(struct obd_import *imp, request = ptlrpc_prep_req_from_pool(pool); if (request) { - LASSERTF((unsigned long)imp > 0x1000, "%p\n", imp); + ptlrpc_cli_req_init(request); + + LASSERTF((unsigned long)imp > 0x1000, "%p", imp); LASSERT(imp != LP_POISON); LASSERTF((unsigned long)imp->imp_client > 0x1000, "%p\n", imp->imp_client); @@ -1235,8 +1224,9 @@ static int after_reply(struct ptlrpc_request *req) } ktime_get_real_ts64(&work_start); - timediff = (work_start.tv_sec - req->rq_arrival_time.tv_sec) * USEC_PER_SEC + - (work_start.tv_nsec - req->rq_arrival_time.tv_nsec) / NSEC_PER_USEC; + timediff = (work_start.tv_sec - req->rq_sent_tv.tv_sec) * USEC_PER_SEC + + (work_start.tv_nsec - req->rq_sent_tv.tv_nsec) / + NSEC_PER_USEC; if (obd->obd_svc_stats) { lprocfs_counter_add(obd->obd_svc_stats, PTLRPC_REQWAIT_CNTR, timediff); @@ -2191,11 +2181,11 @@ static void __ptlrpc_free_req(struct ptlrpc_request *request, int locked) { if (!request) return; + LASSERT(!request->rq_srv_req); + LASSERT(!request->rq_export); LASSERTF(!request->rq_receiving_reply, "req %p\n", request); - LASSERTF(!request->rq_rqbd, "req %p\n", request);/* client-side */ LASSERTF(list_empty(&request->rq_list), "req %p\n", request); LASSERTF(list_empty(&request->rq_set_chain), "req %p\n", request); - LASSERTF(list_empty(&request->rq_exp_list), "req %p\n", request); LASSERTF(!request->rq_replay, "req %p\n", request); req_capsule_fini(&request->rq_pill); @@ -2221,10 +2211,7 @@ static void __ptlrpc_free_req(struct ptlrpc_request *request, int locked) if (request->rq_repbuf) sptlrpc_cli_free_repbuf(request); - if (request->rq_export) { - class_export_put(request->rq_export); - request->rq_export = NULL; - } + if (request->rq_import) { class_import_put(request->rq_import); request->rq_import = NULL; @@ -2614,11 +2601,6 @@ int ptlrpc_queue_wait(struct ptlrpc_request *req) } EXPORT_SYMBOL(ptlrpc_queue_wait); -struct ptlrpc_replay_async_args { - int praa_old_state; - int praa_old_status; -}; - /** * Callback used for replayed requests reply processing. * In case of successful reply calls registered request replay callback. @@ -3013,10 +2995,11 @@ void *ptlrpcd_alloc_work(struct obd_import *imp, return ERR_PTR(-ENOMEM); } + ptlrpc_cli_req_init(req); + req->rq_send_state = LUSTRE_IMP_FULL; req->rq_type = PTL_RPC_MSG_REQUEST; req->rq_import = class_import_get(imp); - req->rq_export = NULL; req->rq_interpret_reply = work_interpreter; /* don't want reply */ req->rq_receiving_reply = 0; @@ -3026,16 +3009,6 @@ void *ptlrpcd_alloc_work(struct obd_import *imp, req->rq_no_resend = 1; req->rq_pill.rc_fmt = (void *)&worker_format; - spin_lock_init(&req->rq_lock); - INIT_LIST_HEAD(&req->rq_list); - INIT_LIST_HEAD(&req->rq_replay_list); - INIT_LIST_HEAD(&req->rq_set_chain); - INIT_LIST_HEAD(&req->rq_history_list); - INIT_LIST_HEAD(&req->rq_exp_list); - init_waitqueue_head(&req->rq_reply_waitq); - init_waitqueue_head(&req->rq_set_waitq); - atomic_set(&req->rq_refcount, 1); - CLASSERT(sizeof(*args) <= sizeof(req->rq_async_args)); args = ptlrpc_req_async_args(req); args->cb = cb; diff --git a/drivers/staging/lustre/lustre/ptlrpc/events.c b/drivers/staging/lustre/lustre/ptlrpc/events.c index b8ca7d6..95be4aa 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/events.c +++ b/drivers/staging/lustre/lustre/ptlrpc/events.c @@ -324,6 +324,7 @@ void request_in_callback(lnet_event_t *ev) } } + ptlrpc_srv_req_init(req); /* NB we ABSOLUTELY RELY on req being zeroed, so pointers are NULL, * flags are reset and scalars are zero. We only set the message * size to non-zero if this was a successful receive. @@ -337,10 +338,6 @@ void request_in_callback(lnet_event_t *ev) req->rq_self = ev->target.nid; req->rq_rqbd = rqbd; req->rq_phase = RQ_PHASE_NEW; - spin_lock_init(&req->rq_lock); - INIT_LIST_HEAD(&req->rq_timed_list); - INIT_LIST_HEAD(&req->rq_exp_list); - atomic_set(&req->rq_refcount, 1); if (ev->type == LNET_EVENT_PUT) CDEBUG(D_INFO, "incoming req@%p x%llu msgsize %u\n", req, req->rq_xid, ev->mlength); diff --git a/drivers/staging/lustre/lustre/ptlrpc/niobuf.c b/drivers/staging/lustre/lustre/ptlrpc/niobuf.c index ff9a95c..4e7d68f 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/niobuf.c +++ b/drivers/staging/lustre/lustre/ptlrpc/niobuf.c @@ -633,7 +633,7 @@ int ptl_send_rpc(struct ptlrpc_request *request, int noreply) OBD_FAIL_TIMEOUT(OBD_FAIL_PTLRPC_DELAY_SEND, request->rq_timeout + 5); - ktime_get_real_ts64(&request->rq_arrival_time); + ktime_get_real_ts64(&request->rq_sent_tv); request->rq_sent = ktime_get_real_seconds(); /* We give the server rq_timeout secs to process the req, and * add the network latency for our local timeout. diff --git a/drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h b/drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h index 97e97e2..d3674cb 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h +++ b/drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h @@ -288,4 +288,38 @@ static inline void ptlrpc_reqset_put(struct ptlrpc_request_set *set) if (atomic_dec_and_test(&set->set_refcount)) kfree(set); } + +/** initialise ptlrpc common fields */ +static inline void ptlrpc_req_comm_init(struct ptlrpc_request *req) +{ + spin_lock_init(&req->rq_lock); + atomic_set(&req->rq_refcount, 1); + INIT_LIST_HEAD(&req->rq_list); + INIT_LIST_HEAD(&req->rq_replay_list); +} + +/** initialise client side ptlrpc request */ +static inline void ptlrpc_cli_req_init(struct ptlrpc_request *req) +{ + struct ptlrpc_cli_req *cr = &req->rq_cli; + + ptlrpc_req_comm_init(req); + INIT_LIST_HEAD(&cr->cr_set_chain); + INIT_LIST_HEAD(&cr->cr_ctx_chain); + init_waitqueue_head(&cr->cr_reply_waitq); + init_waitqueue_head(&cr->cr_set_waitq); +} + +/** initialise server side ptlrpc request */ +static inline void ptlrpc_srv_req_init(struct ptlrpc_request *req) +{ + struct ptlrpc_srv_req *sr = &req->rq_srv; + + ptlrpc_req_comm_init(req); + req->rq_srv_req = 1; + INIT_LIST_HEAD(&sr->sr_exp_list); + INIT_LIST_HEAD(&sr->sr_timed_list); + INIT_LIST_HEAD(&sr->sr_hist_list); +} + #endif /* PTLRPC_INTERNAL_H */ diff --git a/drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c b/drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c index b0cf585..0a374b6 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c +++ b/drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c @@ -157,9 +157,9 @@ static int ptlrpcd_users; void ptlrpcd_wake(struct ptlrpc_request *req) { - struct ptlrpc_request_set *rq_set = req->rq_set; + struct ptlrpc_request_set *set = req->rq_set; - wake_up(&rq_set->set_waitq); + wake_up(&set->set_waitq); } EXPORT_SYMBOL(ptlrpcd_wake); diff --git a/drivers/staging/lustre/lustre/ptlrpc/sec.c b/drivers/staging/lustre/lustre/ptlrpc/sec.c index f3b4773..dbd819f 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/sec.c +++ b/drivers/staging/lustre/lustre/ptlrpc/sec.c @@ -863,11 +863,9 @@ int sptlrpc_import_check_ctx(struct obd_import *imp) if (!req) return -ENOMEM; - spin_lock_init(&req->rq_lock); + ptlrpc_cli_req_init(req); atomic_set(&req->rq_refcount, 10000); - INIT_LIST_HEAD(&req->rq_ctx_chain); - init_waitqueue_head(&req->rq_reply_waitq); - init_waitqueue_head(&req->rq_set_waitq); + req->rq_import = imp; req->rq_flvr = sec->ps_flvr; req->rq_cli_ctx = ctx; @@ -1047,6 +1045,8 @@ int sptlrpc_cli_unwrap_early_reply(struct ptlrpc_request *req, if (!early_req) return -ENOMEM; + ptlrpc_cli_req_init(early_req); + early_size = req->rq_nob_received; early_bufsz = size_roundup_power2(early_size); early_buf = libcfs_kvzalloc(early_bufsz, GFP_NOFS); @@ -1095,7 +1095,6 @@ int sptlrpc_cli_unwrap_early_reply(struct ptlrpc_request *req, memcpy(early_buf, req->rq_repbuf, early_size); spin_unlock(&req->rq_lock); - spin_lock_init(&early_req->rq_lock); early_req->rq_cli_ctx = sptlrpc_cli_ctx_get(req->rq_cli_ctx); early_req->rq_flvr = req->rq_flvr; early_req->rq_repbuf = early_buf; -- 2.7.4 From green at linuxhacker.ru Mon Jun 20 02:07:23 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Sun, 19 Jun 2016 22:07:23 -0400 Subject: [lustre-devel] [PATCH 08/28] staging/lustre/ptlrpc: missing wakeup for ptlrpc_check_set In-Reply-To: <1466388463-1817551-1-git-send-email-green@linuxhacker.ru> References: <1466388463-1817551-1-git-send-email-green@linuxhacker.ru> Message-ID: <1466388463-1817551-9-git-send-email-green@linuxhacker.ru> From: Liang Zhen This patch changes a few things: - There is no guarantee that request_out_callback will happen before reply_in_callback, if a request got reply and unlinked reply buffer before request_out_callback is called, then the thread waiting on ptlrpc_request_set will miss wakeup event. This may seriously impact performance of some IO workloads or result in RPC timeout - To make code more easier to understand, this patch changes action-bits "rq_req_unlink" and "rq_reply_unlink" to status-bits "rq_req_unlinked" and "rq_reply_unlinked" Signed-off-by: Liang Zhen Reviewed-on: http://review.whamcloud.com/12158 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5696 Reviewed-by: Johann Lombardi Reviewed-by: Li Wei Reviewed-by: Mike Pershin Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/include/lustre_net.h | 27 +++++++++++++--------- drivers/staging/lustre/lustre/ptlrpc/client.c | 12 ++++------ drivers/staging/lustre/lustre/ptlrpc/events.c | 22 +++++++++++------- drivers/staging/lustre/lustre/ptlrpc/niobuf.c | 14 +++++------ .../staging/lustre/lustre/ptlrpc/ptlrpc_internal.h | 9 ++++++++ 5 files changed, 51 insertions(+), 33 deletions(-) diff --git a/drivers/staging/lustre/lustre/include/lustre_net.h b/drivers/staging/lustre/lustre/include/lustre_net.h index 5968c3c..523d082 100644 --- a/drivers/staging/lustre/lustre/include/lustre_net.h +++ b/drivers/staging/lustre/lustre/include/lustre_net.h @@ -1428,7 +1428,7 @@ struct ptlrpc_request { * rq_list */ spinlock_t rq_lock; - /** client-side flags are serialized by rq_lock */ + /** client-side flags are serialized by rq_lock @{ */ unsigned int rq_intr:1, rq_replied:1, rq_err:1, rq_timedout:1, rq_resend:1, rq_restart:1, /** @@ -1444,18 +1444,15 @@ struct ptlrpc_request { rq_no_resend:1, rq_waiting:1, rq_receiving_reply:1, rq_no_delay:1, rq_net_err:1, rq_wait_ctx:1, rq_early:1, - rq_req_unlink:1, rq_reply_unlink:1, + rq_req_unlinked:1, /* unlinked request buffer from lnet */ + rq_reply_unlinked:1, /* unlinked reply buffer from lnet */ rq_memalloc:1, /* req originated from "kswapd" */ - /* server-side flags */ - rq_packed_final:1, /* packed final reply */ - rq_hp:1, /* high priority RPC */ - rq_at_linked:1, /* link into service's srv_at_array */ - rq_reply_truncate:1, rq_committed:1, - /* whether the "rq_set" is a valid one */ + rq_reply_truncated:1, + /** whether the "rq_set" is a valid one */ rq_invalid_rqset:1, rq_generation_set:1, - /* do not resend request on -EINPROGRESS */ + /** do not resend request on -EINPROGRESS */ rq_no_retry_einprogress:1, /* allow the req to be sent if the import is in recovery * status @@ -1463,6 +1460,14 @@ struct ptlrpc_request { rq_allow_replay:1, /* bulk request, sent to server, but uncommitted */ rq_unstable:1; + /** @} */ + + /** server-side flags @{ */ + unsigned int + rq_hp:1, /**< high priority RPC */ + rq_at_linked:1, /**< link into service's srv_at_array */ + rq_packed_final:1; /**< packed final reply */ + /** @} */ /** one of RQ_PHASE_* */ enum rq_phase rq_phase; @@ -2785,8 +2790,8 @@ ptlrpc_client_recv_or_unlink(struct ptlrpc_request *req) spin_unlock(&req->rq_lock); return 1; } - rc = req->rq_receiving_reply; - rc = rc || req->rq_req_unlink || req->rq_reply_unlink; + rc = !req->rq_req_unlinked || !req->rq_reply_unlinked || + req->rq_receiving_reply; spin_unlock(&req->rq_lock); return rc; } diff --git a/drivers/staging/lustre/lustre/ptlrpc/client.c b/drivers/staging/lustre/lustre/ptlrpc/client.c index 9abd469..ae1cef3 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/client.c +++ b/drivers/staging/lustre/lustre/ptlrpc/client.c @@ -1148,9 +1148,9 @@ static int after_reply(struct ptlrpc_request *req) LASSERT(obd); /* repbuf must be unlinked */ - LASSERT(!req->rq_receiving_reply && !req->rq_reply_unlink); + LASSERT(!req->rq_receiving_reply && req->rq_reply_unlinked); - if (req->rq_reply_truncate) { + if (req->rq_reply_truncated) { if (ptlrpc_no_resend(req)) { DEBUG_REQ(D_ERROR, req, "reply buffer overflow, expected: %d, actual size: %d", req->rq_nob_received, req->rq_repbuf_len); @@ -2342,9 +2342,10 @@ int ptlrpc_unregister_reply(struct ptlrpc_request *request, int async) LASSERT(rc == -ETIMEDOUT); DEBUG_REQ(D_WARNING, request, - "Unexpectedly long timeout rvcng=%d unlnk=%d/%d", + "Unexpectedly long timeout receiving_reply=%d req_ulinked=%d reply_unlinked=%d", request->rq_receiving_reply, - request->rq_req_unlink, request->rq_reply_unlink); + request->rq_req_unlinked, + request->rq_reply_unlinked); } return 0; } @@ -3002,9 +3003,6 @@ void *ptlrpcd_alloc_work(struct obd_import *imp, req->rq_import = class_import_get(imp); req->rq_interpret_reply = work_interpreter; /* don't want reply */ - req->rq_receiving_reply = 0; - req->rq_req_unlink = 0; - req->rq_reply_unlink = 0; req->rq_no_delay = 1; req->rq_no_resend = 1; req->rq_pill.rc_fmt = (void *)&worker_format; diff --git a/drivers/staging/lustre/lustre/ptlrpc/events.c b/drivers/staging/lustre/lustre/ptlrpc/events.c index 95be4aa..a243342 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/events.c +++ b/drivers/staging/lustre/lustre/ptlrpc/events.c @@ -51,27 +51,33 @@ void request_out_callback(lnet_event_t *ev) { struct ptlrpc_cb_id *cbid = ev->md.user_ptr; struct ptlrpc_request *req = cbid->cbid_arg; + bool wakeup = false; - LASSERT(ev->type == LNET_EVENT_SEND || - ev->type == LNET_EVENT_UNLINK); + LASSERT(ev->type == LNET_EVENT_SEND || ev->type == LNET_EVENT_UNLINK); LASSERT(ev->unlinked); DEBUG_REQ(D_NET, req, "type %d, status %d", ev->type, ev->status); sptlrpc_request_out_callback(req); + spin_lock(&req->rq_lock); req->rq_real_sent = ktime_get_real_seconds(); - if (ev->unlinked) - req->rq_req_unlink = 0; + req->rq_req_unlinked = 1; + /* reply_in_callback happened before request_out_callback? */ + if (req->rq_reply_unlinked) + wakeup = true; if (ev->type == LNET_EVENT_UNLINK || ev->status != 0) { /* Failed send: make it seem like the reply timed out, just * like failing sends in client.c does currently... */ - req->rq_net_err = 1; - ptlrpc_client_wake_req(req); + wakeup = true; } + + if (wakeup) + ptlrpc_client_wake_req(req); + spin_unlock(&req->rq_lock); ptlrpc_req_finished(req); @@ -100,7 +106,7 @@ void reply_in_callback(lnet_event_t *ev) req->rq_receiving_reply = 0; req->rq_early = 0; if (ev->unlinked) - req->rq_reply_unlink = 0; + req->rq_reply_unlinked = 1; if (ev->status) goto out_wake; @@ -114,7 +120,7 @@ void reply_in_callback(lnet_event_t *ev) if (ev->mlength < ev->rlength) { CDEBUG(D_RPCTRACE, "truncate req %p rpc %d - %d+%d\n", req, req->rq_replen, ev->rlength, ev->offset); - req->rq_reply_truncate = 1; + req->rq_reply_truncated = 1; req->rq_replied = 1; req->rq_status = -EOVERFLOW; req->rq_nob_received = ev->rlength + ev->offset; diff --git a/drivers/staging/lustre/lustre/ptlrpc/niobuf.c b/drivers/staging/lustre/lustre/ptlrpc/niobuf.c index 4e7d68f..8c49f5e 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/niobuf.c +++ b/drivers/staging/lustre/lustre/ptlrpc/niobuf.c @@ -577,19 +577,18 @@ int ptl_send_rpc(struct ptlrpc_request *request, int noreply) } spin_lock(&request->rq_lock); - /* If the MD attach succeeds, there _will_ be a reply_in callback */ - request->rq_receiving_reply = !noreply; - request->rq_req_unlink = 1; /* We are responsible for unlinking the reply buffer */ - request->rq_reply_unlink = !noreply; + request->rq_reply_unlinked = noreply; + request->rq_receiving_reply = !noreply; /* Clear any flags that may be present from previous sends. */ + request->rq_req_unlinked = 0; request->rq_replied = 0; request->rq_err = 0; request->rq_timedout = 0; request->rq_net_err = 0; request->rq_resend = 0; request->rq_restart = 0; - request->rq_reply_truncate = 0; + request->rq_reply_truncated = 0; spin_unlock(&request->rq_lock); if (!noreply) { @@ -604,7 +603,7 @@ int ptl_send_rpc(struct ptlrpc_request *request, int noreply) reply_md.user_ptr = &request->rq_reply_cbid; reply_md.eq_handle = ptlrpc_eq_h; - /* We must see the unlink callback to unset rq_reply_unlink, + /* We must see the unlink callback to set rq_reply_unlinked, * so we can't auto-unlink */ rc = LNetMDAttach(reply_me_h, reply_md, LNET_RETAIN, @@ -651,9 +650,10 @@ int ptl_send_rpc(struct ptlrpc_request *request, int noreply) connection, request->rq_request_portal, request->rq_xid, 0); - if (rc == 0) + if (likely(rc == 0)) goto out; + request->rq_req_unlinked = 1; ptlrpc_req_finished(request); if (noreply) goto out; diff --git a/drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h b/drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h index d3674cb..a9831fa 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h +++ b/drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h @@ -304,6 +304,15 @@ static inline void ptlrpc_cli_req_init(struct ptlrpc_request *req) struct ptlrpc_cli_req *cr = &req->rq_cli; ptlrpc_req_comm_init(req); + + req->rq_receiving_reply = 0; + req->rq_req_unlinked = 1; + req->rq_reply_unlinked = 1; + + req->rq_receiving_reply = 0; + req->rq_req_unlinked = 1; + req->rq_reply_unlinked = 1; + INIT_LIST_HEAD(&cr->cr_set_chain); INIT_LIST_HEAD(&cr->cr_ctx_chain); init_waitqueue_head(&cr->cr_reply_waitq); -- 2.7.4 From green at linuxhacker.ru Mon Jun 20 02:07:24 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Sun, 19 Jun 2016 22:07:24 -0400 Subject: [lustre-devel] [PATCH 09/28] staging/lustre/ptlrpc: Early Reply vs Reply MDunlink In-Reply-To: <1466388463-1817551-1-git-send-email-green@linuxhacker.ru> References: <1466388463-1817551-1-git-send-email-green@linuxhacker.ru> Message-ID: <1466388463-1817551-10-git-send-email-green@linuxhacker.ru> From: Vitaly Fertman A race between unregister_reply & early reply. When buffers are busy for the early transfer, they cannon be unlinked by unregister_reply, so the RPC gets into UNREGISTERING state. The coming reply_in_callback for the early RPC already has unlinked flag set due to previous mdunlink attempt, but we handle it properly only for UNILNK event, whereas this is PUT in this case. Signed-off-by: Vitaly Fertman Seagate-bug-id: MRP-3323 Reviewed-by: Alexey Leonidovich Lyashkov Reviewed-by: Andriy Skulysh Tested-by: Parinay Vijayprakash Kondekar Reviewed-on: http://review.whamcloud.com/18934 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7434 Reviewed-by: Chris Horn Reviewed-by: Andreas Dilger Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/ptlrpc/events.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/ptlrpc/events.c b/drivers/staging/lustre/lustre/ptlrpc/events.c index a243342..b1ce725 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/events.c +++ b/drivers/staging/lustre/lustre/ptlrpc/events.c @@ -137,7 +137,8 @@ void reply_in_callback(lnet_event_t *ev) req->rq_early_count++; /* number received, client side */ - if (req->rq_replied) /* already got the real reply */ + /* already got the real reply or buffers are already unlinked */ + if (req->rq_replied || req->rq_reply_unlinked == 1) goto out_wake; req->rq_early = 1; -- 2.7.4 From green at linuxhacker.ru Mon Jun 20 02:07:20 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Sun, 19 Jun 2016 22:07:20 -0400 Subject: [lustre-devel] [PATCH 05/28] staging/lustre/osc: osc_lock_weight endless loop fix In-Reply-To: <1466388463-1817551-1-git-send-email-green@linuxhacker.ru> References: <1466388463-1817551-1-git-send-email-green@linuxhacker.ru> Message-ID: <1466388463-1817551-6-git-send-email-green@linuxhacker.ru> From: Jinshan Xiong With huge number of pages to scan by osc_lock_weight() it is likely CLP_GANG_RESCHED is returned from osc_page_gang_lookup() and the scan will be repeated again from the start. To be sure that the scan is progressing across those restarts, next scan should be started from the last scanned page index plus one. Xyratex-bug-id: MRP-2145 Signed-off-by: Alexander Zarochentsev Signed-off-by: Jinshan Xiong Reviewed-on: http://review.whamcloud.com/12362 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5781 Reviewed-by: Bobi Jam Reviewed-by: James Simmons Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/osc/osc_lock.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/staging/lustre/lustre/osc/osc_lock.c b/drivers/staging/lustre/lustre/osc/osc_lock.c index 42def38..d856775 100644 --- a/drivers/staging/lustre/lustre/osc/osc_lock.c +++ b/drivers/staging/lustre/lustre/osc/osc_lock.c @@ -634,11 +634,10 @@ static int weigh_cb(const struct lu_env *env, struct cl_io *io, if (cl_page_is_vmlocked(env, page) || PageDirty(page->cp_vmpage) || PageWriteback(page->cp_vmpage) - ) { - (*(unsigned long *)cbdata)++; + ) return CLP_GANG_ABORT; - } + *(pgoff_t *)cbdata = osc_index(ops) + 1; return CLP_GANG_OKAY; } @@ -648,7 +647,7 @@ static unsigned long osc_lock_weight(const struct lu_env *env, { struct cl_io *io = &osc_env_info(env)->oti_io; struct cl_object *obj = cl_object_top(&oscobj->oo_cl); - unsigned long npages = 0; + pgoff_t page_index; int result; io->ci_obj = obj; @@ -657,11 +656,12 @@ static unsigned long osc_lock_weight(const struct lu_env *env, if (result != 0) return result; + page_index = cl_index(obj, extent->start); do { result = osc_page_gang_lookup(env, io, oscobj, - cl_index(obj, extent->start), + page_index, cl_index(obj, extent->end), - weigh_cb, (void *)&npages); + weigh_cb, (void *)&page_index); if (result == CLP_GANG_ABORT) break; if (result == CLP_GANG_RESCHED) @@ -669,7 +669,7 @@ static unsigned long osc_lock_weight(const struct lu_env *env, } while (result != CLP_GANG_OKAY); cl_io_fini(env, io); - return npages; + return result == CLP_GANG_ABORT ? 1 : 0; } /** -- 2.7.4 From green at linuxhacker.ru Mon Jun 20 02:07:21 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Sun, 19 Jun 2016 22:07:21 -0400 Subject: [lustre-devel] [PATCH 06/28] staging/lustre/osc: Fix reverted condition in osc_lock_weight In-Reply-To: <1466388463-1817551-1-git-send-email-green@linuxhacker.ru> References: <1466388463-1817551-1-git-send-email-green@linuxhacker.ru> Message-ID: <1466388463-1817551-7-git-send-email-green@linuxhacker.ru> When importing clio simplification patch, the check for object got reversed by mistake when converting from if (obj == NULL) it somehow became if (obj) which is obviously wrong, and so when it does hit, a crash was happening as result. Fix the condition and all if fine now. Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/osc/osc_lock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/osc/osc_lock.c b/drivers/staging/lustre/lustre/osc/osc_lock.c index d856775..5455d9d 100644 --- a/drivers/staging/lustre/lustre/osc/osc_lock.c +++ b/drivers/staging/lustre/lustre/osc/osc_lock.c @@ -699,7 +699,7 @@ unsigned long osc_ldlm_weigh_ast(struct ldlm_lock *dlmlock) LASSERT(dlmlock->l_resource->lr_type == LDLM_EXTENT); obj = dlmlock->l_ast_data; - if (obj) { + if (!obj) { weight = 1; goto out; } -- 2.7.4 From green at linuxhacker.ru Mon Jun 20 02:07:26 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Sun, 19 Jun 2016 22:07:26 -0400 Subject: [lustre-devel] [PATCH 11/28] staging/lustre/ptlrpc: lost bulk leads to a hang In-Reply-To: <1466388463-1817551-1-git-send-email-green@linuxhacker.ru> References: <1466388463-1817551-1-git-send-email-green@linuxhacker.ru> Message-ID: <1466388463-1817551-12-git-send-email-green@linuxhacker.ru> From: Vitaly Fertman The reverse order of request_out_callback() and reply_in_callback() puts the RPC into UNREGISTERING state, which is waiting for RPC & bulk md unlink, whereas only RPC md unlink has been called so far. If bulk is lost, even expired_set does not check for UNREGISTERING state. The same for write if server returns an error. This phase is ambiguous, split to UNREG_RPC and UNREG_BULK. Signed-off-by: Vitaly Fertman Seagate-bug-id: MRP-2953, MRP-3206 Reviewed-by: Andriy Skulysh Reviewed-by: Alexey Leonidovich Lyashkov Tested-by: Elena V. Gryaznova Reviewed-on: http://review.whamcloud.com/19953 Reviewed-by: Chris Horn Reviewed-by: Ann Koehler Reviewed-by: Andreas Dilger Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/include/lustre_net.h | 48 +++++++++------- .../staging/lustre/lustre/include/obd_support.h | 3 + drivers/staging/lustre/lustre/ptlrpc/client.c | 64 +++++++++++++++++++--- drivers/staging/lustre/lustre/ptlrpc/import.c | 3 +- drivers/staging/lustre/lustre/ptlrpc/niobuf.c | 4 +- 5 files changed, 91 insertions(+), 31 deletions(-) diff --git a/drivers/staging/lustre/lustre/include/lustre_net.h b/drivers/staging/lustre/lustre/include/lustre_net.h index 523d082..3f43664 100644 --- a/drivers/staging/lustre/lustre/include/lustre_net.h +++ b/drivers/staging/lustre/lustre/include/lustre_net.h @@ -480,8 +480,9 @@ enum rq_phase { RQ_PHASE_BULK = 0xebc0de02, RQ_PHASE_INTERPRET = 0xebc0de03, RQ_PHASE_COMPLETE = 0xebc0de04, - RQ_PHASE_UNREGISTERING = 0xebc0de05, - RQ_PHASE_UNDEFINED = 0xebc0de06 + RQ_PHASE_UNREG_RPC = 0xebc0de05, + RQ_PHASE_UNREG_BULK = 0xebc0de06, + RQ_PHASE_UNDEFINED = 0xebc0de07 }; /** Type of request interpreter call-back */ @@ -1263,6 +1264,8 @@ struct ptlrpc_cli_req { time_t cr_reply_deadline; /** when req bulk unlink must finish. */ time_t cr_bulk_deadline; + /** when req unlink must finish. */ + time_t cr_req_deadline; /** Portal to which this request would be sent */ short cr_req_ptl; /** Portal where to wait for reply and where reply would be sent */ @@ -1318,6 +1321,7 @@ struct ptlrpc_cli_req { #define rq_real_sent rq_cli.cr_sent_out #define rq_reply_deadline rq_cli.cr_reply_deadline #define rq_bulk_deadline rq_cli.cr_bulk_deadline +#define rq_req_deadline rq_cli.cr_req_deadline #define rq_nr_resend rq_cli.cr_resend_nr #define rq_request_portal rq_cli.cr_req_ptl #define rq_reply_portal rq_cli.cr_rep_ptl @@ -1693,8 +1697,10 @@ ptlrpc_phase2str(enum rq_phase phase) return "Interpret"; case RQ_PHASE_COMPLETE: return "Complete"; - case RQ_PHASE_UNREGISTERING: - return "Unregistering"; + case RQ_PHASE_UNREG_RPC: + return "UnregRPC"; + case RQ_PHASE_UNREG_BULK: + return "UnregBULK"; default: return "?Phase?"; } @@ -1721,7 +1727,7 @@ ptlrpc_rqphase2str(struct ptlrpc_request *req) #define DEBUG_REQ_FLAGS(req) \ ptlrpc_rqphase2str(req), \ FLAG(req->rq_intr, "I"), FLAG(req->rq_replied, "R"), \ - FLAG(req->rq_err, "E"), \ + FLAG(req->rq_err, "E"), FLAG(req->rq_net_err, "e"), \ FLAG(req->rq_timedout, "X") /* eXpired */, FLAG(req->rq_resend, "S"), \ FLAG(req->rq_restart, "T"), FLAG(req->rq_replay, "P"), \ FLAG(req->rq_no_resend, "N"), \ @@ -1729,7 +1735,7 @@ ptlrpc_rqphase2str(struct ptlrpc_request *req) FLAG(req->rq_wait_ctx, "C"), FLAG(req->rq_hp, "H"), \ FLAG(req->rq_committed, "M") -#define REQ_FLAGS_FMT "%s:%s%s%s%s%s%s%s%s%s%s%s%s" +#define REQ_FLAGS_FMT "%s:%s%s%s%s%s%s%s%s%s%s%s%s%s" void _debug_req(struct ptlrpc_request *req, struct libcfs_debug_msg_data *data, const char *fmt, ...) @@ -2380,8 +2386,7 @@ static inline int ptlrpc_client_bulk_active(struct ptlrpc_request *req) desc = req->rq_bulk; - if (OBD_FAIL_CHECK(OBD_FAIL_PTLRPC_LONG_BULK_UNLINK) && - req->rq_bulk_deadline > ktime_get_real_seconds()) + if (req->rq_bulk_deadline > ktime_get_real_seconds()) return 1; if (!desc) @@ -2728,13 +2733,20 @@ ptlrpc_rqphase_move(struct ptlrpc_request *req, enum rq_phase new_phase) if (req->rq_phase == new_phase) return; - if (new_phase == RQ_PHASE_UNREGISTERING) { + if (new_phase == RQ_PHASE_UNREG_RPC || + new_phase == RQ_PHASE_UNREG_BULK) { + /* No embedded unregistering phases */ + if (req->rq_phase == RQ_PHASE_UNREG_RPC || + req->rq_phase == RQ_PHASE_UNREG_BULK) + return; + req->rq_next_phase = req->rq_phase; if (req->rq_import) atomic_inc(&req->rq_import->imp_unregistering); } - if (req->rq_phase == RQ_PHASE_UNREGISTERING) { + if (req->rq_phase == RQ_PHASE_UNREG_RPC || + req->rq_phase == RQ_PHASE_UNREG_BULK) { if (req->rq_import) atomic_dec(&req->rq_import->imp_unregistering); } @@ -2751,9 +2763,6 @@ ptlrpc_rqphase_move(struct ptlrpc_request *req, enum rq_phase new_phase) static inline int ptlrpc_client_early(struct ptlrpc_request *req) { - if (OBD_FAIL_CHECK(OBD_FAIL_PTLRPC_LONG_REPL_UNLINK) && - req->rq_reply_deadline > ktime_get_real_seconds()) - return 0; return req->rq_early; } @@ -2763,8 +2772,7 @@ ptlrpc_client_early(struct ptlrpc_request *req) static inline int ptlrpc_client_replied(struct ptlrpc_request *req) { - if (OBD_FAIL_CHECK(OBD_FAIL_PTLRPC_LONG_REPL_UNLINK) && - req->rq_reply_deadline > ktime_get_real_seconds()) + if (req->rq_reply_deadline > ktime_get_real_seconds()) return 0; return req->rq_replied; } @@ -2773,8 +2781,7 @@ ptlrpc_client_replied(struct ptlrpc_request *req) static inline int ptlrpc_client_recv(struct ptlrpc_request *req) { - if (OBD_FAIL_CHECK(OBD_FAIL_PTLRPC_LONG_REPL_UNLINK) && - req->rq_reply_deadline > ktime_get_real_seconds()) + if (req->rq_reply_deadline > ktime_get_real_seconds()) return 1; return req->rq_receiving_reply; } @@ -2785,8 +2792,11 @@ ptlrpc_client_recv_or_unlink(struct ptlrpc_request *req) int rc; spin_lock(&req->rq_lock); - if (OBD_FAIL_CHECK(OBD_FAIL_PTLRPC_LONG_REPL_UNLINK) && - req->rq_reply_deadline > ktime_get_real_seconds()) { + if (req->rq_reply_deadline > ktime_get_real_seconds()) { + spin_unlock(&req->rq_lock); + return 1; + } + if (req->rq_req_deadline > ktime_get_real_seconds()) { spin_unlock(&req->rq_lock); return 1; } diff --git a/drivers/staging/lustre/lustre/include/obd_support.h b/drivers/staging/lustre/lustre/include/obd_support.h index cdf20d6..845e64a 100644 --- a/drivers/staging/lustre/lustre/include/obd_support.h +++ b/drivers/staging/lustre/lustre/include/obd_support.h @@ -364,6 +364,9 @@ extern char obd_jobid_var[]; #define OBD_FAIL_PTLRPC_CLIENT_BULK_CB2 0x515 #define OBD_FAIL_PTLRPC_DELAY_IMP_FULL 0x516 #define OBD_FAIL_PTLRPC_CANCEL_RESEND 0x517 +#define OBD_FAIL_PTLRPC_DROP_BULK 0x51a +#define OBD_FAIL_PTLRPC_LONG_REQ_UNLINK 0x51b +#define OBD_FAIL_PTLRPC_LONG_BOTH_UNLINK 0x51c #define OBD_FAIL_OBD_PING_NET 0x600 #define OBD_FAIL_OBD_LOG_CANCEL_NET 0x601 diff --git a/drivers/staging/lustre/lustre/ptlrpc/client.c b/drivers/staging/lustre/lustre/ptlrpc/client.c index 5d832eb..d4463d7 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/client.c +++ b/drivers/staging/lustre/lustre/ptlrpc/client.c @@ -621,6 +621,8 @@ int ptlrpc_request_bufs_pack(struct ptlrpc_request *request, request->rq_reply_cbid.cbid_arg = request; request->rq_reply_deadline = 0; + request->rq_bulk_deadline = 0; + request->rq_req_deadline = 0; request->rq_phase = RQ_PHASE_NEW; request->rq_next_phase = RQ_PHASE_UNDEFINED; @@ -632,6 +634,37 @@ int ptlrpc_request_bufs_pack(struct ptlrpc_request *request, request->rq_xid = ptlrpc_next_xid(); lustre_msg_set_opc(request->rq_reqmsg, opcode); + /* Let's setup deadline for req/reply/bulk unlink for opcode. */ + if (cfs_fail_val == opcode) { + time_t *fail_t = NULL, *fail2_t = NULL; + + if (CFS_FAIL_CHECK(OBD_FAIL_PTLRPC_LONG_BULK_UNLINK)) { + fail_t = &request->rq_bulk_deadline; + } else if (CFS_FAIL_CHECK(OBD_FAIL_PTLRPC_LONG_REPL_UNLINK)) { + fail_t = &request->rq_reply_deadline; + } else if (CFS_FAIL_CHECK(OBD_FAIL_PTLRPC_LONG_REQ_UNLINK)) { + fail_t = &request->rq_req_deadline; + } else if (CFS_FAIL_CHECK(OBD_FAIL_PTLRPC_LONG_BOTH_UNLINK)) { + fail_t = &request->rq_reply_deadline; + fail2_t = &request->rq_bulk_deadline; + } + + if (fail_t) { + *fail_t = ktime_get_real_seconds() + LONG_UNLINK; + + if (fail2_t) + *fail2_t = ktime_get_real_seconds() + + LONG_UNLINK; + + /* The RPC is infected, let the test change the + * fail_loc + */ + set_current_state(TASK_UNINTERRUPTIBLE); + schedule_timeout(cfs_time_seconds(2)); + set_current_state(TASK_RUNNING); + } + } + return 0; out_ctx: @@ -1481,16 +1514,28 @@ int ptlrpc_check_set(const struct lu_env *env, struct ptlrpc_request_set *set) if (!(req->rq_phase == RQ_PHASE_RPC || req->rq_phase == RQ_PHASE_BULK || req->rq_phase == RQ_PHASE_INTERPRET || - req->rq_phase == RQ_PHASE_UNREGISTERING || + req->rq_phase == RQ_PHASE_UNREG_RPC || + req->rq_phase == RQ_PHASE_UNREG_BULK || req->rq_phase == RQ_PHASE_COMPLETE)) { DEBUG_REQ(D_ERROR, req, "bad phase %x", req->rq_phase); LBUG(); } - if (req->rq_phase == RQ_PHASE_UNREGISTERING) { + if (req->rq_phase == RQ_PHASE_UNREG_RPC || + req->rq_phase == RQ_PHASE_UNREG_BULK) { LASSERT(req->rq_next_phase != req->rq_phase); LASSERT(req->rq_next_phase != RQ_PHASE_UNDEFINED); + if (req->rq_req_deadline && + !OBD_FAIL_CHECK(OBD_FAIL_PTLRPC_LONG_REQ_UNLINK)) + req->rq_req_deadline = 0; + if (req->rq_reply_deadline && + !OBD_FAIL_CHECK(OBD_FAIL_PTLRPC_LONG_REPL_UNLINK)) + req->rq_reply_deadline = 0; + if (req->rq_bulk_deadline && + !OBD_FAIL_CHECK(OBD_FAIL_PTLRPC_LONG_BULK_UNLINK)) + req->rq_bulk_deadline = 0; + /* * Skip processing until reply is unlinked. We * can't return to pool before that and we can't @@ -1498,7 +1543,10 @@ int ptlrpc_check_set(const struct lu_env *env, struct ptlrpc_request_set *set) * sure that all rdma transfers finished and will * not corrupt any data. */ - if (ptlrpc_client_recv_or_unlink(req) || + if (req->rq_phase == RQ_PHASE_UNREG_RPC && + ptlrpc_client_recv_or_unlink(req)) + continue; + if (req->rq_phase == RQ_PHASE_UNREG_BULK && ptlrpc_client_bulk_active(req)) continue; @@ -1976,7 +2024,7 @@ void ptlrpc_interrupted_set(void *data) list_entry(tmp, struct ptlrpc_request, rq_set_chain); if (req->rq_phase != RQ_PHASE_RPC && - req->rq_phase != RQ_PHASE_UNREGISTERING) + req->rq_phase != RQ_PHASE_UNREG_RPC) continue; ptlrpc_mark_interrupted(req); @@ -2288,8 +2336,9 @@ int ptlrpc_unregister_reply(struct ptlrpc_request *request, int async) /* Let's setup deadline for reply unlink. */ if (OBD_FAIL_CHECK(OBD_FAIL_PTLRPC_LONG_REPL_UNLINK) && - async && request->rq_reply_deadline == 0) - request->rq_reply_deadline = ktime_get_real_seconds()+LONG_UNLINK; + async && request->rq_reply_deadline == 0 && cfs_fail_val == 0) + request->rq_reply_deadline = + ktime_get_real_seconds() + LONG_UNLINK; /* Nothing left to do. */ if (!ptlrpc_client_recv_or_unlink(request)) @@ -2302,7 +2351,7 @@ int ptlrpc_unregister_reply(struct ptlrpc_request *request, int async) return 1; /* Move to "Unregistering" phase as reply was not unlinked yet. */ - ptlrpc_rqphase_move(request, RQ_PHASE_UNREGISTERING); + ptlrpc_rqphase_move(request, RQ_PHASE_UNREG_RPC); /* Do not wait for unlink to finish. */ if (async) @@ -2932,7 +2981,6 @@ static void ptlrpcd_add_work_req(struct ptlrpc_request *req) req->rq_timeout = obd_timeout; req->rq_sent = ktime_get_real_seconds(); req->rq_deadline = req->rq_sent + req->rq_timeout; - req->rq_reply_deadline = req->rq_deadline; req->rq_phase = RQ_PHASE_INTERPRET; req->rq_next_phase = RQ_PHASE_COMPLETE; req->rq_xid = ptlrpc_next_xid(); diff --git a/drivers/staging/lustre/lustre/ptlrpc/import.c b/drivers/staging/lustre/lustre/ptlrpc/import.c index 914bbd2..3292e6e 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/import.c +++ b/drivers/staging/lustre/lustre/ptlrpc/import.c @@ -356,9 +356,8 @@ void ptlrpc_invalidate_import(struct obd_import *imp) "still on delayed list"); } - CERROR("%s: RPCs in \"%s\" phase found (%d). Network is sluggish? Waiting them to error out.\n", + CERROR("%s: Unregistering RPCs found (%d). Network is sluggish? Waiting them to error out.\n", cli_tgt, - ptlrpc_phase2str(RQ_PHASE_UNREGISTERING), atomic_read(&imp-> imp_unregistering)); } diff --git a/drivers/staging/lustre/lustre/ptlrpc/niobuf.c b/drivers/staging/lustre/lustre/ptlrpc/niobuf.c index 8c49f5e..11ec825 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/niobuf.c +++ b/drivers/staging/lustre/lustre/ptlrpc/niobuf.c @@ -247,7 +247,7 @@ int ptlrpc_unregister_bulk(struct ptlrpc_request *req, int async) /* Let's setup deadline for reply unlink. */ if (OBD_FAIL_CHECK(OBD_FAIL_PTLRPC_LONG_BULK_UNLINK) && - async && req->rq_bulk_deadline == 0) + async && req->rq_bulk_deadline == 0 && cfs_fail_val == 0) req->rq_bulk_deadline = ktime_get_real_seconds() + LONG_UNLINK; if (ptlrpc_client_bulk_active(req) == 0) /* completed or */ @@ -266,7 +266,7 @@ int ptlrpc_unregister_bulk(struct ptlrpc_request *req, int async) return 1; /* never registered */ /* Move to "Unregistering" phase as bulk was not unlinked yet. */ - ptlrpc_rqphase_move(req, RQ_PHASE_UNREGISTERING); + ptlrpc_rqphase_move(req, RQ_PHASE_UNREG_BULK); /* Do not wait for unlink to finish. */ if (async) -- 2.7.4 From green at linuxhacker.ru Mon Jun 20 02:07:25 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Sun, 19 Jun 2016 22:07:25 -0400 Subject: [lustre-devel] [PATCH 10/28] staging/lustre/ptlrpc: Remove __ptlrpc_request_bufs_pack In-Reply-To: <1466388463-1817551-1-git-send-email-green@linuxhacker.ru> References: <1466388463-1817551-1-git-send-email-green@linuxhacker.ru> Message-ID: <1466388463-1817551-11-git-send-email-green@linuxhacker.ru> From: Ben Evans Combine __ptlrpc_request_bufs_pack into ptlrpc_request_bufs_pack because it was an unnecessary wrapper otherwise. Signed-off-by: Ben Evans Reviewed-on: http://review.whamcloud.com/16765 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7269 Reviewed-by: Frank Zago Reviewed-by: Andreas Dilger Reviewed-by: John L. Hammond Reviewed-by: Chris Horn Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/ptlrpc/client.c | 34 ++++++++++----------------- 1 file changed, 13 insertions(+), 21 deletions(-) diff --git a/drivers/staging/lustre/lustre/ptlrpc/client.c b/drivers/staging/lustre/lustre/ptlrpc/client.c index ae1cef3..5d832eb 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/client.c +++ b/drivers/staging/lustre/lustre/ptlrpc/client.c @@ -583,14 +583,19 @@ static void __ptlrpc_free_req_to_pool(struct ptlrpc_request *request) spin_unlock(&pool->prp_lock); } -static int __ptlrpc_request_bufs_pack(struct ptlrpc_request *request, - __u32 version, int opcode, - int count, __u32 *lengths, char **bufs, - struct ptlrpc_cli_ctx *ctx) +int ptlrpc_request_bufs_pack(struct ptlrpc_request *request, + __u32 version, int opcode, char **bufs, + struct ptlrpc_cli_ctx *ctx) { - struct obd_import *imp = request->rq_import; + int count; + struct obd_import *imp; + __u32 *lengths; int rc; + count = req_capsule_filled_sizes(&request->rq_pill, RCL_CLIENT); + imp = request->rq_import; + lengths = request->rq_pill.rc_area[RCL_CLIENT]; + if (unlikely(ctx)) { request->rq_cli_ctx = sptlrpc_cli_ctx_get(ctx); } else { @@ -598,15 +603,12 @@ static int __ptlrpc_request_bufs_pack(struct ptlrpc_request *request, if (rc) goto out_free; } - sptlrpc_req_set_flavor(request, opcode); rc = lustre_pack_request(request, imp->imp_msg_magic, count, lengths, bufs); - if (rc) { - LASSERT(!request->rq_pool); + if (rc) goto out_ctx; - } lustre_msg_add_version(request->rq_reqmsg, version); request->rq_send_state = LUSTRE_IMP_FULL; @@ -631,24 +633,14 @@ static int __ptlrpc_request_bufs_pack(struct ptlrpc_request *request, lustre_msg_set_opc(request->rq_reqmsg, opcode); return 0; + out_ctx: + LASSERT(!request->rq_pool); sptlrpc_cli_ctx_put(request->rq_cli_ctx, 1); out_free: class_import_put(imp); return rc; } - -int ptlrpc_request_bufs_pack(struct ptlrpc_request *request, - __u32 version, int opcode, char **bufs, - struct ptlrpc_cli_ctx *ctx) -{ - int count; - - count = req_capsule_filled_sizes(&request->rq_pill, RCL_CLIENT); - return __ptlrpc_request_bufs_pack(request, version, opcode, count, - request->rq_pill.rc_area[RCL_CLIENT], - bufs, ctx); -} EXPORT_SYMBOL(ptlrpc_request_bufs_pack); /** -- 2.7.4 From green at linuxhacker.ru Mon Jun 20 02:07:27 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Sun, 19 Jun 2016 22:07:27 -0400 Subject: [lustre-devel] [PATCH 12/28] staging/lustre/llite: take trunc_sem only at vvp layer In-Reply-To: <1466388463-1817551-1-git-send-email-green@linuxhacker.ru> References: <1466388463-1817551-1-git-send-email-green@linuxhacker.ru> Message-ID: <1466388463-1817551-13-git-send-email-green@linuxhacker.ru> From: Patrick Farrell The lli_trunc_sem is taken in 'read' mode in both ll_page_mkwrite and vvp_io_fault_start. This can lead to a deadlock with another thread which asks for the semaphore in write mode between thse two read calls. Since all users of lli_trunc_sem are in the vvp layer, we can satisfy the requirement to exclude truncate by taking the semaphore only in vvp_io_fault_start. Signed-off-by: Patrick Farrell Reviewed-on: http://review.whamcloud.com/19315 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7981 Reviewed-by: Jinshan Xiong Reviewed-by: Andriy Skulysh Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/llite/llite_mmap.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/drivers/staging/lustre/lustre/llite/llite_mmap.c b/drivers/staging/lustre/lustre/llite/llite_mmap.c index fb1c3b6..66ee5db 100644 --- a/drivers/staging/lustre/lustre/llite/llite_mmap.c +++ b/drivers/staging/lustre/lustre/llite/llite_mmap.c @@ -196,18 +196,11 @@ static int ll_page_mkwrite0(struct vm_area_struct *vma, struct page *vmpage, set = cfs_block_sigsinv(sigmask(SIGKILL) | sigmask(SIGTERM)); - /* we grab lli_trunc_sem to exclude truncate case. - * Otherwise, we could add dirty pages into osc cache - * while truncate is on-going. - */ inode = vvp_object_inode(io->ci_obj); lli = ll_i2info(inode); - down_read(&lli->lli_trunc_sem); result = cl_io_loop(env, io); - up_read(&lli->lli_trunc_sem); - cfs_restore_sigs(set); if (result == 0) { -- 2.7.4 From green at linuxhacker.ru Mon Jun 20 02:07:28 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Sun, 19 Jun 2016 22:07:28 -0400 Subject: [lustre-devel] [PATCH 13/28] staging/lustre: LDLM_DEBUG() shouldn't be passed \n In-Reply-To: <1466388463-1817551-1-git-send-email-green@linuxhacker.ru> References: <1466388463-1817551-1-git-send-email-green@linuxhacker.ru> Message-ID: <1466388463-1817551-14-git-send-email-green@linuxhacker.ru> From: Alex Zhuravlev as it adds own \n, so any extra \n break log format. Signed-off-by: Alex Zhuravlev Reviewed-on: http://review.whamcloud.com/17494 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7521 Reviewed-by: James Simmons Reviewed-by: John L. Hammond Reviewed-by: Andreas Dilger Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/ldlm/ldlm_lock.c | 2 +- drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c | 3 ++- drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 2 +- drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | 2 +- drivers/staging/lustre/lustre/lov/lov_object.c | 4 ++-- drivers/staging/lustre/lustre/mdc/mdc_locks.c | 2 +- drivers/staging/lustre/lustre/osc/osc_cache.c | 4 ++-- drivers/staging/lustre/lustre/osc/osc_lock.c | 2 +- 8 files changed, 11 insertions(+), 10 deletions(-) diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c b/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c index 1ecdfa2..b7254eb 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c @@ -1440,7 +1440,7 @@ int ldlm_fill_lvb(struct ldlm_lock *lock, struct req_capsule *pill, memcpy(data, lvb, size); break; default: - LDLM_ERROR(lock, "Unknown LVB type: %d\n", lock->l_lvb_type); + LDLM_ERROR(lock, "Unknown LVB type: %d", lock->l_lvb_type); dump_stack(); return -EINVAL; } diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c b/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c index 3eab059..8294703 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c @@ -637,7 +637,8 @@ static int ldlm_callback_handler(struct ptlrpc_request *req) */ if ((ldlm_is_canceling(lock) && ldlm_is_bl_done(lock)) || ldlm_is_failed(lock)) { - LDLM_DEBUG(lock, "callback on lock %#llx - lock disappeared\n", + LDLM_DEBUG(lock, + "callback on lock %#llx - lock disappeared", dlm_req->lock_handle[0].cookie); unlock_res_and_lock(lock); LDLM_LOCK_RELEASE(lock); diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_request.c b/drivers/staging/lustre/lustre/ldlm/ldlm_request.c index 471ab08..d3a376e 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_request.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_request.c @@ -711,7 +711,7 @@ int ldlm_cli_enqueue(struct obd_export *exp, struct ptlrpc_request **reqp, lock->l_req_extent = policy->l_extent; } - LDLM_DEBUG(lock, "client-side enqueue START, flags %llx\n", + LDLM_DEBUG(lock, "client-side enqueue START, flags %llx", *flags); } diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c index f7c95b7..51a28d9 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c @@ -1275,7 +1275,7 @@ void ldlm_resource_add_lock(struct ldlm_resource *res, struct list_head *head, { check_res_locked(res); - LDLM_DEBUG(lock, "About to add this lock:\n"); + LDLM_DEBUG(lock, "About to add this lock:"); if (ldlm_is_destroyed(lock)) { CDEBUG(D_OTHER, "Lock destroyed, not adding to resource\n"); diff --git a/drivers/staging/lustre/lustre/lov/lov_object.c b/drivers/staging/lustre/lustre/lov/lov_object.c index ec55b88..f9621b0 100644 --- a/drivers/staging/lustre/lustre/lov/lov_object.c +++ b/drivers/staging/lustre/lustre/lov/lov_object.c @@ -181,8 +181,8 @@ static int lov_init_sub(const struct lu_env *env, struct lov_object *lov, } LU_OBJECT_DEBUG(mask, env, &stripe->co_lu, - "stripe %d is already owned.\n", idx); - LU_OBJECT_DEBUG(mask, env, old_obj, "owned.\n"); + "stripe %d is already owned.", idx); + LU_OBJECT_DEBUG(mask, env, old_obj, "owned."); LU_OBJECT_HEADER(mask, env, lov2lu(lov), "try to own.\n"); cl_object_put(env, stripe); } diff --git a/drivers/staging/lustre/lustre/mdc/mdc_locks.c b/drivers/staging/lustre/lustre/mdc/mdc_locks.c index b395420..19b549c 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_locks.c +++ b/drivers/staging/lustre/lustre/mdc/mdc_locks.c @@ -711,7 +711,7 @@ static int mdc_finish_enqueue(struct obd_export *exp, if (lock && ldlm_has_layout(lock) && lvb_data) { void *lmm; - LDLM_DEBUG(lock, "layout lock returned by: %s, lvb_len: %d\n", + LDLM_DEBUG(lock, "layout lock returned by: %s, lvb_len: %d", ldlm_it2str(it->it_op), lvb_len); lmm = libcfs_kvzalloc(lvb_len, GFP_NOFS); diff --git a/drivers/staging/lustre/lustre/osc/osc_cache.c b/drivers/staging/lustre/lustre/osc/osc_cache.c index 1a6df43..e3b9f9d 100644 --- a/drivers/staging/lustre/lustre/osc/osc_cache.c +++ b/drivers/staging/lustre/lustre/osc/osc_cache.c @@ -123,9 +123,9 @@ static const char *oes_strings[] = { /* ----- part 4 ----- */ \ ## __VA_ARGS__); \ if (lvl == D_ERROR && __ext->oe_dlmlock) \ - LDLM_ERROR(__ext->oe_dlmlock, "extent: %p\n", __ext); \ + LDLM_ERROR(__ext->oe_dlmlock, "extent: %p", __ext); \ else \ - LDLM_DEBUG(__ext->oe_dlmlock, "extent: %p\n", __ext); \ + LDLM_DEBUG(__ext->oe_dlmlock, "extent: %p", __ext); \ } while (0) #undef EASSERTF diff --git a/drivers/staging/lustre/lustre/osc/osc_lock.c b/drivers/staging/lustre/lustre/osc/osc_lock.c index 5455d9d..717d3ff 100644 --- a/drivers/staging/lustre/lustre/osc/osc_lock.c +++ b/drivers/staging/lustre/lustre/osc/osc_lock.c @@ -1168,7 +1168,7 @@ int osc_lock_init(const struct lu_env *env, osc_lock_set_writer(env, io, obj, oscl); - LDLM_DEBUG_NOLOCK("lock %p, osc lock %p, flags %llx\n", + LDLM_DEBUG_NOLOCK("lock %p, osc lock %p, flags %llx", lock, oscl, oscl->ols_flags); return 0; -- 2.7.4 From green at linuxhacker.ru Mon Jun 20 02:07:33 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Sun, 19 Jun 2016 22:07:33 -0400 Subject: [lustre-devel] [PATCH 18/28] staging/lustre/ldlm: const qualify struct lustre_handle * params In-Reply-To: <1466388463-1817551-1-git-send-email-green@linuxhacker.ru> References: <1466388463-1817551-1-git-send-email-green@linuxhacker.ru> Message-ID: <1466388463-1817551-19-git-send-email-green@linuxhacker.ru> From: "John L. Hammond" Add a const qualifier to several struct lustre_handle * parameters in the LDLM interface. Signed-off-by: John L. Hammond Reviewed-on: http://review.whamcloud.com/17071 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7403 Reviewed-by: Andreas Dilger Reviewed-by: James Simmons Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/include/lustre_dlm.h | 18 +++++++++--------- drivers/staging/lustre/lustre/ldlm/ldlm_lock.c | 14 +++++++------- drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c | 2 +- drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 4 ++-- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/drivers/staging/lustre/lustre/include/lustre_dlm.h b/drivers/staging/lustre/lustre/include/lustre_dlm.h index 63085a0..60051a5 100644 --- a/drivers/staging/lustre/lustre/include/lustre_dlm.h +++ b/drivers/staging/lustre/lustre/include/lustre_dlm.h @@ -1073,7 +1073,7 @@ void ldlm_lock2handle(const struct ldlm_lock *lock, struct ldlm_lock *__ldlm_handle2lock(const struct lustre_handle *, __u64 flags); void ldlm_cancel_callback(struct ldlm_lock *); int ldlm_lock_remove_from_lru(struct ldlm_lock *); -int ldlm_lock_set_data(struct lustre_handle *, void *); +int ldlm_lock_set_data(const struct lustre_handle *lockh, void *data); /** * Obtain a lock reference by its handle. @@ -1162,10 +1162,10 @@ do { \ struct ldlm_lock *ldlm_lock_get(struct ldlm_lock *lock); void ldlm_lock_put(struct ldlm_lock *lock); void ldlm_lock2desc(struct ldlm_lock *lock, struct ldlm_lock_desc *desc); -void ldlm_lock_addref(struct lustre_handle *lockh, __u32 mode); -int ldlm_lock_addref_try(struct lustre_handle *lockh, __u32 mode); -void ldlm_lock_decref(struct lustre_handle *lockh, __u32 mode); -void ldlm_lock_decref_and_cancel(struct lustre_handle *lockh, __u32 mode); +void ldlm_lock_addref(const struct lustre_handle *lockh, __u32 mode); +int ldlm_lock_addref_try(const struct lustre_handle *lockh, __u32 mode); +void ldlm_lock_decref(const struct lustre_handle *lockh, __u32 mode); +void ldlm_lock_decref_and_cancel(const struct lustre_handle *lockh, __u32 mode); void ldlm_lock_fail_match_locked(struct ldlm_lock *lock); void ldlm_lock_allow_match(struct ldlm_lock *lock); void ldlm_lock_allow_match_locked(struct ldlm_lock *lock); @@ -1174,10 +1174,10 @@ enum ldlm_mode ldlm_lock_match(struct ldlm_namespace *ns, __u64 flags, enum ldlm_type type, ldlm_policy_data_t *, enum ldlm_mode mode, struct lustre_handle *, int unref); -enum ldlm_mode ldlm_revalidate_lock_handle(struct lustre_handle *lockh, +enum ldlm_mode ldlm_revalidate_lock_handle(const struct lustre_handle *lockh, __u64 *bits); void ldlm_lock_cancel(struct ldlm_lock *lock); -void ldlm_lock_dump_handle(int level, struct lustre_handle *); +void ldlm_lock_dump_handle(int level, const struct lustre_handle *); void ldlm_unlink_lock_skiplist(struct ldlm_lock *req); /* resource.c */ @@ -1251,9 +1251,9 @@ int ldlm_cli_enqueue_fini(struct obd_export *exp, struct ptlrpc_request *req, enum ldlm_type type, __u8 with_policy, enum ldlm_mode mode, __u64 *flags, void *lvb, __u32 lvb_len, - struct lustre_handle *lockh, int rc); + const struct lustre_handle *lockh, int rc); int ldlm_cli_update_pool(struct ptlrpc_request *req); -int ldlm_cli_cancel(struct lustre_handle *lockh, +int ldlm_cli_cancel(const struct lustre_handle *lockh, enum ldlm_cancel_flags cancel_flags); int ldlm_cli_cancel_unused(struct ldlm_namespace *, const struct ldlm_res_id *, enum ldlm_cancel_flags flags, void *opaque); diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c b/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c index b7254eb..a5993f7 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c @@ -658,7 +658,7 @@ static void ldlm_add_ast_work_item(struct ldlm_lock *lock, * r/w reference type is determined by \a mode * Calls ldlm_lock_addref_internal. */ -void ldlm_lock_addref(struct lustre_handle *lockh, __u32 mode) +void ldlm_lock_addref(const struct lustre_handle *lockh, __u32 mode) { struct ldlm_lock *lock; @@ -700,7 +700,7 @@ void ldlm_lock_addref_internal_nolock(struct ldlm_lock *lock, __u32 mode) * * \retval -EAGAIN lock is being canceled. */ -int ldlm_lock_addref_try(struct lustre_handle *lockh, __u32 mode) +int ldlm_lock_addref_try(const struct lustre_handle *lockh, __u32 mode) { struct ldlm_lock *lock; int result; @@ -832,7 +832,7 @@ void ldlm_lock_decref_internal(struct ldlm_lock *lock, __u32 mode) /** * Decrease reader/writer refcount for LDLM lock with handle \a lockh */ -void ldlm_lock_decref(struct lustre_handle *lockh, __u32 mode) +void ldlm_lock_decref(const struct lustre_handle *lockh, __u32 mode) { struct ldlm_lock *lock = __ldlm_handle2lock(lockh, 0); @@ -849,7 +849,7 @@ EXPORT_SYMBOL(ldlm_lock_decref); * * Typical usage is for GROUP locks which we cannot allow to be cached. */ -void ldlm_lock_decref_and_cancel(struct lustre_handle *lockh, __u32 mode) +void ldlm_lock_decref_and_cancel(const struct lustre_handle *lockh, __u32 mode) { struct ldlm_lock *lock = __ldlm_handle2lock(lockh, 0); @@ -1318,7 +1318,7 @@ enum ldlm_mode ldlm_lock_match(struct ldlm_namespace *ns, __u64 flags, } EXPORT_SYMBOL(ldlm_lock_match); -enum ldlm_mode ldlm_revalidate_lock_handle(struct lustre_handle *lockh, +enum ldlm_mode ldlm_revalidate_lock_handle(const struct lustre_handle *lockh, __u64 *bits) { struct ldlm_lock *lock; @@ -1849,7 +1849,7 @@ EXPORT_SYMBOL(ldlm_lock_cancel); /** * Set opaque data into the lock that only makes sense to upper layer. */ -int ldlm_lock_set_data(struct lustre_handle *lockh, void *data) +int ldlm_lock_set_data(const struct lustre_handle *lockh, void *data) { struct ldlm_lock *lock = ldlm_handle2lock(lockh); int rc = -EINVAL; @@ -1875,7 +1875,7 @@ struct export_cl_data { * * Used when printing all locks on a resource for debug purposes. */ -void ldlm_lock_dump_handle(int level, struct lustre_handle *lockh) +void ldlm_lock_dump_handle(int level, const struct lustre_handle *lockh) { struct ldlm_lock *lock; diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c b/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c index 8294703..821939f 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c @@ -499,7 +499,7 @@ static int ldlm_handle_setinfo(struct ptlrpc_request *req) static inline void ldlm_callback_errmsg(struct ptlrpc_request *req, const char *msg, int rc, - struct lustre_handle *handle) + const struct lustre_handle *handle) { DEBUG_REQ((req->rq_no_reply || rc) ? D_WARNING : D_DLMTRACE, req, "%s: [nid %s] [rc %d] [lock %#llx]", diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_request.c b/drivers/staging/lustre/lustre/ldlm/ldlm_request.c index d3a376e..af487f9 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_request.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_request.c @@ -336,7 +336,7 @@ int ldlm_cli_enqueue_fini(struct obd_export *exp, struct ptlrpc_request *req, enum ldlm_type type, __u8 with_policy, enum ldlm_mode mode, __u64 *flags, void *lvb, __u32 lvb_len, - struct lustre_handle *lockh, int rc) + const struct lustre_handle *lockh, int rc) { struct ldlm_namespace *ns = exp->exp_obd->obd_namespace; int is_replay = *flags & LDLM_FL_REPLAY; @@ -1023,7 +1023,7 @@ EXPORT_SYMBOL(ldlm_cli_update_pool); * * Lock must not have any readers or writers by this time. */ -int ldlm_cli_cancel(struct lustre_handle *lockh, +int ldlm_cli_cancel(const struct lustre_handle *lockh, enum ldlm_cancel_flags cancel_flags) { struct obd_export *exp; -- 2.7.4 From green at linuxhacker.ru Mon Jun 20 02:07:35 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Sun, 19 Jun 2016 22:07:35 -0400 Subject: [lustre-devel] [PATCH 20/28] staging/lustre/mdc: Zero atime in close RPC In-Reply-To: <1466388463-1817551-1-git-send-email-green@linuxhacker.ru> References: <1466388463-1817551-1-git-send-email-green@linuxhacker.ru> Message-ID: <1466388463-1817551-21-git-send-email-green@linuxhacker.ru> From: Niu Yawei While atime on close is supposed to only increase, there's a bug in some older server versions where atime from a client is taken no matter the value that allows a stale client atime to overwrite a correct value. Update atime in close rpc to 0 to help such servers out. Signed-off-by: Niu Yawei Reviewed-on: http://review.whamcloud.com/19932 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8041 Reviewed-by: Andreas Dilger Reviewed-by: Jinshan Xiong Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/mdc/mdc_lib.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/staging/lustre/lustre/mdc/mdc_lib.c b/drivers/staging/lustre/lustre/mdc/mdc_lib.c index 2703113..143bd76 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_lib.c +++ b/drivers/staging/lustre/lustre/mdc/mdc_lib.c @@ -467,6 +467,18 @@ void mdc_close_pack(struct ptlrpc_request *req, struct md_op_data *op_data) rec = req_capsule_client_get(&req->rq_pill, &RMF_REC_REINT); mdc_setattr_pack_rec(rec, op_data); + /* + * The client will zero out local timestamps when losing the IBITS lock + * so any new RPC timestamps will update the client inode's timestamps. + * There was a defect on the server side which allowed the atime to be + * overwritten by a zeroed-out atime packed into the close RPC. + * + * Proactively clear the MDS_ATTR_ATIME flag in the RPC in this case + * to avoid zeroing the atime on old unpatched servers. See LU-8041. + */ + if (rec->sa_atime == 0) + rec->sa_valid &= ~MDS_ATTR_ATIME; + mdc_ioepoch_pack(epoch, op_data); mdc_hsm_release_pack(req, op_data); } -- 2.7.4 From green at linuxhacker.ru Mon Jun 20 02:07:34 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Sun, 19 Jun 2016 22:07:34 -0400 Subject: [lustre-devel] [PATCH 19/28] staging/lustre/llite: ensure obd is effective in onu_upcall In-Reply-To: <1466388463-1817551-1-git-send-email-green@linuxhacker.ru> References: <1466388463-1817551-1-git-send-email-green@linuxhacker.ru> Message-ID: <1466388463-1817551-20-git-send-email-green@linuxhacker.ru> From: Yang Sheng The watched obd device may still not setup while onu_upcall invoked. So we need verify it in cl_ocd_update. Signed-off-by: Yang Sheng Reviewed-on: http://review.whamcloud.com/19597 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8027 Reviewed-by: Niu Yawei Reviewed-by: Lai Siyao Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/llite/lcommon_misc.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/staging/lustre/lustre/llite/lcommon_misc.c b/drivers/staging/lustre/lustre/llite/lcommon_misc.c index 8a508ed..f6be105 100644 --- a/drivers/staging/lustre/lustre/llite/lcommon_misc.c +++ b/drivers/staging/lustre/lustre/llite/lcommon_misc.c @@ -96,7 +96,8 @@ int cl_ocd_update(struct obd_device *host, __u64 flags; int result; - if (!strcmp(watched->obd_type->typ_name, LUSTRE_OSC_NAME)) { + if (!strcmp(watched->obd_type->typ_name, LUSTRE_OSC_NAME) && + watched->obd_set_up && !watched->obd_stopping) { cli = &watched->u.cli; lco = owner; flags = cli->cl_import->imp_connect_data.ocd_connect_flags; @@ -111,9 +112,10 @@ int cl_ocd_update(struct obd_device *host, mutex_unlock(&lco->lco_lock); result = 0; } else { - CERROR("unexpected notification from %s %s!\n", + CERROR("unexpected notification from %s %s (setup:%d,stopping:%d)!\n", watched->obd_type->typ_name, - watched->obd_name); + watched->obd_name, watched->obd_set_up, + watched->obd_stopping); result = -EINVAL; } return result; -- 2.7.4 From green at linuxhacker.ru Mon Jun 20 02:07:36 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Sun, 19 Jun 2016 22:07:36 -0400 Subject: [lustre-devel] [PATCH 21/28] staging/lustre/o2ib: Don't access NULL NI on failure path In-Reply-To: <1466388463-1817551-1-git-send-email-green@linuxhacker.ru> References: <1466388463-1817551-1-git-send-email-green@linuxhacker.ru> Message-ID: <1466388463-1817551-22-git-send-email-green@linuxhacker.ru> From: Doug Oucharek In kiblnd_passive_connect(), if we are failing the connection attempt because we cannot find a valid NI (we have a NULL NI), we were coring after the "goto fail" because the failure path was assuming non-NULL NI. This patch ensures we don't dereference a NULL NI on that failure path. Signed-off-by: Doug Oucharek Reviewed-on: http://review.whamcloud.com/19614 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8022 Reviewed-by: Dmitry Eremin Reviewed-by: James Simmons Reviewed-by: Matt Ezell Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c index e32e43b..a585d22 100644 --- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c +++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c @@ -2525,12 +2525,14 @@ kiblnd_passive_connect(struct rdma_cm_id *cmid, void *priv, int priv_nob) return 0; failed: - if (ni) + if (ni) { lnet_ni_decref(ni); + rej.ibr_cp.ibcp_queue_depth = + kiblnd_msg_queue_size(version, ni); + rej.ibr_cp.ibcp_max_frags = kiblnd_rdma_frags(version, ni); + } rej.ibr_version = version; - rej.ibr_cp.ibcp_queue_depth = kiblnd_msg_queue_size(version, ni); - rej.ibr_cp.ibcp_max_frags = kiblnd_rdma_frags(version, ni); kiblnd_reject(cmid, &rej); return -ECONNREFUSED; -- 2.7.4 From green at linuxhacker.ru Mon Jun 20 02:07:37 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Sun, 19 Jun 2016 22:07:37 -0400 Subject: [lustre-devel] [PATCH 22/28] staging/lustre/llite: don't panic when fid is insane In-Reply-To: <1466388463-1817551-1-git-send-email-green@linuxhacker.ru> References: <1466388463-1817551-1-git-send-email-green@linuxhacker.ru> Message-ID: <1466388463-1817551-23-git-send-email-green@linuxhacker.ru> From: Sergey Cheremencev LASSERT should never be done on data that is received to over the network. Return EINVAL when server returns invalid fid despite of it_status == 0. Signed-off-by: Sergey Cheremencev Seagate-bug-id: MRP-3073 Reviewed-on: http://review.whamcloud.com/17985 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7422 Reviewed-by: John L. Hammond Reviewed-by: Andreas Dilger Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/llite/llite_lib.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/llite/llite_lib.c b/drivers/staging/lustre/lustre/llite/llite_lib.c index 539fdd1..118e41d 100644 --- a/drivers/staging/lustre/lustre/llite/llite_lib.c +++ b/drivers/staging/lustre/lustre/llite/llite_lib.c @@ -1971,7 +1971,13 @@ int ll_prep_inode(struct inode **inode, struct ptlrpc_request *req, * At this point server returns to client's same fid as client * generated for creating. So using ->fid1 is okay here. */ - LASSERT(fid_is_sane(&md.body->fid1)); + if (!fid_is_sane(&md.body->fid1)) { + CERROR("%s: Fid is insane " DFID "\n", + ll_get_fsname(sb, NULL, 0), + PFID(&md.body->fid1)); + rc = -EINVAL; + goto out; + } *inode = ll_iget(sb, cl_fid_build_ino(&md.body->fid1, sbi->ll_flags & LL_SBI_32BIT_API), -- 2.7.4 From green at linuxhacker.ru Mon Jun 20 02:07:32 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Sun, 19 Jun 2016 22:07:32 -0400 Subject: [lustre-devel] [PATCH 17/28] staging/lustre/llite: change it_data to it_request In-Reply-To: <1466388463-1817551-1-git-send-email-green@linuxhacker.ru> References: <1466388463-1817551-1-git-send-email-green@linuxhacker.ru> Message-ID: <1466388463-1817551-18-git-send-email-green@linuxhacker.ru> From: "John L. Hammond" Change the void *it_data member of struct lookup_intent to struct ptlrpc_request *it_request. Signed-off-by: John L. Hammond Reviewed-on: http://review.whamcloud.com/17070 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7403 Reviewed-by: Andreas Dilger Reviewed-by: James Simmons Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/include/lustre_intent.h | 2 +- drivers/staging/lustre/lustre/llite/dcache.c | 6 +++--- drivers/staging/lustre/lustre/llite/dir.c | 2 +- drivers/staging/lustre/lustre/llite/file.c | 17 ++++++++--------- drivers/staging/lustre/lustre/llite/namei.c | 2 +- drivers/staging/lustre/lustre/llite/xattr_cache.c | 2 +- drivers/staging/lustre/lustre/lmv/lmv_intent.c | 2 +- drivers/staging/lustre/lustre/lmv/lmv_obd.c | 4 ++-- drivers/staging/lustre/lustre/mdc/mdc_locks.c | 6 +++--- drivers/staging/lustre/lustre/mdc/mdc_request.c | 2 +- 10 files changed, 22 insertions(+), 23 deletions(-) diff --git a/drivers/staging/lustre/lustre/include/lustre_intent.h b/drivers/staging/lustre/lustre/include/lustre_intent.h index 3aed810..ed2b6c6 100644 --- a/drivers/staging/lustre/lustre/include/lustre_intent.h +++ b/drivers/staging/lustre/lustre/include/lustre_intent.h @@ -46,7 +46,7 @@ struct lookup_intent { int it_lock_mode; int it_remote_lock_mode; __u64 it_remote_lock_handle; - void *it_data; + struct ptlrpc_request *it_request; unsigned int it_lock_set:1; }; diff --git a/drivers/staging/lustre/lustre/llite/dcache.c b/drivers/staging/lustre/lustre/llite/dcache.c index c5789f7..d964f4f 100644 --- a/drivers/staging/lustre/lustre/llite/dcache.c +++ b/drivers/staging/lustre/lustre/llite/dcache.c @@ -233,13 +233,13 @@ void ll_intent_release(struct lookup_intent *it) ll_intent_drop_lock(it); /* We are still holding extra reference on a request, need to free it */ if (it_disposition(it, DISP_ENQ_OPEN_REF)) - ptlrpc_req_finished(it->it_data); /* ll_file_open */ + ptlrpc_req_finished(it->it_request); /* ll_file_open */ if (it_disposition(it, DISP_ENQ_CREATE_REF)) /* create rec */ - ptlrpc_req_finished(it->it_data); + ptlrpc_req_finished(it->it_request); it->it_disposition = 0; - it->it_data = NULL; + it->it_request = NULL; } void ll_invalidate_aliases(struct inode *inode) diff --git a/drivers/staging/lustre/lustre/llite/dir.c b/drivers/staging/lustre/lustre/llite/dir.c index a62df87..f0eb64b 100644 --- a/drivers/staging/lustre/lustre/llite/dir.c +++ b/drivers/staging/lustre/lustre/llite/dir.c @@ -362,7 +362,7 @@ struct page *ll_get_dir_page(struct inode *dir, __u64 hash, ll_finish_md_op_data(op_data); - request = (struct ptlrpc_request *)it.it_data; + request = (struct ptlrpc_request *)it.it_request; if (request) ptlrpc_req_finished(request); if (rc < 0) { diff --git a/drivers/staging/lustre/lustre/llite/file.c b/drivers/staging/lustre/lustre/llite/file.c index 92fab63..a188366 100644 --- a/drivers/staging/lustre/lustre/llite/file.c +++ b/drivers/staging/lustre/lustre/llite/file.c @@ -476,10 +476,9 @@ void ll_ioepoch_open(struct ll_inode_info *lli, __u64 ioepoch) static int ll_och_fill(struct obd_export *md_exp, struct lookup_intent *it, struct obd_client_handle *och) { - struct ptlrpc_request *req = it->it_data; struct mdt_body *body; - body = req_capsule_server_get(&req->rq_pill, &RMF_MDT_BODY); + body = req_capsule_server_get(&it->it_request->rq_pill, &RMF_MDT_BODY); och->och_fh = body->handle; och->och_fid = body->fid1; och->och_lease_handle.cookie = it->it_lock_handle; @@ -500,7 +499,6 @@ static int ll_local_open(struct file *file, struct lookup_intent *it, LASSERT(fd); if (och) { - struct ptlrpc_request *req = it->it_data; struct mdt_body *body; int rc; @@ -508,7 +506,8 @@ static int ll_local_open(struct file *file, struct lookup_intent *it, if (rc != 0) return rc; - body = req_capsule_server_get(&req->rq_pill, &RMF_MDT_BODY); + body = req_capsule_server_get(&it->it_request->rq_pill, + &RMF_MDT_BODY); ll_ioepoch_open(lli, body->ioepoch); } @@ -725,7 +724,7 @@ out_openerr: } if (it && it_disposition(it, DISP_ENQ_OPEN_REF)) { - ptlrpc_req_finished(it->it_data); + ptlrpc_req_finished(it->it_request); it_clear_disposition(it, DISP_ENQ_OPEN_REF); } @@ -1413,7 +1412,7 @@ out_unlock: out: return rc; out_req_free: - ptlrpc_req_finished((struct ptlrpc_request *)oit.it_data); + ptlrpc_req_finished((struct ptlrpc_request *)oit.it_request); goto out; } @@ -1701,7 +1700,7 @@ int ll_release_openhandle(struct inode *inode, struct lookup_intent *it) out: /* this one is in place of ll_file_open */ if (it_disposition(it, DISP_ENQ_OPEN_REF)) { - ptlrpc_req_finished(it->it_data); + ptlrpc_req_finished(it->it_request); it_clear_disposition(it, DISP_ENQ_OPEN_REF); } return rc; @@ -3610,8 +3609,8 @@ again: rc = md_enqueue(sbi->ll_md_exp, &einfo, &it, op_data, &lockh, NULL, 0, NULL, 0); - ptlrpc_req_finished(it.it_data); - it.it_data = NULL; + ptlrpc_req_finished(it.it_request); + it.it_request = NULL; ll_finish_md_op_data(op_data); diff --git a/drivers/staging/lustre/lustre/llite/namei.c b/drivers/staging/lustre/lustre/llite/namei.c index 7a6da02..3664bfd 100644 --- a/drivers/staging/lustre/lustre/llite/namei.c +++ b/drivers/staging/lustre/lustre/llite/namei.c @@ -659,7 +659,7 @@ static struct inode *ll_create_node(struct inode *dir, struct lookup_intent *it) LASSERT(it && it->it_disposition); LASSERT(it_disposition(it, DISP_ENQ_CREATE_REF)); - request = it->it_data; + request = it->it_request; it_clear_disposition(it, DISP_ENQ_CREATE_REF); rc = ll_prep_inode(&inode, request, dir->i_sb, it); if (rc) { diff --git a/drivers/staging/lustre/lustre/llite/xattr_cache.c b/drivers/staging/lustre/lustre/llite/xattr_cache.c index 0d19645..8089da8 100644 --- a/drivers/staging/lustre/lustre/llite/xattr_cache.c +++ b/drivers/staging/lustre/lustre/llite/xattr_cache.c @@ -315,7 +315,7 @@ static int ll_xattr_find_get_lock(struct inode *inode, return rc; } - *req = (struct ptlrpc_request *)oit->it_data; + *req = oit->it_request; out: down_write(&lli->lli_xattrs_list_rwsem); mutex_unlock(&lli->lli_xattrs_enq_lock); diff --git a/drivers/staging/lustre/lustre/lmv/lmv_intent.c b/drivers/staging/lustre/lustre/lmv/lmv_intent.c index b3cff23..2f58fda 100644 --- a/drivers/staging/lustre/lustre/lmv/lmv_intent.c +++ b/drivers/staging/lustre/lustre/lmv/lmv_intent.c @@ -84,7 +84,7 @@ static int lmv_intent_remote(struct obd_export *exp, void *lmm, if (pmode) { plock.cookie = it->it_lock_handle; it->it_lock_mode = 0; - it->it_data = NULL; + it->it_request = NULL; } LASSERT(fid_is_sane(&body->fid1)); diff --git a/drivers/staging/lustre/lustre/lmv/lmv_obd.c b/drivers/staging/lustre/lustre/lmv/lmv_obd.c index eb675fa..210ed1e 100644 --- a/drivers/staging/lustre/lustre/lmv/lmv_obd.c +++ b/drivers/staging/lustre/lustre/lmv/lmv_obd.c @@ -1679,7 +1679,7 @@ lmv_enqueue_remote(struct obd_export *exp, struct ldlm_enqueue_info *einfo, struct lustre_handle *lockh, void *lmm, int lmmsize, __u64 extra_lock_flags) { - struct ptlrpc_request *req = it->it_data; + struct ptlrpc_request *req = it->it_request; struct obd_device *obd = exp->exp_obd; struct lmv_obd *lmv = &obd->u.lmv; struct lustre_handle plock; @@ -1705,7 +1705,7 @@ lmv_enqueue_remote(struct obd_export *exp, struct ldlm_enqueue_info *einfo, LASSERT(pmode != 0); memcpy(&plock, lockh, sizeof(plock)); it->it_lock_mode = 0; - it->it_data = NULL; + it->it_request = NULL; fid1 = body->fid1; ptlrpc_req_finished(req); diff --git a/drivers/staging/lustre/lustre/mdc/mdc_locks.c b/drivers/staging/lustre/lustre/mdc/mdc_locks.c index c43b3a2..c1f8da6 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_locks.c +++ b/drivers/staging/lustre/lustre/mdc/mdc_locks.c @@ -570,7 +570,7 @@ static int mdc_finish_enqueue(struct obd_export *exp, it->it_status = (int)lockrep->lock_policy_res2; it->it_lock_mode = einfo->ei_mode; it->it_lock_handle = lockh->cookie; - it->it_data = req; + it->it_request = req; /* Technically speaking rq_transno must already be zero if * it_status is in error, so the check is a bit redundant @@ -902,7 +902,7 @@ resend: it->it_lock_handle = 0; it->it_lock_mode = 0; - it->it_data = NULL; + it->it_request = NULL; } return rc; @@ -1165,7 +1165,7 @@ int mdc_intent_lock(struct obd_export *exp, struct md_op_data *op_data, if (rc < 0) return rc; - *reqp = it->it_data; + *reqp = it->it_request; rc = mdc_finish_intent_lock(exp, *reqp, op_data, it, &lockh); return rc; } diff --git a/drivers/staging/lustre/lustre/mdc/mdc_request.c b/drivers/staging/lustre/lustre/mdc/mdc_request.c index 7f5dfb0..2622eb3 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_request.c +++ b/drivers/staging/lustre/lustre/mdc/mdc_request.c @@ -661,7 +661,7 @@ int mdc_set_open_replay_data(struct obd_export *exp, struct md_open_data *mod; struct mdt_rec_create *rec; struct mdt_body *body; - struct ptlrpc_request *open_req = it->it_data; + struct ptlrpc_request *open_req = it->it_request; struct obd_import *imp = open_req->rq_import; if (!open_req->rq_replay) -- 2.7.4 From green at linuxhacker.ru Mon Jun 20 02:07:29 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Sun, 19 Jun 2016 22:07:29 -0400 Subject: [lustre-devel] [PATCH 14/28] staging/lustre: Add newline to LU_OBJECT_DEBUG() message In-Reply-To: <1466388463-1817551-1-git-send-email-green@linuxhacker.ru> References: <1466388463-1817551-1-git-send-email-green@linuxhacker.ru> Message-ID: <1466388463-1817551-15-git-send-email-green@linuxhacker.ru> From: Bob Glossman LU_OBJECT_DEBUG expects non \n terminated message from the caller, so it should add it's own to keep debug logger happy. Signed-off-by: Bob Glossman Reviewed-on: http://review.whamcloud.com/19960 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8094 Reviewed-by: Andreas Dilger Reviewed-by: Alex Zhuravlev Reviewed-by: John L. Hammond Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/include/lu_object.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/include/lu_object.h b/drivers/staging/lustre/lustre/include/lu_object.h index c6281e6..6e25c1b 100644 --- a/drivers/staging/lustre/lustre/include/lu_object.h +++ b/drivers/staging/lustre/lustre/include/lu_object.h @@ -779,7 +779,7 @@ do { \ if (cfs_cdebug_show(mask, DEBUG_SUBSYSTEM)) { \ LIBCFS_DEBUG_MSG_DATA_DECL(msgdata, mask, NULL); \ lu_object_print(env, &msgdata, lu_cdebug_printer, object);\ - CDEBUG(mask, format, ## __VA_ARGS__); \ + CDEBUG(mask, format "\n", ## __VA_ARGS__); \ } \ } while (0) -- 2.7.4 From green at linuxhacker.ru Mon Jun 20 02:07:42 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Sun, 19 Jun 2016 22:07:42 -0400 Subject: [lustre-devel] [PATCH 27/28] staging/lustre: Add documentation for unstable_stats in sysfs In-Reply-To: <1466388463-1817551-1-git-send-email-green@linuxhacker.ru> References: <1466388463-1817551-1-git-send-email-green@linuxhacker.ru> Message-ID: <1466388463-1817551-28-git-send-email-green@linuxhacker.ru> commit ac5b14810952 ("staging: lustre: osc: Track and limit "unstable" pages") added a new sysfs variable, but corresponding bit of documentation was not forgotten. Signed-off-by: Oleg Drokin --- drivers/staging/lustre/sysfs-fs-lustre | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/staging/lustre/sysfs-fs-lustre b/drivers/staging/lustre/sysfs-fs-lustre index 873e2cf..20206ba 100644 --- a/drivers/staging/lustre/sysfs-fs-lustre +++ b/drivers/staging/lustre/sysfs-fs-lustre @@ -294,6 +294,14 @@ Description: Controls extended attributes client-side cache. 1 to enable, 0 to disable. +What: /sys/fs/lustre/llite/-/unstable_stats +Date: Apr 2016 +Contact: "Oleg Drokin" +Description: + Shows number of pages that were sent and acknowledged by + server but were not yet committed and therefore still + pinned in client memory even though no longer dirty. + What: /sys/fs/lustre/ldlm/cancel_unused_locks_before_replay Date: May 2015 Contact: "Oleg Drokin" -- 2.7.4 From green at linuxhacker.ru Mon Jun 20 02:07:43 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Sun, 19 Jun 2016 22:07:43 -0400 Subject: [lustre-devel] [PATCH 28/28] staging/lustre/osc: glimpse lock should match only with granted locks In-Reply-To: <1466388463-1817551-1-git-send-email-green@linuxhacker.ru> References: <1466388463-1817551-1-git-send-email-green@linuxhacker.ru> Message-ID: <1466388463-1817551-29-git-send-email-green@linuxhacker.ru> From: Andriy Skulysh A deadlock is possible during ccc_prep_size()->ldlm_lock_match() vs cl_io_lock() which is waiting for a matched lock and conflicts with already taken lock before ccc_prep_size(). It is better to send an additional lock request to avoid deadlock. Seagate-bug-id: MRP-3312 Signed-off-by: Andriy Skulysh Reviewed-on: http://review.whamcloud.com/18738 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7829 Reviewed-by: Jinshan Xiong Reviewed-by: Bobi Jam Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/osc/osc_request.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lustre/osc/osc_request.c b/drivers/staging/lustre/lustre/osc/osc_request.c index 9334349..536b868 100644 --- a/drivers/staging/lustre/lustre/osc/osc_request.c +++ b/drivers/staging/lustre/lustre/osc/osc_request.c @@ -2246,7 +2246,7 @@ int osc_enqueue_base(struct obd_export *exp, struct ldlm_res_id *res_id, struct lustre_handle lockh = { 0 }; struct ptlrpc_request *req = NULL; int intent = *flags & LDLM_FL_HAS_INTENT; - __u64 match_lvb = agl ? 0 : LDLM_FL_LVB_READY; + __u64 match_flags = *flags; enum ldlm_mode mode; int rc; @@ -2281,7 +2281,11 @@ int osc_enqueue_base(struct obd_export *exp, struct ldlm_res_id *res_id, mode = einfo->ei_mode; if (einfo->ei_mode == LCK_PR) mode |= LCK_PW; - mode = ldlm_lock_match(obd->obd_namespace, *flags | match_lvb, res_id, + if (agl == 0) + match_flags |= LDLM_FL_LVB_READY; + if (intent != 0) + match_flags |= LDLM_FL_BLOCK_GRANTED; + mode = ldlm_lock_match(obd->obd_namespace, match_flags, res_id, einfo->ei_type, policy, mode, &lockh, 0); if (mode) { struct ldlm_lock *matched; -- 2.7.4 From green at linuxhacker.ru Mon Jun 20 02:07:31 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Sun, 19 Jun 2016 22:07:31 -0400 Subject: [lustre-devel] [PATCH 16/28] staging/lustre: Inline Lustre intent disposition functions In-Reply-To: <1466388463-1817551-1-git-send-email-green@linuxhacker.ru> References: <1466388463-1817551-1-git-send-email-green@linuxhacker.ru> Message-ID: <1466388463-1817551-17-git-send-email-green@linuxhacker.ru> They are just one-liners, so no point in having them exported and called through a different module. Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/include/lustre_intent.h | 15 +++++++++++++++ drivers/staging/lustre/lustre/include/lustre_mdc.h | 3 --- drivers/staging/lustre/lustre/mdc/mdc_locks.c | 18 ------------------ 3 files changed, 15 insertions(+), 21 deletions(-) diff --git a/drivers/staging/lustre/lustre/include/lustre_intent.h b/drivers/staging/lustre/lustre/include/lustre_intent.h index 41c03d7..3aed810 100644 --- a/drivers/staging/lustre/lustre/include/lustre_intent.h +++ b/drivers/staging/lustre/lustre/include/lustre_intent.h @@ -50,4 +50,19 @@ struct lookup_intent { unsigned int it_lock_set:1; }; +static inline int it_disposition(struct lookup_intent *it, int flag) +{ + return it->it_disposition & flag; +} + +static inline void it_set_disposition(struct lookup_intent *it, int flag) +{ + it->it_disposition |= flag; +} + +static inline void it_clear_disposition(struct lookup_intent *it, int flag) +{ + it->it_disposition &= ~flag; +} + #endif diff --git a/drivers/staging/lustre/lustre/include/lustre_mdc.h b/drivers/staging/lustre/lustre/include/lustre_mdc.h index 0ef4226..fa62b95 100644 --- a/drivers/staging/lustre/lustre/include/lustre_mdc.h +++ b/drivers/staging/lustre/lustre/include/lustre_mdc.h @@ -185,9 +185,6 @@ struct mdc_cache_waiter { }; /* mdc/mdc_locks.c */ -int it_disposition(struct lookup_intent *it, int flag); -void it_clear_disposition(struct lookup_intent *it, int flag); -void it_set_disposition(struct lookup_intent *it, int flag); int it_open_error(int phase, struct lookup_intent *it); static inline bool cl_is_lov_delay_create(unsigned int flags) diff --git a/drivers/staging/lustre/lustre/mdc/mdc_locks.c b/drivers/staging/lustre/lustre/mdc/mdc_locks.c index 5da2a1e..c43b3a2 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_locks.c +++ b/drivers/staging/lustre/lustre/mdc/mdc_locks.c @@ -50,24 +50,6 @@ struct mdc_getattr_args { struct ldlm_enqueue_info *ga_einfo; }; -int it_disposition(struct lookup_intent *it, int flag) -{ - return it->it_disposition & flag; -} -EXPORT_SYMBOL(it_disposition); - -void it_set_disposition(struct lookup_intent *it, int flag) -{ - it->it_disposition |= flag; -} -EXPORT_SYMBOL(it_set_disposition); - -void it_clear_disposition(struct lookup_intent *it, int flag) -{ - it->it_disposition &= ~flag; -} -EXPORT_SYMBOL(it_clear_disposition); - int it_open_error(int phase, struct lookup_intent *it) { if (it_disposition(it, DISP_OPEN_LEASE)) { -- 2.7.4 From green at linuxhacker.ru Mon Jun 20 02:07:41 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Sun, 19 Jun 2016 22:07:41 -0400 Subject: [lustre-devel] [PATCH 26/28] staging/lustre/osc: fix signed one bit field In-Reply-To: <1466388463-1817551-1-git-send-email-green@linuxhacker.ru> References: <1466388463-1817551-1-git-send-email-green@linuxhacker.ru> Message-ID: <1466388463-1817551-27-git-send-email-green@linuxhacker.ru> From: Dmitry Eremin Bit field 'oi_lockless' and 'oi_is_active' has one bit and is signed which is confusing. Signed-off-by: Dmitry Eremin Reviewed-on: http://review.whamcloud.com/19196 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7258 Reviewed-by: Andreas Dilger Reviewed-by: James Simmons Reviewed-by: Frank Zago Reviewed-by: John L. Hammond Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/osc/osc_cl_internal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/osc/osc_cl_internal.h b/drivers/staging/lustre/lustre/osc/osc_cl_internal.h index 437c659..c8c3f1c 100644 --- a/drivers/staging/lustre/lustre/osc/osc_cl_internal.h +++ b/drivers/staging/lustre/lustre/osc/osc_cl_internal.h @@ -62,7 +62,7 @@ struct osc_io { /** super class */ struct cl_io_slice oi_cl; /** true if this io is lockless. */ - int oi_lockless; + unsigned int oi_lockless; /** how many LRU pages are reserved for this IO */ int oi_lru_reserved; -- 2.7.4 From green at linuxhacker.ru Mon Jun 20 02:07:40 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Sun, 19 Jun 2016 22:07:40 -0400 Subject: [lustre-devel] [PATCH 25/28] staging/lustre/llite: IOC_MDC_GETFILEINFO returns the wrong ino In-Reply-To: <1466388463-1817551-1-git-send-email-green@linuxhacker.ru> References: <1466388463-1817551-1-git-send-email-green@linuxhacker.ru> Message-ID: <1466388463-1817551-26-git-send-email-green@linuxhacker.ru> From: akam kumar bharathi req_capsule_server_get() through __req_capsule_get in ll_dir_ioctl() returns a pointer to a PTLRPC request or reply buffer, which is assigned to struct mdt_body. If the command is IOC_MDS_GETFILEINFO then the inode "st.st_ino" should be assigned from one extracted from mdt_body through cl_fid_build_ino(). Signed-off-by: John Hammond Signed-off-by: akam kumar bharathi Reviewed-on: http://review.whamcloud.com/17618 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5954 Reviewed-by: Andreas Dilger Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/llite/dir.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/llite/dir.c b/drivers/staging/lustre/lustre/llite/dir.c index f0eb64b..7e7425d 100644 --- a/drivers/staging/lustre/lustre/llite/dir.c +++ b/drivers/staging/lustre/lustre/llite/dir.c @@ -1528,7 +1528,9 @@ skip_lmm: st.st_atime = body->atime; st.st_mtime = body->mtime; st.st_ctime = body->ctime; - st.st_ino = inode->i_ino; + st.st_ino = cl_fid_build_ino(&body->fid1, + sbi->ll_flags & + LL_SBI_32BIT_API); lmdp = (struct lov_user_mds_data __user *)arg; if (copy_to_user(&lmdp->lmd_st, &st, sizeof(st))) { -- 2.7.4 From green at linuxhacker.ru Mon Jun 20 02:07:39 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Sun, 19 Jun 2016 22:07:39 -0400 Subject: [lustre-devel] [PATCH 24/28] staging/lustre/llite: ll_revalidate_dentry update In-Reply-To: <1466388463-1817551-1-git-send-email-green@linuxhacker.ru> References: <1466388463-1817551-1-git-send-email-green@linuxhacker.ru> Message-ID: <1466388463-1817551-25-git-send-email-green@linuxhacker.ru> From: Oleg Drokin There are a couple of cases in ll_revalidate_dentry() where we are pretty sure the dentry is valid, so check for them early and save more expensive checks for later. Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/llite/dcache.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/staging/lustre/lustre/llite/dcache.c b/drivers/staging/lustre/lustre/llite/dcache.c index d964f4f..581a63a 100644 --- a/drivers/staging/lustre/lustre/llite/dcache.c +++ b/drivers/staging/lustre/lustre/llite/dcache.c @@ -302,6 +302,17 @@ static int ll_revalidate_dentry(struct dentry *dentry, { struct inode *dir = d_inode(dentry->d_parent); + /* If this is intermediate component path lookup and we were able to get + * to this dentry, then its lock has not been revoked and the + * path component is valid. + */ + if (lookup_flags & LOOKUP_PARENT) + return 1; + + /* Symlink - always valid as long as the dentry was found */ + if (dentry->d_inode && S_ISLNK(dentry->d_inode->i_mode)) + return 1; + /* * if open&create is set, talk to MDS to make sure file is created if * necessary, because we can't do this in ->open() later since that's -- 2.7.4 From green at linuxhacker.ru Mon Jun 20 02:07:30 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Sun, 19 Jun 2016 22:07:30 -0400 Subject: [lustre-devel] [PATCH 15/28] staging/lustre/llite: flatten struct lookup_intent In-Reply-To: <1466388463-1817551-1-git-send-email-green@linuxhacker.ru> References: <1466388463-1817551-1-git-send-email-green@linuxhacker.ru> Message-ID: <1466388463-1817551-16-git-send-email-green@linuxhacker.ru> From: "John L. Hammond" Replace the union in struct lookup_intent with the members of struct lustre_indent_data. Remove the then unused struct lustre_intent_data. Signed-off-by: John L. Hammond Reviewed-on: http://review.whamcloud.com/17069 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7403 Reviewed-by: James Simmons Reviewed-by: Dmitry Eremin Reviewed-by: Frank Zago Signed-off-by: Oleg Drokin --- .../staging/lustre/lustre/include/lustre_intent.h | 15 ++-- drivers/staging/lustre/lustre/llite/dcache.c | 26 +++---- drivers/staging/lustre/lustre/llite/dir.c | 4 +- drivers/staging/lustre/lustre/llite/file.c | 44 ++++++------ .../staging/lustre/lustre/llite/llite_internal.h | 14 ++-- drivers/staging/lustre/lustre/llite/llite_lib.c | 4 +- drivers/staging/lustre/lustre/llite/namei.c | 8 +-- drivers/staging/lustre/lustre/llite/statahead.c | 10 +-- drivers/staging/lustre/lustre/llite/xattr_cache.c | 16 ++--- drivers/staging/lustre/lustre/lmv/lmv_intent.c | 26 +++---- drivers/staging/lustre/lustre/lmv/lmv_obd.c | 8 +-- drivers/staging/lustre/lustre/mdc/mdc_locks.c | 79 +++++++++++----------- drivers/staging/lustre/lustre/mdc/mdc_request.c | 2 +- 13 files changed, 125 insertions(+), 131 deletions(-) diff --git a/drivers/staging/lustre/lustre/include/lustre_intent.h b/drivers/staging/lustre/lustre/include/lustre_intent.h index fdc6236..41c03d7 100644 --- a/drivers/staging/lustre/lustre/include/lustre_intent.h +++ b/drivers/staging/lustre/lustre/include/lustre_intent.h @@ -34,7 +34,11 @@ #define LUSTRE_INTENT_H /* intent IT_XXX are defined in lustre/include/obd.h */ -struct lustre_intent_data { + +struct lookup_intent { + int it_op; + int it_create_mode; + __u64 it_flags; int it_disposition; int it_status; __u64 it_lock_handle; @@ -46,13 +50,4 @@ struct lustre_intent_data { unsigned int it_lock_set:1; }; -struct lookup_intent { - int it_op; - int it_create_mode; - __u64 it_flags; - union { - struct lustre_intent_data lustre; - } d; -}; - #endif diff --git a/drivers/staging/lustre/lustre/llite/dcache.c b/drivers/staging/lustre/lustre/llite/dcache.c index f002b3a..c5789f7 100644 --- a/drivers/staging/lustre/lustre/llite/dcache.c +++ b/drivers/staging/lustre/lustre/llite/dcache.c @@ -202,27 +202,27 @@ int ll_d_init(struct dentry *de) void ll_intent_drop_lock(struct lookup_intent *it) { - if (it->it_op && it->d.lustre.it_lock_mode) { + if (it->it_op && it->it_lock_mode) { struct lustre_handle handle; - handle.cookie = it->d.lustre.it_lock_handle; + handle.cookie = it->it_lock_handle; CDEBUG(D_DLMTRACE, "releasing lock with cookie %#llx from it %p\n", handle.cookie, it); - ldlm_lock_decref(&handle, it->d.lustre.it_lock_mode); + ldlm_lock_decref(&handle, it->it_lock_mode); /* bug 494: intent_release may be called multiple times, from * this thread and we don't want to double-decref this lock */ - it->d.lustre.it_lock_mode = 0; - if (it->d.lustre.it_remote_lock_mode != 0) { - handle.cookie = it->d.lustre.it_remote_lock_handle; + it->it_lock_mode = 0; + if (it->it_remote_lock_mode != 0) { + handle.cookie = it->it_remote_lock_handle; CDEBUG(D_DLMTRACE, "releasing remote lock with cookie%#llx from it %p\n", handle.cookie, it); ldlm_lock_decref(&handle, - it->d.lustre.it_remote_lock_mode); - it->d.lustre.it_remote_lock_mode = 0; + it->it_remote_lock_mode); + it->it_remote_lock_mode = 0; } } } @@ -233,13 +233,13 @@ void ll_intent_release(struct lookup_intent *it) ll_intent_drop_lock(it); /* We are still holding extra reference on a request, need to free it */ if (it_disposition(it, DISP_ENQ_OPEN_REF)) - ptlrpc_req_finished(it->d.lustre.it_data); /* ll_file_open */ + ptlrpc_req_finished(it->it_data); /* ll_file_open */ if (it_disposition(it, DISP_ENQ_CREATE_REF)) /* create rec */ - ptlrpc_req_finished(it->d.lustre.it_data); + ptlrpc_req_finished(it->it_data); - it->d.lustre.it_disposition = 0; - it->d.lustre.it_data = NULL; + it->it_disposition = 0; + it->it_data = NULL; } void ll_invalidate_aliases(struct inode *inode) @@ -279,7 +279,7 @@ int ll_revalidate_it_finish(struct ptlrpc_request *request, void ll_lookup_finish_locks(struct lookup_intent *it, struct inode *inode) { - if (it->d.lustre.it_lock_mode && inode) { + if (it->it_lock_mode && inode) { struct ll_sb_info *sbi = ll_i2sbi(inode); CDEBUG(D_DLMTRACE, "setting l_data to inode "DFID"(%p)\n", diff --git a/drivers/staging/lustre/lustre/llite/dir.c b/drivers/staging/lustre/lustre/llite/dir.c index 99735f6..a62df87 100644 --- a/drivers/staging/lustre/lustre/llite/dir.c +++ b/drivers/staging/lustre/lustre/llite/dir.c @@ -362,7 +362,7 @@ struct page *ll_get_dir_page(struct inode *dir, __u64 hash, ll_finish_md_op_data(op_data); - request = (struct ptlrpc_request *)it.d.lustre.it_data; + request = (struct ptlrpc_request *)it.it_data; if (request) ptlrpc_req_finished(request); if (rc < 0) { @@ -374,7 +374,7 @@ struct page *ll_get_dir_page(struct inode *dir, __u64 hash, CDEBUG(D_INODE, "setting lr_lvb_inode to inode "DFID"(%p)\n", PFID(ll_inode2fid(dir)), dir); md_set_lock_data(ll_i2sbi(dir)->ll_md_exp, - &it.d.lustre.it_lock_handle, dir, NULL); + &it.it_lock_handle, dir, NULL); } else { /* for cross-ref object, l_ast_data of the lock may not be set, * we reset it here diff --git a/drivers/staging/lustre/lustre/llite/file.c b/drivers/staging/lustre/lustre/llite/file.c index 5436a54..92fab63 100644 --- a/drivers/staging/lustre/lustre/llite/file.c +++ b/drivers/staging/lustre/lustre/llite/file.c @@ -449,7 +449,7 @@ static int ll_intent_file_open(struct dentry *dentry, void *lmm, } rc = ll_prep_inode(&inode, req, NULL, itp); - if (!rc && itp->d.lustre.it_lock_mode) + if (!rc && itp->it_lock_mode) ll_set_lock_data(sbi->ll_md_exp, inode, itp, NULL); out: @@ -476,13 +476,13 @@ void ll_ioepoch_open(struct ll_inode_info *lli, __u64 ioepoch) static int ll_och_fill(struct obd_export *md_exp, struct lookup_intent *it, struct obd_client_handle *och) { - struct ptlrpc_request *req = it->d.lustre.it_data; + struct ptlrpc_request *req = it->it_data; struct mdt_body *body; body = req_capsule_server_get(&req->rq_pill, &RMF_MDT_BODY); och->och_fh = body->handle; och->och_fid = body->fid1; - och->och_lease_handle.cookie = it->d.lustre.it_lock_handle; + och->och_lease_handle.cookie = it->it_lock_handle; och->och_magic = OBD_CLIENT_HANDLE_MAGIC; och->och_flags = it->it_flags; @@ -500,7 +500,7 @@ static int ll_local_open(struct file *file, struct lookup_intent *it, LASSERT(fd); if (och) { - struct ptlrpc_request *req = it->d.lustre.it_data; + struct ptlrpc_request *req = it->it_data; struct mdt_body *body; int rc; @@ -575,7 +575,7 @@ int ll_file_open(struct inode *inode, struct file *file) return 0; } - if (!it || !it->d.lustre.it_disposition) { + if (!it || !it->it_disposition) { /* Convert f_flags into access mode. We cannot use file->f_mode, * because everything but O_ACCMODE mask was stripped from * there @@ -645,7 +645,7 @@ restart: } } else { LASSERT(*och_usecount == 0); - if (!it->d.lustre.it_disposition) { + if (!it->it_disposition) { /* We cannot just request lock handle now, new ELC code * means that one of other OPEN locks for this file * could be cancelled, and since blocking ast handler @@ -682,7 +682,7 @@ restart: LASSERTF(it_disposition(it, DISP_ENQ_OPEN_REF), "inode %p: disposition %x, status %d\n", inode, - it_disposition(it, ~0), it->d.lustre.it_status); + it_disposition(it, ~0), it->it_status); rc = ll_local_open(file, it, fd, *och_p); if (rc) @@ -725,7 +725,7 @@ out_openerr: } if (it && it_disposition(it, DISP_ENQ_OPEN_REF)) { - ptlrpc_req_finished(it->d.lustre.it_data); + ptlrpc_req_finished(it->it_data); it_clear_disposition(it, DISP_ENQ_OPEN_REF); } @@ -866,12 +866,12 @@ ll_lease_open(struct inode *inode, struct file *file, fmode_t fmode, /* already get lease, handle lease lock */ ll_set_lock_data(sbi->ll_md_exp, inode, &it, NULL); - if (it.d.lustre.it_lock_mode == 0 || - it.d.lustre.it_lock_bits != MDS_INODELOCK_OPEN) { + if (it.it_lock_mode == 0 || + it.it_lock_bits != MDS_INODELOCK_OPEN) { /* open lock must return for lease */ CERROR(DFID "lease granted but no open lock, %d/%llu.\n", - PFID(ll_inode2fid(inode)), it.d.lustre.it_lock_mode, - it.d.lustre.it_lock_bits); + PFID(ll_inode2fid(inode)), it.it_lock_mode, + it.it_lock_bits); rc = -EPROTO; goto out_close; } @@ -881,10 +881,10 @@ ll_lease_open(struct inode *inode, struct file *file, fmode_t fmode, out_close: /* Cancel open lock */ - if (it.d.lustre.it_lock_mode != 0) { + if (it.it_lock_mode != 0) { ldlm_lock_decref_and_cancel(&och->och_lease_handle, - it.d.lustre.it_lock_mode); - it.d.lustre.it_lock_mode = 0; + it.it_lock_mode); + it.it_lock_mode = 0; och->och_lease_handle.cookie = 0ULL; } rc2 = ll_close_inode_openhandle(sbi->ll_md_exp, inode, och, NULL); @@ -1400,7 +1400,7 @@ int ll_lov_setstripe_ea_info(struct inode *inode, struct dentry *dentry, rc = ll_intent_file_open(dentry, lum, lum_size, &oit); if (rc) goto out_unlock; - rc = oit.d.lustre.it_status; + rc = oit.it_status; if (rc < 0) goto out_req_free; @@ -1413,7 +1413,7 @@ out_unlock: out: return rc; out_req_free: - ptlrpc_req_finished((struct ptlrpc_request *)oit.d.lustre.it_data); + ptlrpc_req_finished((struct ptlrpc_request *)oit.it_data); goto out; } @@ -1701,7 +1701,7 @@ int ll_release_openhandle(struct inode *inode, struct lookup_intent *it) out: /* this one is in place of ll_file_open */ if (it_disposition(it, DISP_ENQ_OPEN_REF)) { - ptlrpc_req_finished(it->d.lustre.it_data); + ptlrpc_req_finished(it->it_data); it_clear_disposition(it, DISP_ENQ_OPEN_REF); } return rc; @@ -3610,13 +3610,13 @@ again: rc = md_enqueue(sbi->ll_md_exp, &einfo, &it, op_data, &lockh, NULL, 0, NULL, 0); - ptlrpc_req_finished(it.d.lustre.it_data); - it.d.lustre.it_data = NULL; + ptlrpc_req_finished(it.it_data); + it.it_data = NULL; ll_finish_md_op_data(op_data); - mode = it.d.lustre.it_lock_mode; - it.d.lustre.it_lock_mode = 0; + mode = it.it_lock_mode; + it.it_lock_mode = 0; ll_intent_drop_lock(&it); if (rc == 0) { diff --git a/drivers/staging/lustre/lustre/llite/llite_internal.h b/drivers/staging/lustre/lustre/llite/llite_internal.h index 098155f..3692102 100644 --- a/drivers/staging/lustre/lustre/llite/llite_internal.h +++ b/drivers/staging/lustre/lustre/llite/llite_internal.h @@ -1280,7 +1280,7 @@ static inline int ll_file_nolock(const struct file *file) static inline void ll_set_lock_data(struct obd_export *exp, struct inode *inode, struct lookup_intent *it, __u64 *bits) { - if (!it->d.lustre.it_lock_set) { + if (!it->it_lock_set) { struct lustre_handle handle; /* If this inode is a remote object, it will get two @@ -1291,26 +1291,26 @@ static inline void ll_set_lock_data(struct obd_export *exp, struct inode *inode, * LOOKUP and PERM locks, so revoking either locks will * case the dcache being cleared */ - if (it->d.lustre.it_remote_lock_mode) { - handle.cookie = it->d.lustre.it_remote_lock_handle; + if (it->it_remote_lock_mode) { + handle.cookie = it->it_remote_lock_handle; CDEBUG(D_DLMTRACE, "setting l_data to inode "DFID"%p for remote lock %#llx\n", PFID(ll_inode2fid(inode)), inode, handle.cookie); md_set_lock_data(exp, &handle.cookie, inode, NULL); } - handle.cookie = it->d.lustre.it_lock_handle; + handle.cookie = it->it_lock_handle; CDEBUG(D_DLMTRACE, "setting l_data to inode "DFID"%p for lock %#llx\n", PFID(ll_inode2fid(inode)), inode, handle.cookie); md_set_lock_data(exp, &handle.cookie, inode, - &it->d.lustre.it_lock_bits); - it->d.lustre.it_lock_set = 1; + &it->it_lock_bits); + it->it_lock_set = 1; } if (bits) - *bits = it->d.lustre.it_lock_bits; + *bits = it->it_lock_bits; } static inline int d_lustre_invalid(const struct dentry *dentry) diff --git a/drivers/staging/lustre/lustre/llite/llite_lib.c b/drivers/staging/lustre/lustre/llite/llite_lib.c index 83f4e1a..539fdd1 100644 --- a/drivers/staging/lustre/lustre/llite/llite_lib.c +++ b/drivers/staging/lustre/lustre/llite/llite_lib.c @@ -1998,11 +1998,11 @@ int ll_prep_inode(struct inode **inode, struct ptlrpc_request *req, * 3. proc2: refresh layout and layout lock granted * 4. proc1: to apply a stale layout */ - if (it && it->d.lustre.it_lock_mode != 0) { + if (it && it->it_lock_mode != 0) { struct lustre_handle lockh; struct ldlm_lock *lock; - lockh.cookie = it->d.lustre.it_lock_handle; + lockh.cookie = it->it_lock_handle; lock = ldlm_handle2lock(&lockh); LASSERT(lock); if (ldlm_has_layout(lock)) { diff --git a/drivers/staging/lustre/lustre/llite/namei.c b/drivers/staging/lustre/lustre/llite/namei.c index e4df510..7a6da02 100644 --- a/drivers/staging/lustre/lustre/llite/namei.c +++ b/drivers/staging/lustre/lustre/llite/namei.c @@ -393,7 +393,7 @@ static int ll_lookup_it_finish(struct ptlrpc_request *request, * when I return */ CDEBUG(D_DENTRY, "it %p it_disposition %x\n", it, - it->d.lustre.it_disposition); + it->it_disposition); if (!it_disposition(it, DISP_LOOKUP_NEG)) { rc = ll_prep_inode(&inode, request, (*de)->d_sb, it); if (rc) @@ -445,7 +445,7 @@ static int ll_lookup_it_finish(struct ptlrpc_request *request, /* Check that parent has UPDATE lock. */ struct lookup_intent parent_it = { .it_op = IT_GETATTR, - .d.lustre.it_lock_handle = 0 }; + .it_lock_handle = 0 }; if (md_revalidate_lock(ll_i2mdexp(parent), &parent_it, &ll_i2info(parent)->lli_fid, NULL)) { @@ -656,10 +656,10 @@ static struct inode *ll_create_node(struct inode *dir, struct lookup_intent *it) struct ll_sb_info *sbi = ll_i2sbi(dir); int rc; - LASSERT(it && it->d.lustre.it_disposition); + LASSERT(it && it->it_disposition); LASSERT(it_disposition(it, DISP_ENQ_CREATE_REF)); - request = it->d.lustre.it_data; + request = it->it_data; it_clear_disposition(it, DISP_ENQ_CREATE_REF); rc = ll_prep_inode(&inode, request, dir->i_sb, it); if (rc) { diff --git a/drivers/staging/lustre/lustre/llite/statahead.c b/drivers/staging/lustre/lustre/llite/statahead.c index 03ad858..f775242 100644 --- a/drivers/staging/lustre/lustre/llite/statahead.c +++ b/drivers/staging/lustre/lustre/llite/statahead.c @@ -646,7 +646,7 @@ static void ll_post_statahead(struct ll_statahead_info *sai) } } - it->d.lustre.it_lock_handle = entry->se_handle; + it->it_lock_handle = entry->se_handle; rc = md_revalidate_lock(ll_i2mdexp(dir), it, ll_inode2fid(dir), NULL); if (rc != 1) { rc = -EAGAIN; @@ -700,7 +700,7 @@ static int ll_statahead_interpret(struct ptlrpc_request *req, * process enqueues lock on child with parent lock held, eg. * unlink. */ - handle = it->d.lustre.it_lock_handle; + handle = it->it_lock_handle; ll_intent_drop_lock(it); } @@ -850,7 +850,7 @@ static int do_sa_revalidate(struct inode *dir, struct ll_sa_entry *entry, { struct inode *inode = d_inode(dentry); struct lookup_intent it = { .it_op = IT_GETATTR, - .d.lustre.it_lock_handle = 0 }; + .it_lock_handle = 0 }; struct md_enqueue_info *minfo; struct ldlm_enqueue_info *einfo; int rc; @@ -865,7 +865,7 @@ static int do_sa_revalidate(struct inode *dir, struct ll_sa_entry *entry, rc = md_revalidate_lock(ll_i2mdexp(dir), &it, ll_inode2fid(inode), NULL); if (rc == 1) { - entry->se_handle = it.d.lustre.it_lock_handle; + entry->se_handle = it.it_lock_handle; ll_intent_release(&it); return 1; } @@ -1569,7 +1569,7 @@ int do_statahead_enter(struct inode *dir, struct dentry **dentryp, if (entry->se_stat == SA_ENTRY_SUCC && entry->se_inode) { struct inode *inode = entry->se_inode; struct lookup_intent it = { .it_op = IT_GETATTR, - .d.lustre.it_lock_handle = + .it_lock_handle = entry->se_handle }; __u64 bits; diff --git a/drivers/staging/lustre/lustre/llite/xattr_cache.c b/drivers/staging/lustre/lustre/llite/xattr_cache.c index d7e17ab..0d19645 100644 --- a/drivers/staging/lustre/lustre/llite/xattr_cache.c +++ b/drivers/staging/lustre/lustre/llite/xattr_cache.c @@ -288,8 +288,8 @@ static int ll_xattr_find_get_lock(struct inode *inode, LCK_PR); if (mode != 0) { /* fake oit in mdc_revalidate_lock() manner */ - oit->d.lustre.it_lock_handle = lockh.cookie; - oit->d.lustre.it_lock_mode = mode; + oit->it_lock_handle = lockh.cookie; + oit->it_lock_mode = mode; goto out; } } @@ -315,7 +315,7 @@ static int ll_xattr_find_get_lock(struct inode *inode, return rc; } - *req = (struct ptlrpc_request *)oit->d.lustre.it_data; + *req = (struct ptlrpc_request *)oit->it_data; out: down_write(&lli->lli_xattrs_list_rwsem); mutex_unlock(&lli->lli_xattrs_enq_lock); @@ -362,10 +362,10 @@ static int ll_xattr_cache_refill(struct inode *inode, struct lookup_intent *oit) goto out_maybe_drop; } - if (oit->d.lustre.it_status < 0) { + if (oit->it_status < 0) { CDEBUG(D_CACHE, "getxattr intent returned %d for fid "DFID"\n", - oit->d.lustre.it_status, PFID(ll_inode2fid(inode))); - rc = oit->d.lustre.it_status; + oit->it_status, PFID(ll_inode2fid(inode))); + rc = oit->it_status; /* xattr data is so large that we don't want to cache it */ if (rc == -ERANGE) rc = -EAGAIN; @@ -448,8 +448,8 @@ out_destroy: up_write(&lli->lli_xattrs_list_rwsem); ldlm_lock_decref_and_cancel((struct lustre_handle *) - &oit->d.lustre.it_lock_handle, - oit->d.lustre.it_lock_mode); + &oit->it_lock_handle, + oit->it_lock_mode); goto out_no_unlock; } diff --git a/drivers/staging/lustre/lustre/lmv/lmv_intent.c b/drivers/staging/lustre/lustre/lmv/lmv_intent.c index 980c9d4..b3cff23 100644 --- a/drivers/staging/lustre/lustre/lmv/lmv_intent.c +++ b/drivers/staging/lustre/lustre/lmv/lmv_intent.c @@ -80,11 +80,11 @@ static int lmv_intent_remote(struct obd_export *exp, void *lmm, /* * We got LOOKUP lock, but we really need attrs. */ - pmode = it->d.lustre.it_lock_mode; + pmode = it->it_lock_mode; if (pmode) { - plock.cookie = it->d.lustre.it_lock_handle; - it->d.lustre.it_lock_mode = 0; - it->d.lustre.it_data = NULL; + plock.cookie = it->it_lock_handle; + it->it_lock_mode = 0; + it->it_data = NULL; } LASSERT(fid_is_sane(&body->fid1)); @@ -130,14 +130,14 @@ static int lmv_intent_remote(struct obd_export *exp, void *lmm, * maintain dcache consistency. Thus drop UPDATE|PERM lock here * and put LOOKUP in request. */ - if (it->d.lustre.it_lock_mode != 0) { - it->d.lustre.it_remote_lock_handle = - it->d.lustre.it_lock_handle; - it->d.lustre.it_remote_lock_mode = it->d.lustre.it_lock_mode; + if (it->it_lock_mode != 0) { + it->it_remote_lock_handle = + it->it_lock_handle; + it->it_remote_lock_mode = it->it_lock_mode; } - it->d.lustre.it_lock_handle = plock.cookie; - it->d.lustre.it_lock_mode = pmode; + it->it_lock_handle = plock.cookie; + it->it_lock_mode = pmode; out_free_op_data: kfree(op_data); @@ -197,9 +197,9 @@ static int lmv_intent_open(struct obd_export *exp, struct md_op_data *op_data, * Nothing is found, do not access body->fid1 as it is zero and thus * pointless. */ - if ((it->d.lustre.it_disposition & DISP_LOOKUP_NEG) && - !(it->d.lustre.it_disposition & DISP_OPEN_CREATE) && - !(it->d.lustre.it_disposition & DISP_OPEN_OPEN)) + if ((it->it_disposition & DISP_LOOKUP_NEG) && + !(it->it_disposition & DISP_OPEN_CREATE) && + !(it->it_disposition & DISP_OPEN_OPEN)) return rc; body = req_capsule_server_get(&(*reqp)->rq_pill, &RMF_MDT_BODY); diff --git a/drivers/staging/lustre/lustre/lmv/lmv_obd.c b/drivers/staging/lustre/lustre/lmv/lmv_obd.c index ab4f4fb..eb675fa 100644 --- a/drivers/staging/lustre/lustre/lmv/lmv_obd.c +++ b/drivers/staging/lustre/lustre/lmv/lmv_obd.c @@ -1679,7 +1679,7 @@ lmv_enqueue_remote(struct obd_export *exp, struct ldlm_enqueue_info *einfo, struct lustre_handle *lockh, void *lmm, int lmmsize, __u64 extra_lock_flags) { - struct ptlrpc_request *req = it->d.lustre.it_data; + struct ptlrpc_request *req = it->it_data; struct obd_device *obd = exp->exp_obd; struct lmv_obd *lmv = &obd->u.lmv; struct lustre_handle plock; @@ -1701,11 +1701,11 @@ lmv_enqueue_remote(struct obd_export *exp, struct ldlm_enqueue_info *einfo, /* * We got LOOKUP lock, but we really need attrs. */ - pmode = it->d.lustre.it_lock_mode; + pmode = it->it_lock_mode; LASSERT(pmode != 0); memcpy(&plock, lockh, sizeof(plock)); - it->d.lustre.it_lock_mode = 0; - it->d.lustre.it_data = NULL; + it->it_lock_mode = 0; + it->it_data = NULL; fid1 = body->fid1; ptlrpc_req_finished(req); diff --git a/drivers/staging/lustre/lustre/mdc/mdc_locks.c b/drivers/staging/lustre/lustre/mdc/mdc_locks.c index 19b549c..5da2a1e 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_locks.c +++ b/drivers/staging/lustre/lustre/mdc/mdc_locks.c @@ -52,19 +52,19 @@ struct mdc_getattr_args { int it_disposition(struct lookup_intent *it, int flag) { - return it->d.lustre.it_disposition & flag; + return it->it_disposition & flag; } EXPORT_SYMBOL(it_disposition); void it_set_disposition(struct lookup_intent *it, int flag) { - it->d.lustre.it_disposition |= flag; + it->it_disposition |= flag; } EXPORT_SYMBOL(it_set_disposition); void it_clear_disposition(struct lookup_intent *it, int flag) { - it->d.lustre.it_disposition &= ~flag; + it->it_disposition &= ~flag; } EXPORT_SYMBOL(it_clear_disposition); @@ -72,39 +72,39 @@ int it_open_error(int phase, struct lookup_intent *it) { if (it_disposition(it, DISP_OPEN_LEASE)) { if (phase >= DISP_OPEN_LEASE) - return it->d.lustre.it_status; + return it->it_status; else return 0; } if (it_disposition(it, DISP_OPEN_OPEN)) { if (phase >= DISP_OPEN_OPEN) - return it->d.lustre.it_status; + return it->it_status; else return 0; } if (it_disposition(it, DISP_OPEN_CREATE)) { if (phase >= DISP_OPEN_CREATE) - return it->d.lustre.it_status; + return it->it_status; else return 0; } if (it_disposition(it, DISP_LOOKUP_EXECD)) { if (phase >= DISP_LOOKUP_EXECD) - return it->d.lustre.it_status; + return it->it_status; else return 0; } if (it_disposition(it, DISP_IT_EXECD)) { if (phase >= DISP_IT_EXECD) - return it->d.lustre.it_status; + return it->it_status; else return 0; } - CERROR("it disp: %X, status: %d\n", it->d.lustre.it_disposition, - it->d.lustre.it_status); + CERROR("it disp: %X, status: %d\n", it->it_disposition, + it->it_status); LBUG(); return 0; } @@ -551,7 +551,6 @@ static int mdc_finish_enqueue(struct obd_export *exp, struct req_capsule *pill = &req->rq_pill; struct ldlm_request *lockreq; struct ldlm_reply *lockrep; - struct lustre_intent_data *intent = &it->d.lustre; struct ldlm_lock *lock; void *lvb_data = NULL; int lvb_len = 0; @@ -585,17 +584,17 @@ static int mdc_finish_enqueue(struct obd_export *exp, lockrep = req_capsule_server_get(pill, &RMF_DLM_REP); - intent->it_disposition = (int)lockrep->lock_policy_res1; - intent->it_status = (int)lockrep->lock_policy_res2; - intent->it_lock_mode = einfo->ei_mode; - intent->it_lock_handle = lockh->cookie; - intent->it_data = req; + it->it_disposition = (int)lockrep->lock_policy_res1; + it->it_status = (int)lockrep->lock_policy_res2; + it->it_lock_mode = einfo->ei_mode; + it->it_lock_handle = lockh->cookie; + it->it_data = req; /* Technically speaking rq_transno must already be zero if * it_status is in error, so the check is a bit redundant */ - if ((!req->rq_transno || intent->it_status < 0) && req->rq_replay) - mdc_clear_replay_flag(req, intent->it_status); + if ((!req->rq_transno || it->it_status < 0) && req->rq_replay) + mdc_clear_replay_flag(req, it->it_status); /* If we're doing an IT_OPEN which did not result in an actual * successful open, then we need to remove the bit which saves @@ -606,11 +605,11 @@ static int mdc_finish_enqueue(struct obd_export *exp, * (bug 3440) */ if (it->it_op & IT_OPEN && req->rq_replay && - (!it_disposition(it, DISP_OPEN_OPEN) || intent->it_status != 0)) - mdc_clear_replay_flag(req, intent->it_status); + (!it_disposition(it, DISP_OPEN_OPEN) || it->it_status != 0)) + mdc_clear_replay_flag(req, it->it_status); DEBUG_REQ(D_RPCTRACE, req, "op: %d disposition: %x, status: %d", - it->it_op, intent->it_disposition, intent->it_status); + it->it_op, it->it_disposition, it->it_status); /* We know what to expect, so we do any byte flipping required here */ if (it->it_op & (IT_OPEN | IT_UNLINK | IT_LOOKUP | IT_GETATTR)) { @@ -919,9 +918,9 @@ resend: } ptlrpc_req_finished(req); - it->d.lustre.it_lock_handle = 0; - it->d.lustre.it_lock_mode = 0; - it->d.lustre.it_data = NULL; + it->it_lock_handle = 0; + it->it_lock_mode = 0; + it->it_data = NULL; } return rc; @@ -945,8 +944,8 @@ static int mdc_finish_intent_lock(struct obd_export *exp, /* The server failed before it even started executing the * intent, i.e. because it couldn't unpack the request. */ - LASSERT(it->d.lustre.it_status != 0); - return it->d.lustre.it_status; + LASSERT(it->it_status != 0); + return it->it_status; } rc = it_open_error(DISP_IT_EXECD, it); if (rc) @@ -1029,15 +1028,15 @@ static int mdc_finish_intent_lock(struct obd_export *exp, LDLM_IBITS, &policy, LCK_NL, &old_lock, 0)) { ldlm_lock_decref_and_cancel(lockh, - it->d.lustre.it_lock_mode); + it->it_lock_mode); memcpy(lockh, &old_lock, sizeof(old_lock)); - it->d.lustre.it_lock_handle = lockh->cookie; + it->it_lock_handle = lockh->cookie; } } CDEBUG(D_DENTRY, "D_IT dentry %.*s intent: %s status %d disp %x rc %d\n", op_data->op_namelen, op_data->op_name, ldlm_it2str(it->it_op), - it->d.lustre.it_status, it->d.lustre.it_disposition, rc); + it->it_status, it->it_disposition, rc); return rc; } @@ -1053,8 +1052,8 @@ int mdc_revalidate_lock(struct obd_export *exp, struct lookup_intent *it, ldlm_policy_data_t policy; enum ldlm_mode mode; - if (it->d.lustre.it_lock_handle) { - lockh.cookie = it->d.lustre.it_lock_handle; + if (it->it_lock_handle) { + lockh.cookie = it->it_lock_handle; mode = ldlm_revalidate_lock_handle(&lockh, bits); } else { fid_build_reg_res_name(fid, &res_id); @@ -1095,11 +1094,11 @@ int mdc_revalidate_lock(struct obd_export *exp, struct lookup_intent *it, } if (mode) { - it->d.lustre.it_lock_handle = lockh.cookie; - it->d.lustre.it_lock_mode = mode; + it->it_lock_handle = lockh.cookie; + it->it_lock_mode = mode; } else { - it->d.lustre.it_lock_handle = 0; - it->d.lustre.it_lock_mode = 0; + it->it_lock_handle = 0; + it->it_lock_mode = 0; } return !!mode; @@ -1121,15 +1120,15 @@ int mdc_revalidate_lock(struct obd_export *exp, struct lookup_intent *it, * ll_create/ll_open gets called. * * The server will return to us, in it_disposition, an indication of - * exactly what d.lustre.it_status refers to. + * exactly what it_status refers to. * - * If DISP_OPEN_OPEN is set, then d.lustre.it_status refers to the open() call, + * If DISP_OPEN_OPEN is set, then it_status refers to the open() call, * otherwise if DISP_OPEN_CREATE is set, then it status is the * creation failure mode. In either case, one of DISP_LOOKUP_NEG or * DISP_LOOKUP_POS will be set, indicating whether the child lookup * was successful. * - * Else, if DISP_LOOKUP_EXECD then d.lustre.it_status is the rc of the + * Else, if DISP_LOOKUP_EXECD then it_status is the rc of the * child lookup. */ int mdc_intent_lock(struct obd_export *exp, struct md_op_data *op_data, @@ -1162,7 +1161,7 @@ int mdc_intent_lock(struct obd_export *exp, struct md_op_data *op_data, * be called in revalidate_it if we already have a lock, let's * verify that. */ - it->d.lustre.it_lock_handle = 0; + it->it_lock_handle = 0; rc = mdc_revalidate_lock(exp, it, &op_data->op_fid2, NULL); /* Only return failure if it was not GETATTR by cfid * (from inode_revalidate) @@ -1184,7 +1183,7 @@ int mdc_intent_lock(struct obd_export *exp, struct md_op_data *op_data, if (rc < 0) return rc; - *reqp = it->d.lustre.it_data; + *reqp = it->it_data; rc = mdc_finish_intent_lock(exp, *reqp, op_data, it, &lockh); return rc; } diff --git a/drivers/staging/lustre/lustre/mdc/mdc_request.c b/drivers/staging/lustre/lustre/mdc/mdc_request.c index f371e1d..7f5dfb0 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_request.c +++ b/drivers/staging/lustre/lustre/mdc/mdc_request.c @@ -661,7 +661,7 @@ int mdc_set_open_replay_data(struct obd_export *exp, struct md_open_data *mod; struct mdt_rec_create *rec; struct mdt_body *body; - struct ptlrpc_request *open_req = it->d.lustre.it_data; + struct ptlrpc_request *open_req = it->it_data; struct obd_import *imp = open_req->rq_import; if (!open_req->rq_replay) -- 2.7.4 From green at linuxhacker.ru Mon Jun 20 02:07:38 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Sun, 19 Jun 2016 22:07:38 -0400 Subject: [lustre-devel] [PATCH 23/28] staging/lustre/llite: Restore proper opencache operations In-Reply-To: <1466388463-1817551-1-git-send-email-green@linuxhacker.ru> References: <1466388463-1817551-1-git-send-email-green@linuxhacker.ru> Message-ID: <1466388463-1817551-24-git-send-email-green@linuxhacker.ru> From: Oleg Drokin Mark dentries that came to us via NFS in a special way so that we can tell them apart during open and activate open cache (we really don't want to do open/close RPC for every NFS IO). This became needed since dentry revlidate no longer reimplements any RPCs for lookup, and as such if a dentry is valid, ll_revalidate_dentry returns 1 and ll_lookup_it() is never visited during opens, we get straght into ll_file_open() without a valid intent/RPC. This used to be only true for NFS, so opencache was engaged needlessly, and it carries a cost of it's own if there is in fact no repetitive file opening-closing going on Signed-off-by: Oleg Drokin Reviewed-on: http://review.whamcloud.com/20354 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8019 Reviewed-by: Andreas Dilger Reviewed-by: Li Xi Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/llite/file.c | 14 +++++++++++++- drivers/staging/lustre/lustre/llite/llite_internal.h | 1 + drivers/staging/lustre/lustre/llite/llite_nfs.c | 18 ++++++++++++++++++ 3 files changed, 32 insertions(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/llite/file.c b/drivers/staging/lustre/lustre/llite/file.c index a188366..6a5e8c7 100644 --- a/drivers/staging/lustre/lustre/llite/file.c +++ b/drivers/staging/lustre/lustre/llite/file.c @@ -411,7 +411,19 @@ static int ll_intent_file_open(struct dentry *dentry, void *lmm, * parameters. No need for the open lock */ if (!lmm && lmmsize == 0) { - itp->it_flags |= MDS_OPEN_LOCK; + struct ll_dentry_data *ldd = ll_d2d(dentry); + /* + * If we came via ll_iget_for_nfs, then we need to request + * struct ll_dentry_data *ldd = ll_d2d(file->f_dentry); + * + * NB: when ldd is NULL, it must have come via normal + * lookup path only, since ll_iget_for_nfs always calls + * ll_d_init(). + */ + if (ldd && ldd->lld_nfs_dentry) { + ldd->lld_nfs_dentry = 0; + itp->it_flags |= MDS_OPEN_LOCK; + } if (itp->it_flags & FMODE_WRITE) opc = LUSTRE_OPC_CREATE; } diff --git a/drivers/staging/lustre/lustre/llite/llite_internal.h b/drivers/staging/lustre/lustre/llite/llite_internal.h index 3692102..1d4e91e 100644 --- a/drivers/staging/lustre/lustre/llite/llite_internal.h +++ b/drivers/staging/lustre/lustre/llite/llite_internal.h @@ -64,6 +64,7 @@ struct ll_dentry_data { struct lookup_intent *lld_it; unsigned int lld_sa_generation; unsigned int lld_invalid:1; + unsigned int lld_nfs_dentry:1; struct rcu_head lld_rcu_head; }; diff --git a/drivers/staging/lustre/lustre/llite/llite_nfs.c b/drivers/staging/lustre/lustre/llite/llite_nfs.c index d7878e5..65972c8 100644 --- a/drivers/staging/lustre/lustre/llite/llite_nfs.c +++ b/drivers/staging/lustre/lustre/llite/llite_nfs.c @@ -168,6 +168,24 @@ ll_iget_for_nfs(struct super_block *sb, struct lu_fid *fid, struct lu_fid *paren /* N.B. d_obtain_alias() drops inode ref on error */ result = d_obtain_alias(inode); + if (!IS_ERR(result)) { + int rc; + + rc = ll_d_init(result); + if (rc < 0) { + dput(result); + result = ERR_PTR(rc); + } else { + struct ll_dentry_data *ldd = ll_d2d(result); + + /* + * Need to signal to the ll_intent_file_open that + * we came from NFS and so opencache needs to be + * enabled for this one + */ + ldd->lld_nfs_dentry = 1; + } + } return result; } -- 2.7.4 From jsimmons at infradead.org Mon Jun 20 02:53:53 2016 From: jsimmons at infradead.org (James Simmons) Date: Sun, 19 Jun 2016 22:53:53 -0400 Subject: [lustre-devel] [PATCH] staging: lustre: remove remote client support Message-ID: <1466391233-4230-1-git-send-email-jsimmons@infradead.org> From: Fan Yong There are several obsolete sub commands for lfs to work with remote client. We do not support that anymore, and should be deleted along with any kernel code related to remote client. Signed-off-by: Fan Yong Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6971 Reviewed-on: http://review.whamcloud.com/19789 Reviewed-by: Andreas Dilger Reviewed-by: James Simmons Reviewed-by: Lai Siyao Reviewed-by: Oleg Drokin Signed-off-by: James Simmons --- .../lustre/lustre/include/lustre/lustre_idl.h | 40 +-- .../lustre/lustre/include/lustre/lustre_user.h | 15 +- .../staging/lustre/lustre/include/lustre_eacl.h | 11 - .../staging/lustre/lustre/include/lustre_export.h | 13 - drivers/staging/lustre/lustre/include/lustre_net.h | 1 - .../lustre/lustre/include/lustre_req_layout.h | 2 +- drivers/staging/lustre/lustre/include/obd.h | 3 - drivers/staging/lustre/lustre/include/obd_class.h | 10 - drivers/staging/lustre/lustre/llite/Makefile | 3 +- drivers/staging/lustre/lustre/llite/dir.c | 29 +-- drivers/staging/lustre/lustre/llite/file.c | 15 - .../staging/lustre/lustre/llite/llite_internal.h | 88 +---- drivers/staging/lustre/lustre/llite/llite_lib.c | 69 +--- drivers/staging/lustre/lustre/llite/llite_rmtacl.c | 295 -------------- drivers/staging/lustre/lustre/llite/lproc_llite.c | 6 +- drivers/staging/lustre/lustre/llite/remote_perm.c | 320 --------------- drivers/staging/lustre/lustre/llite/super25.c | 19 - drivers/staging/lustre/lustre/llite/xattr.c | 97 +----- drivers/staging/lustre/lustre/lmv/lmv_obd.c | 22 - drivers/staging/lustre/lustre/mdc/mdc_locks.c | 21 +- drivers/staging/lustre/lustre/mdc/mdc_reint.c | 2 +- drivers/staging/lustre/lustre/mdc/mdc_request.c | 76 +---- drivers/staging/lustre/lustre/obdclass/Makefile | 3 +- drivers/staging/lustre/lustre/obdclass/acl.c | 411 -------------------- drivers/staging/lustre/lustre/osc/osc_cache.c | 5 +- drivers/staging/lustre/lustre/osc/osc_page.c | 4 +- drivers/staging/lustre/lustre/ptlrpc/layout.c | 12 +- .../staging/lustre/lustre/ptlrpc/pack_generic.c | 13 - drivers/staging/lustre/lustre/ptlrpc/wiretest.c | 48 --- 29 files changed, 55 insertions(+), 1598 deletions(-) delete mode 100644 drivers/staging/lustre/lustre/llite/llite_rmtacl.c delete mode 100644 drivers/staging/lustre/lustre/llite/remote_perm.c delete mode 100644 drivers/staging/lustre/lustre/obdclass/acl.c diff --git a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h index fac7215..051864c 100644 --- a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h +++ b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h @@ -1237,8 +1237,16 @@ void lustre_swab_ptlrpc_body(struct ptlrpc_body *pb); */ #define OBD_CONNECT_ATTRFID 0x4000ULL /*Server can GetAttr By Fid*/ #define OBD_CONNECT_NODEVOH 0x8000ULL /*No open hndl on specl nodes*/ -#define OBD_CONNECT_RMT_CLIENT 0x10000ULL /*Remote client */ -#define OBD_CONNECT_RMT_CLIENT_FORCE 0x20000ULL /*Remote client by force */ +#define OBD_CONNECT_RMT_CLIENT 0x10000ULL /* Remote client, never used + * in production. Removed in + * 2.9. Keep this flag to + * avoid reuse. + */ +#define OBD_CONNECT_RMT_CLIENT_FORCE 0x20000ULL /* Remote client by force, + * never used in production. + * Removed in 2.9. Keep this + * flag to avoid reuse + */ #define OBD_CONNECT_BRW_SIZE 0x40000ULL /*Max bytes per rpc */ #define OBD_CONNECT_QUOTA64 0x80000ULL /*Not used since 2.4 */ #define OBD_CONNECT_MDS_CAPA 0x100000ULL /*MDS capability */ @@ -1699,7 +1707,7 @@ lov_mds_md_max_stripe_count(size_t buf_size, __u32 lmm_magic) #define OBD_MD_FLXATTRLS (0x0000002000000000ULL) /* xattr list */ #define OBD_MD_FLXATTRRM (0x0000004000000000ULL) /* xattr remove */ #define OBD_MD_FLACL (0x0000008000000000ULL) /* ACL */ -#define OBD_MD_FLRMTPERM (0x0000010000000000ULL) /* remote permission */ +/* OBD_MD_FLRMTPERM (0x0000010000000000ULL) remote perm, obsolete */ #define OBD_MD_FLMDSCAPA (0x0000020000000000ULL) /* MDS capability */ #define OBD_MD_FLOSSCAPA (0x0000040000000000ULL) /* OSS capability */ #define OBD_MD_FLCKSPLIT (0x0000080000000000ULL) /* Check split on server */ @@ -1711,10 +1719,10 @@ lov_mds_md_max_stripe_count(size_t buf_size, __u32 lmm_magic) */ #define OBD_MD_FLOBJCOUNT (0x0000400000000000ULL) /* for multiple destroy */ -#define OBD_MD_FLRMTLSETFACL (0x0001000000000000ULL) /* lfs lsetfacl case */ -#define OBD_MD_FLRMTLGETFACL (0x0002000000000000ULL) /* lfs lgetfacl case */ -#define OBD_MD_FLRMTRSETFACL (0x0004000000000000ULL) /* lfs rsetfacl case */ -#define OBD_MD_FLRMTRGETFACL (0x0008000000000000ULL) /* lfs rgetfacl case */ +/* OBD_MD_FLRMTLSETFACL (0x0001000000000000ULL) lfs lsetfacl, obsolete */ +/* OBD_MD_FLRMTLGETFACL (0x0002000000000000ULL) lfs lgetfacl, obsolete */ +/* OBD_MD_FLRMTRSETFACL (0x0004000000000000ULL) lfs rsetfacl, obsolete */ +/* OBD_MD_FLRMTRGETFACL (0x0008000000000000ULL) lfs rgetfacl, obsolete */ #define OBD_MD_FLDATAVERSION (0x0010000000000000ULL) /* iversion sum */ #define OBD_MD_FLRELEASED (0x0020000000000000ULL) /* file released */ @@ -2155,26 +2163,8 @@ enum { CFS_SETUID_PERM = 0x01, CFS_SETGID_PERM = 0x02, CFS_SETGRP_PERM = 0x04, - CFS_RMTACL_PERM = 0x08, - CFS_RMTOWN_PERM = 0x10 -}; - -/* inode access permission for remote user, the inode info are omitted, - * for client knows them. - */ -struct mdt_remote_perm { - __u32 rp_uid; - __u32 rp_gid; - __u32 rp_fsuid; - __u32 rp_fsuid_h; - __u32 rp_fsgid; - __u32 rp_fsgid_h; - __u32 rp_access_perm; /* MAY_READ/WRITE/EXEC */ - __u32 rp_padding; }; -void lustre_swab_mdt_remote_perm(struct mdt_remote_perm *p); - struct mdt_rec_setattr { __u32 sa_opcode; __u32 sa_cap; diff --git a/drivers/staging/lustre/lustre/include/lustre/lustre_user.h b/drivers/staging/lustre/lustre/include/lustre/lustre_user.h index a6e351a..ef6f38f 100644 --- a/drivers/staging/lustre/lustre/include/lustre/lustre_user.h +++ b/drivers/staging/lustre/lustre/include/lustre/lustre_user.h @@ -211,7 +211,7 @@ struct ost_id { #define IOC_OBD_STATFS _IOWR('f', 164, struct obd_statfs *) #define IOC_LOV_GETINFO _IOWR('f', 165, struct lov_user_mds_data *) #define LL_IOC_FLUSHCTX _IOW('f', 166, long) -#define LL_IOC_RMTACL _IOW('f', 167, long) +/* LL_IOC_RMTACL 167 obsolete */ #define LL_IOC_GETOBDCOUNT _IOR('f', 168, long) #define LL_IOC_LLOOP_ATTACH _IOWR('f', 169, long) #define LL_IOC_LLOOP_DETACH _IOWR('f', 170, long) @@ -538,19 +538,6 @@ struct identity_downcall_data { __u32 idd_groups[0]; }; -/* for non-mapped uid/gid */ -#define NOBODY_UID 99 -#define NOBODY_GID 99 - -#define INVALID_ID (-1) - -enum { - RMT_LSETFACL = 1, - RMT_LGETFACL = 2, - RMT_RSETFACL = 3, - RMT_RGETFACL = 4 -}; - /* lustre volatile file support * file name header: .^L^S^T^R:volatile" */ diff --git a/drivers/staging/lustre/lustre/include/lustre_eacl.h b/drivers/staging/lustre/lustre/include/lustre_eacl.h index e5eadc4..d1039e1 100644 --- a/drivers/staging/lustre/lustre/include/lustre_eacl.h +++ b/drivers/staging/lustre/lustre/include/lustre_eacl.h @@ -66,17 +66,6 @@ typedef struct { #define CFS_ACL_XATTR_COUNT(size, prefix) \ (((size) - sizeof(prefix ## _header)) / sizeof(prefix ## _entry)) -extern ext_acl_xattr_header * -lustre_posix_acl_xattr_2ext(posix_acl_xattr_header *header, int size); -extern int -lustre_posix_acl_xattr_filter(posix_acl_xattr_header *header, size_t size, - posix_acl_xattr_header **out); -extern void -lustre_ext_acl_xattr_free(ext_acl_xattr_header *header); -extern ext_acl_xattr_header * -lustre_acl_xattr_merge2ext(posix_acl_xattr_header *posix_header, int size, - ext_acl_xattr_header *ext_header); - #endif /* CONFIG_FS_POSIX_ACL */ /** @} eacl */ diff --git a/drivers/staging/lustre/lustre/include/lustre_export.h b/drivers/staging/lustre/lustre/include/lustre_export.h index 7c3ed55..6e7cc46 100644 --- a/drivers/staging/lustre/lustre/include/lustre_export.h +++ b/drivers/staging/lustre/lustre/include/lustre_export.h @@ -176,19 +176,6 @@ static inline int exp_connect_lru_resize(struct obd_export *exp) return !!(exp_connect_flags(exp) & OBD_CONNECT_LRU_RESIZE); } -static inline int exp_connect_rmtclient(struct obd_export *exp) -{ - return !!(exp_connect_flags(exp) & OBD_CONNECT_RMT_CLIENT); -} - -static inline int client_is_remote(struct obd_export *exp) -{ - struct obd_import *imp = class_exp2cliimp(exp); - - return !!(imp->imp_connect_data.ocd_connect_flags & - OBD_CONNECT_RMT_CLIENT); -} - static inline int exp_connect_vbr(struct obd_export *exp) { return !!(exp_connect_flags(exp) & OBD_CONNECT_VBR); diff --git a/drivers/staging/lustre/lustre/include/lustre_net.h b/drivers/staging/lustre/lustre/include/lustre_net.h index dba4d1d..bdd2ed5 100644 --- a/drivers/staging/lustre/lustre/include/lustre_net.h +++ b/drivers/staging/lustre/lustre/include/lustre_net.h @@ -1384,7 +1384,6 @@ struct ptlrpc_request { rq_bulk_write:1, /* request bulk write */ /* server authentication flags */ rq_auth_gss:1, /* authenticated by gss */ - rq_auth_remote:1, /* authed as remote user */ rq_auth_usr_root:1, /* authed as root */ rq_auth_usr_mdt:1, /* authed as mdt */ rq_auth_usr_ost:1, /* authed as ost */ diff --git a/drivers/staging/lustre/lustre/include/lustre_req_layout.h b/drivers/staging/lustre/lustre/include/lustre_req_layout.h index d00aae5..544a43c 100644 --- a/drivers/staging/lustre/lustre/include/lustre_req_layout.h +++ b/drivers/staging/lustre/lustre/include/lustre_req_layout.h @@ -160,7 +160,7 @@ extern struct req_format RQF_MDS_IS_SUBDIR; extern struct req_format RQF_MDS_DONE_WRITING; extern struct req_format RQF_MDS_REINT; extern struct req_format RQF_MDS_REINT_CREATE; -extern struct req_format RQF_MDS_REINT_CREATE_RMT_ACL; +extern struct req_format RQF_MDS_REINT_CREATE_ACL; extern struct req_format RQF_MDS_REINT_CREATE_SLAVE; extern struct req_format RQF_MDS_REINT_CREATE_SYM; extern struct req_format RQF_MDS_REINT_OPEN; diff --git a/drivers/staging/lustre/lustre/include/obd.h b/drivers/staging/lustre/lustre/include/obd.h index e654d42..9971ee5 100644 --- a/drivers/staging/lustre/lustre/include/obd.h +++ b/drivers/staging/lustre/lustre/include/obd.h @@ -1115,9 +1115,6 @@ struct md_ops { ldlm_policy_data_t *, enum ldlm_mode, enum ldlm_cancel_flags flags, void *opaque); - int (*get_remote_perm)(struct obd_export *, const struct lu_fid *, - __u32, struct ptlrpc_request **); - int (*intent_getattr_async)(struct obd_export *, struct md_enqueue_info *, struct ldlm_enqueue_info *); diff --git a/drivers/staging/lustre/lustre/include/obd_class.h b/drivers/staging/lustre/lustre/include/obd_class.h index 2196744..6482a93 100644 --- a/drivers/staging/lustre/lustre/include/obd_class.h +++ b/drivers/staging/lustre/lustre/include/obd_class.h @@ -1650,16 +1650,6 @@ static inline int md_init_ea_size(struct obd_export *exp, int easize, cookiesize, def_cookiesize); } -static inline int md_get_remote_perm(struct obd_export *exp, - const struct lu_fid *fid, __u32 suppgid, - struct ptlrpc_request **request) -{ - EXP_CHECK_MD_OP(exp, get_remote_perm); - EXP_MD_COUNTER_INCREMENT(exp, get_remote_perm); - return MDP(exp->exp_obd, get_remote_perm)(exp, fid, suppgid, - request); -} - static inline int md_intent_getattr_async(struct obd_export *exp, struct md_enqueue_info *minfo, struct ldlm_enqueue_info *einfo) diff --git a/drivers/staging/lustre/lustre/llite/Makefile b/drivers/staging/lustre/lustre/llite/Makefile index 19701e7..2cbb1b8 100644 --- a/drivers/staging/lustre/lustre/llite/Makefile +++ b/drivers/staging/lustre/lustre/llite/Makefile @@ -1,8 +1,7 @@ obj-$(CONFIG_LUSTRE_FS) += lustre.o lustre-y := dcache.o dir.o file.o llite_close.o llite_lib.o llite_nfs.o \ rw.o namei.o symlink.o llite_mmap.o \ - xattr.o xattr_cache.o remote_perm.o llite_rmtacl.o \ - rw26.o super25.o statahead.o \ + xattr.o xattr_cache.o rw26.o super25.o statahead.o \ glimpse.o lcommon_cl.o lcommon_misc.o \ vvp_dev.o vvp_page.o vvp_lock.o vvp_io.o vvp_object.o vvp_req.o \ lproc_llite.o diff --git a/drivers/staging/lustre/lustre/llite/dir.c b/drivers/staging/lustre/lustre/llite/dir.c index 99735f6..2f2c57e 100644 --- a/drivers/staging/lustre/lustre/llite/dir.c +++ b/drivers/staging/lustre/lustre/llite/dir.c @@ -1097,8 +1097,7 @@ static int quotactl_ioctl(struct ll_sb_info *sbi, struct if_quotactl *qctl) case Q_QUOTAOFF: case Q_SETQUOTA: case Q_SETINFO: - if (!capable(CFS_CAP_SYS_ADMIN) || - sbi->ll_flags & LL_SBI_RMT_CLIENT) + if (!capable(CFS_CAP_SYS_ADMIN)) return -EPERM; break; case Q_GETQUOTA: @@ -1106,8 +1105,7 @@ static int quotactl_ioctl(struct ll_sb_info *sbi, struct if_quotactl *qctl) !uid_eq(current_euid(), make_kuid(&init_user_ns, id))) || (type == GRPQUOTA && !in_egroup_p(make_kgid(&init_user_ns, id)))) && - (!capable(CFS_CAP_SYS_ADMIN) || - sbi->ll_flags & LL_SBI_RMT_CLIENT)) + !capable(CFS_CAP_SYS_ADMIN)) return -EPERM; break; case Q_GETINFO: @@ -1118,9 +1116,6 @@ static int quotactl_ioctl(struct ll_sb_info *sbi, struct if_quotactl *qctl) } if (valid != QC_GENERAL) { - if (sbi->ll_flags & LL_SBI_RMT_CLIENT) - return -EOPNOTSUPP; - if (cmd == Q_GETINFO) qctl->qc_cmd = Q_GETOINFO; else if (cmd == Q_GETQUOTA) @@ -1621,8 +1616,7 @@ free_lmm: struct obd_quotactl *oqctl; int error = 0; - if (!capable(CFS_CAP_SYS_ADMIN) || - sbi->ll_flags & LL_SBI_RMT_CLIENT) + if (!capable(CFS_CAP_SYS_ADMIN)) return -EPERM; oqctl = kzalloc(sizeof(*oqctl), GFP_NOFS); @@ -1645,8 +1639,7 @@ free_lmm: case OBD_IOC_POLL_QUOTACHECK: { struct if_quotacheck *check; - if (!capable(CFS_CAP_SYS_ADMIN) || - sbi->ll_flags & LL_SBI_RMT_CLIENT) + if (!capable(CFS_CAP_SYS_ADMIN)) return -EPERM; check = kzalloc(sizeof(*check), GFP_NOFS); @@ -1703,20 +1696,6 @@ out_quotactl: return ll_get_obd_name(inode, cmd, arg); case LL_IOC_FLUSHCTX: return ll_flush_ctx(inode); -#ifdef CONFIG_FS_POSIX_ACL - case LL_IOC_RMTACL: { - if (sbi->ll_flags & LL_SBI_RMT_CLIENT && is_root_inode(inode)) { - struct ll_file_data *fd = LUSTRE_FPRIVATE(file); - - rc = rct_add(&sbi->ll_rct, current_pid(), arg); - if (!rc) - fd->fd_flags |= LL_FILE_RMTACL; - return rc; - } else { - return 0; - } - } -#endif case LL_IOC_GETOBDCOUNT: { int count, vallen; struct obd_export *exp; diff --git a/drivers/staging/lustre/lustre/llite/file.c b/drivers/staging/lustre/lustre/llite/file.c index b0c4548..2d50d1c 100644 --- a/drivers/staging/lustre/lustre/llite/file.c +++ b/drivers/staging/lustre/lustre/llite/file.c @@ -344,18 +344,6 @@ int ll_file_release(struct inode *inode, struct file *file) CDEBUG(D_VFSTRACE, "VFS Op:inode="DFID"(%p)\n", PFID(ll_inode2fid(inode)), inode); -#ifdef CONFIG_FS_POSIX_ACL - if (sbi->ll_flags & LL_SBI_RMT_CLIENT && is_root_inode(inode)) { - struct ll_file_data *fd = LUSTRE_FPRIVATE(file); - - if (unlikely(fd->fd_flags & LL_FILE_RMTACL)) { - fd->fd_flags &= ~LL_FILE_RMTACL; - rct_del(&sbi->ll_rct, current_pid()); - et_search_free(&sbi->ll_et, current_pid()); - } - } -#endif - if (!is_root_inode(inode)) ll_stats_ops_tally(sbi, LPROC_LL_RELEASE, 1); fd = LUSTRE_FPRIVATE(file); @@ -3156,9 +3144,6 @@ int ll_inode_permission(struct inode *inode, int mask) CDEBUG(D_VFSTRACE, "VFS Op:inode="DFID"(%p), inode mode %x mask %o\n", PFID(ll_inode2fid(inode)), inode, inode->i_mode, mask); - if (ll_i2sbi(inode)->ll_flags & LL_SBI_RMT_CLIENT) - return lustre_check_remote_perm(inode, mask); - ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_INODE_PERM, 1); rc = generic_permission(inode, mask); diff --git a/drivers/staging/lustre/lustre/llite/llite_internal.h b/drivers/staging/lustre/lustre/llite/llite_internal.h index 7c1a325..8fe63bd 100644 --- a/drivers/staging/lustre/lustre/llite/llite_internal.h +++ b/drivers/staging/lustre/lustre/llite/llite_internal.h @@ -72,9 +72,6 @@ struct ll_dentry_data { #define LLI_INODE_MAGIC 0x111d0de5 #define LLI_INODE_DEAD 0xdeadd00d -/* remote client permission cache */ -#define REMOTE_PERM_HASHSIZE 16 - struct ll_getname_data { struct dir_context ctx; char *lgd_name; /* points to a buffer with NAME_MAX+1 size */ @@ -82,19 +79,6 @@ struct ll_getname_data { int lgd_found; /* inode matched? */ }; -/* llite setxid/access permission for user on remote client */ -struct ll_remote_perm { - struct hlist_node lrp_list; - uid_t lrp_uid; - gid_t lrp_gid; - uid_t lrp_fsuid; - gid_t lrp_fsgid; - int lrp_access_perm; /* MAY_READ/WRITE/EXEC, this - * is access permission with - * lrp_fsuid/lrp_fsgid. - */ -}; - struct ll_grouplock { struct lu_env *lg_env; struct cl_io *lg_io; @@ -129,9 +113,6 @@ struct ll_inode_info { spinlock_t lli_lock; struct posix_acl *lli_posix_acl; - struct hlist_head *lli_remote_perms; - struct mutex lli_rmtperm_mutex; - /* identifying fields for both metadata and data stacks. */ struct lu_fid lli_fid; /* Parent fid for accessing default stripe data on parent directory @@ -141,8 +122,6 @@ struct ll_inode_info { struct list_head lli_close_list; - unsigned long lli_rmtperm_time; - /* handle is to be sent to MDS later on done_writing and setattr. * Open handle data are needed for the recovery to reconstruct * the inode state on the MDS. XXX: recovery is not ready yet. @@ -407,7 +386,7 @@ enum stats_track_type { #define LL_SBI_FLOCK 0x04 #define LL_SBI_USER_XATTR 0x08 /* support user xattr */ #define LL_SBI_ACL 0x10 /* support ACL */ -#define LL_SBI_RMT_CLIENT 0x40 /* remote client */ +/* LL_SBI_RMT_CLIENT 0x40 remote client */ #define LL_SBI_MDS_CAPA 0x80 /* support mds capa, obsolete */ #define LL_SBI_OSS_CAPA 0x100 /* support oss capa, obsolete */ #define LL_SBI_LOCALFLOCK 0x200 /* Local flocks support by kernel */ @@ -429,7 +408,7 @@ enum stats_track_type { "xattr", \ "acl", \ "???", \ - "rmt_client", \ + "???", \ "mds_capa", \ "oss_capa", \ "flock", \ @@ -445,26 +424,6 @@ enum stats_track_type { "xattr", \ } -#define RCE_HASHES 32 - -struct rmtacl_ctl_entry { - struct list_head rce_list; - pid_t rce_key; /* hash key */ - int rce_ops; /* acl operation type */ -}; - -struct rmtacl_ctl_table { - spinlock_t rct_lock; - struct list_head rct_entries[RCE_HASHES]; -}; - -#define EE_HASHES 32 - -struct eacl_table { - spinlock_t et_lock; - struct list_head et_entries[EE_HASHES]; -}; - struct ll_sb_info { /* this protects pglist and ra_info. It isn't safe to * grab from interrupt contexts @@ -529,8 +488,6 @@ struct ll_sb_info { dev_t ll_sdev_orig; /* save s_dev before assign for * clustered nfs */ - struct rmtacl_ctl_table ll_rct; - struct eacl_table ll_et; __kernel_fsid_t ll_fsid; struct kobject ll_kobj; /* sysfs object */ struct super_block *ll_sb; /* struct super_block (for sysfs code)*/ @@ -982,14 +939,6 @@ ssize_t ll_getxattr(struct dentry *dentry, struct inode *inode, ssize_t ll_listxattr(struct dentry *dentry, char *buffer, size_t size); int ll_removexattr(struct dentry *dentry, const char *name); -/* llite/remote_perm.c */ -extern struct kmem_cache *ll_remote_perm_cachep; -extern struct kmem_cache *ll_rmtperm_hash_cachep; - -void free_rmtperm_hash(struct hlist_head *hash); -int ll_update_remote_perm(struct inode *inode, struct mdt_remote_perm *perm); -int lustre_check_remote_perm(struct inode *inode, int mask); - /** * Common IO arguments for various VFS I/O interfaces. */ @@ -1003,40 +952,7 @@ void ras_update(struct ll_sb_info *sbi, struct inode *inode, void ll_ra_count_put(struct ll_sb_info *sbi, unsigned long len); void ll_ra_stats_inc(struct inode *inode, enum ra_stat which); -/* llite/llite_rmtacl.c */ -#ifdef CONFIG_FS_POSIX_ACL -struct eacl_entry { - struct list_head ee_list; - pid_t ee_key; /* hash key */ - struct lu_fid ee_fid; - int ee_type; /* ACL type for ACCESS or DEFAULT */ - ext_acl_xattr_header *ee_acl; -}; - -u64 rce_ops2valid(int ops); -struct rmtacl_ctl_entry *rct_search(struct rmtacl_ctl_table *rct, pid_t key); -int rct_add(struct rmtacl_ctl_table *rct, pid_t key, int ops); -int rct_del(struct rmtacl_ctl_table *rct, pid_t key); -void rct_init(struct rmtacl_ctl_table *rct); -void rct_fini(struct rmtacl_ctl_table *rct); - -void ee_free(struct eacl_entry *ee); -int ee_add(struct eacl_table *et, pid_t key, struct lu_fid *fid, int type, - ext_acl_xattr_header *header); -struct eacl_entry *et_search_del(struct eacl_table *et, pid_t key, - struct lu_fid *fid, int type); -void et_search_free(struct eacl_table *et, pid_t key); -void et_init(struct eacl_table *et); -void et_fini(struct eacl_table *et); -#else -static inline u64 rce_ops2valid(int ops) -{ - return 0; -} -#endif - /* statahead.c */ - #define LL_SA_RPC_MIN 2 #define LL_SA_RPC_DEF 32 #define LL_SA_RPC_MAX 8192 diff --git a/drivers/staging/lustre/lustre/llite/llite_lib.c b/drivers/staging/lustre/lustre/llite/llite_lib.c index ac833db..ae6a571 100644 --- a/drivers/staging/lustre/lustre/llite/llite_lib.c +++ b/drivers/staging/lustre/lustre/llite/llite_lib.c @@ -171,8 +171,8 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt, OBD_CONNECT_VERSION | OBD_CONNECT_BRW_SIZE | OBD_CONNECT_CANCELSET | OBD_CONNECT_FID | OBD_CONNECT_AT | OBD_CONNECT_LOV_V3 | - OBD_CONNECT_RMT_CLIENT | OBD_CONNECT_VBR | - OBD_CONNECT_FULL20 | OBD_CONNECT_64BITHASH| + OBD_CONNECT_VBR | OBD_CONNECT_FULL20 | + OBD_CONNECT_64BITHASH | OBD_CONNECT_EINPROGRESS | OBD_CONNECT_JOBSTATS | OBD_CONNECT_LVB_TYPE | OBD_CONNECT_LAYOUTLOCK | @@ -213,8 +213,6 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt, /* real client */ data->ocd_connect_flags |= OBD_CONNECT_REAL; - if (sbi->ll_flags & LL_SBI_RMT_CLIENT) - data->ocd_connect_flags |= OBD_CONNECT_RMT_CLIENT_FORCE; data->ocd_brw_size = MD_MAX_BRW_SIZE; @@ -307,18 +305,6 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt, sbi->ll_flags &= ~LL_SBI_ACL; } - if (data->ocd_connect_flags & OBD_CONNECT_RMT_CLIENT) { - if (!(sbi->ll_flags & LL_SBI_RMT_CLIENT)) { - sbi->ll_flags |= LL_SBI_RMT_CLIENT; - LCONSOLE_INFO("client is set as remote by default.\n"); - } - } else { - if (sbi->ll_flags & LL_SBI_RMT_CLIENT) { - sbi->ll_flags &= ~LL_SBI_RMT_CLIENT; - LCONSOLE_INFO("client claims to be remote, but server rejected, forced to be local.\n"); - } - } - if (data->ocd_connect_flags & OBD_CONNECT_64BITHASH) sbi->ll_flags |= LL_SBI_64BIT_HASH; @@ -352,10 +338,9 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt, OBD_CONNECT_REQPORTAL | OBD_CONNECT_BRW_SIZE | OBD_CONNECT_CANCELSET | OBD_CONNECT_FID | OBD_CONNECT_SRVLOCK | OBD_CONNECT_TRUNCLOCK| - OBD_CONNECT_AT | OBD_CONNECT_RMT_CLIENT | - OBD_CONNECT_OSS_CAPA | OBD_CONNECT_VBR| - OBD_CONNECT_FULL20 | OBD_CONNECT_64BITHASH | - OBD_CONNECT_MAXBYTES | + OBD_CONNECT_AT | OBD_CONNECT_OSS_CAPA | + OBD_CONNECT_VBR | OBD_CONNECT_FULL20 | + OBD_CONNECT_64BITHASH | OBD_CONNECT_MAXBYTES | OBD_CONNECT_EINPROGRESS | OBD_CONNECT_JOBSTATS | OBD_CONNECT_LVB_TYPE | OBD_CONNECT_LAYOUTLOCK | OBD_CONNECT_PINGLESS; @@ -378,8 +363,6 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt, } data->ocd_connect_flags |= OBD_CONNECT_LRU_RESIZE; - if (sbi->ll_flags & LL_SBI_RMT_CLIENT) - data->ocd_connect_flags |= OBD_CONNECT_RMT_CLIENT_FORCE; CDEBUG(D_RPCTRACE, "ocd_connect_flags: %#llx ocd_version: %d ocd_grant: %d\n", data->ocd_connect_flags, @@ -442,9 +425,7 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt, * XXX: move this to after cbd setup? */ valid = OBD_MD_FLGETATTR | OBD_MD_FLBLOCKS | OBD_MD_FLMODEASIZE; - if (sbi->ll_flags & LL_SBI_RMT_CLIENT) - valid |= OBD_MD_FLRMTPERM; - else if (sbi->ll_flags & LL_SBI_ACL) + if (sbi->ll_flags & LL_SBI_ACL) valid |= OBD_MD_FLACL; op_data = kzalloc(sizeof(*op_data), GFP_NOFS); @@ -500,13 +481,6 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt, goto out_root; } -#ifdef CONFIG_FS_POSIX_ACL - if (sbi->ll_flags & LL_SBI_RMT_CLIENT) { - rct_init(&sbi->ll_rct); - et_init(&sbi->ll_et); - } -#endif - checksum = sbi->ll_flags & LL_SBI_CHECKSUM; err = obd_set_info_async(NULL, sbi->ll_dt_exp, sizeof(KEY_CHECKSUM), KEY_CHECKSUM, sizeof(checksum), &checksum, @@ -604,13 +578,6 @@ static void client_common_put_super(struct super_block *sb) { struct ll_sb_info *sbi = ll_s2sbi(sb); -#ifdef CONFIG_FS_POSIX_ACL - if (sbi->ll_flags & LL_SBI_RMT_CLIENT) { - et_fini(&sbi->ll_et); - rct_fini(&sbi->ll_rct); - } -#endif - ll_close_thread_shutdown(sbi->ll_lcq); cl_sb_fini(sb); @@ -700,11 +667,6 @@ static int ll_options(char *options, int *flags) *flags &= ~tmp; goto next; } - tmp = ll_set_opt("remote_client", s1, LL_SBI_RMT_CLIENT); - if (tmp) { - *flags |= tmp; - goto next; - } tmp = ll_set_opt("user_fid2path", s1, LL_SBI_USER_FID2PATH); if (tmp) { *flags |= tmp; @@ -788,12 +750,9 @@ void ll_lli_init(struct ll_inode_info *lli) lli->lli_maxbytes = MAX_LFS_FILESIZE; spin_lock_init(&lli->lli_lock); lli->lli_posix_acl = NULL; - lli->lli_remote_perms = NULL; - mutex_init(&lli->lli_rmtperm_mutex); /* Do not set lli_fid, it has been initialized already. */ fid_zero(&lli->lli_pfid); INIT_LIST_HEAD(&lli->lli_close_list); - lli->lli_rmtperm_time = 0; lli->lli_pending_och = NULL; lli->lli_mds_read_och = NULL; lli->lli_mds_write_och = NULL; @@ -1075,17 +1034,9 @@ void ll_clear_inode(struct inode *inode) ll_xattr_cache_destroy(inode); - if (sbi->ll_flags & LL_SBI_RMT_CLIENT) { - LASSERT(!lli->lli_posix_acl); - if (lli->lli_remote_perms) { - free_rmtperm_hash(lli->lli_remote_perms); - lli->lli_remote_perms = NULL; - } - } #ifdef CONFIG_FS_POSIX_ACL - else if (lli->lli_posix_acl) { + if (lli->lli_posix_acl) { LASSERT(atomic_read(&lli->lli_posix_acl->a_refcount) == 1); - LASSERT(!lli->lli_remote_perms); posix_acl_release(lli->lli_posix_acl); lli->lli_posix_acl = NULL; } @@ -1537,12 +1488,8 @@ void ll_update_inode(struct inode *inode, struct lustre_md *md) lli->lli_maxbytes = MAX_LFS_FILESIZE; } - if (sbi->ll_flags & LL_SBI_RMT_CLIENT) { - if (body->valid & OBD_MD_FLRMTPERM) - ll_update_remote_perm(inode, md->remote_perm); - } #ifdef CONFIG_FS_POSIX_ACL - else if (body->valid & OBD_MD_FLACL) { + if (body->valid & OBD_MD_FLACL) { spin_lock(&lli->lli_lock); if (lli->lli_posix_acl) posix_acl_release(lli->lli_posix_acl); diff --git a/drivers/staging/lustre/lustre/llite/llite_rmtacl.c b/drivers/staging/lustre/lustre/llite/llite_rmtacl.c deleted file mode 100644 index edb92f9..0000000 --- a/drivers/staging/lustre/lustre/llite/llite_rmtacl.c +++ /dev/null @@ -1,295 +0,0 @@ -/* - * GPL HEADER START - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 only, - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License version 2 for more details (a copy is included - * in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU General Public License - * version 2 along with this program; If not, see - * http://www.gnu.org/licenses/gpl-2.0.html - * - * GPL HEADER END - */ -/* - * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. - * Use is subject to license terms. - * - * Copyright (c) 2012, Intel Corporation. - */ -/* - * This file is part of Lustre, http://www.lustre.org/ - * Lustre is a trademark of Sun Microsystems, Inc. - * - * lustre/llite/llite_rmtacl.c - * - * Lustre Remote User Access Control List. - * - * Author: Fan Yong - */ - -#define DEBUG_SUBSYSTEM S_LLITE - -#ifdef CONFIG_FS_POSIX_ACL - -#include "../include/lustre_lite.h" -#include "../include/lustre_eacl.h" -#include "llite_internal.h" - -static inline __u32 rce_hashfunc(uid_t id) -{ - return id & (RCE_HASHES - 1); -} - -static inline __u32 ee_hashfunc(uid_t id) -{ - return id & (EE_HASHES - 1); -} - -u64 rce_ops2valid(int ops) -{ - switch (ops) { - case RMT_LSETFACL: - return OBD_MD_FLRMTLSETFACL; - case RMT_LGETFACL: - return OBD_MD_FLRMTLGETFACL; - case RMT_RSETFACL: - return OBD_MD_FLRMTRSETFACL; - case RMT_RGETFACL: - return OBD_MD_FLRMTRGETFACL; - default: - return 0; - } -} - -static struct rmtacl_ctl_entry *rce_alloc(pid_t key, int ops) -{ - struct rmtacl_ctl_entry *rce; - - rce = kzalloc(sizeof(*rce), GFP_NOFS); - if (!rce) - return NULL; - - INIT_LIST_HEAD(&rce->rce_list); - rce->rce_key = key; - rce->rce_ops = ops; - - return rce; -} - -static void rce_free(struct rmtacl_ctl_entry *rce) -{ - if (!list_empty(&rce->rce_list)) - list_del(&rce->rce_list); - - kfree(rce); -} - -static struct rmtacl_ctl_entry *__rct_search(struct rmtacl_ctl_table *rct, - pid_t key) -{ - struct rmtacl_ctl_entry *rce; - struct list_head *head = &rct->rct_entries[rce_hashfunc(key)]; - - list_for_each_entry(rce, head, rce_list) - if (rce->rce_key == key) - return rce; - - return NULL; -} - -struct rmtacl_ctl_entry *rct_search(struct rmtacl_ctl_table *rct, pid_t key) -{ - struct rmtacl_ctl_entry *rce; - - spin_lock(&rct->rct_lock); - rce = __rct_search(rct, key); - spin_unlock(&rct->rct_lock); - return rce; -} - -int rct_add(struct rmtacl_ctl_table *rct, pid_t key, int ops) -{ - struct rmtacl_ctl_entry *rce, *e; - - rce = rce_alloc(key, ops); - if (!rce) - return -ENOMEM; - - spin_lock(&rct->rct_lock); - e = __rct_search(rct, key); - if (unlikely(e)) { - CWARN("Unexpected stale rmtacl_entry found: [key: %d] [ops: %d]\n", - (int)key, ops); - rce_free(e); - } - list_add_tail(&rce->rce_list, &rct->rct_entries[rce_hashfunc(key)]); - spin_unlock(&rct->rct_lock); - - return 0; -} - -int rct_del(struct rmtacl_ctl_table *rct, pid_t key) -{ - struct rmtacl_ctl_entry *rce; - - spin_lock(&rct->rct_lock); - rce = __rct_search(rct, key); - if (rce) - rce_free(rce); - spin_unlock(&rct->rct_lock); - - return rce ? 0 : -ENOENT; -} - -void rct_init(struct rmtacl_ctl_table *rct) -{ - int i; - - spin_lock_init(&rct->rct_lock); - for (i = 0; i < RCE_HASHES; i++) - INIT_LIST_HEAD(&rct->rct_entries[i]); -} - -void rct_fini(struct rmtacl_ctl_table *rct) -{ - struct rmtacl_ctl_entry *rce; - int i; - - spin_lock(&rct->rct_lock); - for (i = 0; i < RCE_HASHES; i++) - while (!list_empty(&rct->rct_entries[i])) { - rce = list_entry(rct->rct_entries[i].next, - struct rmtacl_ctl_entry, rce_list); - rce_free(rce); - } - spin_unlock(&rct->rct_lock); -} - -static struct eacl_entry *ee_alloc(pid_t key, struct lu_fid *fid, int type, - ext_acl_xattr_header *header) -{ - struct eacl_entry *ee; - - ee = kzalloc(sizeof(*ee), GFP_NOFS); - if (!ee) - return NULL; - - INIT_LIST_HEAD(&ee->ee_list); - ee->ee_key = key; - ee->ee_fid = *fid; - ee->ee_type = type; - ee->ee_acl = header; - - return ee; -} - -void ee_free(struct eacl_entry *ee) -{ - if (!list_empty(&ee->ee_list)) - list_del(&ee->ee_list); - - if (ee->ee_acl) - lustre_ext_acl_xattr_free(ee->ee_acl); - - kfree(ee); -} - -static struct eacl_entry *__et_search_del(struct eacl_table *et, pid_t key, - struct lu_fid *fid, int type) -{ - struct eacl_entry *ee; - struct list_head *head = &et->et_entries[ee_hashfunc(key)]; - - LASSERT(fid); - list_for_each_entry(ee, head, ee_list) - if (ee->ee_key == key) { - if (lu_fid_eq(&ee->ee_fid, fid) && - ee->ee_type == type) { - list_del_init(&ee->ee_list); - return ee; - } - } - - return NULL; -} - -struct eacl_entry *et_search_del(struct eacl_table *et, pid_t key, - struct lu_fid *fid, int type) -{ - struct eacl_entry *ee; - - spin_lock(&et->et_lock); - ee = __et_search_del(et, key, fid, type); - spin_unlock(&et->et_lock); - return ee; -} - -void et_search_free(struct eacl_table *et, pid_t key) -{ - struct eacl_entry *ee, *next; - struct list_head *head = &et->et_entries[ee_hashfunc(key)]; - - spin_lock(&et->et_lock); - list_for_each_entry_safe(ee, next, head, ee_list) - if (ee->ee_key == key) - ee_free(ee); - - spin_unlock(&et->et_lock); -} - -int ee_add(struct eacl_table *et, pid_t key, struct lu_fid *fid, int type, - ext_acl_xattr_header *header) -{ - struct eacl_entry *ee, *e; - - ee = ee_alloc(key, fid, type, header); - if (!ee) - return -ENOMEM; - - spin_lock(&et->et_lock); - e = __et_search_del(et, key, fid, type); - if (unlikely(e)) { - CWARN("Unexpected stale eacl_entry found: [key: %d] [fid: " DFID "] [type: %d]\n", - (int)key, PFID(fid), type); - ee_free(e); - } - list_add_tail(&ee->ee_list, &et->et_entries[ee_hashfunc(key)]); - spin_unlock(&et->et_lock); - - return 0; -} - -void et_init(struct eacl_table *et) -{ - int i; - - spin_lock_init(&et->et_lock); - for (i = 0; i < EE_HASHES; i++) - INIT_LIST_HEAD(&et->et_entries[i]); -} - -void et_fini(struct eacl_table *et) -{ - struct eacl_entry *ee; - int i; - - spin_lock(&et->et_lock); - for (i = 0; i < EE_HASHES; i++) - while (!list_empty(&et->et_entries[i])) { - ee = list_entry(et->et_entries[i].next, - struct eacl_entry, ee_list); - ee_free(ee); - } - spin_unlock(&et->et_lock); -} - -#endif diff --git a/drivers/staging/lustre/lustre/llite/lproc_llite.c b/drivers/staging/lustre/lustre/llite/lproc_llite.c index 6e9a8a5..18a7775 100644 --- a/drivers/staging/lustre/lustre/llite/lproc_llite.c +++ b/drivers/staging/lustre/lustre/llite/lproc_llite.c @@ -176,11 +176,7 @@ LUSTRE_RO_ATTR(filesfree); static ssize_t client_type_show(struct kobject *kobj, struct attribute *attr, char *buf) { - struct ll_sb_info *sbi = container_of(kobj, struct ll_sb_info, - ll_kobj); - - return sprintf(buf, "%s client\n", - sbi->ll_flags & LL_SBI_RMT_CLIENT ? "remote" : "local"); + return sprintf(buf, "local client\n"); } LUSTRE_RO_ATTR(client_type); diff --git a/drivers/staging/lustre/lustre/llite/remote_perm.c b/drivers/staging/lustre/lustre/llite/remote_perm.c deleted file mode 100644 index 9df9e78..0000000 --- a/drivers/staging/lustre/lustre/llite/remote_perm.c +++ /dev/null @@ -1,320 +0,0 @@ -/* - * GPL HEADER START - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 only, - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License version 2 for more details (a copy is included - * in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU General Public License - * version 2 along with this program; If not, see - * http://www.gnu.org/licenses/gpl-2.0.html - * - * GPL HEADER END - */ -/* - * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. - * Use is subject to license terms. - * - * Copyright (c) 2011, 2012, Intel Corporation. - */ -/* - * This file is part of Lustre, http://www.lustre.org/ - * Lustre is a trademark of Sun Microsystems, Inc. - * - * lustre/llite/remote_perm.c - * - * Lustre Permission Cache for Remote Client - * - * Author: Lai Siyao - * Author: Fan Yong - */ - -#define DEBUG_SUBSYSTEM S_LLITE - -#include -#include - -#include "../include/lustre_lite.h" -#include "../include/lustre_ha.h" -#include "../include/lustre_dlm.h" -#include "../include/lprocfs_status.h" -#include "../include/lustre_disk.h" -#include "../include/lustre_param.h" -#include "llite_internal.h" - -struct kmem_cache *ll_remote_perm_cachep; -struct kmem_cache *ll_rmtperm_hash_cachep; - -static inline struct ll_remote_perm *alloc_ll_remote_perm(void) -{ - struct ll_remote_perm *lrp; - - lrp = kmem_cache_zalloc(ll_remote_perm_cachep, GFP_KERNEL); - if (lrp) - INIT_HLIST_NODE(&lrp->lrp_list); - return lrp; -} - -static inline void free_ll_remote_perm(struct ll_remote_perm *lrp) -{ - if (!lrp) - return; - - if (!hlist_unhashed(&lrp->lrp_list)) - hlist_del(&lrp->lrp_list); - kmem_cache_free(ll_remote_perm_cachep, lrp); -} - -static struct hlist_head *alloc_rmtperm_hash(void) -{ - struct hlist_head *hash; - int i; - - hash = kmem_cache_zalloc(ll_rmtperm_hash_cachep, GFP_NOFS); - if (!hash) - return NULL; - - for (i = 0; i < REMOTE_PERM_HASHSIZE; i++) - INIT_HLIST_HEAD(hash + i); - - return hash; -} - -void free_rmtperm_hash(struct hlist_head *hash) -{ - int i; - struct ll_remote_perm *lrp; - struct hlist_node *next; - - if (!hash) - return; - - for (i = 0; i < REMOTE_PERM_HASHSIZE; i++) - hlist_for_each_entry_safe(lrp, next, hash + i, lrp_list) - free_ll_remote_perm(lrp); - kmem_cache_free(ll_rmtperm_hash_cachep, hash); -} - -static inline int remote_perm_hashfunc(uid_t uid) -{ - return uid & (REMOTE_PERM_HASHSIZE - 1); -} - -/* NB: setxid permission is not checked here, instead it's done on - * MDT when client get remote permission. - */ -static int do_check_remote_perm(struct ll_inode_info *lli, int mask) -{ - struct hlist_head *head; - struct ll_remote_perm *lrp; - int found = 0, rc; - - if (!lli->lli_remote_perms) - return -ENOENT; - - head = lli->lli_remote_perms + - remote_perm_hashfunc(from_kuid(&init_user_ns, current_uid())); - - spin_lock(&lli->lli_lock); - hlist_for_each_entry(lrp, head, lrp_list) { - if (lrp->lrp_uid != from_kuid(&init_user_ns, current_uid())) - continue; - if (lrp->lrp_gid != from_kgid(&init_user_ns, current_gid())) - continue; - if (lrp->lrp_fsuid != from_kuid(&init_user_ns, current_fsuid())) - continue; - if (lrp->lrp_fsgid != from_kgid(&init_user_ns, current_fsgid())) - continue; - found = 1; - break; - } - - if (!found) { - rc = -ENOENT; - goto out; - } - - CDEBUG(D_SEC, "found remote perm: %u/%u/%u/%u - %#x\n", - lrp->lrp_uid, lrp->lrp_gid, lrp->lrp_fsuid, lrp->lrp_fsgid, - lrp->lrp_access_perm); - rc = ((lrp->lrp_access_perm & mask) == mask) ? 0 : -EACCES; - -out: - spin_unlock(&lli->lli_lock); - return rc; -} - -int ll_update_remote_perm(struct inode *inode, struct mdt_remote_perm *perm) -{ - struct ll_inode_info *lli = ll_i2info(inode); - struct ll_remote_perm *lrp = NULL, *tmp = NULL; - struct hlist_head *head, *perm_hash = NULL; - - LASSERT(ll_i2sbi(inode)->ll_flags & LL_SBI_RMT_CLIENT); - -#if 0 - if (perm->rp_uid != current->uid || - perm->rp_gid != current->gid || - perm->rp_fsuid != current->fsuid || - perm->rp_fsgid != current->fsgid) { - /* user might setxid in this small period */ - CDEBUG(D_SEC, - "remote perm user %u/%u/%u/%u != current %u/%u/%u/%u\n", - perm->rp_uid, perm->rp_gid, perm->rp_fsuid, - perm->rp_fsgid, current->uid, current->gid, - current->fsuid, current->fsgid); - return -EAGAIN; - } -#endif - - if (!lli->lli_remote_perms) { - perm_hash = alloc_rmtperm_hash(); - if (!perm_hash) { - CERROR("alloc lli_remote_perms failed!\n"); - return -ENOMEM; - } - } - - spin_lock(&lli->lli_lock); - - if (!lli->lli_remote_perms) - lli->lli_remote_perms = perm_hash; - else - free_rmtperm_hash(perm_hash); - - head = lli->lli_remote_perms + remote_perm_hashfunc(perm->rp_uid); - -again: - hlist_for_each_entry(tmp, head, lrp_list) { - if (tmp->lrp_uid != perm->rp_uid) - continue; - if (tmp->lrp_gid != perm->rp_gid) - continue; - if (tmp->lrp_fsuid != perm->rp_fsuid) - continue; - if (tmp->lrp_fsgid != perm->rp_fsgid) - continue; - free_ll_remote_perm(lrp); - lrp = tmp; - break; - } - - if (!lrp) { - spin_unlock(&lli->lli_lock); - lrp = alloc_ll_remote_perm(); - if (!lrp) { - CERROR("alloc memory for ll_remote_perm failed!\n"); - return -ENOMEM; - } - spin_lock(&lli->lli_lock); - goto again; - } - - lrp->lrp_access_perm = perm->rp_access_perm; - if (lrp != tmp) { - lrp->lrp_uid = perm->rp_uid; - lrp->lrp_gid = perm->rp_gid; - lrp->lrp_fsuid = perm->rp_fsuid; - lrp->lrp_fsgid = perm->rp_fsgid; - hlist_add_head(&lrp->lrp_list, head); - } - lli->lli_rmtperm_time = cfs_time_current(); - spin_unlock(&lli->lli_lock); - - CDEBUG(D_SEC, "new remote perm@%p: %u/%u/%u/%u - %#x\n", - lrp, lrp->lrp_uid, lrp->lrp_gid, lrp->lrp_fsuid, lrp->lrp_fsgid, - lrp->lrp_access_perm); - - return 0; -} - -int lustre_check_remote_perm(struct inode *inode, int mask) -{ - struct ll_inode_info *lli = ll_i2info(inode); - struct ll_sb_info *sbi = ll_i2sbi(inode); - struct ptlrpc_request *req = NULL; - struct mdt_remote_perm *perm; - unsigned long save; - int i = 0, rc; - - do { - save = lli->lli_rmtperm_time; - rc = do_check_remote_perm(lli, mask); - if (!rc || (rc != -ENOENT && i)) - break; - - might_sleep(); - - mutex_lock(&lli->lli_rmtperm_mutex); - /* check again */ - if (save != lli->lli_rmtperm_time) { - rc = do_check_remote_perm(lli, mask); - if (!rc || (rc != -ENOENT && i)) { - mutex_unlock(&lli->lli_rmtperm_mutex); - break; - } - } - - if (i++ > 5) { - CERROR("check remote perm falls in dead loop!\n"); - LBUG(); - } - - rc = md_get_remote_perm(sbi->ll_md_exp, ll_inode2fid(inode), - ll_i2suppgid(inode), &req); - if (rc) { - mutex_unlock(&lli->lli_rmtperm_mutex); - break; - } - - perm = req_capsule_server_swab_get(&req->rq_pill, &RMF_ACL, - lustre_swab_mdt_remote_perm); - if (unlikely(!perm)) { - mutex_unlock(&lli->lli_rmtperm_mutex); - rc = -EPROTO; - break; - } - - rc = ll_update_remote_perm(inode, perm); - mutex_unlock(&lli->lli_rmtperm_mutex); - if (rc == -ENOMEM) - break; - - ptlrpc_req_finished(req); - req = NULL; - } while (1); - ptlrpc_req_finished(req); - return rc; -} - -#if 0 /* NB: remote perms can't be freed in ll_mdc_blocking_ast of UPDATE lock, - * because it will fail sanity test 48. - */ -void ll_free_remote_perms(struct inode *inode) -{ - struct ll_inode_info *lli = ll_i2info(inode); - struct hlist_head *hash = lli->lli_remote_perms; - struct ll_remote_perm *lrp; - struct hlist_node *node, *next; - int i; - - LASSERT(hash); - - spin_lock(&lli->lli_lock); - - for (i = 0; i < REMOTE_PERM_HASHSIZE; i++) { - hlist_for_each_entry_safe(lrp, node, next, hash + i, lrp_list) - free_ll_remote_perm(lrp); - } - - spin_unlock(&lli->lli_lock); -} -#endif diff --git a/drivers/staging/lustre/lustre/llite/super25.c b/drivers/staging/lustre/lustre/llite/super25.c index b40ea79..3dd7e0e 100644 --- a/drivers/staging/lustre/lustre/llite/super25.c +++ b/drivers/staging/lustre/lustre/llite/super25.c @@ -114,19 +114,6 @@ static int __init lustre_init(void) if (!ll_file_data_slab) goto out_cache; - ll_remote_perm_cachep = kmem_cache_create("ll_remote_perm_cache", - sizeof(struct ll_remote_perm), - 0, 0, NULL); - if (!ll_remote_perm_cachep) - goto out_cache; - - ll_rmtperm_hash_cachep = kmem_cache_create("ll_rmtperm_hash_cache", - REMOTE_PERM_HASHSIZE * - sizeof(struct list_head), - 0, 0, NULL); - if (!ll_rmtperm_hash_cachep) - goto out_cache; - llite_root = debugfs_create_dir("llite", debugfs_lustre_root); if (IS_ERR_OR_NULL(llite_root)) { rc = llite_root ? PTR_ERR(llite_root) : -ENOMEM; @@ -190,8 +177,6 @@ out_debugfs: out_cache: kmem_cache_destroy(ll_inode_cachep); kmem_cache_destroy(ll_file_data_slab); - kmem_cache_destroy(ll_remote_perm_cachep); - kmem_cache_destroy(ll_rmtperm_hash_cachep); return rc; } @@ -209,10 +194,6 @@ static void __exit lustre_exit(void) vvp_global_fini(); kmem_cache_destroy(ll_inode_cachep); - kmem_cache_destroy(ll_rmtperm_hash_cachep); - - kmem_cache_destroy(ll_remote_perm_cachep); - kmem_cache_destroy(ll_file_data_slab); } diff --git a/drivers/staging/lustre/lustre/llite/xattr.c b/drivers/staging/lustre/lustre/llite/xattr.c index 6ce790e..98303cf 100644 --- a/drivers/staging/lustre/lustre/llite/xattr.c +++ b/drivers/staging/lustre/lustre/llite/xattr.c @@ -107,11 +107,6 @@ int ll_setxattr_common(struct inode *inode, const char *name, struct ll_sb_info *sbi = ll_i2sbi(inode); struct ptlrpc_request *req = NULL; int xattr_type, rc; -#ifdef CONFIG_FS_POSIX_ACL - struct rmtacl_ctl_entry *rce = NULL; - posix_acl_xattr_header *new_value = NULL; - ext_acl_xattr_header *acl = NULL; -#endif const char *pv = value; xattr_type = get_xattr_type(name); @@ -139,62 +134,9 @@ int ll_setxattr_common(struct inode *inode, const char *name, strcmp(name, "security.selinux") == 0) return -EOPNOTSUPP; -#ifdef CONFIG_FS_POSIX_ACL - if (sbi->ll_flags & LL_SBI_RMT_CLIENT && - (xattr_type == XATTR_ACL_ACCESS_T || - xattr_type == XATTR_ACL_DEFAULT_T)) { - rce = rct_search(&sbi->ll_rct, current_pid()); - if (!rce || - (rce->rce_ops != RMT_LSETFACL && - rce->rce_ops != RMT_RSETFACL)) - return -EOPNOTSUPP; - - if (rce->rce_ops == RMT_LSETFACL) { - struct eacl_entry *ee; - - ee = et_search_del(&sbi->ll_et, current_pid(), - ll_inode2fid(inode), xattr_type); - if (valid & OBD_MD_FLXATTR) { - acl = lustre_acl_xattr_merge2ext( - (posix_acl_xattr_header *)value, - size, ee->ee_acl); - if (IS_ERR(acl)) { - ee_free(ee); - return PTR_ERR(acl); - } - size = CFS_ACL_XATTR_SIZE(\ - le32_to_cpu(acl->a_count), \ - ext_acl_xattr); - pv = (const char *)acl; - } - ee_free(ee); - } else if (rce->rce_ops == RMT_RSETFACL) { - rc = lustre_posix_acl_xattr_filter( - (posix_acl_xattr_header *)value, - size, &new_value); - if (unlikely(rc < 0)) - return rc; - size = rc; - - pv = (const char *)new_value; - } else { - return -EOPNOTSUPP; - } - - valid |= rce_ops2valid(rce->rce_ops); - } -#endif rc = md_setxattr(sbi->ll_md_exp, ll_inode2fid(inode), valid, name, pv, size, 0, flags, ll_i2suppgid(inode), &req); -#ifdef CONFIG_FS_POSIX_ACL - /* - * Release the posix ACL space. - */ - kfree(new_value); - if (acl) - lustre_ext_acl_xattr_free(acl); -#endif if (rc) { if (rc == -EOPNOTSUPP && xattr_type == XATTR_USER_T) { LCONSOLE_INFO("Disabling user_xattr feature because it is not supported on the server\n"); @@ -284,7 +226,6 @@ int ll_getxattr_common(struct inode *inode, const char *name, struct mdt_body *body; int xattr_type, rc; void *xdata; - struct rmtacl_ctl_entry *rce = NULL; struct ll_inode_info *lli = ll_i2info(inode); CDEBUG(D_VFSTRACE, "VFS Op:inode="DFID"(%p)\n", @@ -315,24 +256,11 @@ int ll_getxattr_common(struct inode *inode, const char *name, return -EOPNOTSUPP; #ifdef CONFIG_FS_POSIX_ACL - if (sbi->ll_flags & LL_SBI_RMT_CLIENT && - (xattr_type == XATTR_ACL_ACCESS_T || - xattr_type == XATTR_ACL_DEFAULT_T)) { - rce = rct_search(&sbi->ll_rct, current_pid()); - if (!rce || - (rce->rce_ops != RMT_LSETFACL && - rce->rce_ops != RMT_LGETFACL && - rce->rce_ops != RMT_RSETFACL && - rce->rce_ops != RMT_RGETFACL)) - return -EOPNOTSUPP; - } - /* posix acl is under protection of LOOKUP lock. when calling to this, * we just have path resolution to the target inode, so we have great * chance that cached ACL is uptodate. */ - if (xattr_type == XATTR_ACL_ACCESS_T && - !(sbi->ll_flags & LL_SBI_RMT_CLIENT)) { + if (xattr_type == XATTR_ACL_ACCESS_T) { struct posix_acl *acl; spin_lock(&lli->lli_lock); @@ -374,9 +302,7 @@ do_getxattr: } else { getxattr_nocache: rc = md_getxattr(sbi->ll_md_exp, ll_inode2fid(inode), - valid | (rce ? rce_ops2valid(rce->rce_ops) : 0), - name, NULL, 0, size, 0, &req); - + valid, name, NULL, 0, size, 0, &req); if (rc < 0) goto out_xattr; @@ -413,25 +339,6 @@ getxattr_nocache: rc = body->eadatasize; } -#ifdef CONFIG_FS_POSIX_ACL - if (rce && rce->rce_ops == RMT_LSETFACL) { - ext_acl_xattr_header *acl; - - acl = lustre_posix_acl_xattr_2ext(buffer, rc); - if (IS_ERR(acl)) { - rc = PTR_ERR(acl); - goto out; - } - - rc = ee_add(&sbi->ll_et, current_pid(), ll_inode2fid(inode), - xattr_type, acl); - if (unlikely(rc < 0)) { - lustre_ext_acl_xattr_free(acl); - goto out; - } - } -#endif - out_xattr: if (rc == -EOPNOTSUPP && xattr_type == XATTR_USER_T) { LCONSOLE_INFO( diff --git a/drivers/staging/lustre/lustre/lmv/lmv_obd.c b/drivers/staging/lustre/lustre/lmv/lmv_obd.c index ab4f4fb..6483f2c 100644 --- a/drivers/staging/lustre/lustre/lmv/lmv_obd.c +++ b/drivers/staging/lustre/lustre/lmv/lmv_obd.c @@ -2607,27 +2607,6 @@ static int lmv_clear_open_replay_data(struct obd_export *exp, return md_clear_open_replay_data(tgt->ltd_exp, och); } -static int lmv_get_remote_perm(struct obd_export *exp, - const struct lu_fid *fid, - __u32 suppgid, struct ptlrpc_request **request) -{ - struct obd_device *obd = exp->exp_obd; - struct lmv_obd *lmv = &obd->u.lmv; - struct lmv_tgt_desc *tgt; - int rc; - - rc = lmv_check_connect(obd); - if (rc) - return rc; - - tgt = lmv_find_target(lmv, fid); - if (IS_ERR(tgt)) - return PTR_ERR(tgt); - - rc = md_get_remote_perm(tgt->ltd_exp, fid, suppgid, request); - return rc; -} - static int lmv_intent_getattr_async(struct obd_export *exp, struct md_enqueue_info *minfo, struct ldlm_enqueue_info *einfo) @@ -2791,7 +2770,6 @@ static struct md_ops lmv_md_ops = { .free_lustre_md = lmv_free_lustre_md, .set_open_replay_data = lmv_set_open_replay_data, .clear_open_replay_data = lmv_clear_open_replay_data, - .get_remote_perm = lmv_get_remote_perm, .intent_getattr_async = lmv_intent_getattr_async, .revalidate_lock = lmv_revalidate_lock }; diff --git a/drivers/staging/lustre/lustre/mdc/mdc_locks.c b/drivers/staging/lustre/lustre/mdc/mdc_locks.c index b395420..d55a5d8 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_locks.c +++ b/drivers/staging/lustre/lustre/mdc/mdc_locks.c @@ -343,10 +343,6 @@ static struct ptlrpc_request *mdc_intent_open_pack(struct obd_export *exp, mdc_open_pack(req, op_data, it->it_create_mode, 0, it->it_flags, lmm, lmmsize); - /* for remote client, fetch remote perm for current user */ - if (client_is_remote(exp)) - req_capsule_set_size(&req->rq_pill, &RMF_ACL, RCL_SERVER, - sizeof(struct mdt_remote_perm)); ptlrpc_request_set_replen(req); return req; } @@ -440,9 +436,7 @@ static struct ptlrpc_request *mdc_intent_getattr_pack(struct obd_export *exp, struct obd_device *obddev = class_exp2obd(exp); u64 valid = OBD_MD_FLGETATTR | OBD_MD_FLEASIZE | OBD_MD_FLMODEASIZE | OBD_MD_FLDIREA | - OBD_MD_MEA | - (client_is_remote(exp) ? - OBD_MD_FLRMTPERM : OBD_MD_FLACL); + OBD_MD_MEA | OBD_MD_FLACL; struct ldlm_intent *lit; int rc; int easize; @@ -474,9 +468,6 @@ static struct ptlrpc_request *mdc_intent_getattr_pack(struct obd_export *exp, mdc_getattr_pack(req, valid, it->it_flags, op_data, easize); req_capsule_set_size(&req->rq_pill, &RMF_MDT_MD, RCL_SERVER, easize); - if (client_is_remote(exp)) - req_capsule_set_size(&req->rq_pill, &RMF_ACL, RCL_SERVER, - sizeof(struct mdt_remote_perm)); ptlrpc_request_set_replen(req); return req; } @@ -683,16 +674,6 @@ static int mdc_finish_enqueue(struct obd_export *exp, memcpy(lmm, eadata, body->eadatasize); } } - - if (body->valid & OBD_MD_FLRMTPERM) { - struct mdt_remote_perm *perm; - - LASSERT(client_is_remote(exp)); - perm = req_capsule_server_swab_get(pill, &RMF_ACL, - lustre_swab_mdt_remote_perm); - if (!perm) - return -EPROTO; - } } else if (it->it_op & IT_LAYOUT) { /* maybe the lock was granted right away and layout * is packed into RMF_DLM_LVB of req diff --git a/drivers/staging/lustre/lustre/mdc/mdc_reint.c b/drivers/staging/lustre/lustre/mdc/mdc_reint.c index 661488e..5dba2c8 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_reint.c +++ b/drivers/staging/lustre/lustre/mdc/mdc_reint.c @@ -230,7 +230,7 @@ rebuild: MDS_INODELOCK_UPDATE); req = ptlrpc_request_alloc(class_exp2cliimp(exp), - &RQF_MDS_REINT_CREATE_RMT_ACL); + &RQF_MDS_REINT_CREATE_ACL); if (!req) { ldlm_lock_list_put(&cancels, l_bl_ast, count); return -ENOMEM; diff --git a/drivers/staging/lustre/lustre/mdc/mdc_request.c b/drivers/staging/lustre/lustre/mdc/mdc_request.c index f371e1d..f7e30b1 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_request.c +++ b/drivers/staging/lustre/lustre/mdc/mdc_request.c @@ -146,16 +146,6 @@ static int mdc_getattr_common(struct obd_export *exp, return -EPROTO; } - if (body->valid & OBD_MD_FLRMTPERM) { - struct mdt_remote_perm *perm; - - LASSERT(client_is_remote(exp)); - perm = req_capsule_server_swab_get(pill, &RMF_ACL, - lustre_swab_mdt_remote_perm); - if (!perm) - return -EPROTO; - } - return 0; } @@ -186,11 +176,6 @@ static int mdc_getattr(struct obd_export *exp, struct md_op_data *op_data, req_capsule_set_size(&req->rq_pill, &RMF_MDT_MD, RCL_SERVER, op_data->op_mode); - if (op_data->op_valid & OBD_MD_FLRMTPERM) { - LASSERT(client_is_remote(exp)); - req_capsule_set_size(&req->rq_pill, &RMF_ACL, RCL_SERVER, - sizeof(struct mdt_remote_perm)); - } ptlrpc_request_set_replen(req); rc = mdc_getattr_common(exp, req); @@ -535,16 +520,7 @@ static int mdc_get_lustre_md(struct obd_export *exp, } rc = 0; - if (md->body->valid & OBD_MD_FLRMTPERM) { - /* remote permission */ - LASSERT(client_is_remote(exp)); - md->remote_perm = req_capsule_server_swab_get(pill, &RMF_ACL, - lustre_swab_mdt_remote_perm); - if (!md->remote_perm) { - rc = -EPROTO; - goto out; - } - } else if (md->body->valid & OBD_MD_FLACL) { + if (md->body->valid & OBD_MD_FLACL) { /* for ACL, it's possible that FLACL is set but aclsize is zero. * only when aclsize != 0 there's an actual segment for ACL * in reply buffer. @@ -1164,7 +1140,7 @@ static int mdc_ioc_hsm_progress(struct obd_export *exp, goto out; } - mdc_pack_body(req, NULL, OBD_MD_FLRMTPERM, 0, -1, 0); + mdc_pack_body(req, NULL, 0, 0, -1, 0); /* Copy hsm_progress struct */ req_hpk = req_capsule_client_get(&req->rq_pill, &RMF_MDS_HSM_PROGRESS); @@ -1198,7 +1174,7 @@ static int mdc_ioc_hsm_ct_register(struct obd_import *imp, __u32 archives) goto out; } - mdc_pack_body(req, NULL, OBD_MD_FLRMTPERM, 0, -1, 0); + mdc_pack_body(req, NULL, 0, 0, -1, 0); /* Copy hsm_progress struct */ archive_mask = req_capsule_client_get(&req->rq_pill, @@ -1237,7 +1213,7 @@ static int mdc_ioc_hsm_current_action(struct obd_export *exp, return rc; } - mdc_pack_body(req, &op_data->op_fid1, OBD_MD_FLRMTPERM, 0, + mdc_pack_body(req, &op_data->op_fid1, 0, 0, op_data->op_suppgids[0], 0); ptlrpc_request_set_replen(req); @@ -1273,7 +1249,7 @@ static int mdc_ioc_hsm_ct_unregister(struct obd_import *imp) goto out; } - mdc_pack_body(req, NULL, OBD_MD_FLRMTPERM, 0, -1, 0); + mdc_pack_body(req, NULL, 0, 0, -1, 0); ptlrpc_request_set_replen(req); @@ -1302,7 +1278,7 @@ static int mdc_ioc_hsm_state_get(struct obd_export *exp, return rc; } - mdc_pack_body(req, &op_data->op_fid1, OBD_MD_FLRMTPERM, 0, + mdc_pack_body(req, &op_data->op_fid1, 0, 0, op_data->op_suppgids[0], 0); ptlrpc_request_set_replen(req); @@ -1343,7 +1319,7 @@ static int mdc_ioc_hsm_state_set(struct obd_export *exp, return rc; } - mdc_pack_body(req, &op_data->op_fid1, OBD_MD_FLRMTPERM, 0, + mdc_pack_body(req, &op_data->op_fid1, 0, 0, op_data->op_suppgids[0], 0); /* Copy states */ @@ -1390,7 +1366,7 @@ static int mdc_ioc_hsm_request(struct obd_export *exp, return rc; } - mdc_pack_body(req, NULL, OBD_MD_FLRMTPERM, 0, -1, 0); + mdc_pack_body(req, NULL, 0, 0, -1, 0); /* Copy hsm_request struct */ req_hr = req_capsule_client_get(&req->rq_pill, &RMF_MDS_HSM_REQUEST); @@ -2428,41 +2404,6 @@ static int mdc_process_config(struct obd_device *obd, u32 len, void *buf) return rc; } -/* get remote permission for current user on fid */ -static int mdc_get_remote_perm(struct obd_export *exp, const struct lu_fid *fid, - __u32 suppgid, struct ptlrpc_request **request) -{ - struct ptlrpc_request *req; - int rc; - - LASSERT(client_is_remote(exp)); - - *request = NULL; - req = ptlrpc_request_alloc(class_exp2cliimp(exp), &RQF_MDS_GETATTR); - if (!req) - return -ENOMEM; - - rc = ptlrpc_request_pack(req, LUSTRE_MDS_VERSION, MDS_GETATTR); - if (rc) { - ptlrpc_request_free(req); - return rc; - } - - mdc_pack_body(req, fid, OBD_MD_FLRMTPERM, 0, suppgid, 0); - - req_capsule_set_size(&req->rq_pill, &RMF_ACL, RCL_SERVER, - sizeof(struct mdt_remote_perm)); - - ptlrpc_request_set_replen(req); - - rc = ptlrpc_queue_wait(req); - if (rc) - ptlrpc_req_finished(req); - else - *request = req; - return rc; -} - static struct obd_ops mdc_obd_ops = { .owner = THIS_MODULE, .setup = mdc_setup, @@ -2514,7 +2455,6 @@ static struct md_ops mdc_md_ops = { .free_lustre_md = mdc_free_lustre_md, .set_open_replay_data = mdc_set_open_replay_data, .clear_open_replay_data = mdc_clear_open_replay_data, - .get_remote_perm = mdc_get_remote_perm, .intent_getattr_async = mdc_intent_getattr_async, .revalidate_lock = mdc_revalidate_lock }; diff --git a/drivers/staging/lustre/lustre/obdclass/Makefile b/drivers/staging/lustre/lustre/obdclass/Makefile index c404eb3..df7e47f 100644 --- a/drivers/staging/lustre/lustre/obdclass/Makefile +++ b/drivers/staging/lustre/lustre/obdclass/Makefile @@ -5,5 +5,4 @@ obdclass-y := linux/linux-module.o linux/linux-obdo.o linux/linux-sysctl.o \ genops.o uuid.o lprocfs_status.o lprocfs_counters.o \ lustre_handles.o lustre_peer.o statfs_pack.o \ obdo.o obd_config.o obd_mount.o lu_object.o lu_ref.o \ - cl_object.o cl_page.o cl_lock.o cl_io.o \ - acl.o kernelcomm.o + cl_object.o cl_page.o cl_lock.o cl_io.o kernelcomm.o diff --git a/drivers/staging/lustre/lustre/obdclass/acl.c b/drivers/staging/lustre/lustre/obdclass/acl.c deleted file mode 100644 index 30d8b42..0000000 --- a/drivers/staging/lustre/lustre/obdclass/acl.c +++ /dev/null @@ -1,411 +0,0 @@ -/* - * GPL HEADER START - * - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 2 only, - * as published by the Free Software Foundation. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License version 2 for more details (a copy is included - * in the LICENSE file that accompanied this code). - * - * You should have received a copy of the GNU General Public License - * version 2 along with this program; If not, see - * http://www.gnu.org/licenses/gpl-2.0.html - * - * GPL HEADER END - */ -/* - * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. - * Use is subject to license terms. - * - * Copyright (c) 2012, Intel Corporation. - */ -/* - * This file is part of Lustre, http://www.lustre.org/ - * Lustre is a trademark of Sun Microsystems, Inc. - * - * lustre/obdclass/acl.c - * - * Lustre Access Control List. - * - * Author: Fan Yong - */ - -#define DEBUG_SUBSYSTEM S_SEC -#include "../include/lu_object.h" -#include "../include/lustre_acl.h" -#include "../include/lustre_eacl.h" -#include "../include/obd_support.h" - -#ifdef CONFIG_FS_POSIX_ACL - -#define CFS_ACL_XATTR_VERSION POSIX_ACL_XATTR_VERSION - -enum { - ES_UNK = 0, /* unknown stat */ - ES_UNC = 1, /* ACL entry is not changed */ - ES_MOD = 2, /* ACL entry is modified */ - ES_ADD = 3, /* ACL entry is added */ - ES_DEL = 4 /* ACL entry is deleted */ -}; - -static inline void lustre_ext_acl_le_to_cpu(ext_acl_xattr_entry *d, - ext_acl_xattr_entry *s) -{ - d->e_tag = le16_to_cpu(s->e_tag); - d->e_perm = le16_to_cpu(s->e_perm); - d->e_id = le32_to_cpu(s->e_id); - d->e_stat = le32_to_cpu(s->e_stat); -} - -static inline void lustre_ext_acl_cpu_to_le(ext_acl_xattr_entry *d, - ext_acl_xattr_entry *s) -{ - d->e_tag = cpu_to_le16(s->e_tag); - d->e_perm = cpu_to_le16(s->e_perm); - d->e_id = cpu_to_le32(s->e_id); - d->e_stat = cpu_to_le32(s->e_stat); -} - -static inline void lustre_posix_acl_le_to_cpu(posix_acl_xattr_entry *d, - posix_acl_xattr_entry *s) -{ - d->e_tag = le16_to_cpu(s->e_tag); - d->e_perm = le16_to_cpu(s->e_perm); - d->e_id = le32_to_cpu(s->e_id); -} - -static inline void lustre_posix_acl_cpu_to_le(posix_acl_xattr_entry *d, - posix_acl_xattr_entry *s) -{ - d->e_tag = cpu_to_le16(s->e_tag); - d->e_perm = cpu_to_le16(s->e_perm); - d->e_id = cpu_to_le32(s->e_id); -} - -/* if "new_count == 0", then "new = {a_version, NULL}", NOT NULL. */ -static int lustre_posix_acl_xattr_reduce_space(posix_acl_xattr_header **header, - int old_count, int new_count) -{ - int old_size = CFS_ACL_XATTR_SIZE(old_count, posix_acl_xattr); - int new_size = CFS_ACL_XATTR_SIZE(new_count, posix_acl_xattr); - posix_acl_xattr_header *new; - - if (unlikely(old_count <= new_count)) - return old_size; - - new = kmemdup(*header, new_size, GFP_NOFS); - if (unlikely(!new)) - return -ENOMEM; - - kfree(*header); - *header = new; - return new_size; -} - -/* if "new_count == 0", then "new = {0, NULL}", NOT NULL. */ -static int lustre_ext_acl_xattr_reduce_space(ext_acl_xattr_header **header, - int old_count) -{ - int ext_count = le32_to_cpu((*header)->a_count); - int ext_size = CFS_ACL_XATTR_SIZE(ext_count, ext_acl_xattr); - ext_acl_xattr_header *new; - - if (unlikely(old_count <= ext_count)) - return 0; - - new = kmemdup(*header, ext_size, GFP_NOFS); - if (unlikely(!new)) - return -ENOMEM; - - kfree(*header); - *header = new; - return 0; -} - -/* - * Generate new extended ACL based on the posix ACL. - */ -ext_acl_xattr_header * -lustre_posix_acl_xattr_2ext(posix_acl_xattr_header *header, int size) -{ - int count, i, esize; - ext_acl_xattr_header *new; - - if (unlikely(size < 0)) - return ERR_PTR(-EINVAL); - else if (!size) - count = 0; - else - count = CFS_ACL_XATTR_COUNT(size, posix_acl_xattr); - esize = CFS_ACL_XATTR_SIZE(count, ext_acl_xattr); - new = kzalloc(esize, GFP_NOFS); - if (unlikely(!new)) - return ERR_PTR(-ENOMEM); - - new->a_count = cpu_to_le32(count); - for (i = 0; i < count; i++) { - new->a_entries[i].e_tag = header->a_entries[i].e_tag; - new->a_entries[i].e_perm = header->a_entries[i].e_perm; - new->a_entries[i].e_id = header->a_entries[i].e_id; - new->a_entries[i].e_stat = cpu_to_le32(ES_UNK); - } - - return new; -} -EXPORT_SYMBOL(lustre_posix_acl_xattr_2ext); - -/* - * Filter out the "nobody" entries in the posix ACL. - */ -int lustre_posix_acl_xattr_filter(posix_acl_xattr_header *header, size_t size, - posix_acl_xattr_header **out) -{ - int count, i, j, rc = 0; - __u32 id; - posix_acl_xattr_header *new; - - if (!size) - return 0; - if (size < sizeof(*new)) - return -EINVAL; - - new = kzalloc(size, GFP_NOFS); - if (unlikely(!new)) - return -ENOMEM; - - new->a_version = cpu_to_le32(CFS_ACL_XATTR_VERSION); - count = CFS_ACL_XATTR_COUNT(size, posix_acl_xattr); - for (i = 0, j = 0; i < count; i++) { - id = le32_to_cpu(header->a_entries[i].e_id); - switch (le16_to_cpu(header->a_entries[i].e_tag)) { - case ACL_USER_OBJ: - case ACL_GROUP_OBJ: - case ACL_MASK: - case ACL_OTHER: - if (id != ACL_UNDEFINED_ID) { - rc = -EIO; - goto _out; - } - - memcpy(&new->a_entries[j++], &header->a_entries[i], - sizeof(posix_acl_xattr_entry)); - break; - case ACL_USER: - if (id != NOBODY_UID) - memcpy(&new->a_entries[j++], - &header->a_entries[i], - sizeof(posix_acl_xattr_entry)); - break; - case ACL_GROUP: - if (id != NOBODY_GID) - memcpy(&new->a_entries[j++], - &header->a_entries[i], - sizeof(posix_acl_xattr_entry)); - break; - default: - rc = -EIO; - goto _out; - } - } - - /* free unused space. */ - rc = lustre_posix_acl_xattr_reduce_space(&new, count, j); - if (rc >= 0) { - size = rc; - *out = new; - rc = 0; - } - -_out: - if (rc) { - kfree(new); - size = rc; - } - return size; -} -EXPORT_SYMBOL(lustre_posix_acl_xattr_filter); - -/* - * Release the extended ACL space. - */ -void lustre_ext_acl_xattr_free(ext_acl_xattr_header *header) -{ - kfree(header); -} -EXPORT_SYMBOL(lustre_ext_acl_xattr_free); - -static ext_acl_xattr_entry * -lustre_ext_acl_xattr_search(ext_acl_xattr_header *header, - posix_acl_xattr_entry *entry, int *pos) -{ - int once, start, end, i, j, count = le32_to_cpu(header->a_count); - - once = 0; - start = *pos; - end = count; - -again: - for (i = start; i < end; i++) { - if (header->a_entries[i].e_tag == entry->e_tag && - header->a_entries[i].e_id == entry->e_id) { - j = i; - if (++i >= count) - i = 0; - *pos = i; - return &header->a_entries[j]; - } - } - - if (!once) { - once = 1; - start = 0; - end = *pos; - goto again; - } - - return NULL; -} - -/* - * Merge the posix ACL and the extended ACL into new extended ACL. - */ -ext_acl_xattr_header * -lustre_acl_xattr_merge2ext(posix_acl_xattr_header *posix_header, int size, - ext_acl_xattr_header *ext_header) -{ - int ori_ext_count, posix_count, ext_count, ext_size; - int i, j, pos = 0, rc = 0; - posix_acl_xattr_entry pae; - ext_acl_xattr_header *new; - ext_acl_xattr_entry *ee, eae; - - if (unlikely(size < 0)) - return ERR_PTR(-EINVAL); - else if (!size) - posix_count = 0; - else - posix_count = CFS_ACL_XATTR_COUNT(size, posix_acl_xattr); - ori_ext_count = le32_to_cpu(ext_header->a_count); - ext_count = posix_count + ori_ext_count; - ext_size = CFS_ACL_XATTR_SIZE(ext_count, ext_acl_xattr); - - new = kzalloc(ext_size, GFP_NOFS); - if (unlikely(!new)) - return ERR_PTR(-ENOMEM); - - for (i = 0, j = 0; i < posix_count; i++) { - lustre_posix_acl_le_to_cpu(&pae, &posix_header->a_entries[i]); - switch (pae.e_tag) { - case ACL_USER_OBJ: - case ACL_GROUP_OBJ: - case ACL_MASK: - case ACL_OTHER: - if (pae.e_id != ACL_UNDEFINED_ID) { - rc = -EIO; - goto out; - } - case ACL_USER: - /* ignore "nobody" entry. */ - if (pae.e_id == NOBODY_UID) - break; - - new->a_entries[j].e_tag = - posix_header->a_entries[i].e_tag; - new->a_entries[j].e_perm = - posix_header->a_entries[i].e_perm; - new->a_entries[j].e_id = - posix_header->a_entries[i].e_id; - ee = lustre_ext_acl_xattr_search(ext_header, - &posix_header->a_entries[i], &pos); - if (ee) { - if (posix_header->a_entries[i].e_perm != - ee->e_perm) - /* entry modified. */ - ee->e_stat = - new->a_entries[j++].e_stat = - cpu_to_le32(ES_MOD); - else - /* entry unchanged. */ - ee->e_stat = - new->a_entries[j++].e_stat = - cpu_to_le32(ES_UNC); - } else { - /* new entry. */ - new->a_entries[j++].e_stat = - cpu_to_le32(ES_ADD); - } - break; - case ACL_GROUP: - /* ignore "nobody" entry. */ - if (pae.e_id == NOBODY_GID) - break; - new->a_entries[j].e_tag = - posix_header->a_entries[i].e_tag; - new->a_entries[j].e_perm = - posix_header->a_entries[i].e_perm; - new->a_entries[j].e_id = - posix_header->a_entries[i].e_id; - ee = lustre_ext_acl_xattr_search(ext_header, - &posix_header->a_entries[i], &pos); - if (ee) { - if (posix_header->a_entries[i].e_perm != - ee->e_perm) - /* entry modified. */ - ee->e_stat = - new->a_entries[j++].e_stat = - cpu_to_le32(ES_MOD); - else - /* entry unchanged. */ - ee->e_stat = - new->a_entries[j++].e_stat = - cpu_to_le32(ES_UNC); - } else { - /* new entry. */ - new->a_entries[j++].e_stat = - cpu_to_le32(ES_ADD); - } - break; - default: - rc = -EIO; - goto out; - } - } - - /* process deleted entries. */ - for (i = 0; i < ori_ext_count; i++) { - lustre_ext_acl_le_to_cpu(&eae, &ext_header->a_entries[i]); - if (eae.e_stat == ES_UNK) { - /* ignore "nobody" entry. */ - if ((eae.e_tag == ACL_USER && eae.e_id == NOBODY_UID) || - (eae.e_tag == ACL_GROUP && eae.e_id == NOBODY_GID)) - continue; - - new->a_entries[j].e_tag = - ext_header->a_entries[i].e_tag; - new->a_entries[j].e_perm = - ext_header->a_entries[i].e_perm; - new->a_entries[j].e_id = ext_header->a_entries[i].e_id; - new->a_entries[j++].e_stat = cpu_to_le32(ES_DEL); - } - } - - new->a_count = cpu_to_le32(j); - /* free unused space. */ - rc = lustre_ext_acl_xattr_reduce_space(&new, ext_count); - -out: - if (rc) { - kfree(new); - new = ERR_PTR(rc); - } - return new; -} -EXPORT_SYMBOL(lustre_acl_xattr_merge2ext); - -#endif diff --git a/drivers/staging/lustre/lustre/osc/osc_cache.c b/drivers/staging/lustre/lustre/osc/osc_cache.c index 1a6df43..4c78b53 100644 --- a/drivers/staging/lustre/lustre/osc/osc_cache.c +++ b/drivers/staging/lustre/lustre/osc/osc_cache.c @@ -2367,7 +2367,7 @@ int osc_prep_async_page(struct osc_object *osc, struct osc_page *ops, oap->oap_obj_off = offset; LASSERT(!(offset & ~PAGE_MASK)); - if (!client_is_remote(exp) && capable(CFS_CAP_SYS_RESOURCE)) + if (capable(CFS_CAP_SYS_RESOURCE)) oap->oap_brw_flags = OBD_BRW_NOQUOTA; INIT_LIST_HEAD(&oap->oap_pending_item); @@ -2406,8 +2406,7 @@ int osc_queue_async_io(const struct lu_env *env, struct cl_io *io, /* Set the OBD_BRW_SRVLOCK before the page is queued. */ brw_flags |= ops->ops_srvlock ? OBD_BRW_SRVLOCK : 0; - if (!client_is_remote(osc_export(osc)) && - capable(CFS_CAP_SYS_RESOURCE)) { + if (capable(CFS_CAP_SYS_RESOURCE)) { brw_flags |= OBD_BRW_NOQUOTA; cmd |= OBD_BRW_NOQUOTA; } diff --git a/drivers/staging/lustre/lustre/osc/osc_page.c b/drivers/staging/lustre/lustre/osc/osc_page.c index 57d8a5a..18c261b 100644 --- a/drivers/staging/lustre/lustre/osc/osc_page.c +++ b/drivers/staging/lustre/lustre/osc/osc_page.c @@ -357,7 +357,6 @@ void osc_page_submit(const struct lu_env *env, struct osc_page *opg, enum cl_req_type crt, int brw_flags) { struct osc_async_page *oap = &opg->ops_oap; - struct osc_object *obj = oap->oap_obj; LASSERTF(oap->oap_magic == OAP_MAGIC, "Bad oap magic: oap %p, magic 0x%x\n", oap, oap->oap_magic); @@ -372,8 +371,7 @@ void osc_page_submit(const struct lu_env *env, struct osc_page *opg, if (osc_over_unstable_soft_limit(oap->oap_cli)) oap->oap_brw_flags |= OBD_BRW_SOFT_SYNC; - if (!client_is_remote(osc_export(obj)) && - capable(CFS_CAP_SYS_RESOURCE)) { + if (capable(CFS_CAP_SYS_RESOURCE)) { oap->oap_brw_flags |= OBD_BRW_NOQUOTA; oap->oap_cmd |= OBD_BRW_NOQUOTA; } diff --git a/drivers/staging/lustre/lustre/ptlrpc/layout.c b/drivers/staging/lustre/lustre/ptlrpc/layout.c index e6ff97d..ab5d851 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/layout.c +++ b/drivers/staging/lustre/lustre/ptlrpc/layout.c @@ -194,7 +194,7 @@ static const struct req_msg_field *mds_reint_create_slave_client[] = { &RMF_DLM_REQ }; -static const struct req_msg_field *mds_reint_create_rmt_acl_client[] = { +static const struct req_msg_field *mds_reint_create_acl_client[] = { &RMF_PTLRPC_BODY, &RMF_REC_REINT, &RMF_CAPA1, @@ -675,7 +675,7 @@ static struct req_format *req_formats[] = { &RQF_MDS_DONE_WRITING, &RQF_MDS_REINT, &RQF_MDS_REINT_CREATE, - &RQF_MDS_REINT_CREATE_RMT_ACL, + &RQF_MDS_REINT_CREATE_ACL, &RQF_MDS_REINT_CREATE_SLAVE, &RQF_MDS_REINT_CREATE_SYM, &RQF_MDS_REINT_OPEN, @@ -1238,10 +1238,10 @@ struct req_format RQF_MDS_REINT_CREATE = mds_reint_create_client, mdt_body_capa); EXPORT_SYMBOL(RQF_MDS_REINT_CREATE); -struct req_format RQF_MDS_REINT_CREATE_RMT_ACL = - DEFINE_REQ_FMT0("MDS_REINT_CREATE_RMT_ACL", - mds_reint_create_rmt_acl_client, mdt_body_capa); -EXPORT_SYMBOL(RQF_MDS_REINT_CREATE_RMT_ACL); +struct req_format RQF_MDS_REINT_CREATE_ACL = + DEFINE_REQ_FMT0("MDS_REINT_CREATE_ACL", + mds_reint_create_acl_client, mdt_body_capa); +EXPORT_SYMBOL(RQF_MDS_REINT_CREATE_ACL); struct req_format RQF_MDS_REINT_CREATE_SLAVE = DEFINE_REQ_FMT0("MDS_REINT_CREATE_EA", diff --git a/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c b/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c index 9ff58a1..b514f18 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c +++ b/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c @@ -1802,19 +1802,6 @@ void lustre_swab_obd_quotactl(struct obd_quotactl *q) } EXPORT_SYMBOL(lustre_swab_obd_quotactl); -void lustre_swab_mdt_remote_perm(struct mdt_remote_perm *p) -{ - __swab32s(&p->rp_uid); - __swab32s(&p->rp_gid); - __swab32s(&p->rp_fsuid); - __swab32s(&p->rp_fsuid_h); - __swab32s(&p->rp_fsgid); - __swab32s(&p->rp_fsgid_h); - __swab32s(&p->rp_access_perm); - __swab32s(&p->rp_padding); -}; -EXPORT_SYMBOL(lustre_swab_mdt_remote_perm); - void lustre_swab_fid2path(struct getinfo_fid2path *gf) { lustre_swab_lu_fid(&gf->gf_fid); diff --git a/drivers/staging/lustre/lustre/ptlrpc/wiretest.c b/drivers/staging/lustre/lustre/ptlrpc/wiretest.c index 9fd9de9..6cc2b2e 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/wiretest.c +++ b/drivers/staging/lustre/lustre/ptlrpc/wiretest.c @@ -1265,8 +1265,6 @@ void lustre_assert_wire_constants(void) OBD_MD_FLXATTRRM); LASSERTF(OBD_MD_FLACL == (0x0000008000000000ULL), "found 0x%.16llxULL\n", OBD_MD_FLACL); - LASSERTF(OBD_MD_FLRMTPERM == (0x0000010000000000ULL), "found 0x%.16llxULL\n", - OBD_MD_FLRMTPERM); LASSERTF(OBD_MD_FLMDSCAPA == (0x0000020000000000ULL), "found 0x%.16llxULL\n", OBD_MD_FLMDSCAPA); LASSERTF(OBD_MD_FLOSSCAPA == (0x0000040000000000ULL), "found 0x%.16llxULL\n", @@ -1277,14 +1275,6 @@ void lustre_assert_wire_constants(void) OBD_MD_FLCROSSREF); LASSERTF(OBD_MD_FLGETATTRLOCK == (0x0000200000000000ULL), "found 0x%.16llxULL\n", OBD_MD_FLGETATTRLOCK); - LASSERTF(OBD_MD_FLRMTLSETFACL == (0x0001000000000000ULL), "found 0x%.16llxULL\n", - OBD_MD_FLRMTLSETFACL); - LASSERTF(OBD_MD_FLRMTLGETFACL == (0x0002000000000000ULL), "found 0x%.16llxULL\n", - OBD_MD_FLRMTLGETFACL); - LASSERTF(OBD_MD_FLRMTRSETFACL == (0x0004000000000000ULL), "found 0x%.16llxULL\n", - OBD_MD_FLRMTRSETFACL); - LASSERTF(OBD_MD_FLRMTRGETFACL == (0x0008000000000000ULL), "found 0x%.16llxULL\n", - OBD_MD_FLRMTRGETFACL); LASSERTF(OBD_MD_FLDATAVERSION == (0x0010000000000000ULL), "found 0x%.16llxULL\n", OBD_MD_FLDATAVERSION); CLASSERT(OBD_FL_INLINEDATA == 0x00000001); @@ -1891,44 +1881,6 @@ void lustre_assert_wire_constants(void) LASSERTF((int)sizeof(((struct mdt_ioepoch *)0)->padding) == 4, "found %lld\n", (long long)(int)sizeof(((struct mdt_ioepoch *)0)->padding)); - /* Checks for struct mdt_remote_perm */ - LASSERTF((int)sizeof(struct mdt_remote_perm) == 32, "found %lld\n", - (long long)(int)sizeof(struct mdt_remote_perm)); - LASSERTF((int)offsetof(struct mdt_remote_perm, rp_uid) == 0, "found %lld\n", - (long long)(int)offsetof(struct mdt_remote_perm, rp_uid)); - LASSERTF((int)sizeof(((struct mdt_remote_perm *)0)->rp_uid) == 4, "found %lld\n", - (long long)(int)sizeof(((struct mdt_remote_perm *)0)->rp_uid)); - LASSERTF((int)offsetof(struct mdt_remote_perm, rp_gid) == 4, "found %lld\n", - (long long)(int)offsetof(struct mdt_remote_perm, rp_gid)); - LASSERTF((int)sizeof(((struct mdt_remote_perm *)0)->rp_gid) == 4, "found %lld\n", - (long long)(int)sizeof(((struct mdt_remote_perm *)0)->rp_gid)); - LASSERTF((int)offsetof(struct mdt_remote_perm, rp_fsuid) == 8, "found %lld\n", - (long long)(int)offsetof(struct mdt_remote_perm, rp_fsuid)); - LASSERTF((int)sizeof(((struct mdt_remote_perm *)0)->rp_fsuid) == 4, "found %lld\n", - (long long)(int)sizeof(((struct mdt_remote_perm *)0)->rp_fsuid)); - LASSERTF((int)offsetof(struct mdt_remote_perm, rp_fsgid) == 16, "found %lld\n", - (long long)(int)offsetof(struct mdt_remote_perm, rp_fsgid)); - LASSERTF((int)sizeof(((struct mdt_remote_perm *)0)->rp_fsgid) == 4, "found %lld\n", - (long long)(int)sizeof(((struct mdt_remote_perm *)0)->rp_fsgid)); - LASSERTF((int)offsetof(struct mdt_remote_perm, rp_access_perm) == 24, "found %lld\n", - (long long)(int)offsetof(struct mdt_remote_perm, rp_access_perm)); - LASSERTF((int)sizeof(((struct mdt_remote_perm *)0)->rp_access_perm) == 4, "found %lld\n", - (long long)(int)sizeof(((struct mdt_remote_perm *)0)->rp_access_perm)); - LASSERTF((int)offsetof(struct mdt_remote_perm, rp_padding) == 28, "found %lld\n", - (long long)(int)offsetof(struct mdt_remote_perm, rp_padding)); - LASSERTF((int)sizeof(((struct mdt_remote_perm *)0)->rp_padding) == 4, "found %lld\n", - (long long)(int)sizeof(((struct mdt_remote_perm *)0)->rp_padding)); - LASSERTF(CFS_SETUID_PERM == 0x00000001UL, "found 0x%.8xUL\n", - (unsigned)CFS_SETUID_PERM); - LASSERTF(CFS_SETGID_PERM == 0x00000002UL, "found 0x%.8xUL\n", - (unsigned)CFS_SETGID_PERM); - LASSERTF(CFS_SETGRP_PERM == 0x00000004UL, "found 0x%.8xUL\n", - (unsigned)CFS_SETGRP_PERM); - LASSERTF(CFS_RMTACL_PERM == 0x00000008UL, "found 0x%.8xUL\n", - (unsigned)CFS_RMTACL_PERM); - LASSERTF(CFS_RMTOWN_PERM == 0x00000010UL, "found 0x%.8xUL\n", - (unsigned)CFS_RMTOWN_PERM); - /* Checks for struct mdt_rec_setattr */ LASSERTF((int)sizeof(struct mdt_rec_setattr) == 136, "found %lld\n", (long long)(int)sizeof(struct mdt_rec_setattr)); -- 1.7.1 From oleg.drokin at intel.com Mon Jun 20 03:44:41 2016 From: oleg.drokin at intel.com (Oleg Drokin) Date: Sun, 19 Jun 2016 23:44:41 -0400 Subject: [lustre-devel] [PATCH] staging: lustre: remove remote client support In-Reply-To: <1466391233-4230-1-git-send-email-jsimmons@infradead.org> References: <1466391233-4230-1-git-send-email-jsimmons@infradead.org> Message-ID: On Jun 19, 2016, at 10:53 PM, James Simmons wrote: > From: Fan Yong > > There are several obsolete sub commands for lfs to work with > remote client. We do not support that anymore, and should be > deleted along with any kernel code related to remote client. I wish you reworked this message to say that it removes remote something or other that's no longer in use. I am not sure why Greag or kernel guys would care for lctl commands, esp. considering those are not even part of this patch. > Signed-off-by: Fan Yong > Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6971 > Reviewed-on: http://review.whamcloud.com/19789 > Reviewed-by: Andreas Dilger > Reviewed-by: James Simmons > Reviewed-by: Lai Siyao > Reviewed-by: Oleg Drokin > Signed-off-by: James Simmons > --- > .../lustre/lustre/include/lustre/lustre_idl.h | 40 +-- > .../lustre/lustre/include/lustre/lustre_user.h | 15 +- > .../staging/lustre/lustre/include/lustre_eacl.h | 11 - > .../staging/lustre/lustre/include/lustre_export.h | 13 - > drivers/staging/lustre/lustre/include/lustre_net.h | 1 - > .../lustre/lustre/include/lustre_req_layout.h | 2 +- > drivers/staging/lustre/lustre/include/obd.h | 3 - > drivers/staging/lustre/lustre/include/obd_class.h | 10 - > drivers/staging/lustre/lustre/llite/Makefile | 3 +- > drivers/staging/lustre/lustre/llite/dir.c | 29 +-- > drivers/staging/lustre/lustre/llite/file.c | 15 - > .../staging/lustre/lustre/llite/llite_internal.h | 88 +---- > drivers/staging/lustre/lustre/llite/llite_lib.c | 69 +--- > drivers/staging/lustre/lustre/llite/llite_rmtacl.c | 295 -------------- > drivers/staging/lustre/lustre/llite/lproc_llite.c | 6 +- > drivers/staging/lustre/lustre/llite/remote_perm.c | 320 --------------- > drivers/staging/lustre/lustre/llite/super25.c | 19 - > drivers/staging/lustre/lustre/llite/xattr.c | 97 +----- > drivers/staging/lustre/lustre/lmv/lmv_obd.c | 22 - > drivers/staging/lustre/lustre/mdc/mdc_locks.c | 21 +- > drivers/staging/lustre/lustre/mdc/mdc_reint.c | 2 +- > drivers/staging/lustre/lustre/mdc/mdc_request.c | 76 +---- > drivers/staging/lustre/lustre/obdclass/Makefile | 3 +- > drivers/staging/lustre/lustre/obdclass/acl.c | 411 -------------------- > drivers/staging/lustre/lustre/osc/osc_cache.c | 5 +- > drivers/staging/lustre/lustre/osc/osc_page.c | 4 +- > drivers/staging/lustre/lustre/ptlrpc/layout.c | 12 +- > .../staging/lustre/lustre/ptlrpc/pack_generic.c | 13 - > drivers/staging/lustre/lustre/ptlrpc/wiretest.c | 48 --- > 29 files changed, 55 insertions(+), 1598 deletions(-) > delete mode 100644 drivers/staging/lustre/lustre/llite/llite_rmtacl.c > delete mode 100644 drivers/staging/lustre/lustre/llite/remote_perm.c > delete mode 100644 drivers/staging/lustre/lustre/obdclass/acl.c > > diff --git a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h > index fac7215..051864c 100644 > --- a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h > +++ b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h > @@ -1237,8 +1237,16 @@ void lustre_swab_ptlrpc_body(struct ptlrpc_body *pb); > */ > #define OBD_CONNECT_ATTRFID 0x4000ULL /*Server can GetAttr By Fid*/ > #define OBD_CONNECT_NODEVOH 0x8000ULL /*No open hndl on specl nodes*/ > -#define OBD_CONNECT_RMT_CLIENT 0x10000ULL /*Remote client */ > -#define OBD_CONNECT_RMT_CLIENT_FORCE 0x20000ULL /*Remote client by force */ > +#define OBD_CONNECT_RMT_CLIENT 0x10000ULL /* Remote client, never used > + * in production. Removed in > + * 2.9. Keep this flag to > + * avoid reuse. > + */ > +#define OBD_CONNECT_RMT_CLIENT_FORCE 0x20000ULL /* Remote client by force, > + * never used in production. > + * Removed in 2.9. Keep this > + * flag to avoid reuse > + */ > #define OBD_CONNECT_BRW_SIZE 0x40000ULL /*Max bytes per rpc */ > #define OBD_CONNECT_QUOTA64 0x80000ULL /*Not used since 2.4 */ > #define OBD_CONNECT_MDS_CAPA 0x100000ULL /*MDS capability */ > @@ -1699,7 +1707,7 @@ lov_mds_md_max_stripe_count(size_t buf_size, __u32 lmm_magic) > #define OBD_MD_FLXATTRLS (0x0000002000000000ULL) /* xattr list */ > #define OBD_MD_FLXATTRRM (0x0000004000000000ULL) /* xattr remove */ > #define OBD_MD_FLACL (0x0000008000000000ULL) /* ACL */ > -#define OBD_MD_FLRMTPERM (0x0000010000000000ULL) /* remote permission */ > +/* OBD_MD_FLRMTPERM (0x0000010000000000ULL) remote perm, obsolete */ > #define OBD_MD_FLMDSCAPA (0x0000020000000000ULL) /* MDS capability */ > #define OBD_MD_FLOSSCAPA (0x0000040000000000ULL) /* OSS capability */ > #define OBD_MD_FLCKSPLIT (0x0000080000000000ULL) /* Check split on server */ > @@ -1711,10 +1719,10 @@ lov_mds_md_max_stripe_count(size_t buf_size, __u32 lmm_magic) > */ > #define OBD_MD_FLOBJCOUNT (0x0000400000000000ULL) /* for multiple destroy */ > > -#define OBD_MD_FLRMTLSETFACL (0x0001000000000000ULL) /* lfs lsetfacl case */ > -#define OBD_MD_FLRMTLGETFACL (0x0002000000000000ULL) /* lfs lgetfacl case */ > -#define OBD_MD_FLRMTRSETFACL (0x0004000000000000ULL) /* lfs rsetfacl case */ > -#define OBD_MD_FLRMTRGETFACL (0x0008000000000000ULL) /* lfs rgetfacl case */ > +/* OBD_MD_FLRMTLSETFACL (0x0001000000000000ULL) lfs lsetfacl, obsolete */ > +/* OBD_MD_FLRMTLGETFACL (0x0002000000000000ULL) lfs lgetfacl, obsolete */ > +/* OBD_MD_FLRMTRSETFACL (0x0004000000000000ULL) lfs rsetfacl, obsolete */ > +/* OBD_MD_FLRMTRGETFACL (0x0008000000000000ULL) lfs rgetfacl, obsolete */ > > #define OBD_MD_FLDATAVERSION (0x0010000000000000ULL) /* iversion sum */ > #define OBD_MD_FLRELEASED (0x0020000000000000ULL) /* file released */ > @@ -2155,26 +2163,8 @@ enum { > CFS_SETUID_PERM = 0x01, > CFS_SETGID_PERM = 0x02, > CFS_SETGRP_PERM = 0x04, > - CFS_RMTACL_PERM = 0x08, > - CFS_RMTOWN_PERM = 0x10 > -}; > - > -/* inode access permission for remote user, the inode info are omitted, > - * for client knows them. > - */ > -struct mdt_remote_perm { > - __u32 rp_uid; > - __u32 rp_gid; > - __u32 rp_fsuid; > - __u32 rp_fsuid_h; > - __u32 rp_fsgid; > - __u32 rp_fsgid_h; > - __u32 rp_access_perm; /* MAY_READ/WRITE/EXEC */ > - __u32 rp_padding; > }; > > -void lustre_swab_mdt_remote_perm(struct mdt_remote_perm *p); > - > struct mdt_rec_setattr { > __u32 sa_opcode; > __u32 sa_cap; > diff --git a/drivers/staging/lustre/lustre/include/lustre/lustre_user.h b/drivers/staging/lustre/lustre/include/lustre/lustre_user.h > index a6e351a..ef6f38f 100644 > --- a/drivers/staging/lustre/lustre/include/lustre/lustre_user.h > +++ b/drivers/staging/lustre/lustre/include/lustre/lustre_user.h > @@ -211,7 +211,7 @@ struct ost_id { > #define IOC_OBD_STATFS _IOWR('f', 164, struct obd_statfs *) > #define IOC_LOV_GETINFO _IOWR('f', 165, struct lov_user_mds_data *) > #define LL_IOC_FLUSHCTX _IOW('f', 166, long) > -#define LL_IOC_RMTACL _IOW('f', 167, long) > +/* LL_IOC_RMTACL 167 obsolete */ > #define LL_IOC_GETOBDCOUNT _IOR('f', 168, long) > #define LL_IOC_LLOOP_ATTACH _IOWR('f', 169, long) > #define LL_IOC_LLOOP_DETACH _IOWR('f', 170, long) > @@ -538,19 +538,6 @@ struct identity_downcall_data { > __u32 idd_groups[0]; > }; > > -/* for non-mapped uid/gid */ > -#define NOBODY_UID 99 > -#define NOBODY_GID 99 > - > -#define INVALID_ID (-1) > - > -enum { > - RMT_LSETFACL = 1, > - RMT_LGETFACL = 2, > - RMT_RSETFACL = 3, > - RMT_RGETFACL = 4 > -}; > - > /* lustre volatile file support > * file name header: .^L^S^T^R:volatile" > */ > diff --git a/drivers/staging/lustre/lustre/include/lustre_eacl.h b/drivers/staging/lustre/lustre/include/lustre_eacl.h > index e5eadc4..d1039e1 100644 > --- a/drivers/staging/lustre/lustre/include/lustre_eacl.h > +++ b/drivers/staging/lustre/lustre/include/lustre_eacl.h > @@ -66,17 +66,6 @@ typedef struct { > #define CFS_ACL_XATTR_COUNT(size, prefix) \ > (((size) - sizeof(prefix ## _header)) / sizeof(prefix ## _entry)) > > -extern ext_acl_xattr_header * > -lustre_posix_acl_xattr_2ext(posix_acl_xattr_header *header, int size); > -extern int > -lustre_posix_acl_xattr_filter(posix_acl_xattr_header *header, size_t size, > - posix_acl_xattr_header **out); > -extern void > -lustre_ext_acl_xattr_free(ext_acl_xattr_header *header); > -extern ext_acl_xattr_header * > -lustre_acl_xattr_merge2ext(posix_acl_xattr_header *posix_header, int size, > - ext_acl_xattr_header *ext_header); > - > #endif /* CONFIG_FS_POSIX_ACL */ > > /** @} eacl */ > diff --git a/drivers/staging/lustre/lustre/include/lustre_export.h b/drivers/staging/lustre/lustre/include/lustre_export.h > index 7c3ed55..6e7cc46 100644 > --- a/drivers/staging/lustre/lustre/include/lustre_export.h > +++ b/drivers/staging/lustre/lustre/include/lustre_export.h > @@ -176,19 +176,6 @@ static inline int exp_connect_lru_resize(struct obd_export *exp) > return !!(exp_connect_flags(exp) & OBD_CONNECT_LRU_RESIZE); > } > > -static inline int exp_connect_rmtclient(struct obd_export *exp) > -{ > - return !!(exp_connect_flags(exp) & OBD_CONNECT_RMT_CLIENT); > -} > - > -static inline int client_is_remote(struct obd_export *exp) > -{ > - struct obd_import *imp = class_exp2cliimp(exp); > - > - return !!(imp->imp_connect_data.ocd_connect_flags & > - OBD_CONNECT_RMT_CLIENT); > -} > - > static inline int exp_connect_vbr(struct obd_export *exp) > { > return !!(exp_connect_flags(exp) & OBD_CONNECT_VBR); > diff --git a/drivers/staging/lustre/lustre/include/lustre_net.h b/drivers/staging/lustre/lustre/include/lustre_net.h > index dba4d1d..bdd2ed5 100644 > --- a/drivers/staging/lustre/lustre/include/lustre_net.h > +++ b/drivers/staging/lustre/lustre/include/lustre_net.h > @@ -1384,7 +1384,6 @@ struct ptlrpc_request { > rq_bulk_write:1, /* request bulk write */ > /* server authentication flags */ > rq_auth_gss:1, /* authenticated by gss */ > - rq_auth_remote:1, /* authed as remote user */ > rq_auth_usr_root:1, /* authed as root */ > rq_auth_usr_mdt:1, /* authed as mdt */ > rq_auth_usr_ost:1, /* authed as ost */ > diff --git a/drivers/staging/lustre/lustre/include/lustre_req_layout.h b/drivers/staging/lustre/lustre/include/lustre_req_layout.h > index d00aae5..544a43c 100644 > --- a/drivers/staging/lustre/lustre/include/lustre_req_layout.h > +++ b/drivers/staging/lustre/lustre/include/lustre_req_layout.h > @@ -160,7 +160,7 @@ extern struct req_format RQF_MDS_IS_SUBDIR; > extern struct req_format RQF_MDS_DONE_WRITING; > extern struct req_format RQF_MDS_REINT; > extern struct req_format RQF_MDS_REINT_CREATE; > -extern struct req_format RQF_MDS_REINT_CREATE_RMT_ACL; > +extern struct req_format RQF_MDS_REINT_CREATE_ACL; > extern struct req_format RQF_MDS_REINT_CREATE_SLAVE; > extern struct req_format RQF_MDS_REINT_CREATE_SYM; > extern struct req_format RQF_MDS_REINT_OPEN; > diff --git a/drivers/staging/lustre/lustre/include/obd.h b/drivers/staging/lustre/lustre/include/obd.h > index e654d42..9971ee5 100644 > --- a/drivers/staging/lustre/lustre/include/obd.h > +++ b/drivers/staging/lustre/lustre/include/obd.h > @@ -1115,9 +1115,6 @@ struct md_ops { > ldlm_policy_data_t *, enum ldlm_mode, > enum ldlm_cancel_flags flags, void *opaque); > > - int (*get_remote_perm)(struct obd_export *, const struct lu_fid *, > - __u32, struct ptlrpc_request **); > - > int (*intent_getattr_async)(struct obd_export *, > struct md_enqueue_info *, > struct ldlm_enqueue_info *); > diff --git a/drivers/staging/lustre/lustre/include/obd_class.h b/drivers/staging/lustre/lustre/include/obd_class.h > index 2196744..6482a93 100644 > --- a/drivers/staging/lustre/lustre/include/obd_class.h > +++ b/drivers/staging/lustre/lustre/include/obd_class.h > @@ -1650,16 +1650,6 @@ static inline int md_init_ea_size(struct obd_export *exp, int easize, > cookiesize, def_cookiesize); > } > > -static inline int md_get_remote_perm(struct obd_export *exp, > - const struct lu_fid *fid, __u32 suppgid, > - struct ptlrpc_request **request) > -{ > - EXP_CHECK_MD_OP(exp, get_remote_perm); > - EXP_MD_COUNTER_INCREMENT(exp, get_remote_perm); > - return MDP(exp->exp_obd, get_remote_perm)(exp, fid, suppgid, > - request); > -} > - > static inline int md_intent_getattr_async(struct obd_export *exp, > struct md_enqueue_info *minfo, > struct ldlm_enqueue_info *einfo) > diff --git a/drivers/staging/lustre/lustre/llite/Makefile b/drivers/staging/lustre/lustre/llite/Makefile > index 19701e7..2cbb1b8 100644 > --- a/drivers/staging/lustre/lustre/llite/Makefile > +++ b/drivers/staging/lustre/lustre/llite/Makefile > @@ -1,8 +1,7 @@ > obj-$(CONFIG_LUSTRE_FS) += lustre.o > lustre-y := dcache.o dir.o file.o llite_close.o llite_lib.o llite_nfs.o \ > rw.o namei.o symlink.o llite_mmap.o \ > - xattr.o xattr_cache.o remote_perm.o llite_rmtacl.o \ > - rw26.o super25.o statahead.o \ > + xattr.o xattr_cache.o rw26.o super25.o statahead.o \ > glimpse.o lcommon_cl.o lcommon_misc.o \ > vvp_dev.o vvp_page.o vvp_lock.o vvp_io.o vvp_object.o vvp_req.o \ > lproc_llite.o > diff --git a/drivers/staging/lustre/lustre/llite/dir.c b/drivers/staging/lustre/lustre/llite/dir.c > index 99735f6..2f2c57e 100644 > --- a/drivers/staging/lustre/lustre/llite/dir.c > +++ b/drivers/staging/lustre/lustre/llite/dir.c > @@ -1097,8 +1097,7 @@ static int quotactl_ioctl(struct ll_sb_info *sbi, struct if_quotactl *qctl) > case Q_QUOTAOFF: > case Q_SETQUOTA: > case Q_SETINFO: > - if (!capable(CFS_CAP_SYS_ADMIN) || > - sbi->ll_flags & LL_SBI_RMT_CLIENT) > + if (!capable(CFS_CAP_SYS_ADMIN)) > return -EPERM; > break; > case Q_GETQUOTA: > @@ -1106,8 +1105,7 @@ static int quotactl_ioctl(struct ll_sb_info *sbi, struct if_quotactl *qctl) > !uid_eq(current_euid(), make_kuid(&init_user_ns, id))) || > (type == GRPQUOTA && > !in_egroup_p(make_kgid(&init_user_ns, id)))) && > - (!capable(CFS_CAP_SYS_ADMIN) || > - sbi->ll_flags & LL_SBI_RMT_CLIENT)) > + !capable(CFS_CAP_SYS_ADMIN)) > return -EPERM; > break; > case Q_GETINFO: > @@ -1118,9 +1116,6 @@ static int quotactl_ioctl(struct ll_sb_info *sbi, struct if_quotactl *qctl) > } > > if (valid != QC_GENERAL) { > - if (sbi->ll_flags & LL_SBI_RMT_CLIENT) > - return -EOPNOTSUPP; > - > if (cmd == Q_GETINFO) > qctl->qc_cmd = Q_GETOINFO; > else if (cmd == Q_GETQUOTA) > @@ -1621,8 +1616,7 @@ free_lmm: > struct obd_quotactl *oqctl; > int error = 0; > > - if (!capable(CFS_CAP_SYS_ADMIN) || > - sbi->ll_flags & LL_SBI_RMT_CLIENT) > + if (!capable(CFS_CAP_SYS_ADMIN)) > return -EPERM; > > oqctl = kzalloc(sizeof(*oqctl), GFP_NOFS); > @@ -1645,8 +1639,7 @@ free_lmm: > case OBD_IOC_POLL_QUOTACHECK: { > struct if_quotacheck *check; > > - if (!capable(CFS_CAP_SYS_ADMIN) || > - sbi->ll_flags & LL_SBI_RMT_CLIENT) > + if (!capable(CFS_CAP_SYS_ADMIN)) > return -EPERM; > > check = kzalloc(sizeof(*check), GFP_NOFS); > @@ -1703,20 +1696,6 @@ out_quotactl: > return ll_get_obd_name(inode, cmd, arg); > case LL_IOC_FLUSHCTX: > return ll_flush_ctx(inode); > -#ifdef CONFIG_FS_POSIX_ACL > - case LL_IOC_RMTACL: { > - if (sbi->ll_flags & LL_SBI_RMT_CLIENT && is_root_inode(inode)) { > - struct ll_file_data *fd = LUSTRE_FPRIVATE(file); > - > - rc = rct_add(&sbi->ll_rct, current_pid(), arg); > - if (!rc) > - fd->fd_flags |= LL_FILE_RMTACL; > - return rc; > - } else { > - return 0; > - } > - } > -#endif > case LL_IOC_GETOBDCOUNT: { > int count, vallen; > struct obd_export *exp; > diff --git a/drivers/staging/lustre/lustre/llite/file.c b/drivers/staging/lustre/lustre/llite/file.c > index b0c4548..2d50d1c 100644 > --- a/drivers/staging/lustre/lustre/llite/file.c > +++ b/drivers/staging/lustre/lustre/llite/file.c > @@ -344,18 +344,6 @@ int ll_file_release(struct inode *inode, struct file *file) > CDEBUG(D_VFSTRACE, "VFS Op:inode="DFID"(%p)\n", > PFID(ll_inode2fid(inode)), inode); > > -#ifdef CONFIG_FS_POSIX_ACL > - if (sbi->ll_flags & LL_SBI_RMT_CLIENT && is_root_inode(inode)) { > - struct ll_file_data *fd = LUSTRE_FPRIVATE(file); > - > - if (unlikely(fd->fd_flags & LL_FILE_RMTACL)) { > - fd->fd_flags &= ~LL_FILE_RMTACL; > - rct_del(&sbi->ll_rct, current_pid()); > - et_search_free(&sbi->ll_et, current_pid()); > - } > - } > -#endif > - > if (!is_root_inode(inode)) > ll_stats_ops_tally(sbi, LPROC_LL_RELEASE, 1); > fd = LUSTRE_FPRIVATE(file); > @@ -3156,9 +3144,6 @@ int ll_inode_permission(struct inode *inode, int mask) > CDEBUG(D_VFSTRACE, "VFS Op:inode="DFID"(%p), inode mode %x mask %o\n", > PFID(ll_inode2fid(inode)), inode, inode->i_mode, mask); > > - if (ll_i2sbi(inode)->ll_flags & LL_SBI_RMT_CLIENT) > - return lustre_check_remote_perm(inode, mask); > - > ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_INODE_PERM, 1); > rc = generic_permission(inode, mask); > > diff --git a/drivers/staging/lustre/lustre/llite/llite_internal.h b/drivers/staging/lustre/lustre/llite/llite_internal.h > index 7c1a325..8fe63bd 100644 > --- a/drivers/staging/lustre/lustre/llite/llite_internal.h > +++ b/drivers/staging/lustre/lustre/llite/llite_internal.h > @@ -72,9 +72,6 @@ struct ll_dentry_data { > #define LLI_INODE_MAGIC 0x111d0de5 > #define LLI_INODE_DEAD 0xdeadd00d > > -/* remote client permission cache */ > -#define REMOTE_PERM_HASHSIZE 16 > - > struct ll_getname_data { > struct dir_context ctx; > char *lgd_name; /* points to a buffer with NAME_MAX+1 size */ > @@ -82,19 +79,6 @@ struct ll_getname_data { > int lgd_found; /* inode matched? */ > }; > > -/* llite setxid/access permission for user on remote client */ > -struct ll_remote_perm { > - struct hlist_node lrp_list; > - uid_t lrp_uid; > - gid_t lrp_gid; > - uid_t lrp_fsuid; > - gid_t lrp_fsgid; > - int lrp_access_perm; /* MAY_READ/WRITE/EXEC, this > - * is access permission with > - * lrp_fsuid/lrp_fsgid. > - */ > -}; > - > struct ll_grouplock { > struct lu_env *lg_env; > struct cl_io *lg_io; > @@ -129,9 +113,6 @@ struct ll_inode_info { > spinlock_t lli_lock; > struct posix_acl *lli_posix_acl; > > - struct hlist_head *lli_remote_perms; > - struct mutex lli_rmtperm_mutex; > - > /* identifying fields for both metadata and data stacks. */ > struct lu_fid lli_fid; > /* Parent fid for accessing default stripe data on parent directory > @@ -141,8 +122,6 @@ struct ll_inode_info { > > struct list_head lli_close_list; > > - unsigned long lli_rmtperm_time; > - > /* handle is to be sent to MDS later on done_writing and setattr. > * Open handle data are needed for the recovery to reconstruct > * the inode state on the MDS. XXX: recovery is not ready yet. > @@ -407,7 +386,7 @@ enum stats_track_type { > #define LL_SBI_FLOCK 0x04 > #define LL_SBI_USER_XATTR 0x08 /* support user xattr */ > #define LL_SBI_ACL 0x10 /* support ACL */ > -#define LL_SBI_RMT_CLIENT 0x40 /* remote client */ > +/* LL_SBI_RMT_CLIENT 0x40 remote client */ > #define LL_SBI_MDS_CAPA 0x80 /* support mds capa, obsolete */ > #define LL_SBI_OSS_CAPA 0x100 /* support oss capa, obsolete */ > #define LL_SBI_LOCALFLOCK 0x200 /* Local flocks support by kernel */ > @@ -429,7 +408,7 @@ enum stats_track_type { > "xattr", \ > "acl", \ > "???", \ > - "rmt_client", \ > + "???", \ > "mds_capa", \ > "oss_capa", \ > "flock", \ > @@ -445,26 +424,6 @@ enum stats_track_type { > "xattr", \ > } > > -#define RCE_HASHES 32 > - > -struct rmtacl_ctl_entry { > - struct list_head rce_list; > - pid_t rce_key; /* hash key */ > - int rce_ops; /* acl operation type */ > -}; > - > -struct rmtacl_ctl_table { > - spinlock_t rct_lock; > - struct list_head rct_entries[RCE_HASHES]; > -}; > - > -#define EE_HASHES 32 > - > -struct eacl_table { > - spinlock_t et_lock; > - struct list_head et_entries[EE_HASHES]; > -}; > - > struct ll_sb_info { > /* this protects pglist and ra_info. It isn't safe to > * grab from interrupt contexts > @@ -529,8 +488,6 @@ struct ll_sb_info { > dev_t ll_sdev_orig; /* save s_dev before assign for > * clustered nfs > */ > - struct rmtacl_ctl_table ll_rct; > - struct eacl_table ll_et; > __kernel_fsid_t ll_fsid; > struct kobject ll_kobj; /* sysfs object */ > struct super_block *ll_sb; /* struct super_block (for sysfs code)*/ > @@ -982,14 +939,6 @@ ssize_t ll_getxattr(struct dentry *dentry, struct inode *inode, > ssize_t ll_listxattr(struct dentry *dentry, char *buffer, size_t size); > int ll_removexattr(struct dentry *dentry, const char *name); > > -/* llite/remote_perm.c */ > -extern struct kmem_cache *ll_remote_perm_cachep; > -extern struct kmem_cache *ll_rmtperm_hash_cachep; > - > -void free_rmtperm_hash(struct hlist_head *hash); > -int ll_update_remote_perm(struct inode *inode, struct mdt_remote_perm *perm); > -int lustre_check_remote_perm(struct inode *inode, int mask); > - > /** > * Common IO arguments for various VFS I/O interfaces. > */ > @@ -1003,40 +952,7 @@ void ras_update(struct ll_sb_info *sbi, struct inode *inode, > void ll_ra_count_put(struct ll_sb_info *sbi, unsigned long len); > void ll_ra_stats_inc(struct inode *inode, enum ra_stat which); > > -/* llite/llite_rmtacl.c */ > -#ifdef CONFIG_FS_POSIX_ACL > -struct eacl_entry { > - struct list_head ee_list; > - pid_t ee_key; /* hash key */ > - struct lu_fid ee_fid; > - int ee_type; /* ACL type for ACCESS or DEFAULT */ > - ext_acl_xattr_header *ee_acl; > -}; > - > -u64 rce_ops2valid(int ops); > -struct rmtacl_ctl_entry *rct_search(struct rmtacl_ctl_table *rct, pid_t key); > -int rct_add(struct rmtacl_ctl_table *rct, pid_t key, int ops); > -int rct_del(struct rmtacl_ctl_table *rct, pid_t key); > -void rct_init(struct rmtacl_ctl_table *rct); > -void rct_fini(struct rmtacl_ctl_table *rct); > - > -void ee_free(struct eacl_entry *ee); > -int ee_add(struct eacl_table *et, pid_t key, struct lu_fid *fid, int type, > - ext_acl_xattr_header *header); > -struct eacl_entry *et_search_del(struct eacl_table *et, pid_t key, > - struct lu_fid *fid, int type); > -void et_search_free(struct eacl_table *et, pid_t key); > -void et_init(struct eacl_table *et); > -void et_fini(struct eacl_table *et); > -#else > -static inline u64 rce_ops2valid(int ops) > -{ > - return 0; > -} > -#endif > - > /* statahead.c */ > - > #define LL_SA_RPC_MIN 2 > #define LL_SA_RPC_DEF 32 > #define LL_SA_RPC_MAX 8192 > diff --git a/drivers/staging/lustre/lustre/llite/llite_lib.c b/drivers/staging/lustre/lustre/llite/llite_lib.c > index ac833db..ae6a571 100644 > --- a/drivers/staging/lustre/lustre/llite/llite_lib.c > +++ b/drivers/staging/lustre/lustre/llite/llite_lib.c > @@ -171,8 +171,8 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt, > OBD_CONNECT_VERSION | OBD_CONNECT_BRW_SIZE | > OBD_CONNECT_CANCELSET | OBD_CONNECT_FID | > OBD_CONNECT_AT | OBD_CONNECT_LOV_V3 | > - OBD_CONNECT_RMT_CLIENT | OBD_CONNECT_VBR | > - OBD_CONNECT_FULL20 | OBD_CONNECT_64BITHASH| > + OBD_CONNECT_VBR | OBD_CONNECT_FULL20 | > + OBD_CONNECT_64BITHASH | > OBD_CONNECT_EINPROGRESS | > OBD_CONNECT_JOBSTATS | OBD_CONNECT_LVB_TYPE | > OBD_CONNECT_LAYOUTLOCK | > @@ -213,8 +213,6 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt, > > /* real client */ > data->ocd_connect_flags |= OBD_CONNECT_REAL; > - if (sbi->ll_flags & LL_SBI_RMT_CLIENT) > - data->ocd_connect_flags |= OBD_CONNECT_RMT_CLIENT_FORCE; > > data->ocd_brw_size = MD_MAX_BRW_SIZE; > > @@ -307,18 +305,6 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt, > sbi->ll_flags &= ~LL_SBI_ACL; > } > > - if (data->ocd_connect_flags & OBD_CONNECT_RMT_CLIENT) { > - if (!(sbi->ll_flags & LL_SBI_RMT_CLIENT)) { > - sbi->ll_flags |= LL_SBI_RMT_CLIENT; > - LCONSOLE_INFO("client is set as remote by default.\n"); > - } > - } else { > - if (sbi->ll_flags & LL_SBI_RMT_CLIENT) { > - sbi->ll_flags &= ~LL_SBI_RMT_CLIENT; > - LCONSOLE_INFO("client claims to be remote, but server rejected, forced to be local.\n"); > - } > - } > - > if (data->ocd_connect_flags & OBD_CONNECT_64BITHASH) > sbi->ll_flags |= LL_SBI_64BIT_HASH; > > @@ -352,10 +338,9 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt, > OBD_CONNECT_REQPORTAL | OBD_CONNECT_BRW_SIZE | > OBD_CONNECT_CANCELSET | OBD_CONNECT_FID | > OBD_CONNECT_SRVLOCK | OBD_CONNECT_TRUNCLOCK| > - OBD_CONNECT_AT | OBD_CONNECT_RMT_CLIENT | > - OBD_CONNECT_OSS_CAPA | OBD_CONNECT_VBR| > - OBD_CONNECT_FULL20 | OBD_CONNECT_64BITHASH | > - OBD_CONNECT_MAXBYTES | > + OBD_CONNECT_AT | OBD_CONNECT_OSS_CAPA | > + OBD_CONNECT_VBR | OBD_CONNECT_FULL20 | > + OBD_CONNECT_64BITHASH | OBD_CONNECT_MAXBYTES | > OBD_CONNECT_EINPROGRESS | > OBD_CONNECT_JOBSTATS | OBD_CONNECT_LVB_TYPE | > OBD_CONNECT_LAYOUTLOCK | OBD_CONNECT_PINGLESS; > @@ -378,8 +363,6 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt, > } > > data->ocd_connect_flags |= OBD_CONNECT_LRU_RESIZE; > - if (sbi->ll_flags & LL_SBI_RMT_CLIENT) > - data->ocd_connect_flags |= OBD_CONNECT_RMT_CLIENT_FORCE; > > CDEBUG(D_RPCTRACE, "ocd_connect_flags: %#llx ocd_version: %d ocd_grant: %d\n", > data->ocd_connect_flags, > @@ -442,9 +425,7 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt, > * XXX: move this to after cbd setup? > */ > valid = OBD_MD_FLGETATTR | OBD_MD_FLBLOCKS | OBD_MD_FLMODEASIZE; > - if (sbi->ll_flags & LL_SBI_RMT_CLIENT) > - valid |= OBD_MD_FLRMTPERM; > - else if (sbi->ll_flags & LL_SBI_ACL) > + if (sbi->ll_flags & LL_SBI_ACL) > valid |= OBD_MD_FLACL; > > op_data = kzalloc(sizeof(*op_data), GFP_NOFS); > @@ -500,13 +481,6 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt, > goto out_root; > } > > -#ifdef CONFIG_FS_POSIX_ACL > - if (sbi->ll_flags & LL_SBI_RMT_CLIENT) { > - rct_init(&sbi->ll_rct); > - et_init(&sbi->ll_et); > - } > -#endif > - > checksum = sbi->ll_flags & LL_SBI_CHECKSUM; > err = obd_set_info_async(NULL, sbi->ll_dt_exp, sizeof(KEY_CHECKSUM), > KEY_CHECKSUM, sizeof(checksum), &checksum, > @@ -604,13 +578,6 @@ static void client_common_put_super(struct super_block *sb) > { > struct ll_sb_info *sbi = ll_s2sbi(sb); > > -#ifdef CONFIG_FS_POSIX_ACL > - if (sbi->ll_flags & LL_SBI_RMT_CLIENT) { > - et_fini(&sbi->ll_et); > - rct_fini(&sbi->ll_rct); > - } > -#endif > - > ll_close_thread_shutdown(sbi->ll_lcq); > > cl_sb_fini(sb); > @@ -700,11 +667,6 @@ static int ll_options(char *options, int *flags) > *flags &= ~tmp; > goto next; > } > - tmp = ll_set_opt("remote_client", s1, LL_SBI_RMT_CLIENT); > - if (tmp) { > - *flags |= tmp; > - goto next; > - } > tmp = ll_set_opt("user_fid2path", s1, LL_SBI_USER_FID2PATH); > if (tmp) { > *flags |= tmp; > @@ -788,12 +750,9 @@ void ll_lli_init(struct ll_inode_info *lli) > lli->lli_maxbytes = MAX_LFS_FILESIZE; > spin_lock_init(&lli->lli_lock); > lli->lli_posix_acl = NULL; > - lli->lli_remote_perms = NULL; > - mutex_init(&lli->lli_rmtperm_mutex); > /* Do not set lli_fid, it has been initialized already. */ > fid_zero(&lli->lli_pfid); > INIT_LIST_HEAD(&lli->lli_close_list); > - lli->lli_rmtperm_time = 0; > lli->lli_pending_och = NULL; > lli->lli_mds_read_och = NULL; > lli->lli_mds_write_och = NULL; > @@ -1075,17 +1034,9 @@ void ll_clear_inode(struct inode *inode) > > ll_xattr_cache_destroy(inode); > > - if (sbi->ll_flags & LL_SBI_RMT_CLIENT) { > - LASSERT(!lli->lli_posix_acl); > - if (lli->lli_remote_perms) { > - free_rmtperm_hash(lli->lli_remote_perms); > - lli->lli_remote_perms = NULL; > - } > - } > #ifdef CONFIG_FS_POSIX_ACL > - else if (lli->lli_posix_acl) { > + if (lli->lli_posix_acl) { > LASSERT(atomic_read(&lli->lli_posix_acl->a_refcount) == 1); > - LASSERT(!lli->lli_remote_perms); > posix_acl_release(lli->lli_posix_acl); > lli->lli_posix_acl = NULL; > } > @@ -1537,12 +1488,8 @@ void ll_update_inode(struct inode *inode, struct lustre_md *md) > lli->lli_maxbytes = MAX_LFS_FILESIZE; > } > > - if (sbi->ll_flags & LL_SBI_RMT_CLIENT) { > - if (body->valid & OBD_MD_FLRMTPERM) > - ll_update_remote_perm(inode, md->remote_perm); > - } > #ifdef CONFIG_FS_POSIX_ACL > - else if (body->valid & OBD_MD_FLACL) { > + if (body->valid & OBD_MD_FLACL) { > spin_lock(&lli->lli_lock); > if (lli->lli_posix_acl) > posix_acl_release(lli->lli_posix_acl); > diff --git a/drivers/staging/lustre/lustre/llite/llite_rmtacl.c b/drivers/staging/lustre/lustre/llite/llite_rmtacl.c > deleted file mode 100644 > index edb92f9..0000000 > --- a/drivers/staging/lustre/lustre/llite/llite_rmtacl.c > +++ /dev/null > @@ -1,295 +0,0 @@ > -/* > - * GPL HEADER START > - * > - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. > - * > - * This program is free software; you can redistribute it and/or modify > - * it under the terms of the GNU General Public License version 2 only, > - * as published by the Free Software Foundation. > - * > - * This program is distributed in the hope that it will be useful, but > - * WITHOUT ANY WARRANTY; without even the implied warranty of > - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > - * General Public License version 2 for more details (a copy is included > - * in the LICENSE file that accompanied this code). > - * > - * You should have received a copy of the GNU General Public License > - * version 2 along with this program; If not, see > - * http://www.gnu.org/licenses/gpl-2.0.html > - * > - * GPL HEADER END > - */ > -/* > - * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. > - * Use is subject to license terms. > - * > - * Copyright (c) 2012, Intel Corporation. > - */ > -/* > - * This file is part of Lustre, http://www.lustre.org/ > - * Lustre is a trademark of Sun Microsystems, Inc. > - * > - * lustre/llite/llite_rmtacl.c > - * > - * Lustre Remote User Access Control List. > - * > - * Author: Fan Yong > - */ > - > -#define DEBUG_SUBSYSTEM S_LLITE > - > -#ifdef CONFIG_FS_POSIX_ACL > - > -#include "../include/lustre_lite.h" > -#include "../include/lustre_eacl.h" > -#include "llite_internal.h" > - > -static inline __u32 rce_hashfunc(uid_t id) > -{ > - return id & (RCE_HASHES - 1); > -} > - > -static inline __u32 ee_hashfunc(uid_t id) > -{ > - return id & (EE_HASHES - 1); > -} > - > -u64 rce_ops2valid(int ops) > -{ > - switch (ops) { > - case RMT_LSETFACL: > - return OBD_MD_FLRMTLSETFACL; > - case RMT_LGETFACL: > - return OBD_MD_FLRMTLGETFACL; > - case RMT_RSETFACL: > - return OBD_MD_FLRMTRSETFACL; > - case RMT_RGETFACL: > - return OBD_MD_FLRMTRGETFACL; > - default: > - return 0; > - } > -} > - > -static struct rmtacl_ctl_entry *rce_alloc(pid_t key, int ops) > -{ > - struct rmtacl_ctl_entry *rce; > - > - rce = kzalloc(sizeof(*rce), GFP_NOFS); > - if (!rce) > - return NULL; > - > - INIT_LIST_HEAD(&rce->rce_list); > - rce->rce_key = key; > - rce->rce_ops = ops; > - > - return rce; > -} > - > -static void rce_free(struct rmtacl_ctl_entry *rce) > -{ > - if (!list_empty(&rce->rce_list)) > - list_del(&rce->rce_list); > - > - kfree(rce); > -} > - > -static struct rmtacl_ctl_entry *__rct_search(struct rmtacl_ctl_table *rct, > - pid_t key) > -{ > - struct rmtacl_ctl_entry *rce; > - struct list_head *head = &rct->rct_entries[rce_hashfunc(key)]; > - > - list_for_each_entry(rce, head, rce_list) > - if (rce->rce_key == key) > - return rce; > - > - return NULL; > -} > - > -struct rmtacl_ctl_entry *rct_search(struct rmtacl_ctl_table *rct, pid_t key) > -{ > - struct rmtacl_ctl_entry *rce; > - > - spin_lock(&rct->rct_lock); > - rce = __rct_search(rct, key); > - spin_unlock(&rct->rct_lock); > - return rce; > -} > - > -int rct_add(struct rmtacl_ctl_table *rct, pid_t key, int ops) > -{ > - struct rmtacl_ctl_entry *rce, *e; > - > - rce = rce_alloc(key, ops); > - if (!rce) > - return -ENOMEM; > - > - spin_lock(&rct->rct_lock); > - e = __rct_search(rct, key); > - if (unlikely(e)) { > - CWARN("Unexpected stale rmtacl_entry found: [key: %d] [ops: %d]\n", > - (int)key, ops); > - rce_free(e); > - } > - list_add_tail(&rce->rce_list, &rct->rct_entries[rce_hashfunc(key)]); > - spin_unlock(&rct->rct_lock); > - > - return 0; > -} > - > -int rct_del(struct rmtacl_ctl_table *rct, pid_t key) > -{ > - struct rmtacl_ctl_entry *rce; > - > - spin_lock(&rct->rct_lock); > - rce = __rct_search(rct, key); > - if (rce) > - rce_free(rce); > - spin_unlock(&rct->rct_lock); > - > - return rce ? 0 : -ENOENT; > -} > - > -void rct_init(struct rmtacl_ctl_table *rct) > -{ > - int i; > - > - spin_lock_init(&rct->rct_lock); > - for (i = 0; i < RCE_HASHES; i++) > - INIT_LIST_HEAD(&rct->rct_entries[i]); > -} > - > -void rct_fini(struct rmtacl_ctl_table *rct) > -{ > - struct rmtacl_ctl_entry *rce; > - int i; > - > - spin_lock(&rct->rct_lock); > - for (i = 0; i < RCE_HASHES; i++) > - while (!list_empty(&rct->rct_entries[i])) { > - rce = list_entry(rct->rct_entries[i].next, > - struct rmtacl_ctl_entry, rce_list); > - rce_free(rce); > - } > - spin_unlock(&rct->rct_lock); > -} > - > -static struct eacl_entry *ee_alloc(pid_t key, struct lu_fid *fid, int type, > - ext_acl_xattr_header *header) > -{ > - struct eacl_entry *ee; > - > - ee = kzalloc(sizeof(*ee), GFP_NOFS); > - if (!ee) > - return NULL; > - > - INIT_LIST_HEAD(&ee->ee_list); > - ee->ee_key = key; > - ee->ee_fid = *fid; > - ee->ee_type = type; > - ee->ee_acl = header; > - > - return ee; > -} > - > -void ee_free(struct eacl_entry *ee) > -{ > - if (!list_empty(&ee->ee_list)) > - list_del(&ee->ee_list); > - > - if (ee->ee_acl) > - lustre_ext_acl_xattr_free(ee->ee_acl); > - > - kfree(ee); > -} > - > -static struct eacl_entry *__et_search_del(struct eacl_table *et, pid_t key, > - struct lu_fid *fid, int type) > -{ > - struct eacl_entry *ee; > - struct list_head *head = &et->et_entries[ee_hashfunc(key)]; > - > - LASSERT(fid); > - list_for_each_entry(ee, head, ee_list) > - if (ee->ee_key == key) { > - if (lu_fid_eq(&ee->ee_fid, fid) && > - ee->ee_type == type) { > - list_del_init(&ee->ee_list); > - return ee; > - } > - } > - > - return NULL; > -} > - > -struct eacl_entry *et_search_del(struct eacl_table *et, pid_t key, > - struct lu_fid *fid, int type) > -{ > - struct eacl_entry *ee; > - > - spin_lock(&et->et_lock); > - ee = __et_search_del(et, key, fid, type); > - spin_unlock(&et->et_lock); > - return ee; > -} > - > -void et_search_free(struct eacl_table *et, pid_t key) > -{ > - struct eacl_entry *ee, *next; > - struct list_head *head = &et->et_entries[ee_hashfunc(key)]; > - > - spin_lock(&et->et_lock); > - list_for_each_entry_safe(ee, next, head, ee_list) > - if (ee->ee_key == key) > - ee_free(ee); > - > - spin_unlock(&et->et_lock); > -} > - > -int ee_add(struct eacl_table *et, pid_t key, struct lu_fid *fid, int type, > - ext_acl_xattr_header *header) > -{ > - struct eacl_entry *ee, *e; > - > - ee = ee_alloc(key, fid, type, header); > - if (!ee) > - return -ENOMEM; > - > - spin_lock(&et->et_lock); > - e = __et_search_del(et, key, fid, type); > - if (unlikely(e)) { > - CWARN("Unexpected stale eacl_entry found: [key: %d] [fid: " DFID "] [type: %d]\n", > - (int)key, PFID(fid), type); > - ee_free(e); > - } > - list_add_tail(&ee->ee_list, &et->et_entries[ee_hashfunc(key)]); > - spin_unlock(&et->et_lock); > - > - return 0; > -} > - > -void et_init(struct eacl_table *et) > -{ > - int i; > - > - spin_lock_init(&et->et_lock); > - for (i = 0; i < EE_HASHES; i++) > - INIT_LIST_HEAD(&et->et_entries[i]); > -} > - > -void et_fini(struct eacl_table *et) > -{ > - struct eacl_entry *ee; > - int i; > - > - spin_lock(&et->et_lock); > - for (i = 0; i < EE_HASHES; i++) > - while (!list_empty(&et->et_entries[i])) { > - ee = list_entry(et->et_entries[i].next, > - struct eacl_entry, ee_list); > - ee_free(ee); > - } > - spin_unlock(&et->et_lock); > -} > - > -#endif > diff --git a/drivers/staging/lustre/lustre/llite/lproc_llite.c b/drivers/staging/lustre/lustre/llite/lproc_llite.c > index 6e9a8a5..18a7775 100644 > --- a/drivers/staging/lustre/lustre/llite/lproc_llite.c > +++ b/drivers/staging/lustre/lustre/llite/lproc_llite.c > @@ -176,11 +176,7 @@ LUSTRE_RO_ATTR(filesfree); > static ssize_t client_type_show(struct kobject *kobj, struct attribute *attr, > char *buf) > { > - struct ll_sb_info *sbi = container_of(kobj, struct ll_sb_info, > - ll_kobj); > - > - return sprintf(buf, "%s client\n", > - sbi->ll_flags & LL_SBI_RMT_CLIENT ? "remote" : "local"); > + return sprintf(buf, "local client\n"); > } > LUSTRE_RO_ATTR(client_type); > > diff --git a/drivers/staging/lustre/lustre/llite/remote_perm.c b/drivers/staging/lustre/lustre/llite/remote_perm.c > deleted file mode 100644 > index 9df9e78..0000000 > --- a/drivers/staging/lustre/lustre/llite/remote_perm.c > +++ /dev/null > @@ -1,320 +0,0 @@ > -/* > - * GPL HEADER START > - * > - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. > - * > - * This program is free software; you can redistribute it and/or modify > - * it under the terms of the GNU General Public License version 2 only, > - * as published by the Free Software Foundation. > - * > - * This program is distributed in the hope that it will be useful, but > - * WITHOUT ANY WARRANTY; without even the implied warranty of > - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > - * General Public License version 2 for more details (a copy is included > - * in the LICENSE file that accompanied this code). > - * > - * You should have received a copy of the GNU General Public License > - * version 2 along with this program; If not, see > - * http://www.gnu.org/licenses/gpl-2.0.html > - * > - * GPL HEADER END > - */ > -/* > - * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. > - * Use is subject to license terms. > - * > - * Copyright (c) 2011, 2012, Intel Corporation. > - */ > -/* > - * This file is part of Lustre, http://www.lustre.org/ > - * Lustre is a trademark of Sun Microsystems, Inc. > - * > - * lustre/llite/remote_perm.c > - * > - * Lustre Permission Cache for Remote Client > - * > - * Author: Lai Siyao > - * Author: Fan Yong > - */ > - > -#define DEBUG_SUBSYSTEM S_LLITE > - > -#include > -#include > - > -#include "../include/lustre_lite.h" > -#include "../include/lustre_ha.h" > -#include "../include/lustre_dlm.h" > -#include "../include/lprocfs_status.h" > -#include "../include/lustre_disk.h" > -#include "../include/lustre_param.h" > -#include "llite_internal.h" > - > -struct kmem_cache *ll_remote_perm_cachep; > -struct kmem_cache *ll_rmtperm_hash_cachep; > - > -static inline struct ll_remote_perm *alloc_ll_remote_perm(void) > -{ > - struct ll_remote_perm *lrp; > - > - lrp = kmem_cache_zalloc(ll_remote_perm_cachep, GFP_KERNEL); > - if (lrp) > - INIT_HLIST_NODE(&lrp->lrp_list); > - return lrp; > -} > - > -static inline void free_ll_remote_perm(struct ll_remote_perm *lrp) > -{ > - if (!lrp) > - return; > - > - if (!hlist_unhashed(&lrp->lrp_list)) > - hlist_del(&lrp->lrp_list); > - kmem_cache_free(ll_remote_perm_cachep, lrp); > -} > - > -static struct hlist_head *alloc_rmtperm_hash(void) > -{ > - struct hlist_head *hash; > - int i; > - > - hash = kmem_cache_zalloc(ll_rmtperm_hash_cachep, GFP_NOFS); > - if (!hash) > - return NULL; > - > - for (i = 0; i < REMOTE_PERM_HASHSIZE; i++) > - INIT_HLIST_HEAD(hash + i); > - > - return hash; > -} > - > -void free_rmtperm_hash(struct hlist_head *hash) > -{ > - int i; > - struct ll_remote_perm *lrp; > - struct hlist_node *next; > - > - if (!hash) > - return; > - > - for (i = 0; i < REMOTE_PERM_HASHSIZE; i++) > - hlist_for_each_entry_safe(lrp, next, hash + i, lrp_list) > - free_ll_remote_perm(lrp); > - kmem_cache_free(ll_rmtperm_hash_cachep, hash); > -} > - > -static inline int remote_perm_hashfunc(uid_t uid) > -{ > - return uid & (REMOTE_PERM_HASHSIZE - 1); > -} > - > -/* NB: setxid permission is not checked here, instead it's done on > - * MDT when client get remote permission. > - */ > -static int do_check_remote_perm(struct ll_inode_info *lli, int mask) > -{ > - struct hlist_head *head; > - struct ll_remote_perm *lrp; > - int found = 0, rc; > - > - if (!lli->lli_remote_perms) > - return -ENOENT; > - > - head = lli->lli_remote_perms + > - remote_perm_hashfunc(from_kuid(&init_user_ns, current_uid())); > - > - spin_lock(&lli->lli_lock); > - hlist_for_each_entry(lrp, head, lrp_list) { > - if (lrp->lrp_uid != from_kuid(&init_user_ns, current_uid())) > - continue; > - if (lrp->lrp_gid != from_kgid(&init_user_ns, current_gid())) > - continue; > - if (lrp->lrp_fsuid != from_kuid(&init_user_ns, current_fsuid())) > - continue; > - if (lrp->lrp_fsgid != from_kgid(&init_user_ns, current_fsgid())) > - continue; > - found = 1; > - break; > - } > - > - if (!found) { > - rc = -ENOENT; > - goto out; > - } > - > - CDEBUG(D_SEC, "found remote perm: %u/%u/%u/%u - %#x\n", > - lrp->lrp_uid, lrp->lrp_gid, lrp->lrp_fsuid, lrp->lrp_fsgid, > - lrp->lrp_access_perm); > - rc = ((lrp->lrp_access_perm & mask) == mask) ? 0 : -EACCES; > - > -out: > - spin_unlock(&lli->lli_lock); > - return rc; > -} > - > -int ll_update_remote_perm(struct inode *inode, struct mdt_remote_perm *perm) > -{ > - struct ll_inode_info *lli = ll_i2info(inode); > - struct ll_remote_perm *lrp = NULL, *tmp = NULL; > - struct hlist_head *head, *perm_hash = NULL; > - > - LASSERT(ll_i2sbi(inode)->ll_flags & LL_SBI_RMT_CLIENT); > - > -#if 0 > - if (perm->rp_uid != current->uid || > - perm->rp_gid != current->gid || > - perm->rp_fsuid != current->fsuid || > - perm->rp_fsgid != current->fsgid) { > - /* user might setxid in this small period */ > - CDEBUG(D_SEC, > - "remote perm user %u/%u/%u/%u != current %u/%u/%u/%u\n", > - perm->rp_uid, perm->rp_gid, perm->rp_fsuid, > - perm->rp_fsgid, current->uid, current->gid, > - current->fsuid, current->fsgid); > - return -EAGAIN; > - } > -#endif > - > - if (!lli->lli_remote_perms) { > - perm_hash = alloc_rmtperm_hash(); > - if (!perm_hash) { > - CERROR("alloc lli_remote_perms failed!\n"); > - return -ENOMEM; > - } > - } > - > - spin_lock(&lli->lli_lock); > - > - if (!lli->lli_remote_perms) > - lli->lli_remote_perms = perm_hash; > - else > - free_rmtperm_hash(perm_hash); > - > - head = lli->lli_remote_perms + remote_perm_hashfunc(perm->rp_uid); > - > -again: > - hlist_for_each_entry(tmp, head, lrp_list) { > - if (tmp->lrp_uid != perm->rp_uid) > - continue; > - if (tmp->lrp_gid != perm->rp_gid) > - continue; > - if (tmp->lrp_fsuid != perm->rp_fsuid) > - continue; > - if (tmp->lrp_fsgid != perm->rp_fsgid) > - continue; > - free_ll_remote_perm(lrp); > - lrp = tmp; > - break; > - } > - > - if (!lrp) { > - spin_unlock(&lli->lli_lock); > - lrp = alloc_ll_remote_perm(); > - if (!lrp) { > - CERROR("alloc memory for ll_remote_perm failed!\n"); > - return -ENOMEM; > - } > - spin_lock(&lli->lli_lock); > - goto again; > - } > - > - lrp->lrp_access_perm = perm->rp_access_perm; > - if (lrp != tmp) { > - lrp->lrp_uid = perm->rp_uid; > - lrp->lrp_gid = perm->rp_gid; > - lrp->lrp_fsuid = perm->rp_fsuid; > - lrp->lrp_fsgid = perm->rp_fsgid; > - hlist_add_head(&lrp->lrp_list, head); > - } > - lli->lli_rmtperm_time = cfs_time_current(); > - spin_unlock(&lli->lli_lock); > - > - CDEBUG(D_SEC, "new remote perm@%p: %u/%u/%u/%u - %#x\n", > - lrp, lrp->lrp_uid, lrp->lrp_gid, lrp->lrp_fsuid, lrp->lrp_fsgid, > - lrp->lrp_access_perm); > - > - return 0; > -} > - > -int lustre_check_remote_perm(struct inode *inode, int mask) > -{ > - struct ll_inode_info *lli = ll_i2info(inode); > - struct ll_sb_info *sbi = ll_i2sbi(inode); > - struct ptlrpc_request *req = NULL; > - struct mdt_remote_perm *perm; > - unsigned long save; > - int i = 0, rc; > - > - do { > - save = lli->lli_rmtperm_time; > - rc = do_check_remote_perm(lli, mask); > - if (!rc || (rc != -ENOENT && i)) > - break; > - > - might_sleep(); > - > - mutex_lock(&lli->lli_rmtperm_mutex); > - /* check again */ > - if (save != lli->lli_rmtperm_time) { > - rc = do_check_remote_perm(lli, mask); > - if (!rc || (rc != -ENOENT && i)) { > - mutex_unlock(&lli->lli_rmtperm_mutex); > - break; > - } > - } > - > - if (i++ > 5) { > - CERROR("check remote perm falls in dead loop!\n"); > - LBUG(); > - } > - > - rc = md_get_remote_perm(sbi->ll_md_exp, ll_inode2fid(inode), > - ll_i2suppgid(inode), &req); > - if (rc) { > - mutex_unlock(&lli->lli_rmtperm_mutex); > - break; > - } > - > - perm = req_capsule_server_swab_get(&req->rq_pill, &RMF_ACL, > - lustre_swab_mdt_remote_perm); > - if (unlikely(!perm)) { > - mutex_unlock(&lli->lli_rmtperm_mutex); > - rc = -EPROTO; > - break; > - } > - > - rc = ll_update_remote_perm(inode, perm); > - mutex_unlock(&lli->lli_rmtperm_mutex); > - if (rc == -ENOMEM) > - break; > - > - ptlrpc_req_finished(req); > - req = NULL; > - } while (1); > - ptlrpc_req_finished(req); > - return rc; > -} > - > -#if 0 /* NB: remote perms can't be freed in ll_mdc_blocking_ast of UPDATE lock, > - * because it will fail sanity test 48. > - */ > -void ll_free_remote_perms(struct inode *inode) > -{ > - struct ll_inode_info *lli = ll_i2info(inode); > - struct hlist_head *hash = lli->lli_remote_perms; > - struct ll_remote_perm *lrp; > - struct hlist_node *node, *next; > - int i; > - > - LASSERT(hash); > - > - spin_lock(&lli->lli_lock); > - > - for (i = 0; i < REMOTE_PERM_HASHSIZE; i++) { > - hlist_for_each_entry_safe(lrp, node, next, hash + i, lrp_list) > - free_ll_remote_perm(lrp); > - } > - > - spin_unlock(&lli->lli_lock); > -} > -#endif > diff --git a/drivers/staging/lustre/lustre/llite/super25.c b/drivers/staging/lustre/lustre/llite/super25.c > index b40ea79..3dd7e0e 100644 > --- a/drivers/staging/lustre/lustre/llite/super25.c > +++ b/drivers/staging/lustre/lustre/llite/super25.c > @@ -114,19 +114,6 @@ static int __init lustre_init(void) > if (!ll_file_data_slab) > goto out_cache; > > - ll_remote_perm_cachep = kmem_cache_create("ll_remote_perm_cache", > - sizeof(struct ll_remote_perm), > - 0, 0, NULL); > - if (!ll_remote_perm_cachep) > - goto out_cache; > - > - ll_rmtperm_hash_cachep = kmem_cache_create("ll_rmtperm_hash_cache", > - REMOTE_PERM_HASHSIZE * > - sizeof(struct list_head), > - 0, 0, NULL); > - if (!ll_rmtperm_hash_cachep) > - goto out_cache; > - > llite_root = debugfs_create_dir("llite", debugfs_lustre_root); > if (IS_ERR_OR_NULL(llite_root)) { > rc = llite_root ? PTR_ERR(llite_root) : -ENOMEM; > @@ -190,8 +177,6 @@ out_debugfs: > out_cache: > kmem_cache_destroy(ll_inode_cachep); > kmem_cache_destroy(ll_file_data_slab); > - kmem_cache_destroy(ll_remote_perm_cachep); > - kmem_cache_destroy(ll_rmtperm_hash_cachep); > return rc; > } > > @@ -209,10 +194,6 @@ static void __exit lustre_exit(void) > vvp_global_fini(); > > kmem_cache_destroy(ll_inode_cachep); > - kmem_cache_destroy(ll_rmtperm_hash_cachep); > - > - kmem_cache_destroy(ll_remote_perm_cachep); > - > kmem_cache_destroy(ll_file_data_slab); > } > > diff --git a/drivers/staging/lustre/lustre/llite/xattr.c b/drivers/staging/lustre/lustre/llite/xattr.c > index 6ce790e..98303cf 100644 > --- a/drivers/staging/lustre/lustre/llite/xattr.c > +++ b/drivers/staging/lustre/lustre/llite/xattr.c > @@ -107,11 +107,6 @@ int ll_setxattr_common(struct inode *inode, const char *name, > struct ll_sb_info *sbi = ll_i2sbi(inode); > struct ptlrpc_request *req = NULL; > int xattr_type, rc; > -#ifdef CONFIG_FS_POSIX_ACL > - struct rmtacl_ctl_entry *rce = NULL; > - posix_acl_xattr_header *new_value = NULL; > - ext_acl_xattr_header *acl = NULL; > -#endif > const char *pv = value; > > xattr_type = get_xattr_type(name); > @@ -139,62 +134,9 @@ int ll_setxattr_common(struct inode *inode, const char *name, > strcmp(name, "security.selinux") == 0) > return -EOPNOTSUPP; > > -#ifdef CONFIG_FS_POSIX_ACL > - if (sbi->ll_flags & LL_SBI_RMT_CLIENT && > - (xattr_type == XATTR_ACL_ACCESS_T || > - xattr_type == XATTR_ACL_DEFAULT_T)) { > - rce = rct_search(&sbi->ll_rct, current_pid()); > - if (!rce || > - (rce->rce_ops != RMT_LSETFACL && > - rce->rce_ops != RMT_RSETFACL)) > - return -EOPNOTSUPP; > - > - if (rce->rce_ops == RMT_LSETFACL) { > - struct eacl_entry *ee; > - > - ee = et_search_del(&sbi->ll_et, current_pid(), > - ll_inode2fid(inode), xattr_type); > - if (valid & OBD_MD_FLXATTR) { > - acl = lustre_acl_xattr_merge2ext( > - (posix_acl_xattr_header *)value, > - size, ee->ee_acl); > - if (IS_ERR(acl)) { > - ee_free(ee); > - return PTR_ERR(acl); > - } > - size = CFS_ACL_XATTR_SIZE(\ > - le32_to_cpu(acl->a_count), \ > - ext_acl_xattr); > - pv = (const char *)acl; > - } > - ee_free(ee); > - } else if (rce->rce_ops == RMT_RSETFACL) { > - rc = lustre_posix_acl_xattr_filter( > - (posix_acl_xattr_header *)value, > - size, &new_value); > - if (unlikely(rc < 0)) > - return rc; > - size = rc; > - > - pv = (const char *)new_value; > - } else { > - return -EOPNOTSUPP; > - } > - > - valid |= rce_ops2valid(rce->rce_ops); > - } > -#endif > rc = md_setxattr(sbi->ll_md_exp, ll_inode2fid(inode), > valid, name, pv, size, 0, flags, > ll_i2suppgid(inode), &req); > -#ifdef CONFIG_FS_POSIX_ACL > - /* > - * Release the posix ACL space. > - */ > - kfree(new_value); > - if (acl) > - lustre_ext_acl_xattr_free(acl); > -#endif > if (rc) { > if (rc == -EOPNOTSUPP && xattr_type == XATTR_USER_T) { > LCONSOLE_INFO("Disabling user_xattr feature because it is not supported on the server\n"); > @@ -284,7 +226,6 @@ int ll_getxattr_common(struct inode *inode, const char *name, > struct mdt_body *body; > int xattr_type, rc; > void *xdata; > - struct rmtacl_ctl_entry *rce = NULL; > struct ll_inode_info *lli = ll_i2info(inode); > > CDEBUG(D_VFSTRACE, "VFS Op:inode="DFID"(%p)\n", > @@ -315,24 +256,11 @@ int ll_getxattr_common(struct inode *inode, const char *name, > return -EOPNOTSUPP; > > #ifdef CONFIG_FS_POSIX_ACL > - if (sbi->ll_flags & LL_SBI_RMT_CLIENT && > - (xattr_type == XATTR_ACL_ACCESS_T || > - xattr_type == XATTR_ACL_DEFAULT_T)) { > - rce = rct_search(&sbi->ll_rct, current_pid()); > - if (!rce || > - (rce->rce_ops != RMT_LSETFACL && > - rce->rce_ops != RMT_LGETFACL && > - rce->rce_ops != RMT_RSETFACL && > - rce->rce_ops != RMT_RGETFACL)) > - return -EOPNOTSUPP; > - } > - > /* posix acl is under protection of LOOKUP lock. when calling to this, > * we just have path resolution to the target inode, so we have great > * chance that cached ACL is uptodate. > */ > - if (xattr_type == XATTR_ACL_ACCESS_T && > - !(sbi->ll_flags & LL_SBI_RMT_CLIENT)) { > + if (xattr_type == XATTR_ACL_ACCESS_T) { > struct posix_acl *acl; > > spin_lock(&lli->lli_lock); > @@ -374,9 +302,7 @@ do_getxattr: > } else { > getxattr_nocache: > rc = md_getxattr(sbi->ll_md_exp, ll_inode2fid(inode), > - valid | (rce ? rce_ops2valid(rce->rce_ops) : 0), > - name, NULL, 0, size, 0, &req); > - > + valid, name, NULL, 0, size, 0, &req); > if (rc < 0) > goto out_xattr; > > @@ -413,25 +339,6 @@ getxattr_nocache: > rc = body->eadatasize; > } > > -#ifdef CONFIG_FS_POSIX_ACL > - if (rce && rce->rce_ops == RMT_LSETFACL) { > - ext_acl_xattr_header *acl; > - > - acl = lustre_posix_acl_xattr_2ext(buffer, rc); > - if (IS_ERR(acl)) { > - rc = PTR_ERR(acl); > - goto out; > - } > - > - rc = ee_add(&sbi->ll_et, current_pid(), ll_inode2fid(inode), > - xattr_type, acl); > - if (unlikely(rc < 0)) { > - lustre_ext_acl_xattr_free(acl); > - goto out; > - } > - } > -#endif > - > out_xattr: > if (rc == -EOPNOTSUPP && xattr_type == XATTR_USER_T) { > LCONSOLE_INFO( > diff --git a/drivers/staging/lustre/lustre/lmv/lmv_obd.c b/drivers/staging/lustre/lustre/lmv/lmv_obd.c > index ab4f4fb..6483f2c 100644 > --- a/drivers/staging/lustre/lustre/lmv/lmv_obd.c > +++ b/drivers/staging/lustre/lustre/lmv/lmv_obd.c > @@ -2607,27 +2607,6 @@ static int lmv_clear_open_replay_data(struct obd_export *exp, > return md_clear_open_replay_data(tgt->ltd_exp, och); > } > > -static int lmv_get_remote_perm(struct obd_export *exp, > - const struct lu_fid *fid, > - __u32 suppgid, struct ptlrpc_request **request) > -{ > - struct obd_device *obd = exp->exp_obd; > - struct lmv_obd *lmv = &obd->u.lmv; > - struct lmv_tgt_desc *tgt; > - int rc; > - > - rc = lmv_check_connect(obd); > - if (rc) > - return rc; > - > - tgt = lmv_find_target(lmv, fid); > - if (IS_ERR(tgt)) > - return PTR_ERR(tgt); > - > - rc = md_get_remote_perm(tgt->ltd_exp, fid, suppgid, request); > - return rc; > -} > - > static int lmv_intent_getattr_async(struct obd_export *exp, > struct md_enqueue_info *minfo, > struct ldlm_enqueue_info *einfo) > @@ -2791,7 +2770,6 @@ static struct md_ops lmv_md_ops = { > .free_lustre_md = lmv_free_lustre_md, > .set_open_replay_data = lmv_set_open_replay_data, > .clear_open_replay_data = lmv_clear_open_replay_data, > - .get_remote_perm = lmv_get_remote_perm, > .intent_getattr_async = lmv_intent_getattr_async, > .revalidate_lock = lmv_revalidate_lock > }; > diff --git a/drivers/staging/lustre/lustre/mdc/mdc_locks.c b/drivers/staging/lustre/lustre/mdc/mdc_locks.c > index b395420..d55a5d8 100644 > --- a/drivers/staging/lustre/lustre/mdc/mdc_locks.c > +++ b/drivers/staging/lustre/lustre/mdc/mdc_locks.c > @@ -343,10 +343,6 @@ static struct ptlrpc_request *mdc_intent_open_pack(struct obd_export *exp, > mdc_open_pack(req, op_data, it->it_create_mode, 0, it->it_flags, lmm, > lmmsize); > > - /* for remote client, fetch remote perm for current user */ > - if (client_is_remote(exp)) > - req_capsule_set_size(&req->rq_pill, &RMF_ACL, RCL_SERVER, > - sizeof(struct mdt_remote_perm)); > ptlrpc_request_set_replen(req); > return req; > } > @@ -440,9 +436,7 @@ static struct ptlrpc_request *mdc_intent_getattr_pack(struct obd_export *exp, > struct obd_device *obddev = class_exp2obd(exp); > u64 valid = OBD_MD_FLGETATTR | OBD_MD_FLEASIZE | > OBD_MD_FLMODEASIZE | OBD_MD_FLDIREA | > - OBD_MD_MEA | > - (client_is_remote(exp) ? > - OBD_MD_FLRMTPERM : OBD_MD_FLACL); > + OBD_MD_MEA | OBD_MD_FLACL; > struct ldlm_intent *lit; > int rc; > int easize; > @@ -474,9 +468,6 @@ static struct ptlrpc_request *mdc_intent_getattr_pack(struct obd_export *exp, > mdc_getattr_pack(req, valid, it->it_flags, op_data, easize); > > req_capsule_set_size(&req->rq_pill, &RMF_MDT_MD, RCL_SERVER, easize); > - if (client_is_remote(exp)) > - req_capsule_set_size(&req->rq_pill, &RMF_ACL, RCL_SERVER, > - sizeof(struct mdt_remote_perm)); > ptlrpc_request_set_replen(req); > return req; > } > @@ -683,16 +674,6 @@ static int mdc_finish_enqueue(struct obd_export *exp, > memcpy(lmm, eadata, body->eadatasize); > } > } > - > - if (body->valid & OBD_MD_FLRMTPERM) { > - struct mdt_remote_perm *perm; > - > - LASSERT(client_is_remote(exp)); > - perm = req_capsule_server_swab_get(pill, &RMF_ACL, > - lustre_swab_mdt_remote_perm); > - if (!perm) > - return -EPROTO; > - } > } else if (it->it_op & IT_LAYOUT) { > /* maybe the lock was granted right away and layout > * is packed into RMF_DLM_LVB of req > diff --git a/drivers/staging/lustre/lustre/mdc/mdc_reint.c b/drivers/staging/lustre/lustre/mdc/mdc_reint.c > index 661488e..5dba2c8 100644 > --- a/drivers/staging/lustre/lustre/mdc/mdc_reint.c > +++ b/drivers/staging/lustre/lustre/mdc/mdc_reint.c > @@ -230,7 +230,7 @@ rebuild: > MDS_INODELOCK_UPDATE); > > req = ptlrpc_request_alloc(class_exp2cliimp(exp), > - &RQF_MDS_REINT_CREATE_RMT_ACL); > + &RQF_MDS_REINT_CREATE_ACL); > if (!req) { > ldlm_lock_list_put(&cancels, l_bl_ast, count); > return -ENOMEM; > diff --git a/drivers/staging/lustre/lustre/mdc/mdc_request.c b/drivers/staging/lustre/lustre/mdc/mdc_request.c > index f371e1d..f7e30b1 100644 > --- a/drivers/staging/lustre/lustre/mdc/mdc_request.c > +++ b/drivers/staging/lustre/lustre/mdc/mdc_request.c > @@ -146,16 +146,6 @@ static int mdc_getattr_common(struct obd_export *exp, > return -EPROTO; > } > > - if (body->valid & OBD_MD_FLRMTPERM) { > - struct mdt_remote_perm *perm; > - > - LASSERT(client_is_remote(exp)); > - perm = req_capsule_server_swab_get(pill, &RMF_ACL, > - lustre_swab_mdt_remote_perm); > - if (!perm) > - return -EPROTO; > - } > - > return 0; > } > > @@ -186,11 +176,6 @@ static int mdc_getattr(struct obd_export *exp, struct md_op_data *op_data, > > req_capsule_set_size(&req->rq_pill, &RMF_MDT_MD, RCL_SERVER, > op_data->op_mode); > - if (op_data->op_valid & OBD_MD_FLRMTPERM) { > - LASSERT(client_is_remote(exp)); > - req_capsule_set_size(&req->rq_pill, &RMF_ACL, RCL_SERVER, > - sizeof(struct mdt_remote_perm)); > - } > ptlrpc_request_set_replen(req); > > rc = mdc_getattr_common(exp, req); > @@ -535,16 +520,7 @@ static int mdc_get_lustre_md(struct obd_export *exp, > } > rc = 0; > > - if (md->body->valid & OBD_MD_FLRMTPERM) { > - /* remote permission */ > - LASSERT(client_is_remote(exp)); > - md->remote_perm = req_capsule_server_swab_get(pill, &RMF_ACL, > - lustre_swab_mdt_remote_perm); > - if (!md->remote_perm) { > - rc = -EPROTO; > - goto out; > - } > - } else if (md->body->valid & OBD_MD_FLACL) { > + if (md->body->valid & OBD_MD_FLACL) { > /* for ACL, it's possible that FLACL is set but aclsize is zero. > * only when aclsize != 0 there's an actual segment for ACL > * in reply buffer. > @@ -1164,7 +1140,7 @@ static int mdc_ioc_hsm_progress(struct obd_export *exp, > goto out; > } > > - mdc_pack_body(req, NULL, OBD_MD_FLRMTPERM, 0, -1, 0); > + mdc_pack_body(req, NULL, 0, 0, -1, 0); > > /* Copy hsm_progress struct */ > req_hpk = req_capsule_client_get(&req->rq_pill, &RMF_MDS_HSM_PROGRESS); > @@ -1198,7 +1174,7 @@ static int mdc_ioc_hsm_ct_register(struct obd_import *imp, __u32 archives) > goto out; > } > > - mdc_pack_body(req, NULL, OBD_MD_FLRMTPERM, 0, -1, 0); > + mdc_pack_body(req, NULL, 0, 0, -1, 0); > > /* Copy hsm_progress struct */ > archive_mask = req_capsule_client_get(&req->rq_pill, > @@ -1237,7 +1213,7 @@ static int mdc_ioc_hsm_current_action(struct obd_export *exp, > return rc; > } > > - mdc_pack_body(req, &op_data->op_fid1, OBD_MD_FLRMTPERM, 0, > + mdc_pack_body(req, &op_data->op_fid1, 0, 0, > op_data->op_suppgids[0], 0); > > ptlrpc_request_set_replen(req); > @@ -1273,7 +1249,7 @@ static int mdc_ioc_hsm_ct_unregister(struct obd_import *imp) > goto out; > } > > - mdc_pack_body(req, NULL, OBD_MD_FLRMTPERM, 0, -1, 0); > + mdc_pack_body(req, NULL, 0, 0, -1, 0); > > ptlrpc_request_set_replen(req); > > @@ -1302,7 +1278,7 @@ static int mdc_ioc_hsm_state_get(struct obd_export *exp, > return rc; > } > > - mdc_pack_body(req, &op_data->op_fid1, OBD_MD_FLRMTPERM, 0, > + mdc_pack_body(req, &op_data->op_fid1, 0, 0, > op_data->op_suppgids[0], 0); > > ptlrpc_request_set_replen(req); > @@ -1343,7 +1319,7 @@ static int mdc_ioc_hsm_state_set(struct obd_export *exp, > return rc; > } > > - mdc_pack_body(req, &op_data->op_fid1, OBD_MD_FLRMTPERM, 0, > + mdc_pack_body(req, &op_data->op_fid1, 0, 0, > op_data->op_suppgids[0], 0); > > /* Copy states */ > @@ -1390,7 +1366,7 @@ static int mdc_ioc_hsm_request(struct obd_export *exp, > return rc; > } > > - mdc_pack_body(req, NULL, OBD_MD_FLRMTPERM, 0, -1, 0); > + mdc_pack_body(req, NULL, 0, 0, -1, 0); > > /* Copy hsm_request struct */ > req_hr = req_capsule_client_get(&req->rq_pill, &RMF_MDS_HSM_REQUEST); > @@ -2428,41 +2404,6 @@ static int mdc_process_config(struct obd_device *obd, u32 len, void *buf) > return rc; > } > > -/* get remote permission for current user on fid */ > -static int mdc_get_remote_perm(struct obd_export *exp, const struct lu_fid *fid, > - __u32 suppgid, struct ptlrpc_request **request) > -{ > - struct ptlrpc_request *req; > - int rc; > - > - LASSERT(client_is_remote(exp)); > - > - *request = NULL; > - req = ptlrpc_request_alloc(class_exp2cliimp(exp), &RQF_MDS_GETATTR); > - if (!req) > - return -ENOMEM; > - > - rc = ptlrpc_request_pack(req, LUSTRE_MDS_VERSION, MDS_GETATTR); > - if (rc) { > - ptlrpc_request_free(req); > - return rc; > - } > - > - mdc_pack_body(req, fid, OBD_MD_FLRMTPERM, 0, suppgid, 0); > - > - req_capsule_set_size(&req->rq_pill, &RMF_ACL, RCL_SERVER, > - sizeof(struct mdt_remote_perm)); > - > - ptlrpc_request_set_replen(req); > - > - rc = ptlrpc_queue_wait(req); > - if (rc) > - ptlrpc_req_finished(req); > - else > - *request = req; > - return rc; > -} > - > static struct obd_ops mdc_obd_ops = { > .owner = THIS_MODULE, > .setup = mdc_setup, > @@ -2514,7 +2455,6 @@ static struct md_ops mdc_md_ops = { > .free_lustre_md = mdc_free_lustre_md, > .set_open_replay_data = mdc_set_open_replay_data, > .clear_open_replay_data = mdc_clear_open_replay_data, > - .get_remote_perm = mdc_get_remote_perm, > .intent_getattr_async = mdc_intent_getattr_async, > .revalidate_lock = mdc_revalidate_lock > }; > diff --git a/drivers/staging/lustre/lustre/obdclass/Makefile b/drivers/staging/lustre/lustre/obdclass/Makefile > index c404eb3..df7e47f 100644 > --- a/drivers/staging/lustre/lustre/obdclass/Makefile > +++ b/drivers/staging/lustre/lustre/obdclass/Makefile > @@ -5,5 +5,4 @@ obdclass-y := linux/linux-module.o linux/linux-obdo.o linux/linux-sysctl.o \ > genops.o uuid.o lprocfs_status.o lprocfs_counters.o \ > lustre_handles.o lustre_peer.o statfs_pack.o \ > obdo.o obd_config.o obd_mount.o lu_object.o lu_ref.o \ > - cl_object.o cl_page.o cl_lock.o cl_io.o \ > - acl.o kernelcomm.o > + cl_object.o cl_page.o cl_lock.o cl_io.o kernelcomm.o > diff --git a/drivers/staging/lustre/lustre/obdclass/acl.c b/drivers/staging/lustre/lustre/obdclass/acl.c > deleted file mode 100644 > index 30d8b42..0000000 > --- a/drivers/staging/lustre/lustre/obdclass/acl.c > +++ /dev/null > @@ -1,411 +0,0 @@ > -/* > - * GPL HEADER START > - * > - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. > - * > - * This program is free software; you can redistribute it and/or modify > - * it under the terms of the GNU General Public License version 2 only, > - * as published by the Free Software Foundation. > - * > - * This program is distributed in the hope that it will be useful, but > - * WITHOUT ANY WARRANTY; without even the implied warranty of > - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > - * General Public License version 2 for more details (a copy is included > - * in the LICENSE file that accompanied this code). > - * > - * You should have received a copy of the GNU General Public License > - * version 2 along with this program; If not, see > - * http://www.gnu.org/licenses/gpl-2.0.html > - * > - * GPL HEADER END > - */ > -/* > - * Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. > - * Use is subject to license terms. > - * > - * Copyright (c) 2012, Intel Corporation. > - */ > -/* > - * This file is part of Lustre, http://www.lustre.org/ > - * Lustre is a trademark of Sun Microsystems, Inc. > - * > - * lustre/obdclass/acl.c > - * > - * Lustre Access Control List. > - * > - * Author: Fan Yong > - */ > - > -#define DEBUG_SUBSYSTEM S_SEC > -#include "../include/lu_object.h" > -#include "../include/lustre_acl.h" > -#include "../include/lustre_eacl.h" > -#include "../include/obd_support.h" > - > -#ifdef CONFIG_FS_POSIX_ACL > - > -#define CFS_ACL_XATTR_VERSION POSIX_ACL_XATTR_VERSION > - > -enum { > - ES_UNK = 0, /* unknown stat */ > - ES_UNC = 1, /* ACL entry is not changed */ > - ES_MOD = 2, /* ACL entry is modified */ > - ES_ADD = 3, /* ACL entry is added */ > - ES_DEL = 4 /* ACL entry is deleted */ > -}; > - > -static inline void lustre_ext_acl_le_to_cpu(ext_acl_xattr_entry *d, > - ext_acl_xattr_entry *s) > -{ > - d->e_tag = le16_to_cpu(s->e_tag); > - d->e_perm = le16_to_cpu(s->e_perm); > - d->e_id = le32_to_cpu(s->e_id); > - d->e_stat = le32_to_cpu(s->e_stat); > -} > - > -static inline void lustre_ext_acl_cpu_to_le(ext_acl_xattr_entry *d, > - ext_acl_xattr_entry *s) > -{ > - d->e_tag = cpu_to_le16(s->e_tag); > - d->e_perm = cpu_to_le16(s->e_perm); > - d->e_id = cpu_to_le32(s->e_id); > - d->e_stat = cpu_to_le32(s->e_stat); > -} > - > -static inline void lustre_posix_acl_le_to_cpu(posix_acl_xattr_entry *d, > - posix_acl_xattr_entry *s) > -{ > - d->e_tag = le16_to_cpu(s->e_tag); > - d->e_perm = le16_to_cpu(s->e_perm); > - d->e_id = le32_to_cpu(s->e_id); > -} > - > -static inline void lustre_posix_acl_cpu_to_le(posix_acl_xattr_entry *d, > - posix_acl_xattr_entry *s) > -{ > - d->e_tag = cpu_to_le16(s->e_tag); > - d->e_perm = cpu_to_le16(s->e_perm); > - d->e_id = cpu_to_le32(s->e_id); > -} > - > -/* if "new_count == 0", then "new = {a_version, NULL}", NOT NULL. */ > -static int lustre_posix_acl_xattr_reduce_space(posix_acl_xattr_header **header, > - int old_count, int new_count) > -{ > - int old_size = CFS_ACL_XATTR_SIZE(old_count, posix_acl_xattr); > - int new_size = CFS_ACL_XATTR_SIZE(new_count, posix_acl_xattr); > - posix_acl_xattr_header *new; > - > - if (unlikely(old_count <= new_count)) > - return old_size; > - > - new = kmemdup(*header, new_size, GFP_NOFS); > - if (unlikely(!new)) > - return -ENOMEM; > - > - kfree(*header); > - *header = new; > - return new_size; > -} > - > -/* if "new_count == 0", then "new = {0, NULL}", NOT NULL. */ > -static int lustre_ext_acl_xattr_reduce_space(ext_acl_xattr_header **header, > - int old_count) > -{ > - int ext_count = le32_to_cpu((*header)->a_count); > - int ext_size = CFS_ACL_XATTR_SIZE(ext_count, ext_acl_xattr); > - ext_acl_xattr_header *new; > - > - if (unlikely(old_count <= ext_count)) > - return 0; > - > - new = kmemdup(*header, ext_size, GFP_NOFS); > - if (unlikely(!new)) > - return -ENOMEM; > - > - kfree(*header); > - *header = new; > - return 0; > -} > - > -/* > - * Generate new extended ACL based on the posix ACL. > - */ > -ext_acl_xattr_header * > -lustre_posix_acl_xattr_2ext(posix_acl_xattr_header *header, int size) > -{ > - int count, i, esize; > - ext_acl_xattr_header *new; > - > - if (unlikely(size < 0)) > - return ERR_PTR(-EINVAL); > - else if (!size) > - count = 0; > - else > - count = CFS_ACL_XATTR_COUNT(size, posix_acl_xattr); > - esize = CFS_ACL_XATTR_SIZE(count, ext_acl_xattr); > - new = kzalloc(esize, GFP_NOFS); > - if (unlikely(!new)) > - return ERR_PTR(-ENOMEM); > - > - new->a_count = cpu_to_le32(count); > - for (i = 0; i < count; i++) { > - new->a_entries[i].e_tag = header->a_entries[i].e_tag; > - new->a_entries[i].e_perm = header->a_entries[i].e_perm; > - new->a_entries[i].e_id = header->a_entries[i].e_id; > - new->a_entries[i].e_stat = cpu_to_le32(ES_UNK); > - } > - > - return new; > -} > -EXPORT_SYMBOL(lustre_posix_acl_xattr_2ext); > - > -/* > - * Filter out the "nobody" entries in the posix ACL. > - */ > -int lustre_posix_acl_xattr_filter(posix_acl_xattr_header *header, size_t size, > - posix_acl_xattr_header **out) > -{ > - int count, i, j, rc = 0; > - __u32 id; > - posix_acl_xattr_header *new; > - > - if (!size) > - return 0; > - if (size < sizeof(*new)) > - return -EINVAL; > - > - new = kzalloc(size, GFP_NOFS); > - if (unlikely(!new)) > - return -ENOMEM; > - > - new->a_version = cpu_to_le32(CFS_ACL_XATTR_VERSION); > - count = CFS_ACL_XATTR_COUNT(size, posix_acl_xattr); > - for (i = 0, j = 0; i < count; i++) { > - id = le32_to_cpu(header->a_entries[i].e_id); > - switch (le16_to_cpu(header->a_entries[i].e_tag)) { > - case ACL_USER_OBJ: > - case ACL_GROUP_OBJ: > - case ACL_MASK: > - case ACL_OTHER: > - if (id != ACL_UNDEFINED_ID) { > - rc = -EIO; > - goto _out; > - } > - > - memcpy(&new->a_entries[j++], &header->a_entries[i], > - sizeof(posix_acl_xattr_entry)); > - break; > - case ACL_USER: > - if (id != NOBODY_UID) > - memcpy(&new->a_entries[j++], > - &header->a_entries[i], > - sizeof(posix_acl_xattr_entry)); > - break; > - case ACL_GROUP: > - if (id != NOBODY_GID) > - memcpy(&new->a_entries[j++], > - &header->a_entries[i], > - sizeof(posix_acl_xattr_entry)); > - break; > - default: > - rc = -EIO; > - goto _out; > - } > - } > - > - /* free unused space. */ > - rc = lustre_posix_acl_xattr_reduce_space(&new, count, j); > - if (rc >= 0) { > - size = rc; > - *out = new; > - rc = 0; > - } > - > -_out: > - if (rc) { > - kfree(new); > - size = rc; > - } > - return size; > -} > -EXPORT_SYMBOL(lustre_posix_acl_xattr_filter); > - > -/* > - * Release the extended ACL space. > - */ > -void lustre_ext_acl_xattr_free(ext_acl_xattr_header *header) > -{ > - kfree(header); > -} > -EXPORT_SYMBOL(lustre_ext_acl_xattr_free); > - > -static ext_acl_xattr_entry * > -lustre_ext_acl_xattr_search(ext_acl_xattr_header *header, > - posix_acl_xattr_entry *entry, int *pos) > -{ > - int once, start, end, i, j, count = le32_to_cpu(header->a_count); > - > - once = 0; > - start = *pos; > - end = count; > - > -again: > - for (i = start; i < end; i++) { > - if (header->a_entries[i].e_tag == entry->e_tag && > - header->a_entries[i].e_id == entry->e_id) { > - j = i; > - if (++i >= count) > - i = 0; > - *pos = i; > - return &header->a_entries[j]; > - } > - } > - > - if (!once) { > - once = 1; > - start = 0; > - end = *pos; > - goto again; > - } > - > - return NULL; > -} > - > -/* > - * Merge the posix ACL and the extended ACL into new extended ACL. > - */ > -ext_acl_xattr_header * > -lustre_acl_xattr_merge2ext(posix_acl_xattr_header *posix_header, int size, > - ext_acl_xattr_header *ext_header) > -{ > - int ori_ext_count, posix_count, ext_count, ext_size; > - int i, j, pos = 0, rc = 0; > - posix_acl_xattr_entry pae; > - ext_acl_xattr_header *new; > - ext_acl_xattr_entry *ee, eae; > - > - if (unlikely(size < 0)) > - return ERR_PTR(-EINVAL); > - else if (!size) > - posix_count = 0; > - else > - posix_count = CFS_ACL_XATTR_COUNT(size, posix_acl_xattr); > - ori_ext_count = le32_to_cpu(ext_header->a_count); > - ext_count = posix_count + ori_ext_count; > - ext_size = CFS_ACL_XATTR_SIZE(ext_count, ext_acl_xattr); > - > - new = kzalloc(ext_size, GFP_NOFS); > - if (unlikely(!new)) > - return ERR_PTR(-ENOMEM); > - > - for (i = 0, j = 0; i < posix_count; i++) { > - lustre_posix_acl_le_to_cpu(&pae, &posix_header->a_entries[i]); > - switch (pae.e_tag) { > - case ACL_USER_OBJ: > - case ACL_GROUP_OBJ: > - case ACL_MASK: > - case ACL_OTHER: > - if (pae.e_id != ACL_UNDEFINED_ID) { > - rc = -EIO; > - goto out; > - } > - case ACL_USER: > - /* ignore "nobody" entry. */ > - if (pae.e_id == NOBODY_UID) > - break; > - > - new->a_entries[j].e_tag = > - posix_header->a_entries[i].e_tag; > - new->a_entries[j].e_perm = > - posix_header->a_entries[i].e_perm; > - new->a_entries[j].e_id = > - posix_header->a_entries[i].e_id; > - ee = lustre_ext_acl_xattr_search(ext_header, > - &posix_header->a_entries[i], &pos); > - if (ee) { > - if (posix_header->a_entries[i].e_perm != > - ee->e_perm) > - /* entry modified. */ > - ee->e_stat = > - new->a_entries[j++].e_stat = > - cpu_to_le32(ES_MOD); > - else > - /* entry unchanged. */ > - ee->e_stat = > - new->a_entries[j++].e_stat = > - cpu_to_le32(ES_UNC); > - } else { > - /* new entry. */ > - new->a_entries[j++].e_stat = > - cpu_to_le32(ES_ADD); > - } > - break; > - case ACL_GROUP: > - /* ignore "nobody" entry. */ > - if (pae.e_id == NOBODY_GID) > - break; > - new->a_entries[j].e_tag = > - posix_header->a_entries[i].e_tag; > - new->a_entries[j].e_perm = > - posix_header->a_entries[i].e_perm; > - new->a_entries[j].e_id = > - posix_header->a_entries[i].e_id; > - ee = lustre_ext_acl_xattr_search(ext_header, > - &posix_header->a_entries[i], &pos); > - if (ee) { > - if (posix_header->a_entries[i].e_perm != > - ee->e_perm) > - /* entry modified. */ > - ee->e_stat = > - new->a_entries[j++].e_stat = > - cpu_to_le32(ES_MOD); > - else > - /* entry unchanged. */ > - ee->e_stat = > - new->a_entries[j++].e_stat = > - cpu_to_le32(ES_UNC); > - } else { > - /* new entry. */ > - new->a_entries[j++].e_stat = > - cpu_to_le32(ES_ADD); > - } > - break; > - default: > - rc = -EIO; > - goto out; > - } > - } > - > - /* process deleted entries. */ > - for (i = 0; i < ori_ext_count; i++) { > - lustre_ext_acl_le_to_cpu(&eae, &ext_header->a_entries[i]); > - if (eae.e_stat == ES_UNK) { > - /* ignore "nobody" entry. */ > - if ((eae.e_tag == ACL_USER && eae.e_id == NOBODY_UID) || > - (eae.e_tag == ACL_GROUP && eae.e_id == NOBODY_GID)) > - continue; > - > - new->a_entries[j].e_tag = > - ext_header->a_entries[i].e_tag; > - new->a_entries[j].e_perm = > - ext_header->a_entries[i].e_perm; > - new->a_entries[j].e_id = ext_header->a_entries[i].e_id; > - new->a_entries[j++].e_stat = cpu_to_le32(ES_DEL); > - } > - } > - > - new->a_count = cpu_to_le32(j); > - /* free unused space. */ > - rc = lustre_ext_acl_xattr_reduce_space(&new, ext_count); > - > -out: > - if (rc) { > - kfree(new); > - new = ERR_PTR(rc); > - } > - return new; > -} > -EXPORT_SYMBOL(lustre_acl_xattr_merge2ext); > - > -#endif > diff --git a/drivers/staging/lustre/lustre/osc/osc_cache.c b/drivers/staging/lustre/lustre/osc/osc_cache.c > index 1a6df43..4c78b53 100644 > --- a/drivers/staging/lustre/lustre/osc/osc_cache.c > +++ b/drivers/staging/lustre/lustre/osc/osc_cache.c > @@ -2367,7 +2367,7 @@ int osc_prep_async_page(struct osc_object *osc, struct osc_page *ops, > oap->oap_obj_off = offset; > LASSERT(!(offset & ~PAGE_MASK)); > > - if (!client_is_remote(exp) && capable(CFS_CAP_SYS_RESOURCE)) > + if (capable(CFS_CAP_SYS_RESOURCE)) > oap->oap_brw_flags = OBD_BRW_NOQUOTA; > > INIT_LIST_HEAD(&oap->oap_pending_item); > @@ -2406,8 +2406,7 @@ int osc_queue_async_io(const struct lu_env *env, struct cl_io *io, > > /* Set the OBD_BRW_SRVLOCK before the page is queued. */ > brw_flags |= ops->ops_srvlock ? OBD_BRW_SRVLOCK : 0; > - if (!client_is_remote(osc_export(osc)) && > - capable(CFS_CAP_SYS_RESOURCE)) { > + if (capable(CFS_CAP_SYS_RESOURCE)) { > brw_flags |= OBD_BRW_NOQUOTA; > cmd |= OBD_BRW_NOQUOTA; > } > diff --git a/drivers/staging/lustre/lustre/osc/osc_page.c b/drivers/staging/lustre/lustre/osc/osc_page.c > index 57d8a5a..18c261b 100644 > --- a/drivers/staging/lustre/lustre/osc/osc_page.c > +++ b/drivers/staging/lustre/lustre/osc/osc_page.c > @@ -357,7 +357,6 @@ void osc_page_submit(const struct lu_env *env, struct osc_page *opg, > enum cl_req_type crt, int brw_flags) > { > struct osc_async_page *oap = &opg->ops_oap; > - struct osc_object *obj = oap->oap_obj; > > LASSERTF(oap->oap_magic == OAP_MAGIC, "Bad oap magic: oap %p, magic 0x%x\n", > oap, oap->oap_magic); > @@ -372,8 +371,7 @@ void osc_page_submit(const struct lu_env *env, struct osc_page *opg, > if (osc_over_unstable_soft_limit(oap->oap_cli)) > oap->oap_brw_flags |= OBD_BRW_SOFT_SYNC; > > - if (!client_is_remote(osc_export(obj)) && > - capable(CFS_CAP_SYS_RESOURCE)) { > + if (capable(CFS_CAP_SYS_RESOURCE)) { > oap->oap_brw_flags |= OBD_BRW_NOQUOTA; > oap->oap_cmd |= OBD_BRW_NOQUOTA; > } > diff --git a/drivers/staging/lustre/lustre/ptlrpc/layout.c b/drivers/staging/lustre/lustre/ptlrpc/layout.c > index e6ff97d..ab5d851 100644 > --- a/drivers/staging/lustre/lustre/ptlrpc/layout.c > +++ b/drivers/staging/lustre/lustre/ptlrpc/layout.c > @@ -194,7 +194,7 @@ static const struct req_msg_field *mds_reint_create_slave_client[] = { > &RMF_DLM_REQ > }; > > -static const struct req_msg_field *mds_reint_create_rmt_acl_client[] = { > +static const struct req_msg_field *mds_reint_create_acl_client[] = { > &RMF_PTLRPC_BODY, > &RMF_REC_REINT, > &RMF_CAPA1, > @@ -675,7 +675,7 @@ static struct req_format *req_formats[] = { > &RQF_MDS_DONE_WRITING, > &RQF_MDS_REINT, > &RQF_MDS_REINT_CREATE, > - &RQF_MDS_REINT_CREATE_RMT_ACL, > + &RQF_MDS_REINT_CREATE_ACL, > &RQF_MDS_REINT_CREATE_SLAVE, > &RQF_MDS_REINT_CREATE_SYM, > &RQF_MDS_REINT_OPEN, > @@ -1238,10 +1238,10 @@ struct req_format RQF_MDS_REINT_CREATE = > mds_reint_create_client, mdt_body_capa); > EXPORT_SYMBOL(RQF_MDS_REINT_CREATE); > > -struct req_format RQF_MDS_REINT_CREATE_RMT_ACL = > - DEFINE_REQ_FMT0("MDS_REINT_CREATE_RMT_ACL", > - mds_reint_create_rmt_acl_client, mdt_body_capa); > -EXPORT_SYMBOL(RQF_MDS_REINT_CREATE_RMT_ACL); > +struct req_format RQF_MDS_REINT_CREATE_ACL = > + DEFINE_REQ_FMT0("MDS_REINT_CREATE_ACL", > + mds_reint_create_acl_client, mdt_body_capa); > +EXPORT_SYMBOL(RQF_MDS_REINT_CREATE_ACL); > > struct req_format RQF_MDS_REINT_CREATE_SLAVE = > DEFINE_REQ_FMT0("MDS_REINT_CREATE_EA", > diff --git a/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c b/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c > index 9ff58a1..b514f18 100644 > --- a/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c > +++ b/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c > @@ -1802,19 +1802,6 @@ void lustre_swab_obd_quotactl(struct obd_quotactl *q) > } > EXPORT_SYMBOL(lustre_swab_obd_quotactl); > > -void lustre_swab_mdt_remote_perm(struct mdt_remote_perm *p) > -{ > - __swab32s(&p->rp_uid); > - __swab32s(&p->rp_gid); > - __swab32s(&p->rp_fsuid); > - __swab32s(&p->rp_fsuid_h); > - __swab32s(&p->rp_fsgid); > - __swab32s(&p->rp_fsgid_h); > - __swab32s(&p->rp_access_perm); > - __swab32s(&p->rp_padding); > -}; > -EXPORT_SYMBOL(lustre_swab_mdt_remote_perm); > - > void lustre_swab_fid2path(struct getinfo_fid2path *gf) > { > lustre_swab_lu_fid(&gf->gf_fid); > diff --git a/drivers/staging/lustre/lustre/ptlrpc/wiretest.c b/drivers/staging/lustre/lustre/ptlrpc/wiretest.c > index 9fd9de9..6cc2b2e 100644 > --- a/drivers/staging/lustre/lustre/ptlrpc/wiretest.c > +++ b/drivers/staging/lustre/lustre/ptlrpc/wiretest.c > @@ -1265,8 +1265,6 @@ void lustre_assert_wire_constants(void) > OBD_MD_FLXATTRRM); > LASSERTF(OBD_MD_FLACL == (0x0000008000000000ULL), "found 0x%.16llxULL\n", > OBD_MD_FLACL); > - LASSERTF(OBD_MD_FLRMTPERM == (0x0000010000000000ULL), "found 0x%.16llxULL\n", > - OBD_MD_FLRMTPERM); > LASSERTF(OBD_MD_FLMDSCAPA == (0x0000020000000000ULL), "found 0x%.16llxULL\n", > OBD_MD_FLMDSCAPA); > LASSERTF(OBD_MD_FLOSSCAPA == (0x0000040000000000ULL), "found 0x%.16llxULL\n", > @@ -1277,14 +1275,6 @@ void lustre_assert_wire_constants(void) > OBD_MD_FLCROSSREF); > LASSERTF(OBD_MD_FLGETATTRLOCK == (0x0000200000000000ULL), "found 0x%.16llxULL\n", > OBD_MD_FLGETATTRLOCK); > - LASSERTF(OBD_MD_FLRMTLSETFACL == (0x0001000000000000ULL), "found 0x%.16llxULL\n", > - OBD_MD_FLRMTLSETFACL); > - LASSERTF(OBD_MD_FLRMTLGETFACL == (0x0002000000000000ULL), "found 0x%.16llxULL\n", > - OBD_MD_FLRMTLGETFACL); > - LASSERTF(OBD_MD_FLRMTRSETFACL == (0x0004000000000000ULL), "found 0x%.16llxULL\n", > - OBD_MD_FLRMTRSETFACL); > - LASSERTF(OBD_MD_FLRMTRGETFACL == (0x0008000000000000ULL), "found 0x%.16llxULL\n", > - OBD_MD_FLRMTRGETFACL); > LASSERTF(OBD_MD_FLDATAVERSION == (0x0010000000000000ULL), "found 0x%.16llxULL\n", > OBD_MD_FLDATAVERSION); > CLASSERT(OBD_FL_INLINEDATA == 0x00000001); > @@ -1891,44 +1881,6 @@ void lustre_assert_wire_constants(void) > LASSERTF((int)sizeof(((struct mdt_ioepoch *)0)->padding) == 4, "found %lld\n", > (long long)(int)sizeof(((struct mdt_ioepoch *)0)->padding)); > > - /* Checks for struct mdt_remote_perm */ > - LASSERTF((int)sizeof(struct mdt_remote_perm) == 32, "found %lld\n", > - (long long)(int)sizeof(struct mdt_remote_perm)); > - LASSERTF((int)offsetof(struct mdt_remote_perm, rp_uid) == 0, "found %lld\n", > - (long long)(int)offsetof(struct mdt_remote_perm, rp_uid)); > - LASSERTF((int)sizeof(((struct mdt_remote_perm *)0)->rp_uid) == 4, "found %lld\n", > - (long long)(int)sizeof(((struct mdt_remote_perm *)0)->rp_uid)); > - LASSERTF((int)offsetof(struct mdt_remote_perm, rp_gid) == 4, "found %lld\n", > - (long long)(int)offsetof(struct mdt_remote_perm, rp_gid)); > - LASSERTF((int)sizeof(((struct mdt_remote_perm *)0)->rp_gid) == 4, "found %lld\n", > - (long long)(int)sizeof(((struct mdt_remote_perm *)0)->rp_gid)); > - LASSERTF((int)offsetof(struct mdt_remote_perm, rp_fsuid) == 8, "found %lld\n", > - (long long)(int)offsetof(struct mdt_remote_perm, rp_fsuid)); > - LASSERTF((int)sizeof(((struct mdt_remote_perm *)0)->rp_fsuid) == 4, "found %lld\n", > - (long long)(int)sizeof(((struct mdt_remote_perm *)0)->rp_fsuid)); > - LASSERTF((int)offsetof(struct mdt_remote_perm, rp_fsgid) == 16, "found %lld\n", > - (long long)(int)offsetof(struct mdt_remote_perm, rp_fsgid)); > - LASSERTF((int)sizeof(((struct mdt_remote_perm *)0)->rp_fsgid) == 4, "found %lld\n", > - (long long)(int)sizeof(((struct mdt_remote_perm *)0)->rp_fsgid)); > - LASSERTF((int)offsetof(struct mdt_remote_perm, rp_access_perm) == 24, "found %lld\n", > - (long long)(int)offsetof(struct mdt_remote_perm, rp_access_perm)); > - LASSERTF((int)sizeof(((struct mdt_remote_perm *)0)->rp_access_perm) == 4, "found %lld\n", > - (long long)(int)sizeof(((struct mdt_remote_perm *)0)->rp_access_perm)); > - LASSERTF((int)offsetof(struct mdt_remote_perm, rp_padding) == 28, "found %lld\n", > - (long long)(int)offsetof(struct mdt_remote_perm, rp_padding)); > - LASSERTF((int)sizeof(((struct mdt_remote_perm *)0)->rp_padding) == 4, "found %lld\n", > - (long long)(int)sizeof(((struct mdt_remote_perm *)0)->rp_padding)); > - LASSERTF(CFS_SETUID_PERM == 0x00000001UL, "found 0x%.8xUL\n", > - (unsigned)CFS_SETUID_PERM); > - LASSERTF(CFS_SETGID_PERM == 0x00000002UL, "found 0x%.8xUL\n", > - (unsigned)CFS_SETGID_PERM); > - LASSERTF(CFS_SETGRP_PERM == 0x00000004UL, "found 0x%.8xUL\n", > - (unsigned)CFS_SETGRP_PERM); > - LASSERTF(CFS_RMTACL_PERM == 0x00000008UL, "found 0x%.8xUL\n", > - (unsigned)CFS_RMTACL_PERM); > - LASSERTF(CFS_RMTOWN_PERM == 0x00000010UL, "found 0x%.8xUL\n", > - (unsigned)CFS_RMTOWN_PERM); > - > /* Checks for struct mdt_rec_setattr */ > LASSERTF((int)sizeof(struct mdt_rec_setattr) == 136, "found %lld\n", > (long long)(int)sizeof(struct mdt_rec_setattr)); > -- > 1.7.1 > > _______________________________________________ > lustre-devel mailing list > lustre-devel at lists.lustre.org > http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org From torvalds at linux-foundation.org Mon Jun 20 18:03:01 2016 From: torvalds at linux-foundation.org (Linus Torvalds) Date: Mon, 20 Jun 2016 11:03:01 -0700 Subject: [lustre-devel] [PATCH v2 00/24] Delete CURRENT_TIME and CURRENT_TIME_SEC macros In-Reply-To: <1466382443-11063-1-git-send-email-deepa.kernel@gmail.com> References: <1466382443-11063-1-git-send-email-deepa.kernel@gmail.com> Message-ID: On Sun, Jun 19, 2016 at 5:26 PM, Deepa Dinamani wrote: > The series is aimed at getting rid of CURRENT_TIME and CURRENT_TIME_SEC macros. This version now looks ok to me. I do have a comment (or maybe just a RFD) for future work. It does strike me that once we actually change over the inode times to use timespec64, the calling conventions are going to be fairly horrendous on most 32-bit architectures. Gcc handles 8-byte structure returns (on most architectures) by returning them as two 32-bit registers (%edx:%eax on x86). But once it is timespec64, that will no longer be the case, and the calling convention will end up using a pointer to the local stack instead. So for 32-bit code generation, we *may* want to introduce a new model of doing set_inode_time(inode, ATTR_ATIME | ATTR_MTIME); which basically just does inode->i_atime = inode->i_mtime = current_time(inode); but with a much easier calling convention on 32-bit architectures. But that is entirely orthogonal to this patch-set, and should be seen as a separate issue. And maybe it doesn't end up helping anyway, but I do think those "simple" direct assignments will really generate pretty disgusting code on 32-bit architectures. That whole inode->i_atime = inode->i_mtime = CURRENT_TIME; model really made a lot more sense back in the ancient days when inode times were just simply 32-bit seconds (not even timeval structures). Linus From deepa.kernel at gmail.com Mon Jun 20 18:58:31 2016 From: deepa.kernel at gmail.com (Deepa Dinamani) Date: Mon, 20 Jun 2016 11:58:31 -0700 Subject: [lustre-devel] [PATCH v2 00/24] Delete CURRENT_TIME and CURRENT_TIME_SEC macros In-Reply-To: References: <1466382443-11063-1-git-send-email-deepa.kernel@gmail.com> Message-ID: > This version now looks ok to me. > > I do have a comment (or maybe just a RFD) for future work. > > It does strike me that once we actually change over the inode times to > use timespec64, the calling conventions are going to be fairly > horrendous on most 32-bit architectures. > > Gcc handles 8-byte structure returns (on most architectures) by > returning them as two 32-bit registers (%edx:%eax on x86). But once it > is timespec64, that will no longer be the case, and the calling > convention will end up using a pointer to the local stack instead. > > So for 32-bit code generation, we *may* want to introduce a new model of doing > > set_inode_time(inode, ATTR_ATIME | ATTR_MTIME); > > which basically just does > > inode->i_atime = inode->i_mtime = current_time(inode); > > but with a much easier calling convention on 32-bit architectures. Arnd and I had discussed something like this before. But, for entirely different reasons: Having the set_inode_time() like you suggest will also help switching of vfs inode times to timespec64. We were suggesting all the accesses to inode time be abstracted through something like inode_set_time(). Arnd also had suggested a split representation of fields in the struct inode as well which led to space savings as well. And, having the split representation also meant no more direct assignments: https://lkml.org/lkml/2016/1/7/20 This in general will be similar to setattr_copy(), but only sets times rather than other attributes as well. If this is what is preferred, then the patches to change vfs to use timespec64 could make use of this and will need to be refactored. So maybe it would be good to discuss before I post those patches. -Deepa From green at linuxhacker.ru Mon Jun 20 20:55:25 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Mon, 20 Jun 2016 16:55:25 -0400 Subject: [lustre-devel] [PATCH v2 02/29] staging/lustre/llite: correct request handling after ll_lookup_it() In-Reply-To: <1466456152-2199975-1-git-send-email-green@linuxhacker.ru> References: <1466456152-2199975-1-git-send-email-green@linuxhacker.ru> Message-ID: <1466456152-2199975-3-git-send-email-green@linuxhacker.ru> From: "John L. Hammond" In the FIFO cases of ll_atomic_open() and ll_lookup_nd() remove spurious calls to ptlrpc_req_finished(). Explain that these cases are unreachable in practice anyway. Signed-off-by: John L. Hammond Reviewed-on: http://review.whamcloud.com/17068 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7402 Reviewed-by: Dmitry Eremin Reviewed-by: Lai Siyao Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/llite/namei.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/drivers/staging/lustre/lustre/llite/namei.c b/drivers/staging/lustre/lustre/llite/namei.c index d7459bd..6414d52 100644 --- a/drivers/staging/lustre/lustre/llite/namei.c +++ b/drivers/staging/lustre/lustre/llite/namei.c @@ -622,13 +622,10 @@ static int ll_atomic_open(struct inode *dir, struct dentry *dentry, if (d_really_is_positive(dentry) && it_disposition(it, DISP_OPEN_OPEN)) { /* Open dentry. */ if (S_ISFIFO(d_inode(dentry)->i_mode)) { - /* We cannot call open here as it would - * deadlock. + /* We cannot call open here as it might + * deadlock. This case is unreachable in + * practice because of OBD_CONNECT_NODEVOH. */ - if (it_disposition(it, DISP_ENQ_OPEN_REF)) - ptlrpc_req_finished( - (struct ptlrpc_request *) - it->d.lustre.it_data); rc = finish_no_open(file, de); } else { file->private_data = it; -- 2.7.4 From green at linuxhacker.ru Mon Jun 20 20:55:26 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Mon, 20 Jun 2016 16:55:26 -0400 Subject: [lustre-devel] [PATCH v2 03/29] staging/lustre/llite: Get rid of ll_lock_dcache/ll_unlock_dcache In-Reply-To: <1466456152-2199975-1-git-send-email-green@linuxhacker.ru> References: <1466456152-2199975-1-git-send-email-green@linuxhacker.ru> Message-ID: <1466456152-2199975-4-git-send-email-green@linuxhacker.ru> These are just doing spin_lock/unlock on inode's i_lock, so just do the spinlock directly to make the code more clear Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/llite/dcache.c | 4 ++-- drivers/staging/lustre/lustre/llite/llite_internal.h | 10 ---------- drivers/staging/lustre/lustre/llite/namei.c | 8 ++++---- 3 files changed, 6 insertions(+), 16 deletions(-) diff --git a/drivers/staging/lustre/lustre/llite/dcache.c b/drivers/staging/lustre/lustre/llite/dcache.c index 9d13d5e..f002b3a 100644 --- a/drivers/staging/lustre/lustre/llite/dcache.c +++ b/drivers/staging/lustre/lustre/llite/dcache.c @@ -249,7 +249,7 @@ void ll_invalidate_aliases(struct inode *inode) CDEBUG(D_INODE, "marking dentries for ino "DFID"(%p) invalid\n", PFID(ll_inode2fid(inode)), inode); - ll_lock_dcache(inode); + spin_lock(&inode->i_lock); hlist_for_each_entry(dentry, &inode->i_dentry, d_u.d_alias) { CDEBUG(D_DENTRY, "dentry in drop %pd (%p) parent %p inode %p flags %d\n", dentry, dentry, dentry->d_parent, @@ -257,7 +257,7 @@ void ll_invalidate_aliases(struct inode *inode) d_lustre_invalidate(dentry, 0); } - ll_unlock_dcache(inode); + spin_unlock(&inode->i_lock); } int ll_revalidate_it_finish(struct ptlrpc_request *request, diff --git a/drivers/staging/lustre/lustre/llite/llite_internal.h b/drivers/staging/lustre/lustre/llite/llite_internal.h index 74cd241..098155f 100644 --- a/drivers/staging/lustre/lustre/llite/llite_internal.h +++ b/drivers/staging/lustre/lustre/llite/llite_internal.h @@ -1313,16 +1313,6 @@ static inline void ll_set_lock_data(struct obd_export *exp, struct inode *inode, *bits = it->d.lustre.it_lock_bits; } -static inline void ll_lock_dcache(struct inode *inode) -{ - spin_lock(&inode->i_lock); -} - -static inline void ll_unlock_dcache(struct inode *inode) -{ - spin_unlock(&inode->i_lock); -} - static inline int d_lustre_invalid(const struct dentry *dentry) { struct ll_dentry_data *lld = ll_d2d(dentry); diff --git a/drivers/staging/lustre/lustre/llite/namei.c b/drivers/staging/lustre/lustre/llite/namei.c index 6414d52..e4df510 100644 --- a/drivers/staging/lustre/lustre/llite/namei.c +++ b/drivers/staging/lustre/lustre/llite/namei.c @@ -140,7 +140,7 @@ static void ll_invalidate_negative_children(struct inode *dir) { struct dentry *dentry, *tmp_subdir; - ll_lock_dcache(dir); + spin_lock(&dir->i_lock); hlist_for_each_entry(dentry, &dir->i_dentry, d_u.d_alias) { spin_lock(&dentry->d_lock); if (!list_empty(&dentry->d_subdirs)) { @@ -155,7 +155,7 @@ static void ll_invalidate_negative_children(struct inode *dir) } spin_unlock(&dentry->d_lock); } - ll_unlock_dcache(dir); + spin_unlock(&dir->i_lock); } int ll_md_blocking_ast(struct ldlm_lock *lock, struct ldlm_lock_desc *desc, @@ -317,7 +317,7 @@ static struct dentry *ll_find_alias(struct inode *inode, struct dentry *dentry) discon_alias = NULL; invalid_alias = NULL; - ll_lock_dcache(inode); + spin_lock(&inode->i_lock); hlist_for_each_entry(alias, &inode->i_dentry, d_u.d_alias) { LASSERT(alias != dentry); @@ -342,7 +342,7 @@ static struct dentry *ll_find_alias(struct inode *inode, struct dentry *dentry) dget_dlock(alias); spin_unlock(&alias->d_lock); } - ll_unlock_dcache(inode); + spin_unlock(&inode->i_lock); return alias; } -- 2.7.4 From green at linuxhacker.ru Mon Jun 20 20:55:27 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Mon, 20 Jun 2016 16:55:27 -0400 Subject: [lustre-devel] [PATCH v2 04/29] staging/lustre/llite: lock i_lock before __d_drop() In-Reply-To: <1466456152-2199975-1-git-send-email-green@linuxhacker.ru> References: <1466456152-2199975-1-git-send-email-green@linuxhacker.ru> Message-ID: <1466456152-2199975-5-git-send-email-green@linuxhacker.ru> From: Bruno Faccini There has been several Lustre Client crashes reported by sites running with Lustre versions 2.1/2.5, all showing the same dentry->d_hash->next corrupted pointer cause. This patch fixes a regression that has been introduced since a long time by commit : (LU-506 kernel: FC15 - support dcache scalability changes.) where i_lock protection usage has been removed and that is likely to cause racy condition during dentry [un]hashing and to be the root cause of these crashes. Signed-off-by: Bruno Faccini Reviewed-on: http://review.whamcloud.com/19287 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7973 Reviewed-by: Lai Siyao Reviewed-by: Yang Sheng Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/llite/file.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/llite/file.c b/drivers/staging/lustre/lustre/llite/file.c index b0c4548..5436a54 100644 --- a/drivers/staging/lustre/lustre/llite/file.c +++ b/drivers/staging/lustre/lustre/llite/file.c @@ -2975,8 +2975,11 @@ static int __ll_inode_revalidate(struct dentry *dentry, __u64 ibits) * here to preserve get_cwd functionality on 2.6. * Bug 10503 */ - if (!d_inode(dentry)->i_nlink) + if (!d_inode(dentry)->i_nlink) { + spin_lock(&inode->i_lock); d_lustre_invalidate(dentry, 0); + spin_unlock(&inode->i_lock); + } ll_lookup_finish_locks(&oit, inode); } else if (!ll_have_md_lock(d_inode(dentry), &ibits, LCK_MINMODE)) { -- 2.7.4 From green at linuxhacker.ru Mon Jun 20 20:55:29 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Mon, 20 Jun 2016 16:55:29 -0400 Subject: [lustre-devel] [PATCH v2 06/29] staging/lustre/osc: Fix reverted condition in osc_lock_weight In-Reply-To: <1466456152-2199975-1-git-send-email-green@linuxhacker.ru> References: <1466456152-2199975-1-git-send-email-green@linuxhacker.ru> Message-ID: <1466456152-2199975-7-git-send-email-green@linuxhacker.ru> When imprting clio simplification patch, the check for pbject got reversed by mistake when converting from if (obj == NULL) it somehow became (if (obj) which is obviously wrong, and so when it does hit, a crash was happening as result. Fix the condition and all if fine now. Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/osc/osc_lock.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/osc/osc_lock.c b/drivers/staging/lustre/lustre/osc/osc_lock.c index d856775..5455d9d 100644 --- a/drivers/staging/lustre/lustre/osc/osc_lock.c +++ b/drivers/staging/lustre/lustre/osc/osc_lock.c @@ -699,7 +699,7 @@ unsigned long osc_ldlm_weigh_ast(struct ldlm_lock *dlmlock) LASSERT(dlmlock->l_resource->lr_type == LDLM_EXTENT); obj = dlmlock->l_ast_data; - if (obj) { + if (!obj) { weight = 1; goto out; } -- 2.7.4 From green at linuxhacker.ru Mon Jun 20 20:55:23 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Mon, 20 Jun 2016 16:55:23 -0400 Subject: [lustre-devel] [PATCH v2 00/29] Lustre fixes Message-ID: <1466456152-2199975-1-git-send-email-green@linuxhacker.ru> Changes from v1: This is rebased and retested on top of latest staging tree, one patch dropped because it made it to the tree by other means, two more fixes added. These patches represent another round of Lustre fixes and also a few cleanups that some of the fixes were building up upon. Alex Zhuravlev (1): staging/lustre: LDLM_DEBUG() shouldn't be passed \n Andreas Dilger (1): staging: lustre: quiet lockdep recursive lock warning Andriy Skulysh (1): staging/lustre/osc: glimpse lock should match only with granted locks Ben Evans (1): staging/lustre/ptlrpc: Remove __ptlrpc_request_bufs_pack Bob Glossman (1): staging/lustre: Add newline to LU_OBJECT_DEBUG() message Bruno Faccini (1): staging/lustre/llite: lock i_lock before __d_drop() Dmitry Eremin (1): staging/lustre/osc: fix signed one bit field Emoly Liu (1): staging/lustre/llite: allocate and free client cache asynchronously Jinshan Xiong (1): staging/lustre/osc: osc_lock_weight endless loop fix John L. Hammond (4): staging/lustre/llite: correct request handling after ll_lookup_it() staging/lustre/llite: flatten struct lookup_intent staging/lustre/llite: change it_data to it_request staging/lustre/ldlm: const qualify struct lustre_handle * params Liang Zhen (2): staging/lustre/ptlrpc: reorganize ptlrpc_request staging/lustre/ptlrpc: missing wakeup for ptlrpc_check_set Niu Yawei (1): staging/lustre/mdc: Zero atime in close RPC Oleg Drokin (7): staging/lustre/llite: Get rid of ll_lock_dcache/ll_unlock_dcache staging/lustre/osc: Fix reverted condition in osc_lock_weight staging/lustre: Inline Lustre intent disposition functions staging/lustre/llite: Restore proper opencache operations staging/lustre/llite: ll_revalidate_dentry update staging/lustre: Add documentation for unstable_stats in sysfs staging/lustre/libcfs: Do not call kthread_run in wrong state Patrick Farrell (1): staging/lustre/llite: take trunc_sem only at vvp layer Sergey Cheremencev (1): staging/lustre/llite: don't panic when fid is insane Vitaly Fertman (2): staging/lustre/ptlrpc: Early Reply vs Reply MDunlink staging/lustre/ptlrpc: lost bulk leads to a hang Yang Sheng (1): staging/lustre/llite: ensure obd is effective in onu_upcall akam kumar bharathi (1): staging/lustre/llite: IOC_MDC_GETFILEINFO returns the wrong ino drivers/staging/lustre/lnet/libcfs/debug.c | 2 +- drivers/staging/lustre/lustre/include/cl_object.h | 10 +- drivers/staging/lustre/lustre/include/lu_object.h | 2 +- drivers/staging/lustre/lustre/include/lustre_dlm.h | 18 +- .../staging/lustre/lustre/include/lustre_intent.h | 30 +- drivers/staging/lustre/lustre/include/lustre_mdc.h | 3 - drivers/staging/lustre/lustre/include/lustre_net.h | 414 ++++++++++++--------- drivers/staging/lustre/lustre/include/obd.h | 8 +- .../staging/lustre/lustre/include/obd_support.h | 3 + drivers/staging/lustre/lustre/ldlm/ldlm_lock.c | 16 +- drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c | 5 +- drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 6 +- drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | 2 +- drivers/staging/lustre/lustre/llite/dcache.c | 41 +- drivers/staging/lustre/lustre/llite/dir.c | 8 +- drivers/staging/lustre/lustre/llite/file.c | 66 ++-- drivers/staging/lustre/lustre/llite/lcommon_misc.c | 8 +- .../staging/lustre/lustre/llite/llite_internal.h | 27 +- drivers/staging/lustre/lustre/llite/llite_lib.c | 47 +-- drivers/staging/lustre/lustre/llite/llite_mmap.c | 7 - drivers/staging/lustre/lustre/llite/llite_nfs.c | 18 + drivers/staging/lustre/lustre/llite/lproc_llite.c | 6 +- drivers/staging/lustre/lustre/llite/namei.c | 25 +- drivers/staging/lustre/lustre/llite/statahead.c | 10 +- drivers/staging/lustre/lustre/llite/xattr_cache.c | 16 +- drivers/staging/lustre/lustre/lmv/lmv_intent.c | 26 +- drivers/staging/lustre/lustre/lmv/lmv_obd.c | 8 +- drivers/staging/lustre/lustre/lov/lov_obd.c | 7 + drivers/staging/lustre/lustre/lov/lov_object.c | 4 +- drivers/staging/lustre/lustre/mdc/mdc_lib.c | 12 + drivers/staging/lustre/lustre/mdc/mdc_locks.c | 93 ++--- drivers/staging/lustre/lustre/mdc/mdc_request.c | 2 +- drivers/staging/lustre/lustre/mgc/mgc_request.c | 4 +- drivers/staging/lustre/lustre/obdclass/cl_page.c | 46 +++ drivers/staging/lustre/lustre/osc/osc_cache.c | 4 +- .../staging/lustre/lustre/osc/osc_cl_internal.h | 2 +- drivers/staging/lustre/lustre/osc/osc_lock.c | 18 +- drivers/staging/lustre/lustre/osc/osc_page.c | 4 +- drivers/staging/lustre/lustre/osc/osc_request.c | 12 +- drivers/staging/lustre/lustre/ptlrpc/client.c | 159 ++++---- drivers/staging/lustre/lustre/ptlrpc/events.c | 30 +- drivers/staging/lustre/lustre/ptlrpc/import.c | 3 +- drivers/staging/lustre/lustre/ptlrpc/niobuf.c | 20 +- .../staging/lustre/lustre/ptlrpc/ptlrpc_internal.h | 43 +++ drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c | 4 +- drivers/staging/lustre/lustre/ptlrpc/sec.c | 9 +- drivers/staging/lustre/lustre/ptlrpc/sec_config.c | 2 +- drivers/staging/lustre/sysfs-fs-lustre | 8 + 48 files changed, 783 insertions(+), 535 deletions(-) -- 2.7.4 From green at linuxhacker.ru Mon Jun 20 20:55:28 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Mon, 20 Jun 2016 16:55:28 -0400 Subject: [lustre-devel] [PATCH v2 05/29] staging/lustre/osc: osc_lock_weight endless loop fix In-Reply-To: <1466456152-2199975-1-git-send-email-green@linuxhacker.ru> References: <1466456152-2199975-1-git-send-email-green@linuxhacker.ru> Message-ID: <1466456152-2199975-6-git-send-email-green@linuxhacker.ru> From: Jinshan Xiong With huge number of pages to scan by osc_lock_weight() it is likely CLP_GANG_RESCHED is returned from osc_page_gang_lookup() and the scan will be repeated again from the start. To be sure that the scan is progressing across those restarts, next scan should be started from the last scanned page index plus one. Xyratex-bug-id: MRP-2145 Signed-off-by: Alexander Zarochentsev Signed-off-by: Jinshan Xiong Reviewed-on: http://review.whamcloud.com/12362 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5781 Reviewed-by: Bobi Jam Reviewed-by: James Simmons Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/osc/osc_lock.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/staging/lustre/lustre/osc/osc_lock.c b/drivers/staging/lustre/lustre/osc/osc_lock.c index 42def38..d856775 100644 --- a/drivers/staging/lustre/lustre/osc/osc_lock.c +++ b/drivers/staging/lustre/lustre/osc/osc_lock.c @@ -634,11 +634,10 @@ static int weigh_cb(const struct lu_env *env, struct cl_io *io, if (cl_page_is_vmlocked(env, page) || PageDirty(page->cp_vmpage) || PageWriteback(page->cp_vmpage) - ) { - (*(unsigned long *)cbdata)++; + ) return CLP_GANG_ABORT; - } + *(pgoff_t *)cbdata = osc_index(ops) + 1; return CLP_GANG_OKAY; } @@ -648,7 +647,7 @@ static unsigned long osc_lock_weight(const struct lu_env *env, { struct cl_io *io = &osc_env_info(env)->oti_io; struct cl_object *obj = cl_object_top(&oscobj->oo_cl); - unsigned long npages = 0; + pgoff_t page_index; int result; io->ci_obj = obj; @@ -657,11 +656,12 @@ static unsigned long osc_lock_weight(const struct lu_env *env, if (result != 0) return result; + page_index = cl_index(obj, extent->start); do { result = osc_page_gang_lookup(env, io, oscobj, - cl_index(obj, extent->start), + page_index, cl_index(obj, extent->end), - weigh_cb, (void *)&npages); + weigh_cb, (void *)&page_index); if (result == CLP_GANG_ABORT) break; if (result == CLP_GANG_RESCHED) @@ -669,7 +669,7 @@ static unsigned long osc_lock_weight(const struct lu_env *env, } while (result != CLP_GANG_OKAY); cl_io_fini(env, io); - return npages; + return result == CLP_GANG_ABORT ? 1 : 0; } /** -- 2.7.4 From green at linuxhacker.ru Mon Jun 20 20:55:24 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Mon, 20 Jun 2016 16:55:24 -0400 Subject: [lustre-devel] [PATCH v2 01/29] staging/lustre/llite: allocate and free client cache asynchronously In-Reply-To: <1466456152-2199975-1-git-send-email-green@linuxhacker.ru> References: <1466456152-2199975-1-git-send-email-green@linuxhacker.ru> Message-ID: <1466456152-2199975-2-git-send-email-green@linuxhacker.ru> From: Emoly Liu Since the inflight request holds import refcount as well as export, sometimes obd_disconnect() in client_common_put_super() can't put the last refcount of OSC import (e.g. due to network disconnection), this will cause cl_cache being accessed after free. To fix this issue, ccc_users is used as cl_cache refcount, and lov/llite/osc all hold one cl_cache refcount respectively, to avoid the race that a new OST is being added into the system when the client is mounted. The following cl_cache functions are added: - cl_cache_init(): allocate and initialize cl_cache - cl_cache_incref(): increase cl_cache refcount - cl_cache_decref(): decrease cl_cache refcount and free the cache if refcount=0. Signed-off-by: Emoly Liu Reviewed-on: http://review.whamcloud.com/13746 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-6173 Reviewed-by: Niu Yawei Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/include/cl_object.h | 10 ++++- drivers/staging/lustre/lustre/include/obd.h | 2 +- .../staging/lustre/lustre/llite/llite_internal.h | 2 +- drivers/staging/lustre/lustre/llite/llite_lib.c | 35 +++++++--------- drivers/staging/lustre/lustre/llite/lproc_llite.c | 6 +-- drivers/staging/lustre/lustre/lov/lov_obd.c | 7 ++++ drivers/staging/lustre/lustre/obdclass/cl_page.c | 46 ++++++++++++++++++++++ drivers/staging/lustre/lustre/osc/osc_page.c | 4 +- drivers/staging/lustre/lustre/osc/osc_request.c | 4 +- 9 files changed, 86 insertions(+), 30 deletions(-) diff --git a/drivers/staging/lustre/lustre/include/cl_object.h b/drivers/staging/lustre/lustre/include/cl_object.h index 36ca935..3cd4a25 100644 --- a/drivers/staging/lustre/lustre/include/cl_object.h +++ b/drivers/staging/lustre/lustre/include/cl_object.h @@ -2322,7 +2322,8 @@ void cl_lock_descr_print(const struct lu_env *env, void *cookie, */ struct cl_client_cache { /** - * # of users (OSCs) + * # of client cache refcount + * # of users (OSCs) + 2 (held by llite and lov) */ atomic_t ccc_users; /** @@ -2357,6 +2358,13 @@ struct cl_client_cache { }; +/** + * cl_cache functions + */ +struct cl_client_cache *cl_cache_init(unsigned long lru_page_max); +void cl_cache_incref(struct cl_client_cache *cache); +void cl_cache_decref(struct cl_client_cache *cache); + /** @} cl_page */ /** \defgroup cl_lock cl_lock diff --git a/drivers/staging/lustre/lustre/include/obd.h b/drivers/staging/lustre/lustre/include/obd.h index e654d42..ed1081a 100644 --- a/drivers/staging/lustre/lustre/include/obd.h +++ b/drivers/staging/lustre/lustre/include/obd.h @@ -415,7 +415,7 @@ struct lov_obd { enum lustre_sec_part lov_sp_me; /* Cached LRU and unstable data from upper layer */ - void *lov_cache; + struct cl_client_cache *lov_cache; struct rw_semaphore lov_notify_lock; diff --git a/drivers/staging/lustre/lustre/llite/llite_internal.h b/drivers/staging/lustre/lustre/llite/llite_internal.h index 7c1a3254..74cd241 100644 --- a/drivers/staging/lustre/lustre/llite/llite_internal.h +++ b/drivers/staging/lustre/lustre/llite/llite_internal.h @@ -493,7 +493,7 @@ struct ll_sb_info { * any page which is sent to a server as part of a bulk request, * but is uncommitted to stable storage. */ - struct cl_client_cache ll_cache; + struct cl_client_cache *ll_cache; struct lprocfs_stats *ll_ra_stats; diff --git a/drivers/staging/lustre/lustre/llite/llite_lib.c b/drivers/staging/lustre/lustre/llite/llite_lib.c index ac833db..83f4e1a 100644 --- a/drivers/staging/lustre/lustre/llite/llite_lib.c +++ b/drivers/staging/lustre/lustre/llite/llite_lib.c @@ -83,15 +83,11 @@ static struct ll_sb_info *ll_init_sbi(struct super_block *sb) pages = si.totalram - si.totalhigh; lru_page_max = pages / 2; - /* initialize ll_cache data */ - atomic_set(&sbi->ll_cache.ccc_users, 0); - sbi->ll_cache.ccc_lru_max = lru_page_max; - atomic_set(&sbi->ll_cache.ccc_lru_left, lru_page_max); - spin_lock_init(&sbi->ll_cache.ccc_lru_lock); - INIT_LIST_HEAD(&sbi->ll_cache.ccc_lru); - - atomic_set(&sbi->ll_cache.ccc_unstable_nr, 0); - init_waitqueue_head(&sbi->ll_cache.ccc_unstable_waitq); + sbi->ll_cache = cl_cache_init(lru_page_max); + if (!sbi->ll_cache) { + kfree(sbi); + return NULL; + } sbi->ll_ra_info.ra_max_pages_per_file = min(pages / 32, SBI_DEFAULT_READAHEAD_MAX); @@ -131,6 +127,11 @@ static void ll_free_sbi(struct super_block *sb) { struct ll_sb_info *sbi = ll_s2sbi(sb); + if (sbi->ll_cache) { + cl_cache_decref(sbi->ll_cache); + sbi->ll_cache = NULL; + } + kfree(sbi); } @@ -514,8 +515,8 @@ static int client_common_fill_super(struct super_block *sb, char *md, char *dt, cl_sb_init(sb); err = obd_set_info_async(NULL, sbi->ll_dt_exp, sizeof(KEY_CACHE_SET), - KEY_CACHE_SET, sizeof(sbi->ll_cache), - &sbi->ll_cache, NULL); + KEY_CACHE_SET, sizeof(*sbi->ll_cache), + sbi->ll_cache, NULL); sb->s_root = d_make_root(root); if (!sb->s_root) { @@ -560,8 +561,6 @@ out_lock_cn_cb: out_dt: obd_disconnect(sbi->ll_dt_exp); sbi->ll_dt_exp = NULL; - /* Make sure all OScs are gone, since cl_cache is accessing sbi. */ - obd_zombie_barrier(); out_md_fid: obd_fid_fini(sbi->ll_md_exp->exp_obd); out_md: @@ -618,10 +617,6 @@ static void client_common_put_super(struct super_block *sb) obd_fid_fini(sbi->ll_dt_exp->exp_obd); obd_disconnect(sbi->ll_dt_exp); sbi->ll_dt_exp = NULL; - /* wait till all OSCs are gone, since cl_cache is accessing sbi. - * see LU-2543. - */ - obd_zombie_barrier(); ldebugfs_unregister_mountpoint(sbi); @@ -962,12 +957,12 @@ void ll_put_super(struct super_block *sb) if (!force) { struct l_wait_info lwi = LWI_INTR(LWI_ON_SIGNAL_NOOP, NULL); - rc = l_wait_event(sbi->ll_cache.ccc_unstable_waitq, - !atomic_read(&sbi->ll_cache.ccc_unstable_nr), + rc = l_wait_event(sbi->ll_cache->ccc_unstable_waitq, + !atomic_read(&sbi->ll_cache->ccc_unstable_nr), &lwi); } - ccc_count = atomic_read(&sbi->ll_cache.ccc_unstable_nr); + ccc_count = atomic_read(&sbi->ll_cache->ccc_unstable_nr); if (!force && rc != -EINTR) LASSERTF(!ccc_count, "count: %i\n", ccc_count); diff --git a/drivers/staging/lustre/lustre/llite/lproc_llite.c b/drivers/staging/lustre/lustre/llite/lproc_llite.c index 6e9a8a5..1f00bce 100644 --- a/drivers/staging/lustre/lustre/llite/lproc_llite.c +++ b/drivers/staging/lustre/lustre/llite/lproc_llite.c @@ -360,7 +360,7 @@ static int ll_max_cached_mb_seq_show(struct seq_file *m, void *v) { struct super_block *sb = m->private; struct ll_sb_info *sbi = ll_s2sbi(sb); - struct cl_client_cache *cache = &sbi->ll_cache; + struct cl_client_cache *cache = sbi->ll_cache; int shift = 20 - PAGE_SHIFT; int max_cached_mb; int unused_mb; @@ -387,7 +387,7 @@ static ssize_t ll_max_cached_mb_seq_write(struct file *file, { struct super_block *sb = ((struct seq_file *)file->private_data)->private; struct ll_sb_info *sbi = ll_s2sbi(sb); - struct cl_client_cache *cache = &sbi->ll_cache; + struct cl_client_cache *cache = sbi->ll_cache; struct lu_env *env; int refcheck; int mult, rc, pages_number; @@ -826,7 +826,7 @@ static ssize_t unstable_stats_show(struct kobject *kobj, { struct ll_sb_info *sbi = container_of(kobj, struct ll_sb_info, ll_kobj); - struct cl_client_cache *cache = &sbi->ll_cache; + struct cl_client_cache *cache = sbi->ll_cache; int pages, mb; pages = atomic_read(&cache->ccc_unstable_nr); diff --git a/drivers/staging/lustre/lustre/lov/lov_obd.c b/drivers/staging/lustre/lustre/lov/lov_obd.c index c87096e..9b92d55 100644 --- a/drivers/staging/lustre/lustre/lov/lov_obd.c +++ b/drivers/staging/lustre/lustre/lov/lov_obd.c @@ -892,6 +892,12 @@ static int lov_cleanup(struct obd_device *obd) kfree(lov->lov_tgts); lov->lov_tgt_size = 0; } + + if (lov->lov_cache) { + cl_cache_decref(lov->lov_cache); + lov->lov_cache = NULL; + } + return 0; } @@ -2121,6 +2127,7 @@ static int lov_set_info_async(const struct lu_env *env, struct obd_export *exp, LASSERT(!lov->lov_cache); lov->lov_cache = val; do_inactive = 1; + cl_cache_incref(lov->lov_cache); } for (i = 0; i < count; i++, val = (char *)val + incr) { diff --git a/drivers/staging/lustre/lustre/obdclass/cl_page.c b/drivers/staging/lustre/lustre/obdclass/cl_page.c index 71bff49..db2dc6b 100644 --- a/drivers/staging/lustre/lustre/obdclass/cl_page.c +++ b/drivers/staging/lustre/lustre/obdclass/cl_page.c @@ -1072,3 +1072,49 @@ void cl_page_slice_add(struct cl_page *page, struct cl_page_slice *slice, slice->cpl_page = page; } EXPORT_SYMBOL(cl_page_slice_add); + +/** + * Allocate and initialize cl_cache, called by ll_init_sbi(). + */ +struct cl_client_cache *cl_cache_init(unsigned long lru_page_max) +{ + struct cl_client_cache *cache = NULL; + + cache = kzalloc(sizeof(*cache), GFP_KERNEL); + if (!cache) + return NULL; + + /* Initialize cache data */ + atomic_set(&cache->ccc_users, 1); + cache->ccc_lru_max = lru_page_max; + atomic_set(&cache->ccc_lru_left, lru_page_max); + spin_lock_init(&cache->ccc_lru_lock); + INIT_LIST_HEAD(&cache->ccc_lru); + + atomic_set(&cache->ccc_unstable_nr, 0); + init_waitqueue_head(&cache->ccc_unstable_waitq); + + return cache; +} +EXPORT_SYMBOL(cl_cache_init); + +/** + * Increase cl_cache refcount + */ +void cl_cache_incref(struct cl_client_cache *cache) +{ + atomic_inc(&cache->ccc_users); +} +EXPORT_SYMBOL(cl_cache_incref); + +/** + * Decrease cl_cache refcount and free the cache if refcount=0. + * Since llite, lov and osc all hold cl_cache refcount, + * the free will not cause race. (LU-6173) + */ +void cl_cache_decref(struct cl_client_cache *cache) +{ + if (atomic_dec_and_test(&cache->ccc_users)) + kfree(cache); +} +EXPORT_SYMBOL(cl_cache_decref); diff --git a/drivers/staging/lustre/lustre/osc/osc_page.c b/drivers/staging/lustre/lustre/osc/osc_page.c index 57d8a5a..c1aa11e 100644 --- a/drivers/staging/lustre/lustre/osc/osc_page.c +++ b/drivers/staging/lustre/lustre/osc/osc_page.c @@ -414,7 +414,7 @@ static int osc_cache_too_much(struct client_obd *cli) int pages = atomic_read(&cli->cl_lru_in_list); unsigned long budget; - budget = cache->ccc_lru_max / atomic_read(&cache->ccc_users); + budget = cache->ccc_lru_max / (atomic_read(&cache->ccc_users) - 2); /* if it's going to run out LRU slots, we should free some, but not * too much to maintain fairness among OSCs. @@ -714,7 +714,7 @@ int osc_lru_reclaim(struct client_obd *cli) cache->ccc_lru_shrinkers++; list_move_tail(&cli->cl_lru_osc, &cache->ccc_lru); - max_scans = atomic_read(&cache->ccc_users); + max_scans = atomic_read(&cache->ccc_users) - 2; while (--max_scans > 0 && !list_empty(&cache->ccc_lru)) { cli = list_entry(cache->ccc_lru.next, struct client_obd, cl_lru_osc); diff --git a/drivers/staging/lustre/lustre/osc/osc_request.c b/drivers/staging/lustre/lustre/osc/osc_request.c index 7260027..9334349 100644 --- a/drivers/staging/lustre/lustre/osc/osc_request.c +++ b/drivers/staging/lustre/lustre/osc/osc_request.c @@ -2913,7 +2913,7 @@ static int osc_set_info_async(const struct lu_env *env, struct obd_export *exp, LASSERT(!cli->cl_cache); /* only once */ cli->cl_cache = val; - atomic_inc(&cli->cl_cache->ccc_users); + cl_cache_incref(cli->cl_cache); cli->cl_lru_left = &cli->cl_cache->ccc_lru_left; /* add this osc into entity list */ @@ -3293,7 +3293,7 @@ static int osc_cleanup(struct obd_device *obd) list_del_init(&cli->cl_lru_osc); spin_unlock(&cli->cl_cache->ccc_lru_lock); cli->cl_lru_left = NULL; - atomic_dec(&cli->cl_cache->ccc_users); + cl_cache_decref(cli->cl_cache); cli->cl_cache = NULL; } -- 2.7.4 From green at linuxhacker.ru Mon Jun 20 20:55:34 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Mon, 20 Jun 2016 16:55:34 -0400 Subject: [lustre-devel] [PATCH v2 11/29] staging/lustre/ptlrpc: lost bulk leads to a hang In-Reply-To: <1466456152-2199975-1-git-send-email-green@linuxhacker.ru> References: <1466456152-2199975-1-git-send-email-green@linuxhacker.ru> Message-ID: <1466456152-2199975-12-git-send-email-green@linuxhacker.ru> From: Vitaly Fertman The reverse order of request_out_callback() and reply_in_callback() puts the RPC into UNREGISTERING state, which is waiting for RPC & bulk md unlink, whereas only RPC md unlink has been called so far. If bulk is lost, even expired_set does not check for UNREGISTERING state. The same for write if server returns an error. This phase is ambiguous, split to UNREG_RPC and UNREG_BULK. Signed-off-by: Vitaly Fertman Seagate-bug-id: MRP-2953, MRP-3206 Reviewed-by: Andriy Skulysh Reviewed-by: Alexey Leonidovich Lyashkov Tested-by: Elena V. Gryaznova Reviewed-on: http://review.whamcloud.com/19953 Reviewed-by: Chris Horn Reviewed-by: Ann Koehler Reviewed-by: Andreas Dilger Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/include/lustre_net.h | 48 +++++++++------- .../staging/lustre/lustre/include/obd_support.h | 3 + drivers/staging/lustre/lustre/ptlrpc/client.c | 64 +++++++++++++++++++--- drivers/staging/lustre/lustre/ptlrpc/import.c | 3 +- drivers/staging/lustre/lustre/ptlrpc/niobuf.c | 4 +- 5 files changed, 91 insertions(+), 31 deletions(-) diff --git a/drivers/staging/lustre/lustre/include/lustre_net.h b/drivers/staging/lustre/lustre/include/lustre_net.h index 523d082..3f43664 100644 --- a/drivers/staging/lustre/lustre/include/lustre_net.h +++ b/drivers/staging/lustre/lustre/include/lustre_net.h @@ -480,8 +480,9 @@ enum rq_phase { RQ_PHASE_BULK = 0xebc0de02, RQ_PHASE_INTERPRET = 0xebc0de03, RQ_PHASE_COMPLETE = 0xebc0de04, - RQ_PHASE_UNREGISTERING = 0xebc0de05, - RQ_PHASE_UNDEFINED = 0xebc0de06 + RQ_PHASE_UNREG_RPC = 0xebc0de05, + RQ_PHASE_UNREG_BULK = 0xebc0de06, + RQ_PHASE_UNDEFINED = 0xebc0de07 }; /** Type of request interpreter call-back */ @@ -1263,6 +1264,8 @@ struct ptlrpc_cli_req { time_t cr_reply_deadline; /** when req bulk unlink must finish. */ time_t cr_bulk_deadline; + /** when req unlink must finish. */ + time_t cr_req_deadline; /** Portal to which this request would be sent */ short cr_req_ptl; /** Portal where to wait for reply and where reply would be sent */ @@ -1318,6 +1321,7 @@ struct ptlrpc_cli_req { #define rq_real_sent rq_cli.cr_sent_out #define rq_reply_deadline rq_cli.cr_reply_deadline #define rq_bulk_deadline rq_cli.cr_bulk_deadline +#define rq_req_deadline rq_cli.cr_req_deadline #define rq_nr_resend rq_cli.cr_resend_nr #define rq_request_portal rq_cli.cr_req_ptl #define rq_reply_portal rq_cli.cr_rep_ptl @@ -1693,8 +1697,10 @@ ptlrpc_phase2str(enum rq_phase phase) return "Interpret"; case RQ_PHASE_COMPLETE: return "Complete"; - case RQ_PHASE_UNREGISTERING: - return "Unregistering"; + case RQ_PHASE_UNREG_RPC: + return "UnregRPC"; + case RQ_PHASE_UNREG_BULK: + return "UnregBULK"; default: return "?Phase?"; } @@ -1721,7 +1727,7 @@ ptlrpc_rqphase2str(struct ptlrpc_request *req) #define DEBUG_REQ_FLAGS(req) \ ptlrpc_rqphase2str(req), \ FLAG(req->rq_intr, "I"), FLAG(req->rq_replied, "R"), \ - FLAG(req->rq_err, "E"), \ + FLAG(req->rq_err, "E"), FLAG(req->rq_net_err, "e"), \ FLAG(req->rq_timedout, "X") /* eXpired */, FLAG(req->rq_resend, "S"), \ FLAG(req->rq_restart, "T"), FLAG(req->rq_replay, "P"), \ FLAG(req->rq_no_resend, "N"), \ @@ -1729,7 +1735,7 @@ ptlrpc_rqphase2str(struct ptlrpc_request *req) FLAG(req->rq_wait_ctx, "C"), FLAG(req->rq_hp, "H"), \ FLAG(req->rq_committed, "M") -#define REQ_FLAGS_FMT "%s:%s%s%s%s%s%s%s%s%s%s%s%s" +#define REQ_FLAGS_FMT "%s:%s%s%s%s%s%s%s%s%s%s%s%s%s" void _debug_req(struct ptlrpc_request *req, struct libcfs_debug_msg_data *data, const char *fmt, ...) @@ -2380,8 +2386,7 @@ static inline int ptlrpc_client_bulk_active(struct ptlrpc_request *req) desc = req->rq_bulk; - if (OBD_FAIL_CHECK(OBD_FAIL_PTLRPC_LONG_BULK_UNLINK) && - req->rq_bulk_deadline > ktime_get_real_seconds()) + if (req->rq_bulk_deadline > ktime_get_real_seconds()) return 1; if (!desc) @@ -2728,13 +2733,20 @@ ptlrpc_rqphase_move(struct ptlrpc_request *req, enum rq_phase new_phase) if (req->rq_phase == new_phase) return; - if (new_phase == RQ_PHASE_UNREGISTERING) { + if (new_phase == RQ_PHASE_UNREG_RPC || + new_phase == RQ_PHASE_UNREG_BULK) { + /* No embedded unregistering phases */ + if (req->rq_phase == RQ_PHASE_UNREG_RPC || + req->rq_phase == RQ_PHASE_UNREG_BULK) + return; + req->rq_next_phase = req->rq_phase; if (req->rq_import) atomic_inc(&req->rq_import->imp_unregistering); } - if (req->rq_phase == RQ_PHASE_UNREGISTERING) { + if (req->rq_phase == RQ_PHASE_UNREG_RPC || + req->rq_phase == RQ_PHASE_UNREG_BULK) { if (req->rq_import) atomic_dec(&req->rq_import->imp_unregistering); } @@ -2751,9 +2763,6 @@ ptlrpc_rqphase_move(struct ptlrpc_request *req, enum rq_phase new_phase) static inline int ptlrpc_client_early(struct ptlrpc_request *req) { - if (OBD_FAIL_CHECK(OBD_FAIL_PTLRPC_LONG_REPL_UNLINK) && - req->rq_reply_deadline > ktime_get_real_seconds()) - return 0; return req->rq_early; } @@ -2763,8 +2772,7 @@ ptlrpc_client_early(struct ptlrpc_request *req) static inline int ptlrpc_client_replied(struct ptlrpc_request *req) { - if (OBD_FAIL_CHECK(OBD_FAIL_PTLRPC_LONG_REPL_UNLINK) && - req->rq_reply_deadline > ktime_get_real_seconds()) + if (req->rq_reply_deadline > ktime_get_real_seconds()) return 0; return req->rq_replied; } @@ -2773,8 +2781,7 @@ ptlrpc_client_replied(struct ptlrpc_request *req) static inline int ptlrpc_client_recv(struct ptlrpc_request *req) { - if (OBD_FAIL_CHECK(OBD_FAIL_PTLRPC_LONG_REPL_UNLINK) && - req->rq_reply_deadline > ktime_get_real_seconds()) + if (req->rq_reply_deadline > ktime_get_real_seconds()) return 1; return req->rq_receiving_reply; } @@ -2785,8 +2792,11 @@ ptlrpc_client_recv_or_unlink(struct ptlrpc_request *req) int rc; spin_lock(&req->rq_lock); - if (OBD_FAIL_CHECK(OBD_FAIL_PTLRPC_LONG_REPL_UNLINK) && - req->rq_reply_deadline > ktime_get_real_seconds()) { + if (req->rq_reply_deadline > ktime_get_real_seconds()) { + spin_unlock(&req->rq_lock); + return 1; + } + if (req->rq_req_deadline > ktime_get_real_seconds()) { spin_unlock(&req->rq_lock); return 1; } diff --git a/drivers/staging/lustre/lustre/include/obd_support.h b/drivers/staging/lustre/lustre/include/obd_support.h index cdf20d6..845e64a 100644 --- a/drivers/staging/lustre/lustre/include/obd_support.h +++ b/drivers/staging/lustre/lustre/include/obd_support.h @@ -364,6 +364,9 @@ extern char obd_jobid_var[]; #define OBD_FAIL_PTLRPC_CLIENT_BULK_CB2 0x515 #define OBD_FAIL_PTLRPC_DELAY_IMP_FULL 0x516 #define OBD_FAIL_PTLRPC_CANCEL_RESEND 0x517 +#define OBD_FAIL_PTLRPC_DROP_BULK 0x51a +#define OBD_FAIL_PTLRPC_LONG_REQ_UNLINK 0x51b +#define OBD_FAIL_PTLRPC_LONG_BOTH_UNLINK 0x51c #define OBD_FAIL_OBD_PING_NET 0x600 #define OBD_FAIL_OBD_LOG_CANCEL_NET 0x601 diff --git a/drivers/staging/lustre/lustre/ptlrpc/client.c b/drivers/staging/lustre/lustre/ptlrpc/client.c index 5d832eb..d4463d7 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/client.c +++ b/drivers/staging/lustre/lustre/ptlrpc/client.c @@ -621,6 +621,8 @@ int ptlrpc_request_bufs_pack(struct ptlrpc_request *request, request->rq_reply_cbid.cbid_arg = request; request->rq_reply_deadline = 0; + request->rq_bulk_deadline = 0; + request->rq_req_deadline = 0; request->rq_phase = RQ_PHASE_NEW; request->rq_next_phase = RQ_PHASE_UNDEFINED; @@ -632,6 +634,37 @@ int ptlrpc_request_bufs_pack(struct ptlrpc_request *request, request->rq_xid = ptlrpc_next_xid(); lustre_msg_set_opc(request->rq_reqmsg, opcode); + /* Let's setup deadline for req/reply/bulk unlink for opcode. */ + if (cfs_fail_val == opcode) { + time_t *fail_t = NULL, *fail2_t = NULL; + + if (CFS_FAIL_CHECK(OBD_FAIL_PTLRPC_LONG_BULK_UNLINK)) { + fail_t = &request->rq_bulk_deadline; + } else if (CFS_FAIL_CHECK(OBD_FAIL_PTLRPC_LONG_REPL_UNLINK)) { + fail_t = &request->rq_reply_deadline; + } else if (CFS_FAIL_CHECK(OBD_FAIL_PTLRPC_LONG_REQ_UNLINK)) { + fail_t = &request->rq_req_deadline; + } else if (CFS_FAIL_CHECK(OBD_FAIL_PTLRPC_LONG_BOTH_UNLINK)) { + fail_t = &request->rq_reply_deadline; + fail2_t = &request->rq_bulk_deadline; + } + + if (fail_t) { + *fail_t = ktime_get_real_seconds() + LONG_UNLINK; + + if (fail2_t) + *fail2_t = ktime_get_real_seconds() + + LONG_UNLINK; + + /* The RPC is infected, let the test change the + * fail_loc + */ + set_current_state(TASK_UNINTERRUPTIBLE); + schedule_timeout(cfs_time_seconds(2)); + set_current_state(TASK_RUNNING); + } + } + return 0; out_ctx: @@ -1481,16 +1514,28 @@ int ptlrpc_check_set(const struct lu_env *env, struct ptlrpc_request_set *set) if (!(req->rq_phase == RQ_PHASE_RPC || req->rq_phase == RQ_PHASE_BULK || req->rq_phase == RQ_PHASE_INTERPRET || - req->rq_phase == RQ_PHASE_UNREGISTERING || + req->rq_phase == RQ_PHASE_UNREG_RPC || + req->rq_phase == RQ_PHASE_UNREG_BULK || req->rq_phase == RQ_PHASE_COMPLETE)) { DEBUG_REQ(D_ERROR, req, "bad phase %x", req->rq_phase); LBUG(); } - if (req->rq_phase == RQ_PHASE_UNREGISTERING) { + if (req->rq_phase == RQ_PHASE_UNREG_RPC || + req->rq_phase == RQ_PHASE_UNREG_BULK) { LASSERT(req->rq_next_phase != req->rq_phase); LASSERT(req->rq_next_phase != RQ_PHASE_UNDEFINED); + if (req->rq_req_deadline && + !OBD_FAIL_CHECK(OBD_FAIL_PTLRPC_LONG_REQ_UNLINK)) + req->rq_req_deadline = 0; + if (req->rq_reply_deadline && + !OBD_FAIL_CHECK(OBD_FAIL_PTLRPC_LONG_REPL_UNLINK)) + req->rq_reply_deadline = 0; + if (req->rq_bulk_deadline && + !OBD_FAIL_CHECK(OBD_FAIL_PTLRPC_LONG_BULK_UNLINK)) + req->rq_bulk_deadline = 0; + /* * Skip processing until reply is unlinked. We * can't return to pool before that and we can't @@ -1498,7 +1543,10 @@ int ptlrpc_check_set(const struct lu_env *env, struct ptlrpc_request_set *set) * sure that all rdma transfers finished and will * not corrupt any data. */ - if (ptlrpc_client_recv_or_unlink(req) || + if (req->rq_phase == RQ_PHASE_UNREG_RPC && + ptlrpc_client_recv_or_unlink(req)) + continue; + if (req->rq_phase == RQ_PHASE_UNREG_BULK && ptlrpc_client_bulk_active(req)) continue; @@ -1976,7 +2024,7 @@ void ptlrpc_interrupted_set(void *data) list_entry(tmp, struct ptlrpc_request, rq_set_chain); if (req->rq_phase != RQ_PHASE_RPC && - req->rq_phase != RQ_PHASE_UNREGISTERING) + req->rq_phase != RQ_PHASE_UNREG_RPC) continue; ptlrpc_mark_interrupted(req); @@ -2288,8 +2336,9 @@ int ptlrpc_unregister_reply(struct ptlrpc_request *request, int async) /* Let's setup deadline for reply unlink. */ if (OBD_FAIL_CHECK(OBD_FAIL_PTLRPC_LONG_REPL_UNLINK) && - async && request->rq_reply_deadline == 0) - request->rq_reply_deadline = ktime_get_real_seconds()+LONG_UNLINK; + async && request->rq_reply_deadline == 0 && cfs_fail_val == 0) + request->rq_reply_deadline = + ktime_get_real_seconds() + LONG_UNLINK; /* Nothing left to do. */ if (!ptlrpc_client_recv_or_unlink(request)) @@ -2302,7 +2351,7 @@ int ptlrpc_unregister_reply(struct ptlrpc_request *request, int async) return 1; /* Move to "Unregistering" phase as reply was not unlinked yet. */ - ptlrpc_rqphase_move(request, RQ_PHASE_UNREGISTERING); + ptlrpc_rqphase_move(request, RQ_PHASE_UNREG_RPC); /* Do not wait for unlink to finish. */ if (async) @@ -2932,7 +2981,6 @@ static void ptlrpcd_add_work_req(struct ptlrpc_request *req) req->rq_timeout = obd_timeout; req->rq_sent = ktime_get_real_seconds(); req->rq_deadline = req->rq_sent + req->rq_timeout; - req->rq_reply_deadline = req->rq_deadline; req->rq_phase = RQ_PHASE_INTERPRET; req->rq_next_phase = RQ_PHASE_COMPLETE; req->rq_xid = ptlrpc_next_xid(); diff --git a/drivers/staging/lustre/lustre/ptlrpc/import.c b/drivers/staging/lustre/lustre/ptlrpc/import.c index 914bbd2..3292e6e 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/import.c +++ b/drivers/staging/lustre/lustre/ptlrpc/import.c @@ -356,9 +356,8 @@ void ptlrpc_invalidate_import(struct obd_import *imp) "still on delayed list"); } - CERROR("%s: RPCs in \"%s\" phase found (%d). Network is sluggish? Waiting them to error out.\n", + CERROR("%s: Unregistering RPCs found (%d). Network is sluggish? Waiting them to error out.\n", cli_tgt, - ptlrpc_phase2str(RQ_PHASE_UNREGISTERING), atomic_read(&imp-> imp_unregistering)); } diff --git a/drivers/staging/lustre/lustre/ptlrpc/niobuf.c b/drivers/staging/lustre/lustre/ptlrpc/niobuf.c index 8c49f5e..11ec825 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/niobuf.c +++ b/drivers/staging/lustre/lustre/ptlrpc/niobuf.c @@ -247,7 +247,7 @@ int ptlrpc_unregister_bulk(struct ptlrpc_request *req, int async) /* Let's setup deadline for reply unlink. */ if (OBD_FAIL_CHECK(OBD_FAIL_PTLRPC_LONG_BULK_UNLINK) && - async && req->rq_bulk_deadline == 0) + async && req->rq_bulk_deadline == 0 && cfs_fail_val == 0) req->rq_bulk_deadline = ktime_get_real_seconds() + LONG_UNLINK; if (ptlrpc_client_bulk_active(req) == 0) /* completed or */ @@ -266,7 +266,7 @@ int ptlrpc_unregister_bulk(struct ptlrpc_request *req, int async) return 1; /* never registered */ /* Move to "Unregistering" phase as bulk was not unlinked yet. */ - ptlrpc_rqphase_move(req, RQ_PHASE_UNREGISTERING); + ptlrpc_rqphase_move(req, RQ_PHASE_UNREG_BULK); /* Do not wait for unlink to finish. */ if (async) -- 2.7.4 From green at linuxhacker.ru Mon Jun 20 20:55:30 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Mon, 20 Jun 2016 16:55:30 -0400 Subject: [lustre-devel] [PATCH v2 07/29] staging/lustre/ptlrpc: reorganize ptlrpc_request In-Reply-To: <1466456152-2199975-1-git-send-email-green@linuxhacker.ru> References: <1466456152-2199975-1-git-send-email-green@linuxhacker.ru> Message-ID: <1466456152-2199975-8-git-send-email-green@linuxhacker.ru> From: Liang Zhen ptlrpc_request has some structure members are only for client side, and some others are only for server side, this patch moved these members to different structure then putting into an union. By doing this, size of ptlrpc_request is decreased about 300 bytes, besides saving memory, it also can reduce memory footprint while processing. Signed-off-by: Liang Zhen Reviewed-on: http://review.whamcloud.com/8806 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-181 Reviewed-by: Andreas Dilger Reviewed-by: Bobi Jam Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/include/lustre_net.h | 341 ++++++++++++--------- drivers/staging/lustre/lustre/ptlrpc/client.c | 49 +-- drivers/staging/lustre/lustre/ptlrpc/events.c | 5 +- drivers/staging/lustre/lustre/ptlrpc/niobuf.c | 2 +- .../staging/lustre/lustre/ptlrpc/ptlrpc_internal.h | 34 ++ drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c | 4 +- drivers/staging/lustre/lustre/ptlrpc/sec.c | 9 +- 7 files changed, 255 insertions(+), 189 deletions(-) diff --git a/drivers/staging/lustre/lustre/include/lustre_net.h b/drivers/staging/lustre/lustre/include/lustre_net.h index dba4d1d..5968c3c 100644 --- a/drivers/staging/lustre/lustre/include/lustre_net.h +++ b/drivers/staging/lustre/lustre/include/lustre_net.h @@ -266,6 +266,11 @@ /* Macro to hide a typecast. */ #define ptlrpc_req_async_args(req) ((void *)&req->rq_async_args) +struct ptlrpc_replay_async_args { + int praa_old_state; + int praa_old_status; +}; + /** * Structure to single define portal connection. */ @@ -1243,22 +1248,100 @@ struct ptlrpc_hpreq_ops { void (*hpreq_fini)(struct ptlrpc_request *); }; -/** - * Represents remote procedure call. - * - * This is a staple structure used by everybody wanting to send a request - * in Lustre. - */ -struct ptlrpc_request { - /* Request type: one of PTL_RPC_MSG_* */ - int rq_type; - /** Result of request processing */ - int rq_status; +struct ptlrpc_cli_req { + /** For bulk requests on client only: bulk descriptor */ + struct ptlrpc_bulk_desc *cr_bulk; + /** optional time limit for send attempts */ + long cr_delay_limit; + /** time request was first queued */ + time_t cr_queued_time; + /** request sent timeval */ + struct timespec64 cr_sent_tv; + /** time for request really sent out */ + time_t cr_sent_out; + /** when req reply unlink must finish. */ + time_t cr_reply_deadline; + /** when req bulk unlink must finish. */ + time_t cr_bulk_deadline; + /** Portal to which this request would be sent */ + short cr_req_ptl; + /** Portal where to wait for reply and where reply would be sent */ + short cr_rep_ptl; + /** request resending number */ + unsigned int cr_resend_nr; + /** What was import generation when this request was sent */ + int cr_imp_gen; + enum lustre_imp_state cr_send_state; + /** Per-request waitq introduced by bug 21938 for recovery waiting */ + wait_queue_head_t cr_set_waitq; + /** Link item for request set lists */ + struct list_head cr_set_chain; + /** link to waited ctx */ + struct list_head cr_ctx_chain; + + /** client's half ctx */ + struct ptlrpc_cli_ctx *cr_cli_ctx; + /** Link back to the request set */ + struct ptlrpc_request_set *cr_set; + /** outgoing request MD handle */ + lnet_handle_md_t cr_req_md_h; + /** request-out callback parameter */ + struct ptlrpc_cb_id cr_req_cbid; + /** incoming reply MD handle */ + lnet_handle_md_t cr_reply_md_h; + wait_queue_head_t cr_reply_waitq; + /** reply callback parameter */ + struct ptlrpc_cb_id cr_reply_cbid; + /** Async completion handler, called when reply is received */ + ptlrpc_interpterer_t cr_reply_interp; + /** Async completion context */ + union ptlrpc_async_args cr_async_args; + /** Opaq data for replay and commit callbacks. */ + void *cr_cb_data; /** - * Linkage item through which this request is included into - * sending/delayed lists on client and into rqbd list on server + * Commit callback, called when request is committed and about to be + * freed. */ - struct list_head rq_list; + void (*cr_commit_cb)(struct ptlrpc_request *); + /** Replay callback, called after request is replayed at recovery */ + void (*cr_replay_cb)(struct ptlrpc_request *); +}; + +/** client request member alias */ +/* NB: these alias should NOT be used by any new code, instead they should + * be removed step by step to avoid potential abuse + */ +#define rq_bulk rq_cli.cr_bulk +#define rq_delay_limit rq_cli.cr_delay_limit +#define rq_queued_time rq_cli.cr_queued_time +#define rq_sent_tv rq_cli.cr_sent_tv +#define rq_real_sent rq_cli.cr_sent_out +#define rq_reply_deadline rq_cli.cr_reply_deadline +#define rq_bulk_deadline rq_cli.cr_bulk_deadline +#define rq_nr_resend rq_cli.cr_resend_nr +#define rq_request_portal rq_cli.cr_req_ptl +#define rq_reply_portal rq_cli.cr_rep_ptl +#define rq_import_generation rq_cli.cr_imp_gen +#define rq_send_state rq_cli.cr_send_state +#define rq_set_chain rq_cli.cr_set_chain +#define rq_ctx_chain rq_cli.cr_ctx_chain +#define rq_set rq_cli.cr_set +#define rq_set_waitq rq_cli.cr_set_waitq +#define rq_cli_ctx rq_cli.cr_cli_ctx +#define rq_req_md_h rq_cli.cr_req_md_h +#define rq_req_cbid rq_cli.cr_req_cbid +#define rq_reply_md_h rq_cli.cr_reply_md_h +#define rq_reply_waitq rq_cli.cr_reply_waitq +#define rq_reply_cbid rq_cli.cr_reply_cbid +#define rq_interpret_reply rq_cli.cr_reply_interp +#define rq_async_args rq_cli.cr_async_args +#define rq_cb_data rq_cli.cr_cb_data +#define rq_commit_cb rq_cli.cr_commit_cb +#define rq_replay_cb rq_cli.cr_replay_cb + +struct ptlrpc_srv_req { + /** initial thread servicing this request */ + struct ptlrpc_thread *sr_svc_thread; /** * Server side list of incoming unserved requests sorted by arrival * time. Traversed from time to time to notice about to expire @@ -1266,27 +1349,81 @@ struct ptlrpc_request { * know server is alive and well, just very busy to service their * requests in time */ - struct list_head rq_timed_list; - /** server-side history, used for debugging purposes. */ - struct list_head rq_history_list; + struct list_head sr_timed_list; /** server-side per-export list */ - struct list_head rq_exp_list; - /** server-side hp handlers */ - struct ptlrpc_hpreq_ops *rq_ops; - - /** initial thread servicing this request */ - struct ptlrpc_thread *rq_svc_thread; - + struct list_head sr_exp_list; + /** server-side history, used for debuging purposes. */ + struct list_head sr_hist_list; /** history sequence # */ - __u64 rq_history_seq; + __u64 sr_hist_seq; + /** the index of service's srv_at_array into which request is linked */ + time_t sr_at_index; + /** authed uid */ + uid_t sr_auth_uid; + /** authed uid mapped to */ + uid_t sr_auth_mapped_uid; + /** RPC is generated from what part of Lustre */ + enum lustre_sec_part sr_sp_from; + /** request session context */ + struct lu_context sr_ses; /** \addtogroup nrs * @{ */ /** stub for NRS request */ - struct ptlrpc_nrs_request rq_nrq; + struct ptlrpc_nrs_request sr_nrq; /** @} nrs */ - /** the index of service's srv_at_array into which request is linked */ - u32 rq_at_index; + /** request arrival time */ + struct timespec64 sr_arrival_time; + /** server's half ctx */ + struct ptlrpc_svc_ctx *sr_svc_ctx; + /** (server side), pointed directly into req buffer */ + struct ptlrpc_user_desc *sr_user_desc; + /** separated reply state */ + struct ptlrpc_reply_state *sr_reply_state; + /** server-side hp handlers */ + struct ptlrpc_hpreq_ops *sr_ops; + /** incoming request buffer */ + struct ptlrpc_request_buffer_desc *sr_rqbd; +}; + +/** server request member alias */ +/* NB: these alias should NOT be used by any new code, instead they should + * be removed step by step to avoid potential abuse + */ +#define rq_svc_thread rq_srv.sr_svc_thread +#define rq_timed_list rq_srv.sr_timed_list +#define rq_exp_list rq_srv.sr_exp_list +#define rq_history_list rq_srv.sr_hist_list +#define rq_history_seq rq_srv.sr_hist_seq +#define rq_at_index rq_srv.sr_at_index +#define rq_auth_uid rq_srv.sr_auth_uid +#define rq_auth_mapped_uid rq_srv.sr_auth_mapped_uid +#define rq_sp_from rq_srv.sr_sp_from +#define rq_session rq_srv.sr_ses +#define rq_nrq rq_srv.sr_nrq +#define rq_arrival_time rq_srv.sr_arrival_time +#define rq_reply_state rq_srv.sr_reply_state +#define rq_svc_ctx rq_srv.sr_svc_ctx +#define rq_user_desc rq_srv.sr_user_desc +#define rq_ops rq_srv.sr_ops +#define rq_rqbd rq_srv.sr_rqbd + +/** + * Represents remote procedure call. + * + * This is a staple structure used by everybody wanting to send a request + * in Lustre. + */ +struct ptlrpc_request { + /* Request type: one of PTL_RPC_MSG_* */ + int rq_type; + /** Result of request processing */ + int rq_status; + /** + * Linkage item through which this request is included into + * sending/delayed lists on client and into rqbd list on server + */ + struct list_head rq_list; /** Lock to protect request flags and some other important bits, like * rq_list */ @@ -1327,19 +1464,15 @@ struct ptlrpc_request { /* bulk request, sent to server, but uncommitted */ rq_unstable:1; - unsigned int rq_nr_resend; - - enum rq_phase rq_phase; /* one of RQ_PHASE_* */ - enum rq_phase rq_next_phase; /* one of RQ_PHASE_* to be used next */ - atomic_t rq_refcount; /* client-side refcount for SENT race, - * server-side refcount for multiple replies - */ - - /** Portal to which this request would be sent */ - short rq_request_portal; /* XXX FIXME bug 249 */ - /** Portal where to wait for reply and where reply would be sent */ - short rq_reply_portal; /* XXX FIXME bug 249 */ - + /** one of RQ_PHASE_* */ + enum rq_phase rq_phase; + /** one of RQ_PHASE_* to be used next */ + enum rq_phase rq_next_phase; + /** + * client-side refcount for SENT race, server-side refcount + * for multiple replies + */ + atomic_t rq_refcount; /** * client-side: * !rq_truncate : # reply bytes actually received, @@ -1350,6 +1483,8 @@ struct ptlrpc_request { int rq_reqlen; /** Reply length */ int rq_replen; + /** Pool if request is from preallocated list */ + struct ptlrpc_request_pool *rq_pool; /** Request message - what client sent */ struct lustre_msg *rq_reqmsg; /** Reply message - server response */ @@ -1362,19 +1497,20 @@ struct ptlrpc_request { * List item to for replay list. Not yet committed requests get linked * there. * Also see \a rq_replay comment above. + * It's also link chain on obd_export::exp_req_replay_queue */ struct list_head rq_replay_list; - + /** non-shared members for client & server request*/ + union { + struct ptlrpc_cli_req rq_cli; + struct ptlrpc_srv_req rq_srv; + }; /** * security and encryption data * @{ */ - struct ptlrpc_cli_ctx *rq_cli_ctx; /**< client's half ctx */ - struct ptlrpc_svc_ctx *rq_svc_ctx; /**< server's half ctx */ - struct list_head rq_ctx_chain; /**< link to waited ctx */ - - struct sptlrpc_flavor rq_flvr; /**< for client & server */ - enum lustre_sec_part rq_sp_from; + /** description of flavors for client & server */ + struct sptlrpc_flavor rq_flvr; /* client/server security flags */ unsigned int @@ -1393,19 +1529,15 @@ struct ptlrpc_request { rq_pack_bulk:1, /* doesn't expect reply FIXME */ rq_no_reply:1, - rq_pill_init:1; /* pill initialized */ - - uid_t rq_auth_uid; /* authed uid */ - uid_t rq_auth_mapped_uid; /* authed uid mapped to */ - - /* (server side), pointed directly into req buffer */ - struct ptlrpc_user_desc *rq_user_desc; - - /* various buffer pointers */ - struct lustre_msg *rq_reqbuf; /* req wrapper */ - char *rq_repbuf; /* rep buffer */ - struct lustre_msg *rq_repdata; /* rep wrapper msg */ - struct lustre_msg *rq_clrbuf; /* only in priv mode */ + rq_pill_init:1, /* pill initialized */ + rq_srv_req:1; /* server request */ + + /** various buffer pointers */ + struct lustre_msg *rq_reqbuf; /**< req wrapper */ + char *rq_repbuf; /**< rep buffer */ + struct lustre_msg *rq_repdata; /**< rep wrapper msg */ + /** only in priv mode */ + struct lustre_msg *rq_clrbuf; int rq_reqbuf_len; /* req wrapper buf len */ int rq_reqdata_len; /* req wrapper msg len */ int rq_repbuf_len; /* rep buffer len */ @@ -1422,97 +1554,28 @@ struct ptlrpc_request { __u32 rq_req_swab_mask; __u32 rq_rep_swab_mask; - /** What was import generation when this request was sent */ - int rq_import_generation; - enum lustre_imp_state rq_send_state; - /** how many early replies (for stats) */ int rq_early_count; - /** client+server request */ - lnet_handle_md_t rq_req_md_h; - struct ptlrpc_cb_id rq_req_cbid; - /** optional time limit for send attempts */ - long rq_delay_limit; - /** time request was first queued */ - unsigned long rq_queued_time; - - /* server-side... */ - /** request arrival time */ - struct timespec64 rq_arrival_time; - /** separated reply state */ - struct ptlrpc_reply_state *rq_reply_state; - /** incoming request buffer */ - struct ptlrpc_request_buffer_desc *rq_rqbd; - - /** client-only incoming reply */ - lnet_handle_md_t rq_reply_md_h; - wait_queue_head_t rq_reply_waitq; - struct ptlrpc_cb_id rq_reply_cbid; - + /** Server-side, export on which request was received */ + struct obd_export *rq_export; + /** import where request is being sent */ + struct obd_import *rq_import; /** our LNet NID */ lnet_nid_t rq_self; /** Peer description (the other side) */ lnet_process_id_t rq_peer; - /** Server-side, export on which request was received */ - struct obd_export *rq_export; - /** Client side, import where request is being sent */ - struct obd_import *rq_import; - - /** Replay callback, called after request is replayed at recovery */ - void (*rq_replay_cb)(struct ptlrpc_request *); /** - * Commit callback, called when request is committed and about to be - * freed. + * service time estimate (secs) + * If the request is not served by this time, it is marked as timed out. */ - void (*rq_commit_cb)(struct ptlrpc_request *); - /** Opaq data for replay and commit callbacks. */ - void *rq_cb_data; - - /** For bulk requests on client only: bulk descriptor */ - struct ptlrpc_bulk_desc *rq_bulk; - - /** client outgoing req */ + int rq_timeout; /** * when request/reply sent (secs), or time when request should be sent */ time64_t rq_sent; - /** time for request really sent out */ - time64_t rq_real_sent; - - /** when request must finish. volatile - * so that servers' early reply updates to the deadline aren't - * kept in per-cpu cache - */ - volatile time64_t rq_deadline; - /** when req reply unlink must finish. */ - time64_t rq_reply_deadline; - /** when req bulk unlink must finish. */ - time64_t rq_bulk_deadline; - /** - * service time estimate (secs) - * If the requestsis not served by this time, it is marked as timed out. - */ - int rq_timeout; - - /** Multi-rpc bits */ - /** Per-request waitq introduced by bug 21938 for recovery waiting */ - wait_queue_head_t rq_set_waitq; - /** Link item for request set lists */ - struct list_head rq_set_chain; - /** Link back to the request set */ - struct ptlrpc_request_set *rq_set; - /** Async completion handler, called when reply is received */ - ptlrpc_interpterer_t rq_interpret_reply; - /** Async completion context */ - union ptlrpc_async_args rq_async_args; - - /** Pool if request is from preallocated list */ - struct ptlrpc_request_pool *rq_pool; - - struct lu_context rq_session; - struct lu_context rq_recov_session; - + /** when request must finish. */ + time64_t rq_deadline; /** request format description */ struct req_capsule rq_pill; }; diff --git a/drivers/staging/lustre/lustre/ptlrpc/client.c b/drivers/staging/lustre/lustre/ptlrpc/client.c index 22bf893..9abd469 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/client.c +++ b/drivers/staging/lustre/lustre/ptlrpc/client.c @@ -611,7 +611,6 @@ static int __ptlrpc_request_bufs_pack(struct ptlrpc_request *request, lustre_msg_add_version(request->rq_reqmsg, version); request->rq_send_state = LUSTRE_IMP_FULL; request->rq_type = PTL_RPC_MSG_REQUEST; - request->rq_export = NULL; request->rq_req_cbid.cbid_fn = request_out_callback; request->rq_req_cbid.cbid_arg = request; @@ -628,19 +627,7 @@ static int __ptlrpc_request_bufs_pack(struct ptlrpc_request *request, ptlrpc_at_set_req_timeout(request); - spin_lock_init(&request->rq_lock); - INIT_LIST_HEAD(&request->rq_list); - INIT_LIST_HEAD(&request->rq_timed_list); - INIT_LIST_HEAD(&request->rq_replay_list); - INIT_LIST_HEAD(&request->rq_ctx_chain); - INIT_LIST_HEAD(&request->rq_set_chain); - INIT_LIST_HEAD(&request->rq_history_list); - INIT_LIST_HEAD(&request->rq_exp_list); - init_waitqueue_head(&request->rq_reply_waitq); - init_waitqueue_head(&request->rq_set_waitq); request->rq_xid = ptlrpc_next_xid(); - atomic_set(&request->rq_refcount, 1); - lustre_msg_set_opc(request->rq_reqmsg, opcode); return 0; @@ -718,7 +705,9 @@ struct ptlrpc_request *__ptlrpc_request_alloc(struct obd_import *imp, request = ptlrpc_prep_req_from_pool(pool); if (request) { - LASSERTF((unsigned long)imp > 0x1000, "%p\n", imp); + ptlrpc_cli_req_init(request); + + LASSERTF((unsigned long)imp > 0x1000, "%p", imp); LASSERT(imp != LP_POISON); LASSERTF((unsigned long)imp->imp_client > 0x1000, "%p\n", imp->imp_client); @@ -1235,8 +1224,9 @@ static int after_reply(struct ptlrpc_request *req) } ktime_get_real_ts64(&work_start); - timediff = (work_start.tv_sec - req->rq_arrival_time.tv_sec) * USEC_PER_SEC + - (work_start.tv_nsec - req->rq_arrival_time.tv_nsec) / NSEC_PER_USEC; + timediff = (work_start.tv_sec - req->rq_sent_tv.tv_sec) * USEC_PER_SEC + + (work_start.tv_nsec - req->rq_sent_tv.tv_nsec) / + NSEC_PER_USEC; if (obd->obd_svc_stats) { lprocfs_counter_add(obd->obd_svc_stats, PTLRPC_REQWAIT_CNTR, timediff); @@ -2191,11 +2181,11 @@ static void __ptlrpc_free_req(struct ptlrpc_request *request, int locked) { if (!request) return; + LASSERT(!request->rq_srv_req); + LASSERT(!request->rq_export); LASSERTF(!request->rq_receiving_reply, "req %p\n", request); - LASSERTF(!request->rq_rqbd, "req %p\n", request);/* client-side */ LASSERTF(list_empty(&request->rq_list), "req %p\n", request); LASSERTF(list_empty(&request->rq_set_chain), "req %p\n", request); - LASSERTF(list_empty(&request->rq_exp_list), "req %p\n", request); LASSERTF(!request->rq_replay, "req %p\n", request); req_capsule_fini(&request->rq_pill); @@ -2221,10 +2211,7 @@ static void __ptlrpc_free_req(struct ptlrpc_request *request, int locked) if (request->rq_repbuf) sptlrpc_cli_free_repbuf(request); - if (request->rq_export) { - class_export_put(request->rq_export); - request->rq_export = NULL; - } + if (request->rq_import) { class_import_put(request->rq_import); request->rq_import = NULL; @@ -2614,11 +2601,6 @@ int ptlrpc_queue_wait(struct ptlrpc_request *req) } EXPORT_SYMBOL(ptlrpc_queue_wait); -struct ptlrpc_replay_async_args { - int praa_old_state; - int praa_old_status; -}; - /** * Callback used for replayed requests reply processing. * In case of successful reply calls registered request replay callback. @@ -3013,10 +2995,11 @@ void *ptlrpcd_alloc_work(struct obd_import *imp, return ERR_PTR(-ENOMEM); } + ptlrpc_cli_req_init(req); + req->rq_send_state = LUSTRE_IMP_FULL; req->rq_type = PTL_RPC_MSG_REQUEST; req->rq_import = class_import_get(imp); - req->rq_export = NULL; req->rq_interpret_reply = work_interpreter; /* don't want reply */ req->rq_receiving_reply = 0; @@ -3026,16 +3009,6 @@ void *ptlrpcd_alloc_work(struct obd_import *imp, req->rq_no_resend = 1; req->rq_pill.rc_fmt = (void *)&worker_format; - spin_lock_init(&req->rq_lock); - INIT_LIST_HEAD(&req->rq_list); - INIT_LIST_HEAD(&req->rq_replay_list); - INIT_LIST_HEAD(&req->rq_set_chain); - INIT_LIST_HEAD(&req->rq_history_list); - INIT_LIST_HEAD(&req->rq_exp_list); - init_waitqueue_head(&req->rq_reply_waitq); - init_waitqueue_head(&req->rq_set_waitq); - atomic_set(&req->rq_refcount, 1); - CLASSERT(sizeof(*args) <= sizeof(req->rq_async_args)); args = ptlrpc_req_async_args(req); args->cb = cb; diff --git a/drivers/staging/lustre/lustre/ptlrpc/events.c b/drivers/staging/lustre/lustre/ptlrpc/events.c index b8ca7d6..95be4aa 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/events.c +++ b/drivers/staging/lustre/lustre/ptlrpc/events.c @@ -324,6 +324,7 @@ void request_in_callback(lnet_event_t *ev) } } + ptlrpc_srv_req_init(req); /* NB we ABSOLUTELY RELY on req being zeroed, so pointers are NULL, * flags are reset and scalars are zero. We only set the message * size to non-zero if this was a successful receive. @@ -337,10 +338,6 @@ void request_in_callback(lnet_event_t *ev) req->rq_self = ev->target.nid; req->rq_rqbd = rqbd; req->rq_phase = RQ_PHASE_NEW; - spin_lock_init(&req->rq_lock); - INIT_LIST_HEAD(&req->rq_timed_list); - INIT_LIST_HEAD(&req->rq_exp_list); - atomic_set(&req->rq_refcount, 1); if (ev->type == LNET_EVENT_PUT) CDEBUG(D_INFO, "incoming req@%p x%llu msgsize %u\n", req, req->rq_xid, ev->mlength); diff --git a/drivers/staging/lustre/lustre/ptlrpc/niobuf.c b/drivers/staging/lustre/lustre/ptlrpc/niobuf.c index ff9a95c..4e7d68f 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/niobuf.c +++ b/drivers/staging/lustre/lustre/ptlrpc/niobuf.c @@ -633,7 +633,7 @@ int ptl_send_rpc(struct ptlrpc_request *request, int noreply) OBD_FAIL_TIMEOUT(OBD_FAIL_PTLRPC_DELAY_SEND, request->rq_timeout + 5); - ktime_get_real_ts64(&request->rq_arrival_time); + ktime_get_real_ts64(&request->rq_sent_tv); request->rq_sent = ktime_get_real_seconds(); /* We give the server rq_timeout secs to process the req, and * add the network latency for our local timeout. diff --git a/drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h b/drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h index 97e97e2..d3674cb 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h +++ b/drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h @@ -288,4 +288,38 @@ static inline void ptlrpc_reqset_put(struct ptlrpc_request_set *set) if (atomic_dec_and_test(&set->set_refcount)) kfree(set); } + +/** initialise ptlrpc common fields */ +static inline void ptlrpc_req_comm_init(struct ptlrpc_request *req) +{ + spin_lock_init(&req->rq_lock); + atomic_set(&req->rq_refcount, 1); + INIT_LIST_HEAD(&req->rq_list); + INIT_LIST_HEAD(&req->rq_replay_list); +} + +/** initialise client side ptlrpc request */ +static inline void ptlrpc_cli_req_init(struct ptlrpc_request *req) +{ + struct ptlrpc_cli_req *cr = &req->rq_cli; + + ptlrpc_req_comm_init(req); + INIT_LIST_HEAD(&cr->cr_set_chain); + INIT_LIST_HEAD(&cr->cr_ctx_chain); + init_waitqueue_head(&cr->cr_reply_waitq); + init_waitqueue_head(&cr->cr_set_waitq); +} + +/** initialise server side ptlrpc request */ +static inline void ptlrpc_srv_req_init(struct ptlrpc_request *req) +{ + struct ptlrpc_srv_req *sr = &req->rq_srv; + + ptlrpc_req_comm_init(req); + req->rq_srv_req = 1; + INIT_LIST_HEAD(&sr->sr_exp_list); + INIT_LIST_HEAD(&sr->sr_timed_list); + INIT_LIST_HEAD(&sr->sr_hist_list); +} + #endif /* PTLRPC_INTERNAL_H */ diff --git a/drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c b/drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c index b0cf585..0a374b6 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c +++ b/drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c @@ -157,9 +157,9 @@ static int ptlrpcd_users; void ptlrpcd_wake(struct ptlrpc_request *req) { - struct ptlrpc_request_set *rq_set = req->rq_set; + struct ptlrpc_request_set *set = req->rq_set; - wake_up(&rq_set->set_waitq); + wake_up(&set->set_waitq); } EXPORT_SYMBOL(ptlrpcd_wake); diff --git a/drivers/staging/lustre/lustre/ptlrpc/sec.c b/drivers/staging/lustre/lustre/ptlrpc/sec.c index f3b4773..dbd819f 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/sec.c +++ b/drivers/staging/lustre/lustre/ptlrpc/sec.c @@ -863,11 +863,9 @@ int sptlrpc_import_check_ctx(struct obd_import *imp) if (!req) return -ENOMEM; - spin_lock_init(&req->rq_lock); + ptlrpc_cli_req_init(req); atomic_set(&req->rq_refcount, 10000); - INIT_LIST_HEAD(&req->rq_ctx_chain); - init_waitqueue_head(&req->rq_reply_waitq); - init_waitqueue_head(&req->rq_set_waitq); + req->rq_import = imp; req->rq_flvr = sec->ps_flvr; req->rq_cli_ctx = ctx; @@ -1047,6 +1045,8 @@ int sptlrpc_cli_unwrap_early_reply(struct ptlrpc_request *req, if (!early_req) return -ENOMEM; + ptlrpc_cli_req_init(early_req); + early_size = req->rq_nob_received; early_bufsz = size_roundup_power2(early_size); early_buf = libcfs_kvzalloc(early_bufsz, GFP_NOFS); @@ -1095,7 +1095,6 @@ int sptlrpc_cli_unwrap_early_reply(struct ptlrpc_request *req, memcpy(early_buf, req->rq_repbuf, early_size); spin_unlock(&req->rq_lock); - spin_lock_init(&early_req->rq_lock); early_req->rq_cli_ctx = sptlrpc_cli_ctx_get(req->rq_cli_ctx); early_req->rq_flvr = req->rq_flvr; early_req->rq_repbuf = early_buf; -- 2.7.4 From green at linuxhacker.ru Mon Jun 20 20:55:32 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Mon, 20 Jun 2016 16:55:32 -0400 Subject: [lustre-devel] [PATCH v2 09/29] staging/lustre/ptlrpc: Early Reply vs Reply MDunlink In-Reply-To: <1466456152-2199975-1-git-send-email-green@linuxhacker.ru> References: <1466456152-2199975-1-git-send-email-green@linuxhacker.ru> Message-ID: <1466456152-2199975-10-git-send-email-green@linuxhacker.ru> From: Vitaly Fertman A race between unregister_reply & early reply. When buffers are busy for the early transfer, they cannon be unlinked by unregister_reply, so the RPC gets into UNREGISTERING state. The coming reply_in_callback for the early RPC already has unlinked flag set due to previous mdunlink attempt, but we handle it properly only for UNILNK event, whereas this is PUT in this case. Signed-off-by: Vitaly Fertman Seagate-bug-id: MRP-3323 Reviewed-by: Alexey Leonidovich Lyashkov Reviewed-by: Andriy Skulysh Tested-by: Parinay Vijayprakash Kondekar Reviewed-on: http://review.whamcloud.com/18934 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7434 Reviewed-by: Chris Horn Reviewed-by: Andreas Dilger Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/ptlrpc/events.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/ptlrpc/events.c b/drivers/staging/lustre/lustre/ptlrpc/events.c index a243342..b1ce725 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/events.c +++ b/drivers/staging/lustre/lustre/ptlrpc/events.c @@ -137,7 +137,8 @@ void reply_in_callback(lnet_event_t *ev) req->rq_early_count++; /* number received, client side */ - if (req->rq_replied) /* already got the real reply */ + /* already got the real reply or buffers are already unlinked */ + if (req->rq_replied || req->rq_reply_unlinked == 1) goto out_wake; req->rq_early = 1; -- 2.7.4 From green at linuxhacker.ru Mon Jun 20 20:55:31 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Mon, 20 Jun 2016 16:55:31 -0400 Subject: [lustre-devel] [PATCH v2 08/29] staging/lustre/ptlrpc: missing wakeup for ptlrpc_check_set In-Reply-To: <1466456152-2199975-1-git-send-email-green@linuxhacker.ru> References: <1466456152-2199975-1-git-send-email-green@linuxhacker.ru> Message-ID: <1466456152-2199975-9-git-send-email-green@linuxhacker.ru> From: Liang Zhen This patch changes a few things: - There is no guarantee that request_out_callback will happen before reply_in_callback, if a request got reply and unlinked reply buffer before request_out_callback is called, then the thread waiting on ptlrpc_request_set will miss wakeup event. This may seriously impact performance of some IO workloads or result in RPC timeout - To make code more easier to understand, this patch changes action-bits "rq_req_unlink" and "rq_reply_unlink" to status-bits "rq_req_unlinked" and "rq_reply_unlinked" Signed-off-by: Liang Zhen Reviewed-on: http://review.whamcloud.com/12158 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5696 Reviewed-by: Johann Lombardi Reviewed-by: Li Wei Reviewed-by: Mike Pershin Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/include/lustre_net.h | 27 +++++++++++++--------- drivers/staging/lustre/lustre/ptlrpc/client.c | 12 ++++------ drivers/staging/lustre/lustre/ptlrpc/events.c | 22 +++++++++++------- drivers/staging/lustre/lustre/ptlrpc/niobuf.c | 14 +++++------ .../staging/lustre/lustre/ptlrpc/ptlrpc_internal.h | 9 ++++++++ 5 files changed, 51 insertions(+), 33 deletions(-) diff --git a/drivers/staging/lustre/lustre/include/lustre_net.h b/drivers/staging/lustre/lustre/include/lustre_net.h index 5968c3c..523d082 100644 --- a/drivers/staging/lustre/lustre/include/lustre_net.h +++ b/drivers/staging/lustre/lustre/include/lustre_net.h @@ -1428,7 +1428,7 @@ struct ptlrpc_request { * rq_list */ spinlock_t rq_lock; - /** client-side flags are serialized by rq_lock */ + /** client-side flags are serialized by rq_lock @{ */ unsigned int rq_intr:1, rq_replied:1, rq_err:1, rq_timedout:1, rq_resend:1, rq_restart:1, /** @@ -1444,18 +1444,15 @@ struct ptlrpc_request { rq_no_resend:1, rq_waiting:1, rq_receiving_reply:1, rq_no_delay:1, rq_net_err:1, rq_wait_ctx:1, rq_early:1, - rq_req_unlink:1, rq_reply_unlink:1, + rq_req_unlinked:1, /* unlinked request buffer from lnet */ + rq_reply_unlinked:1, /* unlinked reply buffer from lnet */ rq_memalloc:1, /* req originated from "kswapd" */ - /* server-side flags */ - rq_packed_final:1, /* packed final reply */ - rq_hp:1, /* high priority RPC */ - rq_at_linked:1, /* link into service's srv_at_array */ - rq_reply_truncate:1, rq_committed:1, - /* whether the "rq_set" is a valid one */ + rq_reply_truncated:1, + /** whether the "rq_set" is a valid one */ rq_invalid_rqset:1, rq_generation_set:1, - /* do not resend request on -EINPROGRESS */ + /** do not resend request on -EINPROGRESS */ rq_no_retry_einprogress:1, /* allow the req to be sent if the import is in recovery * status @@ -1463,6 +1460,14 @@ struct ptlrpc_request { rq_allow_replay:1, /* bulk request, sent to server, but uncommitted */ rq_unstable:1; + /** @} */ + + /** server-side flags @{ */ + unsigned int + rq_hp:1, /**< high priority RPC */ + rq_at_linked:1, /**< link into service's srv_at_array */ + rq_packed_final:1; /**< packed final reply */ + /** @} */ /** one of RQ_PHASE_* */ enum rq_phase rq_phase; @@ -2785,8 +2790,8 @@ ptlrpc_client_recv_or_unlink(struct ptlrpc_request *req) spin_unlock(&req->rq_lock); return 1; } - rc = req->rq_receiving_reply; - rc = rc || req->rq_req_unlink || req->rq_reply_unlink; + rc = !req->rq_req_unlinked || !req->rq_reply_unlinked || + req->rq_receiving_reply; spin_unlock(&req->rq_lock); return rc; } diff --git a/drivers/staging/lustre/lustre/ptlrpc/client.c b/drivers/staging/lustre/lustre/ptlrpc/client.c index 9abd469..ae1cef3 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/client.c +++ b/drivers/staging/lustre/lustre/ptlrpc/client.c @@ -1148,9 +1148,9 @@ static int after_reply(struct ptlrpc_request *req) LASSERT(obd); /* repbuf must be unlinked */ - LASSERT(!req->rq_receiving_reply && !req->rq_reply_unlink); + LASSERT(!req->rq_receiving_reply && req->rq_reply_unlinked); - if (req->rq_reply_truncate) { + if (req->rq_reply_truncated) { if (ptlrpc_no_resend(req)) { DEBUG_REQ(D_ERROR, req, "reply buffer overflow, expected: %d, actual size: %d", req->rq_nob_received, req->rq_repbuf_len); @@ -2342,9 +2342,10 @@ int ptlrpc_unregister_reply(struct ptlrpc_request *request, int async) LASSERT(rc == -ETIMEDOUT); DEBUG_REQ(D_WARNING, request, - "Unexpectedly long timeout rvcng=%d unlnk=%d/%d", + "Unexpectedly long timeout receiving_reply=%d req_ulinked=%d reply_unlinked=%d", request->rq_receiving_reply, - request->rq_req_unlink, request->rq_reply_unlink); + request->rq_req_unlinked, + request->rq_reply_unlinked); } return 0; } @@ -3002,9 +3003,6 @@ void *ptlrpcd_alloc_work(struct obd_import *imp, req->rq_import = class_import_get(imp); req->rq_interpret_reply = work_interpreter; /* don't want reply */ - req->rq_receiving_reply = 0; - req->rq_req_unlink = 0; - req->rq_reply_unlink = 0; req->rq_no_delay = 1; req->rq_no_resend = 1; req->rq_pill.rc_fmt = (void *)&worker_format; diff --git a/drivers/staging/lustre/lustre/ptlrpc/events.c b/drivers/staging/lustre/lustre/ptlrpc/events.c index 95be4aa..a243342 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/events.c +++ b/drivers/staging/lustre/lustre/ptlrpc/events.c @@ -51,27 +51,33 @@ void request_out_callback(lnet_event_t *ev) { struct ptlrpc_cb_id *cbid = ev->md.user_ptr; struct ptlrpc_request *req = cbid->cbid_arg; + bool wakeup = false; - LASSERT(ev->type == LNET_EVENT_SEND || - ev->type == LNET_EVENT_UNLINK); + LASSERT(ev->type == LNET_EVENT_SEND || ev->type == LNET_EVENT_UNLINK); LASSERT(ev->unlinked); DEBUG_REQ(D_NET, req, "type %d, status %d", ev->type, ev->status); sptlrpc_request_out_callback(req); + spin_lock(&req->rq_lock); req->rq_real_sent = ktime_get_real_seconds(); - if (ev->unlinked) - req->rq_req_unlink = 0; + req->rq_req_unlinked = 1; + /* reply_in_callback happened before request_out_callback? */ + if (req->rq_reply_unlinked) + wakeup = true; if (ev->type == LNET_EVENT_UNLINK || ev->status != 0) { /* Failed send: make it seem like the reply timed out, just * like failing sends in client.c does currently... */ - req->rq_net_err = 1; - ptlrpc_client_wake_req(req); + wakeup = true; } + + if (wakeup) + ptlrpc_client_wake_req(req); + spin_unlock(&req->rq_lock); ptlrpc_req_finished(req); @@ -100,7 +106,7 @@ void reply_in_callback(lnet_event_t *ev) req->rq_receiving_reply = 0; req->rq_early = 0; if (ev->unlinked) - req->rq_reply_unlink = 0; + req->rq_reply_unlinked = 1; if (ev->status) goto out_wake; @@ -114,7 +120,7 @@ void reply_in_callback(lnet_event_t *ev) if (ev->mlength < ev->rlength) { CDEBUG(D_RPCTRACE, "truncate req %p rpc %d - %d+%d\n", req, req->rq_replen, ev->rlength, ev->offset); - req->rq_reply_truncate = 1; + req->rq_reply_truncated = 1; req->rq_replied = 1; req->rq_status = -EOVERFLOW; req->rq_nob_received = ev->rlength + ev->offset; diff --git a/drivers/staging/lustre/lustre/ptlrpc/niobuf.c b/drivers/staging/lustre/lustre/ptlrpc/niobuf.c index 4e7d68f..8c49f5e 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/niobuf.c +++ b/drivers/staging/lustre/lustre/ptlrpc/niobuf.c @@ -577,19 +577,18 @@ int ptl_send_rpc(struct ptlrpc_request *request, int noreply) } spin_lock(&request->rq_lock); - /* If the MD attach succeeds, there _will_ be a reply_in callback */ - request->rq_receiving_reply = !noreply; - request->rq_req_unlink = 1; /* We are responsible for unlinking the reply buffer */ - request->rq_reply_unlink = !noreply; + request->rq_reply_unlinked = noreply; + request->rq_receiving_reply = !noreply; /* Clear any flags that may be present from previous sends. */ + request->rq_req_unlinked = 0; request->rq_replied = 0; request->rq_err = 0; request->rq_timedout = 0; request->rq_net_err = 0; request->rq_resend = 0; request->rq_restart = 0; - request->rq_reply_truncate = 0; + request->rq_reply_truncated = 0; spin_unlock(&request->rq_lock); if (!noreply) { @@ -604,7 +603,7 @@ int ptl_send_rpc(struct ptlrpc_request *request, int noreply) reply_md.user_ptr = &request->rq_reply_cbid; reply_md.eq_handle = ptlrpc_eq_h; - /* We must see the unlink callback to unset rq_reply_unlink, + /* We must see the unlink callback to set rq_reply_unlinked, * so we can't auto-unlink */ rc = LNetMDAttach(reply_me_h, reply_md, LNET_RETAIN, @@ -651,9 +650,10 @@ int ptl_send_rpc(struct ptlrpc_request *request, int noreply) connection, request->rq_request_portal, request->rq_xid, 0); - if (rc == 0) + if (likely(rc == 0)) goto out; + request->rq_req_unlinked = 1; ptlrpc_req_finished(request); if (noreply) goto out; diff --git a/drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h b/drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h index d3674cb..a9831fa 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h +++ b/drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h @@ -304,6 +304,15 @@ static inline void ptlrpc_cli_req_init(struct ptlrpc_request *req) struct ptlrpc_cli_req *cr = &req->rq_cli; ptlrpc_req_comm_init(req); + + req->rq_receiving_reply = 0; + req->rq_req_unlinked = 1; + req->rq_reply_unlinked = 1; + + req->rq_receiving_reply = 0; + req->rq_req_unlinked = 1; + req->rq_reply_unlinked = 1; + INIT_LIST_HEAD(&cr->cr_set_chain); INIT_LIST_HEAD(&cr->cr_ctx_chain); init_waitqueue_head(&cr->cr_reply_waitq); -- 2.7.4 From green at linuxhacker.ru Mon Jun 20 20:55:39 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Mon, 20 Jun 2016 16:55:39 -0400 Subject: [lustre-devel] [PATCH v2 16/29] staging/lustre: Inline Lustre intent disposition functions In-Reply-To: <1466456152-2199975-1-git-send-email-green@linuxhacker.ru> References: <1466456152-2199975-1-git-send-email-green@linuxhacker.ru> Message-ID: <1466456152-2199975-17-git-send-email-green@linuxhacker.ru> They are just one-liners, so no point in having them exported and called through a different module. Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/include/lustre_intent.h | 15 +++++++++++++++ drivers/staging/lustre/lustre/include/lustre_mdc.h | 3 --- drivers/staging/lustre/lustre/mdc/mdc_locks.c | 18 ------------------ 3 files changed, 15 insertions(+), 21 deletions(-) diff --git a/drivers/staging/lustre/lustre/include/lustre_intent.h b/drivers/staging/lustre/lustre/include/lustre_intent.h index 41c03d7..3aed810 100644 --- a/drivers/staging/lustre/lustre/include/lustre_intent.h +++ b/drivers/staging/lustre/lustre/include/lustre_intent.h @@ -50,4 +50,19 @@ struct lookup_intent { unsigned int it_lock_set:1; }; +static inline int it_disposition(struct lookup_intent *it, int flag) +{ + return it->it_disposition & flag; +} + +static inline void it_set_disposition(struct lookup_intent *it, int flag) +{ + it->it_disposition |= flag; +} + +static inline void it_clear_disposition(struct lookup_intent *it, int flag) +{ + it->it_disposition &= ~flag; +} + #endif diff --git a/drivers/staging/lustre/lustre/include/lustre_mdc.h b/drivers/staging/lustre/lustre/include/lustre_mdc.h index 0ef4226..fa62b95 100644 --- a/drivers/staging/lustre/lustre/include/lustre_mdc.h +++ b/drivers/staging/lustre/lustre/include/lustre_mdc.h @@ -185,9 +185,6 @@ struct mdc_cache_waiter { }; /* mdc/mdc_locks.c */ -int it_disposition(struct lookup_intent *it, int flag); -void it_clear_disposition(struct lookup_intent *it, int flag); -void it_set_disposition(struct lookup_intent *it, int flag); int it_open_error(int phase, struct lookup_intent *it); static inline bool cl_is_lov_delay_create(unsigned int flags) diff --git a/drivers/staging/lustre/lustre/mdc/mdc_locks.c b/drivers/staging/lustre/lustre/mdc/mdc_locks.c index 5da2a1e..c43b3a2 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_locks.c +++ b/drivers/staging/lustre/lustre/mdc/mdc_locks.c @@ -50,24 +50,6 @@ struct mdc_getattr_args { struct ldlm_enqueue_info *ga_einfo; }; -int it_disposition(struct lookup_intent *it, int flag) -{ - return it->it_disposition & flag; -} -EXPORT_SYMBOL(it_disposition); - -void it_set_disposition(struct lookup_intent *it, int flag) -{ - it->it_disposition |= flag; -} -EXPORT_SYMBOL(it_set_disposition); - -void it_clear_disposition(struct lookup_intent *it, int flag) -{ - it->it_disposition &= ~flag; -} -EXPORT_SYMBOL(it_clear_disposition); - int it_open_error(int phase, struct lookup_intent *it) { if (it_disposition(it, DISP_OPEN_LEASE)) { -- 2.7.4 From green at linuxhacker.ru Mon Jun 20 20:55:36 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Mon, 20 Jun 2016 16:55:36 -0400 Subject: [lustre-devel] [PATCH v2 13/29] staging/lustre: LDLM_DEBUG() shouldn't be passed \n In-Reply-To: <1466456152-2199975-1-git-send-email-green@linuxhacker.ru> References: <1466456152-2199975-1-git-send-email-green@linuxhacker.ru> Message-ID: <1466456152-2199975-14-git-send-email-green@linuxhacker.ru> From: Alex Zhuravlev as it adds own \n, so any extra \n break log format. Signed-off-by: Alex Zhuravlev Reviewed-on: http://review.whamcloud.com/17494 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7521 Reviewed-by: James Simmons Reviewed-by: John L. Hammond Reviewed-by: Andreas Dilger Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/ldlm/ldlm_lock.c | 2 +- drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c | 3 ++- drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 2 +- drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | 2 +- drivers/staging/lustre/lustre/lov/lov_object.c | 4 ++-- drivers/staging/lustre/lustre/mdc/mdc_locks.c | 2 +- drivers/staging/lustre/lustre/osc/osc_cache.c | 4 ++-- drivers/staging/lustre/lustre/osc/osc_lock.c | 2 +- 8 files changed, 11 insertions(+), 10 deletions(-) diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c b/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c index 1ecdfa2..b7254eb 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c @@ -1440,7 +1440,7 @@ int ldlm_fill_lvb(struct ldlm_lock *lock, struct req_capsule *pill, memcpy(data, lvb, size); break; default: - LDLM_ERROR(lock, "Unknown LVB type: %d\n", lock->l_lvb_type); + LDLM_ERROR(lock, "Unknown LVB type: %d", lock->l_lvb_type); dump_stack(); return -EINVAL; } diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c b/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c index 3eab059..8294703 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c @@ -637,7 +637,8 @@ static int ldlm_callback_handler(struct ptlrpc_request *req) */ if ((ldlm_is_canceling(lock) && ldlm_is_bl_done(lock)) || ldlm_is_failed(lock)) { - LDLM_DEBUG(lock, "callback on lock %#llx - lock disappeared\n", + LDLM_DEBUG(lock, + "callback on lock %#llx - lock disappeared", dlm_req->lock_handle[0].cookie); unlock_res_and_lock(lock); LDLM_LOCK_RELEASE(lock); diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_request.c b/drivers/staging/lustre/lustre/ldlm/ldlm_request.c index 471ab08..d3a376e 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_request.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_request.c @@ -711,7 +711,7 @@ int ldlm_cli_enqueue(struct obd_export *exp, struct ptlrpc_request **reqp, lock->l_req_extent = policy->l_extent; } - LDLM_DEBUG(lock, "client-side enqueue START, flags %llx\n", + LDLM_DEBUG(lock, "client-side enqueue START, flags %llx", *flags); } diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c index f7c95b7..51a28d9 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c @@ -1275,7 +1275,7 @@ void ldlm_resource_add_lock(struct ldlm_resource *res, struct list_head *head, { check_res_locked(res); - LDLM_DEBUG(lock, "About to add this lock:\n"); + LDLM_DEBUG(lock, "About to add this lock:"); if (ldlm_is_destroyed(lock)) { CDEBUG(D_OTHER, "Lock destroyed, not adding to resource\n"); diff --git a/drivers/staging/lustre/lustre/lov/lov_object.c b/drivers/staging/lustre/lustre/lov/lov_object.c index ec55b88..f9621b0 100644 --- a/drivers/staging/lustre/lustre/lov/lov_object.c +++ b/drivers/staging/lustre/lustre/lov/lov_object.c @@ -181,8 +181,8 @@ static int lov_init_sub(const struct lu_env *env, struct lov_object *lov, } LU_OBJECT_DEBUG(mask, env, &stripe->co_lu, - "stripe %d is already owned.\n", idx); - LU_OBJECT_DEBUG(mask, env, old_obj, "owned.\n"); + "stripe %d is already owned.", idx); + LU_OBJECT_DEBUG(mask, env, old_obj, "owned."); LU_OBJECT_HEADER(mask, env, lov2lu(lov), "try to own.\n"); cl_object_put(env, stripe); } diff --git a/drivers/staging/lustre/lustre/mdc/mdc_locks.c b/drivers/staging/lustre/lustre/mdc/mdc_locks.c index b395420..19b549c 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_locks.c +++ b/drivers/staging/lustre/lustre/mdc/mdc_locks.c @@ -711,7 +711,7 @@ static int mdc_finish_enqueue(struct obd_export *exp, if (lock && ldlm_has_layout(lock) && lvb_data) { void *lmm; - LDLM_DEBUG(lock, "layout lock returned by: %s, lvb_len: %d\n", + LDLM_DEBUG(lock, "layout lock returned by: %s, lvb_len: %d", ldlm_it2str(it->it_op), lvb_len); lmm = libcfs_kvzalloc(lvb_len, GFP_NOFS); diff --git a/drivers/staging/lustre/lustre/osc/osc_cache.c b/drivers/staging/lustre/lustre/osc/osc_cache.c index 1a6df43..e3b9f9d 100644 --- a/drivers/staging/lustre/lustre/osc/osc_cache.c +++ b/drivers/staging/lustre/lustre/osc/osc_cache.c @@ -123,9 +123,9 @@ static const char *oes_strings[] = { /* ----- part 4 ----- */ \ ## __VA_ARGS__); \ if (lvl == D_ERROR && __ext->oe_dlmlock) \ - LDLM_ERROR(__ext->oe_dlmlock, "extent: %p\n", __ext); \ + LDLM_ERROR(__ext->oe_dlmlock, "extent: %p", __ext); \ else \ - LDLM_DEBUG(__ext->oe_dlmlock, "extent: %p\n", __ext); \ + LDLM_DEBUG(__ext->oe_dlmlock, "extent: %p", __ext); \ } while (0) #undef EASSERTF diff --git a/drivers/staging/lustre/lustre/osc/osc_lock.c b/drivers/staging/lustre/lustre/osc/osc_lock.c index 5455d9d..717d3ff 100644 --- a/drivers/staging/lustre/lustre/osc/osc_lock.c +++ b/drivers/staging/lustre/lustre/osc/osc_lock.c @@ -1168,7 +1168,7 @@ int osc_lock_init(const struct lu_env *env, osc_lock_set_writer(env, io, obj, oscl); - LDLM_DEBUG_NOLOCK("lock %p, osc lock %p, flags %llx\n", + LDLM_DEBUG_NOLOCK("lock %p, osc lock %p, flags %llx", lock, oscl, oscl->ols_flags); return 0; -- 2.7.4 From green at linuxhacker.ru Mon Jun 20 20:55:35 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Mon, 20 Jun 2016 16:55:35 -0400 Subject: [lustre-devel] [PATCH v2 12/29] staging/lustre/llite: take trunc_sem only at vvp layer In-Reply-To: <1466456152-2199975-1-git-send-email-green@linuxhacker.ru> References: <1466456152-2199975-1-git-send-email-green@linuxhacker.ru> Message-ID: <1466456152-2199975-13-git-send-email-green@linuxhacker.ru> From: Patrick Farrell The lli_trunc_sem is taken in 'read' mode in both ll_page_mkwrite and vvp_io_fault_start. This can lead to a deadlock with another thread which asks for the semaphore in write mode between thse two read calls. Since all users of lli_trunc_sem are in the vvp layer, we can satisfy the requirement to exclude truncate by taking the semaphore only in vvp_io_fault_start. Signed-off-by: Patrick Farrell Reviewed-on: http://review.whamcloud.com/19315 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7981 Reviewed-by: Jinshan Xiong Reviewed-by: Andriy Skulysh Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/llite/llite_mmap.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/drivers/staging/lustre/lustre/llite/llite_mmap.c b/drivers/staging/lustre/lustre/llite/llite_mmap.c index fb1c3b6..66ee5db 100644 --- a/drivers/staging/lustre/lustre/llite/llite_mmap.c +++ b/drivers/staging/lustre/lustre/llite/llite_mmap.c @@ -196,18 +196,11 @@ static int ll_page_mkwrite0(struct vm_area_struct *vma, struct page *vmpage, set = cfs_block_sigsinv(sigmask(SIGKILL) | sigmask(SIGTERM)); - /* we grab lli_trunc_sem to exclude truncate case. - * Otherwise, we could add dirty pages into osc cache - * while truncate is on-going. - */ inode = vvp_object_inode(io->ci_obj); lli = ll_i2info(inode); - down_read(&lli->lli_trunc_sem); result = cl_io_loop(env, io); - up_read(&lli->lli_trunc_sem); - cfs_restore_sigs(set); if (result == 0) { -- 2.7.4 From green at linuxhacker.ru Mon Jun 20 20:55:41 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Mon, 20 Jun 2016 16:55:41 -0400 Subject: [lustre-devel] [PATCH v2 18/29] staging/lustre/ldlm: const qualify struct lustre_handle * params In-Reply-To: <1466456152-2199975-1-git-send-email-green@linuxhacker.ru> References: <1466456152-2199975-1-git-send-email-green@linuxhacker.ru> Message-ID: <1466456152-2199975-19-git-send-email-green@linuxhacker.ru> From: "John L. Hammond" Add a const qualifier to several struct lustre_handle * parameters in the LDLM interface. Signed-off-by: John L. Hammond Reviewed-on: http://review.whamcloud.com/17071 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7403 Reviewed-by: Andreas Dilger Reviewed-by: James Simmons Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/include/lustre_dlm.h | 18 +++++++++--------- drivers/staging/lustre/lustre/ldlm/ldlm_lock.c | 14 +++++++------- drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c | 2 +- drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 4 ++-- 4 files changed, 19 insertions(+), 19 deletions(-) diff --git a/drivers/staging/lustre/lustre/include/lustre_dlm.h b/drivers/staging/lustre/lustre/include/lustre_dlm.h index 63085a0..60051a5 100644 --- a/drivers/staging/lustre/lustre/include/lustre_dlm.h +++ b/drivers/staging/lustre/lustre/include/lustre_dlm.h @@ -1073,7 +1073,7 @@ void ldlm_lock2handle(const struct ldlm_lock *lock, struct ldlm_lock *__ldlm_handle2lock(const struct lustre_handle *, __u64 flags); void ldlm_cancel_callback(struct ldlm_lock *); int ldlm_lock_remove_from_lru(struct ldlm_lock *); -int ldlm_lock_set_data(struct lustre_handle *, void *); +int ldlm_lock_set_data(const struct lustre_handle *lockh, void *data); /** * Obtain a lock reference by its handle. @@ -1162,10 +1162,10 @@ do { \ struct ldlm_lock *ldlm_lock_get(struct ldlm_lock *lock); void ldlm_lock_put(struct ldlm_lock *lock); void ldlm_lock2desc(struct ldlm_lock *lock, struct ldlm_lock_desc *desc); -void ldlm_lock_addref(struct lustre_handle *lockh, __u32 mode); -int ldlm_lock_addref_try(struct lustre_handle *lockh, __u32 mode); -void ldlm_lock_decref(struct lustre_handle *lockh, __u32 mode); -void ldlm_lock_decref_and_cancel(struct lustre_handle *lockh, __u32 mode); +void ldlm_lock_addref(const struct lustre_handle *lockh, __u32 mode); +int ldlm_lock_addref_try(const struct lustre_handle *lockh, __u32 mode); +void ldlm_lock_decref(const struct lustre_handle *lockh, __u32 mode); +void ldlm_lock_decref_and_cancel(const struct lustre_handle *lockh, __u32 mode); void ldlm_lock_fail_match_locked(struct ldlm_lock *lock); void ldlm_lock_allow_match(struct ldlm_lock *lock); void ldlm_lock_allow_match_locked(struct ldlm_lock *lock); @@ -1174,10 +1174,10 @@ enum ldlm_mode ldlm_lock_match(struct ldlm_namespace *ns, __u64 flags, enum ldlm_type type, ldlm_policy_data_t *, enum ldlm_mode mode, struct lustre_handle *, int unref); -enum ldlm_mode ldlm_revalidate_lock_handle(struct lustre_handle *lockh, +enum ldlm_mode ldlm_revalidate_lock_handle(const struct lustre_handle *lockh, __u64 *bits); void ldlm_lock_cancel(struct ldlm_lock *lock); -void ldlm_lock_dump_handle(int level, struct lustre_handle *); +void ldlm_lock_dump_handle(int level, const struct lustre_handle *); void ldlm_unlink_lock_skiplist(struct ldlm_lock *req); /* resource.c */ @@ -1251,9 +1251,9 @@ int ldlm_cli_enqueue_fini(struct obd_export *exp, struct ptlrpc_request *req, enum ldlm_type type, __u8 with_policy, enum ldlm_mode mode, __u64 *flags, void *lvb, __u32 lvb_len, - struct lustre_handle *lockh, int rc); + const struct lustre_handle *lockh, int rc); int ldlm_cli_update_pool(struct ptlrpc_request *req); -int ldlm_cli_cancel(struct lustre_handle *lockh, +int ldlm_cli_cancel(const struct lustre_handle *lockh, enum ldlm_cancel_flags cancel_flags); int ldlm_cli_cancel_unused(struct ldlm_namespace *, const struct ldlm_res_id *, enum ldlm_cancel_flags flags, void *opaque); diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c b/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c index b7254eb..a5993f7 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c @@ -658,7 +658,7 @@ static void ldlm_add_ast_work_item(struct ldlm_lock *lock, * r/w reference type is determined by \a mode * Calls ldlm_lock_addref_internal. */ -void ldlm_lock_addref(struct lustre_handle *lockh, __u32 mode) +void ldlm_lock_addref(const struct lustre_handle *lockh, __u32 mode) { struct ldlm_lock *lock; @@ -700,7 +700,7 @@ void ldlm_lock_addref_internal_nolock(struct ldlm_lock *lock, __u32 mode) * * \retval -EAGAIN lock is being canceled. */ -int ldlm_lock_addref_try(struct lustre_handle *lockh, __u32 mode) +int ldlm_lock_addref_try(const struct lustre_handle *lockh, __u32 mode) { struct ldlm_lock *lock; int result; @@ -832,7 +832,7 @@ void ldlm_lock_decref_internal(struct ldlm_lock *lock, __u32 mode) /** * Decrease reader/writer refcount for LDLM lock with handle \a lockh */ -void ldlm_lock_decref(struct lustre_handle *lockh, __u32 mode) +void ldlm_lock_decref(const struct lustre_handle *lockh, __u32 mode) { struct ldlm_lock *lock = __ldlm_handle2lock(lockh, 0); @@ -849,7 +849,7 @@ EXPORT_SYMBOL(ldlm_lock_decref); * * Typical usage is for GROUP locks which we cannot allow to be cached. */ -void ldlm_lock_decref_and_cancel(struct lustre_handle *lockh, __u32 mode) +void ldlm_lock_decref_and_cancel(const struct lustre_handle *lockh, __u32 mode) { struct ldlm_lock *lock = __ldlm_handle2lock(lockh, 0); @@ -1318,7 +1318,7 @@ enum ldlm_mode ldlm_lock_match(struct ldlm_namespace *ns, __u64 flags, } EXPORT_SYMBOL(ldlm_lock_match); -enum ldlm_mode ldlm_revalidate_lock_handle(struct lustre_handle *lockh, +enum ldlm_mode ldlm_revalidate_lock_handle(const struct lustre_handle *lockh, __u64 *bits) { struct ldlm_lock *lock; @@ -1849,7 +1849,7 @@ EXPORT_SYMBOL(ldlm_lock_cancel); /** * Set opaque data into the lock that only makes sense to upper layer. */ -int ldlm_lock_set_data(struct lustre_handle *lockh, void *data) +int ldlm_lock_set_data(const struct lustre_handle *lockh, void *data) { struct ldlm_lock *lock = ldlm_handle2lock(lockh); int rc = -EINVAL; @@ -1875,7 +1875,7 @@ struct export_cl_data { * * Used when printing all locks on a resource for debug purposes. */ -void ldlm_lock_dump_handle(int level, struct lustre_handle *lockh) +void ldlm_lock_dump_handle(int level, const struct lustre_handle *lockh) { struct ldlm_lock *lock; diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c b/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c index 8294703..821939f 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c @@ -499,7 +499,7 @@ static int ldlm_handle_setinfo(struct ptlrpc_request *req) static inline void ldlm_callback_errmsg(struct ptlrpc_request *req, const char *msg, int rc, - struct lustre_handle *handle) + const struct lustre_handle *handle) { DEBUG_REQ((req->rq_no_reply || rc) ? D_WARNING : D_DLMTRACE, req, "%s: [nid %s] [rc %d] [lock %#llx]", diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_request.c b/drivers/staging/lustre/lustre/ldlm/ldlm_request.c index d3a376e..af487f9 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_request.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_request.c @@ -336,7 +336,7 @@ int ldlm_cli_enqueue_fini(struct obd_export *exp, struct ptlrpc_request *req, enum ldlm_type type, __u8 with_policy, enum ldlm_mode mode, __u64 *flags, void *lvb, __u32 lvb_len, - struct lustre_handle *lockh, int rc) + const struct lustre_handle *lockh, int rc) { struct ldlm_namespace *ns = exp->exp_obd->obd_namespace; int is_replay = *flags & LDLM_FL_REPLAY; @@ -1023,7 +1023,7 @@ EXPORT_SYMBOL(ldlm_cli_update_pool); * * Lock must not have any readers or writers by this time. */ -int ldlm_cli_cancel(struct lustre_handle *lockh, +int ldlm_cli_cancel(const struct lustre_handle *lockh, enum ldlm_cancel_flags cancel_flags) { struct obd_export *exp; -- 2.7.4 From green at linuxhacker.ru Mon Jun 20 20:55:38 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Mon, 20 Jun 2016 16:55:38 -0400 Subject: [lustre-devel] [PATCH v2 15/29] staging/lustre/llite: flatten struct lookup_intent In-Reply-To: <1466456152-2199975-1-git-send-email-green@linuxhacker.ru> References: <1466456152-2199975-1-git-send-email-green@linuxhacker.ru> Message-ID: <1466456152-2199975-16-git-send-email-green@linuxhacker.ru> From: "John L. Hammond" Replace the union in struct lookup_intent with the members of struct lustre_indent_data. Remove the then unused struct lustre_intent_data. Signed-off-by: John L. Hammond Reviewed-on: http://review.whamcloud.com/17069 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7403 Reviewed-by: James Simmons Reviewed-by: Dmitry Eremin Reviewed-by: Frank Zago Signed-off-by: Oleg Drokin --- .../staging/lustre/lustre/include/lustre_intent.h | 15 ++-- drivers/staging/lustre/lustre/llite/dcache.c | 26 +++---- drivers/staging/lustre/lustre/llite/dir.c | 4 +- drivers/staging/lustre/lustre/llite/file.c | 44 ++++++------ .../staging/lustre/lustre/llite/llite_internal.h | 14 ++-- drivers/staging/lustre/lustre/llite/llite_lib.c | 4 +- drivers/staging/lustre/lustre/llite/namei.c | 8 +-- drivers/staging/lustre/lustre/llite/statahead.c | 10 +-- drivers/staging/lustre/lustre/llite/xattr_cache.c | 16 ++--- drivers/staging/lustre/lustre/lmv/lmv_intent.c | 26 +++---- drivers/staging/lustre/lustre/lmv/lmv_obd.c | 8 +-- drivers/staging/lustre/lustre/mdc/mdc_locks.c | 79 +++++++++++----------- drivers/staging/lustre/lustre/mdc/mdc_request.c | 2 +- 13 files changed, 125 insertions(+), 131 deletions(-) diff --git a/drivers/staging/lustre/lustre/include/lustre_intent.h b/drivers/staging/lustre/lustre/include/lustre_intent.h index fdc6236..41c03d7 100644 --- a/drivers/staging/lustre/lustre/include/lustre_intent.h +++ b/drivers/staging/lustre/lustre/include/lustre_intent.h @@ -34,7 +34,11 @@ #define LUSTRE_INTENT_H /* intent IT_XXX are defined in lustre/include/obd.h */ -struct lustre_intent_data { + +struct lookup_intent { + int it_op; + int it_create_mode; + __u64 it_flags; int it_disposition; int it_status; __u64 it_lock_handle; @@ -46,13 +50,4 @@ struct lustre_intent_data { unsigned int it_lock_set:1; }; -struct lookup_intent { - int it_op; - int it_create_mode; - __u64 it_flags; - union { - struct lustre_intent_data lustre; - } d; -}; - #endif diff --git a/drivers/staging/lustre/lustre/llite/dcache.c b/drivers/staging/lustre/lustre/llite/dcache.c index f002b3a..c5789f7 100644 --- a/drivers/staging/lustre/lustre/llite/dcache.c +++ b/drivers/staging/lustre/lustre/llite/dcache.c @@ -202,27 +202,27 @@ int ll_d_init(struct dentry *de) void ll_intent_drop_lock(struct lookup_intent *it) { - if (it->it_op && it->d.lustre.it_lock_mode) { + if (it->it_op && it->it_lock_mode) { struct lustre_handle handle; - handle.cookie = it->d.lustre.it_lock_handle; + handle.cookie = it->it_lock_handle; CDEBUG(D_DLMTRACE, "releasing lock with cookie %#llx from it %p\n", handle.cookie, it); - ldlm_lock_decref(&handle, it->d.lustre.it_lock_mode); + ldlm_lock_decref(&handle, it->it_lock_mode); /* bug 494: intent_release may be called multiple times, from * this thread and we don't want to double-decref this lock */ - it->d.lustre.it_lock_mode = 0; - if (it->d.lustre.it_remote_lock_mode != 0) { - handle.cookie = it->d.lustre.it_remote_lock_handle; + it->it_lock_mode = 0; + if (it->it_remote_lock_mode != 0) { + handle.cookie = it->it_remote_lock_handle; CDEBUG(D_DLMTRACE, "releasing remote lock with cookie%#llx from it %p\n", handle.cookie, it); ldlm_lock_decref(&handle, - it->d.lustre.it_remote_lock_mode); - it->d.lustre.it_remote_lock_mode = 0; + it->it_remote_lock_mode); + it->it_remote_lock_mode = 0; } } } @@ -233,13 +233,13 @@ void ll_intent_release(struct lookup_intent *it) ll_intent_drop_lock(it); /* We are still holding extra reference on a request, need to free it */ if (it_disposition(it, DISP_ENQ_OPEN_REF)) - ptlrpc_req_finished(it->d.lustre.it_data); /* ll_file_open */ + ptlrpc_req_finished(it->it_data); /* ll_file_open */ if (it_disposition(it, DISP_ENQ_CREATE_REF)) /* create rec */ - ptlrpc_req_finished(it->d.lustre.it_data); + ptlrpc_req_finished(it->it_data); - it->d.lustre.it_disposition = 0; - it->d.lustre.it_data = NULL; + it->it_disposition = 0; + it->it_data = NULL; } void ll_invalidate_aliases(struct inode *inode) @@ -279,7 +279,7 @@ int ll_revalidate_it_finish(struct ptlrpc_request *request, void ll_lookup_finish_locks(struct lookup_intent *it, struct inode *inode) { - if (it->d.lustre.it_lock_mode && inode) { + if (it->it_lock_mode && inode) { struct ll_sb_info *sbi = ll_i2sbi(inode); CDEBUG(D_DLMTRACE, "setting l_data to inode "DFID"(%p)\n", diff --git a/drivers/staging/lustre/lustre/llite/dir.c b/drivers/staging/lustre/lustre/llite/dir.c index 99735f6..a62df87 100644 --- a/drivers/staging/lustre/lustre/llite/dir.c +++ b/drivers/staging/lustre/lustre/llite/dir.c @@ -362,7 +362,7 @@ struct page *ll_get_dir_page(struct inode *dir, __u64 hash, ll_finish_md_op_data(op_data); - request = (struct ptlrpc_request *)it.d.lustre.it_data; + request = (struct ptlrpc_request *)it.it_data; if (request) ptlrpc_req_finished(request); if (rc < 0) { @@ -374,7 +374,7 @@ struct page *ll_get_dir_page(struct inode *dir, __u64 hash, CDEBUG(D_INODE, "setting lr_lvb_inode to inode "DFID"(%p)\n", PFID(ll_inode2fid(dir)), dir); md_set_lock_data(ll_i2sbi(dir)->ll_md_exp, - &it.d.lustre.it_lock_handle, dir, NULL); + &it.it_lock_handle, dir, NULL); } else { /* for cross-ref object, l_ast_data of the lock may not be set, * we reset it here diff --git a/drivers/staging/lustre/lustre/llite/file.c b/drivers/staging/lustre/lustre/llite/file.c index 5436a54..92fab63 100644 --- a/drivers/staging/lustre/lustre/llite/file.c +++ b/drivers/staging/lustre/lustre/llite/file.c @@ -449,7 +449,7 @@ static int ll_intent_file_open(struct dentry *dentry, void *lmm, } rc = ll_prep_inode(&inode, req, NULL, itp); - if (!rc && itp->d.lustre.it_lock_mode) + if (!rc && itp->it_lock_mode) ll_set_lock_data(sbi->ll_md_exp, inode, itp, NULL); out: @@ -476,13 +476,13 @@ void ll_ioepoch_open(struct ll_inode_info *lli, __u64 ioepoch) static int ll_och_fill(struct obd_export *md_exp, struct lookup_intent *it, struct obd_client_handle *och) { - struct ptlrpc_request *req = it->d.lustre.it_data; + struct ptlrpc_request *req = it->it_data; struct mdt_body *body; body = req_capsule_server_get(&req->rq_pill, &RMF_MDT_BODY); och->och_fh = body->handle; och->och_fid = body->fid1; - och->och_lease_handle.cookie = it->d.lustre.it_lock_handle; + och->och_lease_handle.cookie = it->it_lock_handle; och->och_magic = OBD_CLIENT_HANDLE_MAGIC; och->och_flags = it->it_flags; @@ -500,7 +500,7 @@ static int ll_local_open(struct file *file, struct lookup_intent *it, LASSERT(fd); if (och) { - struct ptlrpc_request *req = it->d.lustre.it_data; + struct ptlrpc_request *req = it->it_data; struct mdt_body *body; int rc; @@ -575,7 +575,7 @@ int ll_file_open(struct inode *inode, struct file *file) return 0; } - if (!it || !it->d.lustre.it_disposition) { + if (!it || !it->it_disposition) { /* Convert f_flags into access mode. We cannot use file->f_mode, * because everything but O_ACCMODE mask was stripped from * there @@ -645,7 +645,7 @@ restart: } } else { LASSERT(*och_usecount == 0); - if (!it->d.lustre.it_disposition) { + if (!it->it_disposition) { /* We cannot just request lock handle now, new ELC code * means that one of other OPEN locks for this file * could be cancelled, and since blocking ast handler @@ -682,7 +682,7 @@ restart: LASSERTF(it_disposition(it, DISP_ENQ_OPEN_REF), "inode %p: disposition %x, status %d\n", inode, - it_disposition(it, ~0), it->d.lustre.it_status); + it_disposition(it, ~0), it->it_status); rc = ll_local_open(file, it, fd, *och_p); if (rc) @@ -725,7 +725,7 @@ out_openerr: } if (it && it_disposition(it, DISP_ENQ_OPEN_REF)) { - ptlrpc_req_finished(it->d.lustre.it_data); + ptlrpc_req_finished(it->it_data); it_clear_disposition(it, DISP_ENQ_OPEN_REF); } @@ -866,12 +866,12 @@ ll_lease_open(struct inode *inode, struct file *file, fmode_t fmode, /* already get lease, handle lease lock */ ll_set_lock_data(sbi->ll_md_exp, inode, &it, NULL); - if (it.d.lustre.it_lock_mode == 0 || - it.d.lustre.it_lock_bits != MDS_INODELOCK_OPEN) { + if (it.it_lock_mode == 0 || + it.it_lock_bits != MDS_INODELOCK_OPEN) { /* open lock must return for lease */ CERROR(DFID "lease granted but no open lock, %d/%llu.\n", - PFID(ll_inode2fid(inode)), it.d.lustre.it_lock_mode, - it.d.lustre.it_lock_bits); + PFID(ll_inode2fid(inode)), it.it_lock_mode, + it.it_lock_bits); rc = -EPROTO; goto out_close; } @@ -881,10 +881,10 @@ ll_lease_open(struct inode *inode, struct file *file, fmode_t fmode, out_close: /* Cancel open lock */ - if (it.d.lustre.it_lock_mode != 0) { + if (it.it_lock_mode != 0) { ldlm_lock_decref_and_cancel(&och->och_lease_handle, - it.d.lustre.it_lock_mode); - it.d.lustre.it_lock_mode = 0; + it.it_lock_mode); + it.it_lock_mode = 0; och->och_lease_handle.cookie = 0ULL; } rc2 = ll_close_inode_openhandle(sbi->ll_md_exp, inode, och, NULL); @@ -1400,7 +1400,7 @@ int ll_lov_setstripe_ea_info(struct inode *inode, struct dentry *dentry, rc = ll_intent_file_open(dentry, lum, lum_size, &oit); if (rc) goto out_unlock; - rc = oit.d.lustre.it_status; + rc = oit.it_status; if (rc < 0) goto out_req_free; @@ -1413,7 +1413,7 @@ out_unlock: out: return rc; out_req_free: - ptlrpc_req_finished((struct ptlrpc_request *)oit.d.lustre.it_data); + ptlrpc_req_finished((struct ptlrpc_request *)oit.it_data); goto out; } @@ -1701,7 +1701,7 @@ int ll_release_openhandle(struct inode *inode, struct lookup_intent *it) out: /* this one is in place of ll_file_open */ if (it_disposition(it, DISP_ENQ_OPEN_REF)) { - ptlrpc_req_finished(it->d.lustre.it_data); + ptlrpc_req_finished(it->it_data); it_clear_disposition(it, DISP_ENQ_OPEN_REF); } return rc; @@ -3610,13 +3610,13 @@ again: rc = md_enqueue(sbi->ll_md_exp, &einfo, &it, op_data, &lockh, NULL, 0, NULL, 0); - ptlrpc_req_finished(it.d.lustre.it_data); - it.d.lustre.it_data = NULL; + ptlrpc_req_finished(it.it_data); + it.it_data = NULL; ll_finish_md_op_data(op_data); - mode = it.d.lustre.it_lock_mode; - it.d.lustre.it_lock_mode = 0; + mode = it.it_lock_mode; + it.it_lock_mode = 0; ll_intent_drop_lock(&it); if (rc == 0) { diff --git a/drivers/staging/lustre/lustre/llite/llite_internal.h b/drivers/staging/lustre/lustre/llite/llite_internal.h index 098155f..3692102 100644 --- a/drivers/staging/lustre/lustre/llite/llite_internal.h +++ b/drivers/staging/lustre/lustre/llite/llite_internal.h @@ -1280,7 +1280,7 @@ static inline int ll_file_nolock(const struct file *file) static inline void ll_set_lock_data(struct obd_export *exp, struct inode *inode, struct lookup_intent *it, __u64 *bits) { - if (!it->d.lustre.it_lock_set) { + if (!it->it_lock_set) { struct lustre_handle handle; /* If this inode is a remote object, it will get two @@ -1291,26 +1291,26 @@ static inline void ll_set_lock_data(struct obd_export *exp, struct inode *inode, * LOOKUP and PERM locks, so revoking either locks will * case the dcache being cleared */ - if (it->d.lustre.it_remote_lock_mode) { - handle.cookie = it->d.lustre.it_remote_lock_handle; + if (it->it_remote_lock_mode) { + handle.cookie = it->it_remote_lock_handle; CDEBUG(D_DLMTRACE, "setting l_data to inode "DFID"%p for remote lock %#llx\n", PFID(ll_inode2fid(inode)), inode, handle.cookie); md_set_lock_data(exp, &handle.cookie, inode, NULL); } - handle.cookie = it->d.lustre.it_lock_handle; + handle.cookie = it->it_lock_handle; CDEBUG(D_DLMTRACE, "setting l_data to inode "DFID"%p for lock %#llx\n", PFID(ll_inode2fid(inode)), inode, handle.cookie); md_set_lock_data(exp, &handle.cookie, inode, - &it->d.lustre.it_lock_bits); - it->d.lustre.it_lock_set = 1; + &it->it_lock_bits); + it->it_lock_set = 1; } if (bits) - *bits = it->d.lustre.it_lock_bits; + *bits = it->it_lock_bits; } static inline int d_lustre_invalid(const struct dentry *dentry) diff --git a/drivers/staging/lustre/lustre/llite/llite_lib.c b/drivers/staging/lustre/lustre/llite/llite_lib.c index 83f4e1a..539fdd1 100644 --- a/drivers/staging/lustre/lustre/llite/llite_lib.c +++ b/drivers/staging/lustre/lustre/llite/llite_lib.c @@ -1998,11 +1998,11 @@ int ll_prep_inode(struct inode **inode, struct ptlrpc_request *req, * 3. proc2: refresh layout and layout lock granted * 4. proc1: to apply a stale layout */ - if (it && it->d.lustre.it_lock_mode != 0) { + if (it && it->it_lock_mode != 0) { struct lustre_handle lockh; struct ldlm_lock *lock; - lockh.cookie = it->d.lustre.it_lock_handle; + lockh.cookie = it->it_lock_handle; lock = ldlm_handle2lock(&lockh); LASSERT(lock); if (ldlm_has_layout(lock)) { diff --git a/drivers/staging/lustre/lustre/llite/namei.c b/drivers/staging/lustre/lustre/llite/namei.c index e4df510..7a6da02 100644 --- a/drivers/staging/lustre/lustre/llite/namei.c +++ b/drivers/staging/lustre/lustre/llite/namei.c @@ -393,7 +393,7 @@ static int ll_lookup_it_finish(struct ptlrpc_request *request, * when I return */ CDEBUG(D_DENTRY, "it %p it_disposition %x\n", it, - it->d.lustre.it_disposition); + it->it_disposition); if (!it_disposition(it, DISP_LOOKUP_NEG)) { rc = ll_prep_inode(&inode, request, (*de)->d_sb, it); if (rc) @@ -445,7 +445,7 @@ static int ll_lookup_it_finish(struct ptlrpc_request *request, /* Check that parent has UPDATE lock. */ struct lookup_intent parent_it = { .it_op = IT_GETATTR, - .d.lustre.it_lock_handle = 0 }; + .it_lock_handle = 0 }; if (md_revalidate_lock(ll_i2mdexp(parent), &parent_it, &ll_i2info(parent)->lli_fid, NULL)) { @@ -656,10 +656,10 @@ static struct inode *ll_create_node(struct inode *dir, struct lookup_intent *it) struct ll_sb_info *sbi = ll_i2sbi(dir); int rc; - LASSERT(it && it->d.lustre.it_disposition); + LASSERT(it && it->it_disposition); LASSERT(it_disposition(it, DISP_ENQ_CREATE_REF)); - request = it->d.lustre.it_data; + request = it->it_data; it_clear_disposition(it, DISP_ENQ_CREATE_REF); rc = ll_prep_inode(&inode, request, dir->i_sb, it); if (rc) { diff --git a/drivers/staging/lustre/lustre/llite/statahead.c b/drivers/staging/lustre/lustre/llite/statahead.c index 03ad858..f775242 100644 --- a/drivers/staging/lustre/lustre/llite/statahead.c +++ b/drivers/staging/lustre/lustre/llite/statahead.c @@ -646,7 +646,7 @@ static void ll_post_statahead(struct ll_statahead_info *sai) } } - it->d.lustre.it_lock_handle = entry->se_handle; + it->it_lock_handle = entry->se_handle; rc = md_revalidate_lock(ll_i2mdexp(dir), it, ll_inode2fid(dir), NULL); if (rc != 1) { rc = -EAGAIN; @@ -700,7 +700,7 @@ static int ll_statahead_interpret(struct ptlrpc_request *req, * process enqueues lock on child with parent lock held, eg. * unlink. */ - handle = it->d.lustre.it_lock_handle; + handle = it->it_lock_handle; ll_intent_drop_lock(it); } @@ -850,7 +850,7 @@ static int do_sa_revalidate(struct inode *dir, struct ll_sa_entry *entry, { struct inode *inode = d_inode(dentry); struct lookup_intent it = { .it_op = IT_GETATTR, - .d.lustre.it_lock_handle = 0 }; + .it_lock_handle = 0 }; struct md_enqueue_info *minfo; struct ldlm_enqueue_info *einfo; int rc; @@ -865,7 +865,7 @@ static int do_sa_revalidate(struct inode *dir, struct ll_sa_entry *entry, rc = md_revalidate_lock(ll_i2mdexp(dir), &it, ll_inode2fid(inode), NULL); if (rc == 1) { - entry->se_handle = it.d.lustre.it_lock_handle; + entry->se_handle = it.it_lock_handle; ll_intent_release(&it); return 1; } @@ -1569,7 +1569,7 @@ int do_statahead_enter(struct inode *dir, struct dentry **dentryp, if (entry->se_stat == SA_ENTRY_SUCC && entry->se_inode) { struct inode *inode = entry->se_inode; struct lookup_intent it = { .it_op = IT_GETATTR, - .d.lustre.it_lock_handle = + .it_lock_handle = entry->se_handle }; __u64 bits; diff --git a/drivers/staging/lustre/lustre/llite/xattr_cache.c b/drivers/staging/lustre/lustre/llite/xattr_cache.c index d7e17ab..0d19645 100644 --- a/drivers/staging/lustre/lustre/llite/xattr_cache.c +++ b/drivers/staging/lustre/lustre/llite/xattr_cache.c @@ -288,8 +288,8 @@ static int ll_xattr_find_get_lock(struct inode *inode, LCK_PR); if (mode != 0) { /* fake oit in mdc_revalidate_lock() manner */ - oit->d.lustre.it_lock_handle = lockh.cookie; - oit->d.lustre.it_lock_mode = mode; + oit->it_lock_handle = lockh.cookie; + oit->it_lock_mode = mode; goto out; } } @@ -315,7 +315,7 @@ static int ll_xattr_find_get_lock(struct inode *inode, return rc; } - *req = (struct ptlrpc_request *)oit->d.lustre.it_data; + *req = (struct ptlrpc_request *)oit->it_data; out: down_write(&lli->lli_xattrs_list_rwsem); mutex_unlock(&lli->lli_xattrs_enq_lock); @@ -362,10 +362,10 @@ static int ll_xattr_cache_refill(struct inode *inode, struct lookup_intent *oit) goto out_maybe_drop; } - if (oit->d.lustre.it_status < 0) { + if (oit->it_status < 0) { CDEBUG(D_CACHE, "getxattr intent returned %d for fid "DFID"\n", - oit->d.lustre.it_status, PFID(ll_inode2fid(inode))); - rc = oit->d.lustre.it_status; + oit->it_status, PFID(ll_inode2fid(inode))); + rc = oit->it_status; /* xattr data is so large that we don't want to cache it */ if (rc == -ERANGE) rc = -EAGAIN; @@ -448,8 +448,8 @@ out_destroy: up_write(&lli->lli_xattrs_list_rwsem); ldlm_lock_decref_and_cancel((struct lustre_handle *) - &oit->d.lustre.it_lock_handle, - oit->d.lustre.it_lock_mode); + &oit->it_lock_handle, + oit->it_lock_mode); goto out_no_unlock; } diff --git a/drivers/staging/lustre/lustre/lmv/lmv_intent.c b/drivers/staging/lustre/lustre/lmv/lmv_intent.c index 980c9d4..b3cff23 100644 --- a/drivers/staging/lustre/lustre/lmv/lmv_intent.c +++ b/drivers/staging/lustre/lustre/lmv/lmv_intent.c @@ -80,11 +80,11 @@ static int lmv_intent_remote(struct obd_export *exp, void *lmm, /* * We got LOOKUP lock, but we really need attrs. */ - pmode = it->d.lustre.it_lock_mode; + pmode = it->it_lock_mode; if (pmode) { - plock.cookie = it->d.lustre.it_lock_handle; - it->d.lustre.it_lock_mode = 0; - it->d.lustre.it_data = NULL; + plock.cookie = it->it_lock_handle; + it->it_lock_mode = 0; + it->it_data = NULL; } LASSERT(fid_is_sane(&body->fid1)); @@ -130,14 +130,14 @@ static int lmv_intent_remote(struct obd_export *exp, void *lmm, * maintain dcache consistency. Thus drop UPDATE|PERM lock here * and put LOOKUP in request. */ - if (it->d.lustre.it_lock_mode != 0) { - it->d.lustre.it_remote_lock_handle = - it->d.lustre.it_lock_handle; - it->d.lustre.it_remote_lock_mode = it->d.lustre.it_lock_mode; + if (it->it_lock_mode != 0) { + it->it_remote_lock_handle = + it->it_lock_handle; + it->it_remote_lock_mode = it->it_lock_mode; } - it->d.lustre.it_lock_handle = plock.cookie; - it->d.lustre.it_lock_mode = pmode; + it->it_lock_handle = plock.cookie; + it->it_lock_mode = pmode; out_free_op_data: kfree(op_data); @@ -197,9 +197,9 @@ static int lmv_intent_open(struct obd_export *exp, struct md_op_data *op_data, * Nothing is found, do not access body->fid1 as it is zero and thus * pointless. */ - if ((it->d.lustre.it_disposition & DISP_LOOKUP_NEG) && - !(it->d.lustre.it_disposition & DISP_OPEN_CREATE) && - !(it->d.lustre.it_disposition & DISP_OPEN_OPEN)) + if ((it->it_disposition & DISP_LOOKUP_NEG) && + !(it->it_disposition & DISP_OPEN_CREATE) && + !(it->it_disposition & DISP_OPEN_OPEN)) return rc; body = req_capsule_server_get(&(*reqp)->rq_pill, &RMF_MDT_BODY); diff --git a/drivers/staging/lustre/lustre/lmv/lmv_obd.c b/drivers/staging/lustre/lustre/lmv/lmv_obd.c index ab4f4fb..eb675fa 100644 --- a/drivers/staging/lustre/lustre/lmv/lmv_obd.c +++ b/drivers/staging/lustre/lustre/lmv/lmv_obd.c @@ -1679,7 +1679,7 @@ lmv_enqueue_remote(struct obd_export *exp, struct ldlm_enqueue_info *einfo, struct lustre_handle *lockh, void *lmm, int lmmsize, __u64 extra_lock_flags) { - struct ptlrpc_request *req = it->d.lustre.it_data; + struct ptlrpc_request *req = it->it_data; struct obd_device *obd = exp->exp_obd; struct lmv_obd *lmv = &obd->u.lmv; struct lustre_handle plock; @@ -1701,11 +1701,11 @@ lmv_enqueue_remote(struct obd_export *exp, struct ldlm_enqueue_info *einfo, /* * We got LOOKUP lock, but we really need attrs. */ - pmode = it->d.lustre.it_lock_mode; + pmode = it->it_lock_mode; LASSERT(pmode != 0); memcpy(&plock, lockh, sizeof(plock)); - it->d.lustre.it_lock_mode = 0; - it->d.lustre.it_data = NULL; + it->it_lock_mode = 0; + it->it_data = NULL; fid1 = body->fid1; ptlrpc_req_finished(req); diff --git a/drivers/staging/lustre/lustre/mdc/mdc_locks.c b/drivers/staging/lustre/lustre/mdc/mdc_locks.c index 19b549c..5da2a1e 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_locks.c +++ b/drivers/staging/lustre/lustre/mdc/mdc_locks.c @@ -52,19 +52,19 @@ struct mdc_getattr_args { int it_disposition(struct lookup_intent *it, int flag) { - return it->d.lustre.it_disposition & flag; + return it->it_disposition & flag; } EXPORT_SYMBOL(it_disposition); void it_set_disposition(struct lookup_intent *it, int flag) { - it->d.lustre.it_disposition |= flag; + it->it_disposition |= flag; } EXPORT_SYMBOL(it_set_disposition); void it_clear_disposition(struct lookup_intent *it, int flag) { - it->d.lustre.it_disposition &= ~flag; + it->it_disposition &= ~flag; } EXPORT_SYMBOL(it_clear_disposition); @@ -72,39 +72,39 @@ int it_open_error(int phase, struct lookup_intent *it) { if (it_disposition(it, DISP_OPEN_LEASE)) { if (phase >= DISP_OPEN_LEASE) - return it->d.lustre.it_status; + return it->it_status; else return 0; } if (it_disposition(it, DISP_OPEN_OPEN)) { if (phase >= DISP_OPEN_OPEN) - return it->d.lustre.it_status; + return it->it_status; else return 0; } if (it_disposition(it, DISP_OPEN_CREATE)) { if (phase >= DISP_OPEN_CREATE) - return it->d.lustre.it_status; + return it->it_status; else return 0; } if (it_disposition(it, DISP_LOOKUP_EXECD)) { if (phase >= DISP_LOOKUP_EXECD) - return it->d.lustre.it_status; + return it->it_status; else return 0; } if (it_disposition(it, DISP_IT_EXECD)) { if (phase >= DISP_IT_EXECD) - return it->d.lustre.it_status; + return it->it_status; else return 0; } - CERROR("it disp: %X, status: %d\n", it->d.lustre.it_disposition, - it->d.lustre.it_status); + CERROR("it disp: %X, status: %d\n", it->it_disposition, + it->it_status); LBUG(); return 0; } @@ -551,7 +551,6 @@ static int mdc_finish_enqueue(struct obd_export *exp, struct req_capsule *pill = &req->rq_pill; struct ldlm_request *lockreq; struct ldlm_reply *lockrep; - struct lustre_intent_data *intent = &it->d.lustre; struct ldlm_lock *lock; void *lvb_data = NULL; int lvb_len = 0; @@ -585,17 +584,17 @@ static int mdc_finish_enqueue(struct obd_export *exp, lockrep = req_capsule_server_get(pill, &RMF_DLM_REP); - intent->it_disposition = (int)lockrep->lock_policy_res1; - intent->it_status = (int)lockrep->lock_policy_res2; - intent->it_lock_mode = einfo->ei_mode; - intent->it_lock_handle = lockh->cookie; - intent->it_data = req; + it->it_disposition = (int)lockrep->lock_policy_res1; + it->it_status = (int)lockrep->lock_policy_res2; + it->it_lock_mode = einfo->ei_mode; + it->it_lock_handle = lockh->cookie; + it->it_data = req; /* Technically speaking rq_transno must already be zero if * it_status is in error, so the check is a bit redundant */ - if ((!req->rq_transno || intent->it_status < 0) && req->rq_replay) - mdc_clear_replay_flag(req, intent->it_status); + if ((!req->rq_transno || it->it_status < 0) && req->rq_replay) + mdc_clear_replay_flag(req, it->it_status); /* If we're doing an IT_OPEN which did not result in an actual * successful open, then we need to remove the bit which saves @@ -606,11 +605,11 @@ static int mdc_finish_enqueue(struct obd_export *exp, * (bug 3440) */ if (it->it_op & IT_OPEN && req->rq_replay && - (!it_disposition(it, DISP_OPEN_OPEN) || intent->it_status != 0)) - mdc_clear_replay_flag(req, intent->it_status); + (!it_disposition(it, DISP_OPEN_OPEN) || it->it_status != 0)) + mdc_clear_replay_flag(req, it->it_status); DEBUG_REQ(D_RPCTRACE, req, "op: %d disposition: %x, status: %d", - it->it_op, intent->it_disposition, intent->it_status); + it->it_op, it->it_disposition, it->it_status); /* We know what to expect, so we do any byte flipping required here */ if (it->it_op & (IT_OPEN | IT_UNLINK | IT_LOOKUP | IT_GETATTR)) { @@ -919,9 +918,9 @@ resend: } ptlrpc_req_finished(req); - it->d.lustre.it_lock_handle = 0; - it->d.lustre.it_lock_mode = 0; - it->d.lustre.it_data = NULL; + it->it_lock_handle = 0; + it->it_lock_mode = 0; + it->it_data = NULL; } return rc; @@ -945,8 +944,8 @@ static int mdc_finish_intent_lock(struct obd_export *exp, /* The server failed before it even started executing the * intent, i.e. because it couldn't unpack the request. */ - LASSERT(it->d.lustre.it_status != 0); - return it->d.lustre.it_status; + LASSERT(it->it_status != 0); + return it->it_status; } rc = it_open_error(DISP_IT_EXECD, it); if (rc) @@ -1029,15 +1028,15 @@ static int mdc_finish_intent_lock(struct obd_export *exp, LDLM_IBITS, &policy, LCK_NL, &old_lock, 0)) { ldlm_lock_decref_and_cancel(lockh, - it->d.lustre.it_lock_mode); + it->it_lock_mode); memcpy(lockh, &old_lock, sizeof(old_lock)); - it->d.lustre.it_lock_handle = lockh->cookie; + it->it_lock_handle = lockh->cookie; } } CDEBUG(D_DENTRY, "D_IT dentry %.*s intent: %s status %d disp %x rc %d\n", op_data->op_namelen, op_data->op_name, ldlm_it2str(it->it_op), - it->d.lustre.it_status, it->d.lustre.it_disposition, rc); + it->it_status, it->it_disposition, rc); return rc; } @@ -1053,8 +1052,8 @@ int mdc_revalidate_lock(struct obd_export *exp, struct lookup_intent *it, ldlm_policy_data_t policy; enum ldlm_mode mode; - if (it->d.lustre.it_lock_handle) { - lockh.cookie = it->d.lustre.it_lock_handle; + if (it->it_lock_handle) { + lockh.cookie = it->it_lock_handle; mode = ldlm_revalidate_lock_handle(&lockh, bits); } else { fid_build_reg_res_name(fid, &res_id); @@ -1095,11 +1094,11 @@ int mdc_revalidate_lock(struct obd_export *exp, struct lookup_intent *it, } if (mode) { - it->d.lustre.it_lock_handle = lockh.cookie; - it->d.lustre.it_lock_mode = mode; + it->it_lock_handle = lockh.cookie; + it->it_lock_mode = mode; } else { - it->d.lustre.it_lock_handle = 0; - it->d.lustre.it_lock_mode = 0; + it->it_lock_handle = 0; + it->it_lock_mode = 0; } return !!mode; @@ -1121,15 +1120,15 @@ int mdc_revalidate_lock(struct obd_export *exp, struct lookup_intent *it, * ll_create/ll_open gets called. * * The server will return to us, in it_disposition, an indication of - * exactly what d.lustre.it_status refers to. + * exactly what it_status refers to. * - * If DISP_OPEN_OPEN is set, then d.lustre.it_status refers to the open() call, + * If DISP_OPEN_OPEN is set, then it_status refers to the open() call, * otherwise if DISP_OPEN_CREATE is set, then it status is the * creation failure mode. In either case, one of DISP_LOOKUP_NEG or * DISP_LOOKUP_POS will be set, indicating whether the child lookup * was successful. * - * Else, if DISP_LOOKUP_EXECD then d.lustre.it_status is the rc of the + * Else, if DISP_LOOKUP_EXECD then it_status is the rc of the * child lookup. */ int mdc_intent_lock(struct obd_export *exp, struct md_op_data *op_data, @@ -1162,7 +1161,7 @@ int mdc_intent_lock(struct obd_export *exp, struct md_op_data *op_data, * be called in revalidate_it if we already have a lock, let's * verify that. */ - it->d.lustre.it_lock_handle = 0; + it->it_lock_handle = 0; rc = mdc_revalidate_lock(exp, it, &op_data->op_fid2, NULL); /* Only return failure if it was not GETATTR by cfid * (from inode_revalidate) @@ -1184,7 +1183,7 @@ int mdc_intent_lock(struct obd_export *exp, struct md_op_data *op_data, if (rc < 0) return rc; - *reqp = it->d.lustre.it_data; + *reqp = it->it_data; rc = mdc_finish_intent_lock(exp, *reqp, op_data, it, &lockh); return rc; } diff --git a/drivers/staging/lustre/lustre/mdc/mdc_request.c b/drivers/staging/lustre/lustre/mdc/mdc_request.c index f371e1d..7f5dfb0 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_request.c +++ b/drivers/staging/lustre/lustre/mdc/mdc_request.c @@ -661,7 +661,7 @@ int mdc_set_open_replay_data(struct obd_export *exp, struct md_open_data *mod; struct mdt_rec_create *rec; struct mdt_body *body; - struct ptlrpc_request *open_req = it->d.lustre.it_data; + struct ptlrpc_request *open_req = it->it_data; struct obd_import *imp = open_req->rq_import; if (!open_req->rq_replay) -- 2.7.4 From green at linuxhacker.ru Mon Jun 20 20:55:43 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Mon, 20 Jun 2016 16:55:43 -0400 Subject: [lustre-devel] [PATCH v2 20/29] staging/lustre/mdc: Zero atime in close RPC In-Reply-To: <1466456152-2199975-1-git-send-email-green@linuxhacker.ru> References: <1466456152-2199975-1-git-send-email-green@linuxhacker.ru> Message-ID: <1466456152-2199975-21-git-send-email-green@linuxhacker.ru> From: Niu Yawei While atime on close is supposed to only increase, there's a bug in some older server versions where atime from a client is taken no matter the value that allows a stale client atime to overwrite a correct value. Update atime in close rpc to 0 to help such servers out. Signed-off-by: Niu Yawei Reviewed-on: http://review.whamcloud.com/19932 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8041 Reviewed-by: Andreas Dilger Reviewed-by: Jinshan Xiong Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/mdc/mdc_lib.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/staging/lustre/lustre/mdc/mdc_lib.c b/drivers/staging/lustre/lustre/mdc/mdc_lib.c index 2703113..143bd76 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_lib.c +++ b/drivers/staging/lustre/lustre/mdc/mdc_lib.c @@ -467,6 +467,18 @@ void mdc_close_pack(struct ptlrpc_request *req, struct md_op_data *op_data) rec = req_capsule_client_get(&req->rq_pill, &RMF_REC_REINT); mdc_setattr_pack_rec(rec, op_data); + /* + * The client will zero out local timestamps when losing the IBITS lock + * so any new RPC timestamps will update the client inode's timestamps. + * There was a defect on the server side which allowed the atime to be + * overwritten by a zeroed-out atime packed into the close RPC. + * + * Proactively clear the MDS_ATTR_ATIME flag in the RPC in this case + * to avoid zeroing the atime on old unpatched servers. See LU-8041. + */ + if (rec->sa_atime == 0) + rec->sa_valid &= ~MDS_ATTR_ATIME; + mdc_ioepoch_pack(epoch, op_data); mdc_hsm_release_pack(req, op_data); } -- 2.7.4 From green at linuxhacker.ru Mon Jun 20 20:55:40 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Mon, 20 Jun 2016 16:55:40 -0400 Subject: [lustre-devel] [PATCH v2 17/29] staging/lustre/llite: change it_data to it_request In-Reply-To: <1466456152-2199975-1-git-send-email-green@linuxhacker.ru> References: <1466456152-2199975-1-git-send-email-green@linuxhacker.ru> Message-ID: <1466456152-2199975-18-git-send-email-green@linuxhacker.ru> From: "John L. Hammond" Change the void *it_data member of struct lookup_intent to struct ptlrpc_request *it_request. Signed-off-by: John L. Hammond Reviewed-on: http://review.whamcloud.com/17070 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7403 Reviewed-by: Andreas Dilger Reviewed-by: James Simmons Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/include/lustre_intent.h | 2 +- drivers/staging/lustre/lustre/llite/dcache.c | 6 +++--- drivers/staging/lustre/lustre/llite/dir.c | 2 +- drivers/staging/lustre/lustre/llite/file.c | 17 ++++++++--------- drivers/staging/lustre/lustre/llite/namei.c | 2 +- drivers/staging/lustre/lustre/llite/xattr_cache.c | 2 +- drivers/staging/lustre/lustre/lmv/lmv_intent.c | 2 +- drivers/staging/lustre/lustre/lmv/lmv_obd.c | 4 ++-- drivers/staging/lustre/lustre/mdc/mdc_locks.c | 6 +++--- drivers/staging/lustre/lustre/mdc/mdc_request.c | 2 +- 10 files changed, 22 insertions(+), 23 deletions(-) diff --git a/drivers/staging/lustre/lustre/include/lustre_intent.h b/drivers/staging/lustre/lustre/include/lustre_intent.h index 3aed810..ed2b6c6 100644 --- a/drivers/staging/lustre/lustre/include/lustre_intent.h +++ b/drivers/staging/lustre/lustre/include/lustre_intent.h @@ -46,7 +46,7 @@ struct lookup_intent { int it_lock_mode; int it_remote_lock_mode; __u64 it_remote_lock_handle; - void *it_data; + struct ptlrpc_request *it_request; unsigned int it_lock_set:1; }; diff --git a/drivers/staging/lustre/lustre/llite/dcache.c b/drivers/staging/lustre/lustre/llite/dcache.c index c5789f7..d964f4f 100644 --- a/drivers/staging/lustre/lustre/llite/dcache.c +++ b/drivers/staging/lustre/lustre/llite/dcache.c @@ -233,13 +233,13 @@ void ll_intent_release(struct lookup_intent *it) ll_intent_drop_lock(it); /* We are still holding extra reference on a request, need to free it */ if (it_disposition(it, DISP_ENQ_OPEN_REF)) - ptlrpc_req_finished(it->it_data); /* ll_file_open */ + ptlrpc_req_finished(it->it_request); /* ll_file_open */ if (it_disposition(it, DISP_ENQ_CREATE_REF)) /* create rec */ - ptlrpc_req_finished(it->it_data); + ptlrpc_req_finished(it->it_request); it->it_disposition = 0; - it->it_data = NULL; + it->it_request = NULL; } void ll_invalidate_aliases(struct inode *inode) diff --git a/drivers/staging/lustre/lustre/llite/dir.c b/drivers/staging/lustre/lustre/llite/dir.c index a62df87..f0eb64b 100644 --- a/drivers/staging/lustre/lustre/llite/dir.c +++ b/drivers/staging/lustre/lustre/llite/dir.c @@ -362,7 +362,7 @@ struct page *ll_get_dir_page(struct inode *dir, __u64 hash, ll_finish_md_op_data(op_data); - request = (struct ptlrpc_request *)it.it_data; + request = (struct ptlrpc_request *)it.it_request; if (request) ptlrpc_req_finished(request); if (rc < 0) { diff --git a/drivers/staging/lustre/lustre/llite/file.c b/drivers/staging/lustre/lustre/llite/file.c index 92fab63..a188366 100644 --- a/drivers/staging/lustre/lustre/llite/file.c +++ b/drivers/staging/lustre/lustre/llite/file.c @@ -476,10 +476,9 @@ void ll_ioepoch_open(struct ll_inode_info *lli, __u64 ioepoch) static int ll_och_fill(struct obd_export *md_exp, struct lookup_intent *it, struct obd_client_handle *och) { - struct ptlrpc_request *req = it->it_data; struct mdt_body *body; - body = req_capsule_server_get(&req->rq_pill, &RMF_MDT_BODY); + body = req_capsule_server_get(&it->it_request->rq_pill, &RMF_MDT_BODY); och->och_fh = body->handle; och->och_fid = body->fid1; och->och_lease_handle.cookie = it->it_lock_handle; @@ -500,7 +499,6 @@ static int ll_local_open(struct file *file, struct lookup_intent *it, LASSERT(fd); if (och) { - struct ptlrpc_request *req = it->it_data; struct mdt_body *body; int rc; @@ -508,7 +506,8 @@ static int ll_local_open(struct file *file, struct lookup_intent *it, if (rc != 0) return rc; - body = req_capsule_server_get(&req->rq_pill, &RMF_MDT_BODY); + body = req_capsule_server_get(&it->it_request->rq_pill, + &RMF_MDT_BODY); ll_ioepoch_open(lli, body->ioepoch); } @@ -725,7 +724,7 @@ out_openerr: } if (it && it_disposition(it, DISP_ENQ_OPEN_REF)) { - ptlrpc_req_finished(it->it_data); + ptlrpc_req_finished(it->it_request); it_clear_disposition(it, DISP_ENQ_OPEN_REF); } @@ -1413,7 +1412,7 @@ out_unlock: out: return rc; out_req_free: - ptlrpc_req_finished((struct ptlrpc_request *)oit.it_data); + ptlrpc_req_finished((struct ptlrpc_request *)oit.it_request); goto out; } @@ -1701,7 +1700,7 @@ int ll_release_openhandle(struct inode *inode, struct lookup_intent *it) out: /* this one is in place of ll_file_open */ if (it_disposition(it, DISP_ENQ_OPEN_REF)) { - ptlrpc_req_finished(it->it_data); + ptlrpc_req_finished(it->it_request); it_clear_disposition(it, DISP_ENQ_OPEN_REF); } return rc; @@ -3610,8 +3609,8 @@ again: rc = md_enqueue(sbi->ll_md_exp, &einfo, &it, op_data, &lockh, NULL, 0, NULL, 0); - ptlrpc_req_finished(it.it_data); - it.it_data = NULL; + ptlrpc_req_finished(it.it_request); + it.it_request = NULL; ll_finish_md_op_data(op_data); diff --git a/drivers/staging/lustre/lustre/llite/namei.c b/drivers/staging/lustre/lustre/llite/namei.c index 7a6da02..3664bfd 100644 --- a/drivers/staging/lustre/lustre/llite/namei.c +++ b/drivers/staging/lustre/lustre/llite/namei.c @@ -659,7 +659,7 @@ static struct inode *ll_create_node(struct inode *dir, struct lookup_intent *it) LASSERT(it && it->it_disposition); LASSERT(it_disposition(it, DISP_ENQ_CREATE_REF)); - request = it->it_data; + request = it->it_request; it_clear_disposition(it, DISP_ENQ_CREATE_REF); rc = ll_prep_inode(&inode, request, dir->i_sb, it); if (rc) { diff --git a/drivers/staging/lustre/lustre/llite/xattr_cache.c b/drivers/staging/lustre/lustre/llite/xattr_cache.c index 0d19645..8089da8 100644 --- a/drivers/staging/lustre/lustre/llite/xattr_cache.c +++ b/drivers/staging/lustre/lustre/llite/xattr_cache.c @@ -315,7 +315,7 @@ static int ll_xattr_find_get_lock(struct inode *inode, return rc; } - *req = (struct ptlrpc_request *)oit->it_data; + *req = oit->it_request; out: down_write(&lli->lli_xattrs_list_rwsem); mutex_unlock(&lli->lli_xattrs_enq_lock); diff --git a/drivers/staging/lustre/lustre/lmv/lmv_intent.c b/drivers/staging/lustre/lustre/lmv/lmv_intent.c index b3cff23..2f58fda 100644 --- a/drivers/staging/lustre/lustre/lmv/lmv_intent.c +++ b/drivers/staging/lustre/lustre/lmv/lmv_intent.c @@ -84,7 +84,7 @@ static int lmv_intent_remote(struct obd_export *exp, void *lmm, if (pmode) { plock.cookie = it->it_lock_handle; it->it_lock_mode = 0; - it->it_data = NULL; + it->it_request = NULL; } LASSERT(fid_is_sane(&body->fid1)); diff --git a/drivers/staging/lustre/lustre/lmv/lmv_obd.c b/drivers/staging/lustre/lustre/lmv/lmv_obd.c index eb675fa..210ed1e 100644 --- a/drivers/staging/lustre/lustre/lmv/lmv_obd.c +++ b/drivers/staging/lustre/lustre/lmv/lmv_obd.c @@ -1679,7 +1679,7 @@ lmv_enqueue_remote(struct obd_export *exp, struct ldlm_enqueue_info *einfo, struct lustre_handle *lockh, void *lmm, int lmmsize, __u64 extra_lock_flags) { - struct ptlrpc_request *req = it->it_data; + struct ptlrpc_request *req = it->it_request; struct obd_device *obd = exp->exp_obd; struct lmv_obd *lmv = &obd->u.lmv; struct lustre_handle plock; @@ -1705,7 +1705,7 @@ lmv_enqueue_remote(struct obd_export *exp, struct ldlm_enqueue_info *einfo, LASSERT(pmode != 0); memcpy(&plock, lockh, sizeof(plock)); it->it_lock_mode = 0; - it->it_data = NULL; + it->it_request = NULL; fid1 = body->fid1; ptlrpc_req_finished(req); diff --git a/drivers/staging/lustre/lustre/mdc/mdc_locks.c b/drivers/staging/lustre/lustre/mdc/mdc_locks.c index c43b3a2..c1f8da6 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_locks.c +++ b/drivers/staging/lustre/lustre/mdc/mdc_locks.c @@ -570,7 +570,7 @@ static int mdc_finish_enqueue(struct obd_export *exp, it->it_status = (int)lockrep->lock_policy_res2; it->it_lock_mode = einfo->ei_mode; it->it_lock_handle = lockh->cookie; - it->it_data = req; + it->it_request = req; /* Technically speaking rq_transno must already be zero if * it_status is in error, so the check is a bit redundant @@ -902,7 +902,7 @@ resend: it->it_lock_handle = 0; it->it_lock_mode = 0; - it->it_data = NULL; + it->it_request = NULL; } return rc; @@ -1165,7 +1165,7 @@ int mdc_intent_lock(struct obd_export *exp, struct md_op_data *op_data, if (rc < 0) return rc; - *reqp = it->it_data; + *reqp = it->it_request; rc = mdc_finish_intent_lock(exp, *reqp, op_data, it, &lockh); return rc; } diff --git a/drivers/staging/lustre/lustre/mdc/mdc_request.c b/drivers/staging/lustre/lustre/mdc/mdc_request.c index 7f5dfb0..2622eb3 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_request.c +++ b/drivers/staging/lustre/lustre/mdc/mdc_request.c @@ -661,7 +661,7 @@ int mdc_set_open_replay_data(struct obd_export *exp, struct md_open_data *mod; struct mdt_rec_create *rec; struct mdt_body *body; - struct ptlrpc_request *open_req = it->it_data; + struct ptlrpc_request *open_req = it->it_request; struct obd_import *imp = open_req->rq_import; if (!open_req->rq_replay) -- 2.7.4 From green at linuxhacker.ru Mon Jun 20 20:55:42 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Mon, 20 Jun 2016 16:55:42 -0400 Subject: [lustre-devel] [PATCH v2 19/29] staging/lustre/llite: ensure obd is effective in onu_upcall In-Reply-To: <1466456152-2199975-1-git-send-email-green@linuxhacker.ru> References: <1466456152-2199975-1-git-send-email-green@linuxhacker.ru> Message-ID: <1466456152-2199975-20-git-send-email-green@linuxhacker.ru> From: Yang Sheng The watched obd device may still not setup while onu_upcall invoked. So we need verify it in cl_ocd_update. Signed-off-by: Yang Sheng Reviewed-on: http://review.whamcloud.com/19597 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8027 Reviewed-by: Niu Yawei Reviewed-by: Lai Siyao Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/llite/lcommon_misc.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/staging/lustre/lustre/llite/lcommon_misc.c b/drivers/staging/lustre/lustre/llite/lcommon_misc.c index 8a508ed..f6be105 100644 --- a/drivers/staging/lustre/lustre/llite/lcommon_misc.c +++ b/drivers/staging/lustre/lustre/llite/lcommon_misc.c @@ -96,7 +96,8 @@ int cl_ocd_update(struct obd_device *host, __u64 flags; int result; - if (!strcmp(watched->obd_type->typ_name, LUSTRE_OSC_NAME)) { + if (!strcmp(watched->obd_type->typ_name, LUSTRE_OSC_NAME) && + watched->obd_set_up && !watched->obd_stopping) { cli = &watched->u.cli; lco = owner; flags = cli->cl_import->imp_connect_data.ocd_connect_flags; @@ -111,9 +112,10 @@ int cl_ocd_update(struct obd_device *host, mutex_unlock(&lco->lco_lock); result = 0; } else { - CERROR("unexpected notification from %s %s!\n", + CERROR("unexpected notification from %s %s (setup:%d,stopping:%d)!\n", watched->obd_type->typ_name, - watched->obd_name); + watched->obd_name, watched->obd_set_up, + watched->obd_stopping); result = -EINVAL; } return result; -- 2.7.4 From green at linuxhacker.ru Mon Jun 20 20:55:33 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Mon, 20 Jun 2016 16:55:33 -0400 Subject: [lustre-devel] [PATCH v2 10/29] staging/lustre/ptlrpc: Remove __ptlrpc_request_bufs_pack In-Reply-To: <1466456152-2199975-1-git-send-email-green@linuxhacker.ru> References: <1466456152-2199975-1-git-send-email-green@linuxhacker.ru> Message-ID: <1466456152-2199975-11-git-send-email-green@linuxhacker.ru> From: Ben Evans Combine __ptlrpc_request_bufs_pack into ptlrpc_request_bufs_pack because it was an unnecessary wrapper otherwise. Signed-off-by: Ben Evans Reviewed-on: http://review.whamcloud.com/16765 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7269 Reviewed-by: Frank Zago Reviewed-by: Andreas Dilger Reviewed-by: John L. Hammond Reviewed-by: Chris Horn Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/ptlrpc/client.c | 34 ++++++++++----------------- 1 file changed, 13 insertions(+), 21 deletions(-) diff --git a/drivers/staging/lustre/lustre/ptlrpc/client.c b/drivers/staging/lustre/lustre/ptlrpc/client.c index ae1cef3..5d832eb 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/client.c +++ b/drivers/staging/lustre/lustre/ptlrpc/client.c @@ -583,14 +583,19 @@ static void __ptlrpc_free_req_to_pool(struct ptlrpc_request *request) spin_unlock(&pool->prp_lock); } -static int __ptlrpc_request_bufs_pack(struct ptlrpc_request *request, - __u32 version, int opcode, - int count, __u32 *lengths, char **bufs, - struct ptlrpc_cli_ctx *ctx) +int ptlrpc_request_bufs_pack(struct ptlrpc_request *request, + __u32 version, int opcode, char **bufs, + struct ptlrpc_cli_ctx *ctx) { - struct obd_import *imp = request->rq_import; + int count; + struct obd_import *imp; + __u32 *lengths; int rc; + count = req_capsule_filled_sizes(&request->rq_pill, RCL_CLIENT); + imp = request->rq_import; + lengths = request->rq_pill.rc_area[RCL_CLIENT]; + if (unlikely(ctx)) { request->rq_cli_ctx = sptlrpc_cli_ctx_get(ctx); } else { @@ -598,15 +603,12 @@ static int __ptlrpc_request_bufs_pack(struct ptlrpc_request *request, if (rc) goto out_free; } - sptlrpc_req_set_flavor(request, opcode); rc = lustre_pack_request(request, imp->imp_msg_magic, count, lengths, bufs); - if (rc) { - LASSERT(!request->rq_pool); + if (rc) goto out_ctx; - } lustre_msg_add_version(request->rq_reqmsg, version); request->rq_send_state = LUSTRE_IMP_FULL; @@ -631,24 +633,14 @@ static int __ptlrpc_request_bufs_pack(struct ptlrpc_request *request, lustre_msg_set_opc(request->rq_reqmsg, opcode); return 0; + out_ctx: + LASSERT(!request->rq_pool); sptlrpc_cli_ctx_put(request->rq_cli_ctx, 1); out_free: class_import_put(imp); return rc; } - -int ptlrpc_request_bufs_pack(struct ptlrpc_request *request, - __u32 version, int opcode, char **bufs, - struct ptlrpc_cli_ctx *ctx) -{ - int count; - - count = req_capsule_filled_sizes(&request->rq_pill, RCL_CLIENT); - return __ptlrpc_request_bufs_pack(request, version, opcode, count, - request->rq_pill.rc_area[RCL_CLIENT], - bufs, ctx); -} EXPORT_SYMBOL(ptlrpc_request_bufs_pack); /** -- 2.7.4 From green at linuxhacker.ru Mon Jun 20 20:55:44 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Mon, 20 Jun 2016 16:55:44 -0400 Subject: [lustre-devel] [PATCH v2 21/29] staging/lustre/llite: don't panic when fid is insane In-Reply-To: <1466456152-2199975-1-git-send-email-green@linuxhacker.ru> References: <1466456152-2199975-1-git-send-email-green@linuxhacker.ru> Message-ID: <1466456152-2199975-22-git-send-email-green@linuxhacker.ru> From: Sergey Cheremencev LASSERT should never be done on data that is received to over the network. Return EINVAL when server returns invalid fid despite of it_status == 0. Signed-off-by: Sergey Cheremencev Seagate-bug-id: MRP-3073 Reviewed-on: http://review.whamcloud.com/17985 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7422 Reviewed-by: John L. Hammond Reviewed-by: Andreas Dilger Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/llite/llite_lib.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/llite/llite_lib.c b/drivers/staging/lustre/lustre/llite/llite_lib.c index 539fdd1..118e41d 100644 --- a/drivers/staging/lustre/lustre/llite/llite_lib.c +++ b/drivers/staging/lustre/lustre/llite/llite_lib.c @@ -1971,7 +1971,13 @@ int ll_prep_inode(struct inode **inode, struct ptlrpc_request *req, * At this point server returns to client's same fid as client * generated for creating. So using ->fid1 is okay here. */ - LASSERT(fid_is_sane(&md.body->fid1)); + if (!fid_is_sane(&md.body->fid1)) { + CERROR("%s: Fid is insane " DFID "\n", + ll_get_fsname(sb, NULL, 0), + PFID(&md.body->fid1)); + rc = -EINVAL; + goto out; + } *inode = ll_iget(sb, cl_fid_build_ino(&md.body->fid1, sbi->ll_flags & LL_SBI_32BIT_API), -- 2.7.4 From green at linuxhacker.ru Mon Jun 20 20:55:47 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Mon, 20 Jun 2016 16:55:47 -0400 Subject: [lustre-devel] [PATCH v2 24/29] staging/lustre/llite: IOC_MDC_GETFILEINFO returns the wrong ino In-Reply-To: <1466456152-2199975-1-git-send-email-green@linuxhacker.ru> References: <1466456152-2199975-1-git-send-email-green@linuxhacker.ru> Message-ID: <1466456152-2199975-25-git-send-email-green@linuxhacker.ru> From: akam kumar bharathi req_capsule_server_get() through __req_capsule_get in ll_dir_ioctl() returns a pointer to a PTLRPC request or reply buffer, which is assigned to struct mdt_body. If the command is IOC_MDS_GETFILEINFO then the inode "st.st_ino" should be assigned from one extracted from mdt_body through cl_fid_build_ino(). Signed-off-by: John Hammond Signed-off-by: akam kumar bharathi Reviewed-on: http://review.whamcloud.com/17618 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-5954 Reviewed-by: Andreas Dilger Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/llite/dir.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/llite/dir.c b/drivers/staging/lustre/lustre/llite/dir.c index f0eb64b..7e7425d 100644 --- a/drivers/staging/lustre/lustre/llite/dir.c +++ b/drivers/staging/lustre/lustre/llite/dir.c @@ -1528,7 +1528,9 @@ skip_lmm: st.st_atime = body->atime; st.st_mtime = body->mtime; st.st_ctime = body->ctime; - st.st_ino = inode->i_ino; + st.st_ino = cl_fid_build_ino(&body->fid1, + sbi->ll_flags & + LL_SBI_32BIT_API); lmdp = (struct lov_user_mds_data __user *)arg; if (copy_to_user(&lmdp->lmd_st, &st, sizeof(st))) { -- 2.7.4 From green at linuxhacker.ru Mon Jun 20 20:55:45 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Mon, 20 Jun 2016 16:55:45 -0400 Subject: [lustre-devel] [PATCH v2 22/29] staging/lustre/llite: Restore proper opencache operations In-Reply-To: <1466456152-2199975-1-git-send-email-green@linuxhacker.ru> References: <1466456152-2199975-1-git-send-email-green@linuxhacker.ru> Message-ID: <1466456152-2199975-23-git-send-email-green@linuxhacker.ru> From: Oleg Drokin Mark dentries that came to us via NFS in a special way so that we can tell them apart during open and activate open cache (we really don't want to do open/close RPC for every NFS IO). This became needed since dentry revlidate no longer reimplements any RPCs for lookup, and as such if a dentry is valid, ll_revalidate_dentry returns 1 and ll_lookup_it() is never visited during opens, we get straght into ll_file_open() without a valid intent/RPC. This used to be only true for NFS, so opencache was engaged needlessly, and it carries a cost of it's own if there is in fact no repetitive file opening-closing going on Signed-off-by: Oleg Drokin Reviewed-on: http://review.whamcloud.com/20354 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8019 Reviewed-by: Andreas Dilger Reviewed-by: Li Xi Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/llite/file.c | 14 +++++++++++++- drivers/staging/lustre/lustre/llite/llite_internal.h | 1 + drivers/staging/lustre/lustre/llite/llite_nfs.c | 18 ++++++++++++++++++ 3 files changed, 32 insertions(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/llite/file.c b/drivers/staging/lustre/lustre/llite/file.c index a188366..6a5e8c7 100644 --- a/drivers/staging/lustre/lustre/llite/file.c +++ b/drivers/staging/lustre/lustre/llite/file.c @@ -411,7 +411,19 @@ static int ll_intent_file_open(struct dentry *dentry, void *lmm, * parameters. No need for the open lock */ if (!lmm && lmmsize == 0) { - itp->it_flags |= MDS_OPEN_LOCK; + struct ll_dentry_data *ldd = ll_d2d(dentry); + /* + * If we came via ll_iget_for_nfs, then we need to request + * struct ll_dentry_data *ldd = ll_d2d(file->f_dentry); + * + * NB: when ldd is NULL, it must have come via normal + * lookup path only, since ll_iget_for_nfs always calls + * ll_d_init(). + */ + if (ldd && ldd->lld_nfs_dentry) { + ldd->lld_nfs_dentry = 0; + itp->it_flags |= MDS_OPEN_LOCK; + } if (itp->it_flags & FMODE_WRITE) opc = LUSTRE_OPC_CREATE; } diff --git a/drivers/staging/lustre/lustre/llite/llite_internal.h b/drivers/staging/lustre/lustre/llite/llite_internal.h index 3692102..1d4e91e 100644 --- a/drivers/staging/lustre/lustre/llite/llite_internal.h +++ b/drivers/staging/lustre/lustre/llite/llite_internal.h @@ -64,6 +64,7 @@ struct ll_dentry_data { struct lookup_intent *lld_it; unsigned int lld_sa_generation; unsigned int lld_invalid:1; + unsigned int lld_nfs_dentry:1; struct rcu_head lld_rcu_head; }; diff --git a/drivers/staging/lustre/lustre/llite/llite_nfs.c b/drivers/staging/lustre/lustre/llite/llite_nfs.c index d7878e5..65972c8 100644 --- a/drivers/staging/lustre/lustre/llite/llite_nfs.c +++ b/drivers/staging/lustre/lustre/llite/llite_nfs.c @@ -168,6 +168,24 @@ ll_iget_for_nfs(struct super_block *sb, struct lu_fid *fid, struct lu_fid *paren /* N.B. d_obtain_alias() drops inode ref on error */ result = d_obtain_alias(inode); + if (!IS_ERR(result)) { + int rc; + + rc = ll_d_init(result); + if (rc < 0) { + dput(result); + result = ERR_PTR(rc); + } else { + struct ll_dentry_data *ldd = ll_d2d(result); + + /* + * Need to signal to the ll_intent_file_open that + * we came from NFS and so opencache needs to be + * enabled for this one + */ + ldd->lld_nfs_dentry = 1; + } + } return result; } -- 2.7.4 From green at linuxhacker.ru Mon Jun 20 20:55:51 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Mon, 20 Jun 2016 16:55:51 -0400 Subject: [lustre-devel] [PATCH v2 28/29] staging/lustre/libcfs: Do not call kthread_run in wrong state In-Reply-To: <1466456152-2199975-1-git-send-email-green@linuxhacker.ru> References: <1466456152-2199975-1-git-send-email-green@linuxhacker.ru> Message-ID: <1466456152-2199975-29-git-send-email-green@linuxhacker.ru> kthread_run might sleep during an allocation, and so it's considered unsafe to call with a state that's not RUNNABLE. Move the state setting to after kthread_run call. Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lnet/libcfs/debug.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lnet/libcfs/debug.c b/drivers/staging/lustre/lnet/libcfs/debug.c index 75a2a42..42b15a7 100644 --- a/drivers/staging/lustre/lnet/libcfs/debug.c +++ b/drivers/staging/lustre/lnet/libcfs/debug.c @@ -362,12 +362,12 @@ void libcfs_debug_dumplog(void) * get to schedule() */ init_waitqueue_entry(&wait, current); - set_current_state(TASK_INTERRUPTIBLE); add_wait_queue(&debug_ctlwq, &wait); dumper = kthread_run(libcfs_debug_dumplog_thread, (void *)(long)current_pid(), "libcfs_debug_dumper"); + set_current_state(TASK_INTERRUPTIBLE); if (IS_ERR(dumper)) pr_err("LustreError: cannot start log dump thread: %ld\n", PTR_ERR(dumper)); -- 2.7.4 From green at linuxhacker.ru Mon Jun 20 20:55:37 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Mon, 20 Jun 2016 16:55:37 -0400 Subject: [lustre-devel] [PATCH v2 14/29] staging/lustre: Add newline to LU_OBJECT_DEBUG() message In-Reply-To: <1466456152-2199975-1-git-send-email-green@linuxhacker.ru> References: <1466456152-2199975-1-git-send-email-green@linuxhacker.ru> Message-ID: <1466456152-2199975-15-git-send-email-green@linuxhacker.ru> From: Bob Glossman LU_OBJECT_DEBUG expects non \n terminated message from the caller, so it should add it's own to keep debug logger happy. Signed-off-by: Bob Glossman Reviewed-on: http://review.whamcloud.com/19960 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8094 Reviewed-by: Andreas Dilger Reviewed-by: Alex Zhuravlev Reviewed-by: John L. Hammond Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/include/lu_object.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/include/lu_object.h b/drivers/staging/lustre/lustre/include/lu_object.h index c6281e6..6e25c1b 100644 --- a/drivers/staging/lustre/lustre/include/lu_object.h +++ b/drivers/staging/lustre/lustre/include/lu_object.h @@ -779,7 +779,7 @@ do { \ if (cfs_cdebug_show(mask, DEBUG_SUBSYSTEM)) { \ LIBCFS_DEBUG_MSG_DATA_DECL(msgdata, mask, NULL); \ lu_object_print(env, &msgdata, lu_cdebug_printer, object);\ - CDEBUG(mask, format, ## __VA_ARGS__); \ + CDEBUG(mask, format "\n", ## __VA_ARGS__); \ } \ } while (0) -- 2.7.4 From green at linuxhacker.ru Mon Jun 20 20:55:48 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Mon, 20 Jun 2016 16:55:48 -0400 Subject: [lustre-devel] [PATCH v2 25/29] staging/lustre/osc: fix signed one bit field In-Reply-To: <1466456152-2199975-1-git-send-email-green@linuxhacker.ru> References: <1466456152-2199975-1-git-send-email-green@linuxhacker.ru> Message-ID: <1466456152-2199975-26-git-send-email-green@linuxhacker.ru> From: Dmitry Eremin Bit field 'oi_lockless' and 'oi_is_active' has one bit and is signed which is confusing. Signed-off-by: Dmitry Eremin Reviewed-on: http://review.whamcloud.com/19196 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7258 Reviewed-by: Andreas Dilger Reviewed-by: James Simmons Reviewed-by: Frank Zago Reviewed-by: John L. Hammond Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/osc/osc_cl_internal.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/osc/osc_cl_internal.h b/drivers/staging/lustre/lustre/osc/osc_cl_internal.h index 437c659..c8c3f1c 100644 --- a/drivers/staging/lustre/lustre/osc/osc_cl_internal.h +++ b/drivers/staging/lustre/lustre/osc/osc_cl_internal.h @@ -62,7 +62,7 @@ struct osc_io { /** super class */ struct cl_io_slice oi_cl; /** true if this io is lockless. */ - int oi_lockless; + unsigned int oi_lockless; /** how many LRU pages are reserved for this IO */ int oi_lru_reserved; -- 2.7.4 From green at linuxhacker.ru Mon Jun 20 20:55:52 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Mon, 20 Jun 2016 16:55:52 -0400 Subject: [lustre-devel] [PATCH v2 29/29] staging: lustre: quiet lockdep recursive lock warning In-Reply-To: <1466456152-2199975-1-git-send-email-green@linuxhacker.ru> References: <1466456152-2199975-1-git-send-email-green@linuxhacker.ru> Message-ID: <1466456152-2199975-30-git-send-email-green@linuxhacker.ru> From: Andreas Dilger Lockdep complains about potential recursive locking during mount because the client configuration log is holding a lock on the MGC obd_device to prevent it from being torn down, while also getting mutexes on the MDC and OSC devices as they are instantiated: Lustre: Mounted myth-client ============================================= [ INFO: possible recursive locking detected ] 4.7.0-rc2-vm-nfs+ #127 Tainted: G C --------------------------------------------- May be due to missing lock nesting notation 2 locks held by ll_cfg_requeue/5928: #0: (&cli->cl_sem){.+.+.+}, at: mgc_requeue_thread+0x15d/0x730 [mgc] #1: (&cld->cld_lock){+.+.+.}, at: mgc_process_log+0x5e/0xf80 [mgc] CPU: 0 PID: 5928 Comm: ll_cfg_requeue Call Trace: [] dump_stack+0x86/0xc1 [] __lock_acquire+0x726/0x1210 [] lock_acquire+0xfe/0x1f0 [] down_read+0x51/0xa0 [] sptlrpc_conf_client_adapt+0x47/0x150 [ptlrpc] [] mdc_set_info_async+0x2b6/0x470 [mdc] [] class_notify_sptlrpc_conf+0x190/0x360 [obdclass] [] mgc_process_log+0x925/0xf80 [mgc] [] mgc_requeue_thread+0x1fa/0x730 [mgc] [] kthread+0x101/0x120 [] ret_from_fork+0x1f/0x40 Add a separate lock class for the MGC callpath, since it will always be held first, and none of the other obd_device locks should ever be held concurrently. Signed-off-by: Andreas Dilger Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/include/obd.h | 6 ++++++ drivers/staging/lustre/lustre/mgc/mgc_request.c | 4 +++- drivers/staging/lustre/lustre/ptlrpc/sec_config.c | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lustre/include/obd.h b/drivers/staging/lustre/lustre/include/obd.h index ed1081a..593d107 100644 --- a/drivers/staging/lustre/lustre/include/obd.h +++ b/drivers/staging/lustre/lustre/include/obd.h @@ -228,6 +228,12 @@ enum { #define MDC_MAX_RIF_DEFAULT 8 #define MDC_MAX_RIF_MAX 512 +enum obd_cl_sem_lock_class { + OBD_CLI_SEM_NORMAL, + OBD_CLI_SEM_MGC, + OBD_CLI_SEM_MDCOSC, +}; + struct mdc_rpc_lock; struct obd_import; struct client_obd { diff --git a/drivers/staging/lustre/lustre/mgc/mgc_request.c b/drivers/staging/lustre/lustre/mgc/mgc_request.c index fbbf276..9d0bd47 100644 --- a/drivers/staging/lustre/lustre/mgc/mgc_request.c +++ b/drivers/staging/lustre/lustre/mgc/mgc_request.c @@ -496,7 +496,9 @@ static void do_requeue(struct config_llog_data *cld) * export which is being disconnected. Take the client * semaphore to make the check non-racy. */ - down_read(&cld->cld_mgcexp->exp_obd->u.cli.cl_sem); + down_read_nested(&cld->cld_mgcexp->exp_obd->u.cli.cl_sem, + OBD_CLI_SEM_MGC); + if (cld->cld_mgcexp->exp_obd->u.cli.cl_conn_count != 0) { int rc; diff --git a/drivers/staging/lustre/lustre/ptlrpc/sec_config.c b/drivers/staging/lustre/lustre/ptlrpc/sec_config.c index 1238c87..c140354 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/sec_config.c +++ b/drivers/staging/lustre/lustre/ptlrpc/sec_config.c @@ -815,7 +815,7 @@ void sptlrpc_conf_client_adapt(struct obd_device *obd) CDEBUG(D_SEC, "obd %s\n", obd->u.cli.cl_target_uuid.uuid); /* serialize with connect/disconnect import */ - down_read(&obd->u.cli.cl_sem); + down_read_nested(&obd->u.cli.cl_sem, OBD_CLI_SEM_MDCOSC); imp = obd->u.cli.cl_import; if (imp) { -- 2.7.4 From green at linuxhacker.ru Mon Jun 20 20:55:46 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Mon, 20 Jun 2016 16:55:46 -0400 Subject: [lustre-devel] [PATCH v2 23/29] staging/lustre/llite: ll_revalidate_dentry update In-Reply-To: <1466456152-2199975-1-git-send-email-green@linuxhacker.ru> References: <1466456152-2199975-1-git-send-email-green@linuxhacker.ru> Message-ID: <1466456152-2199975-24-git-send-email-green@linuxhacker.ru> From: Oleg Drokin There are a couple of cases in ll_revalidate_dentry() where we are pretty sure the dentry is valid, so check for them early and save more expensive checks for later. Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/llite/dcache.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/drivers/staging/lustre/lustre/llite/dcache.c b/drivers/staging/lustre/lustre/llite/dcache.c index d964f4f..581a63a 100644 --- a/drivers/staging/lustre/lustre/llite/dcache.c +++ b/drivers/staging/lustre/lustre/llite/dcache.c @@ -302,6 +302,17 @@ static int ll_revalidate_dentry(struct dentry *dentry, { struct inode *dir = d_inode(dentry->d_parent); + /* If this is intermediate component path lookup and we were able to get + * to this dentry, then its lock has not been revoked and the + * path component is valid. + */ + if (lookup_flags & LOOKUP_PARENT) + return 1; + + /* Symlink - always valid as long as the dentry was found */ + if (dentry->d_inode && S_ISLNK(dentry->d_inode->i_mode)) + return 1; + /* * if open&create is set, talk to MDS to make sure file is created if * necessary, because we can't do this in ->open() later since that's -- 2.7.4 From green at linuxhacker.ru Mon Jun 20 20:55:49 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Mon, 20 Jun 2016 16:55:49 -0400 Subject: [lustre-devel] [PATCH v2 26/29] staging/lustre: Add documentation for unstable_stats in sysfs In-Reply-To: <1466456152-2199975-1-git-send-email-green@linuxhacker.ru> References: <1466456152-2199975-1-git-send-email-green@linuxhacker.ru> Message-ID: <1466456152-2199975-27-git-send-email-green@linuxhacker.ru> commit ac5b14810952 ("staging: lustre: osc: Track and limit "unstable" pages") added a new sysfs variable, but corresponding bit of documentation was not forgotten. Signed-off-by: Oleg Drokin --- drivers/staging/lustre/sysfs-fs-lustre | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/staging/lustre/sysfs-fs-lustre b/drivers/staging/lustre/sysfs-fs-lustre index 873e2cf..20206ba 100644 --- a/drivers/staging/lustre/sysfs-fs-lustre +++ b/drivers/staging/lustre/sysfs-fs-lustre @@ -294,6 +294,14 @@ Description: Controls extended attributes client-side cache. 1 to enable, 0 to disable. +What: /sys/fs/lustre/llite/-/unstable_stats +Date: Apr 2016 +Contact: "Oleg Drokin" +Description: + Shows number of pages that were sent and acknowledged by + server but were not yet committed and therefore still + pinned in client memory even though no longer dirty. + What: /sys/fs/lustre/ldlm/cancel_unused_locks_before_replay Date: May 2015 Contact: "Oleg Drokin" -- 2.7.4 From green at linuxhacker.ru Mon Jun 20 20:55:50 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Mon, 20 Jun 2016 16:55:50 -0400 Subject: [lustre-devel] [PATCH v2 27/29] staging/lustre/osc: glimpse lock should match only with granted locks In-Reply-To: <1466456152-2199975-1-git-send-email-green@linuxhacker.ru> References: <1466456152-2199975-1-git-send-email-green@linuxhacker.ru> Message-ID: <1466456152-2199975-28-git-send-email-green@linuxhacker.ru> From: Andriy Skulysh A deadlock is possible during ccc_prep_size()->ldlm_lock_match() vs cl_io_lock() which is waiting for a matched lock and conflicts with already taken lock before ccc_prep_size(). It is better to send an additional lock request to avoid deadlock. Seagate-bug-id: MRP-3312 Signed-off-by: Andriy Skulysh Reviewed-on: http://review.whamcloud.com/18738 Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-7829 Reviewed-by: Jinshan Xiong Reviewed-by: Bobi Jam Signed-off-by: Oleg Drokin --- drivers/staging/lustre/lustre/osc/osc_request.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lustre/osc/osc_request.c b/drivers/staging/lustre/lustre/osc/osc_request.c index 9334349..536b868 100644 --- a/drivers/staging/lustre/lustre/osc/osc_request.c +++ b/drivers/staging/lustre/lustre/osc/osc_request.c @@ -2246,7 +2246,7 @@ int osc_enqueue_base(struct obd_export *exp, struct ldlm_res_id *res_id, struct lustre_handle lockh = { 0 }; struct ptlrpc_request *req = NULL; int intent = *flags & LDLM_FL_HAS_INTENT; - __u64 match_lvb = agl ? 0 : LDLM_FL_LVB_READY; + __u64 match_flags = *flags; enum ldlm_mode mode; int rc; @@ -2281,7 +2281,11 @@ int osc_enqueue_base(struct obd_export *exp, struct ldlm_res_id *res_id, mode = einfo->ei_mode; if (einfo->ei_mode == LCK_PR) mode |= LCK_PW; - mode = ldlm_lock_match(obd->obd_namespace, *flags | match_lvb, res_id, + if (agl == 0) + match_flags |= LDLM_FL_LVB_READY; + if (intent != 0) + match_flags |= LDLM_FL_BLOCK_GRANTED; + mode = ldlm_lock_match(obd->obd_namespace, match_flags, res_id, einfo->ei_type, policy, mode, &lockh, 0); if (mode) { struct ldlm_lock *matched; -- 2.7.4 From jsimmons at infradead.org Mon Jun 20 22:47:50 2016 From: jsimmons at infradead.org (James Simmons) Date: Mon, 20 Jun 2016 18:47:50 -0400 Subject: [lustre-devel] [PATCH] staging: lustre: llite: break ll_getxattr_common into 2 functions Message-ID: <1466462870-20745-1-git-send-email-jsimmons@infradead.org> Split the function ll_getxattr_common into two functions. The code used for listing xattrs and ll_getxattr_common is placed into a new function ll_getxattr_list. This allows ll_listxattr to call directly ll_getxattr_list instead of going through ll_getxattr_common. This change is needed for the upcoming VFS move xattr_handler from [s|g]etxattr. Signed-off-by: James Simmons --- drivers/staging/lustre/lustre/llite/xattr.c | 122 ++++++++++++++------------- 1 files changed, 62 insertions(+), 60 deletions(-) diff --git a/drivers/staging/lustre/lustre/llite/xattr.c b/drivers/staging/lustre/lustre/llite/xattr.c index 98303cf..a034a5f 100644 --- a/drivers/staging/lustre/lustre/llite/xattr.c +++ b/drivers/staging/lustre/lustre/llite/xattr.c @@ -217,69 +217,18 @@ int ll_removexattr(struct dentry *dentry, const char *name) OBD_MD_FLXATTRRM); } -static -int ll_getxattr_common(struct inode *inode, const char *name, - void *buffer, size_t size, __u64 valid) +static int +ll_xattr_list(struct inode *inode, const char *name, int type, void *buffer, + size_t size, __u64 valid) { + struct ll_inode_info *lli = ll_i2info(inode); struct ll_sb_info *sbi = ll_i2sbi(inode); struct ptlrpc_request *req = NULL; struct mdt_body *body; - int xattr_type, rc; void *xdata; - struct ll_inode_info *lli = ll_i2info(inode); - - CDEBUG(D_VFSTRACE, "VFS Op:inode="DFID"(%p)\n", - PFID(ll_inode2fid(inode)), inode); - - /* listxattr have slightly different behavior from of ext3: - * without 'user_xattr' ext3 will list all xattr names but - * filtered out "^user..*"; we list them all for simplicity. - */ - if (!name) { - xattr_type = XATTR_OTHER_T; - goto do_getxattr; - } - - xattr_type = get_xattr_type(name); - rc = xattr_type_filter(sbi, xattr_type); - if (rc) - return rc; - - /* b15587: ignore security.capability xattr for now */ - if ((xattr_type == XATTR_SECURITY_T && - strcmp(name, "security.capability") == 0)) - return -ENODATA; - - /* LU-549: Disable security.selinux when selinux is disabled */ - if (xattr_type == XATTR_SECURITY_T && !selinux_is_enabled() && - strcmp(name, "security.selinux") == 0) - return -EOPNOTSUPP; - -#ifdef CONFIG_FS_POSIX_ACL - /* posix acl is under protection of LOOKUP lock. when calling to this, - * we just have path resolution to the target inode, so we have great - * chance that cached ACL is uptodate. - */ - if (xattr_type == XATTR_ACL_ACCESS_T) { - struct posix_acl *acl; - - spin_lock(&lli->lli_lock); - acl = posix_acl_dup(lli->lli_posix_acl); - spin_unlock(&lli->lli_lock); - - if (!acl) - return -ENODATA; - - rc = posix_acl_to_xattr(&init_user_ns, acl, buffer, size); - posix_acl_release(acl); - return rc; - } - if (xattr_type == XATTR_ACL_DEFAULT_T && !S_ISDIR(inode->i_mode)) - return -ENODATA; -#endif + int rc; -do_getxattr: - if (sbi->ll_xattr_cache_enabled && xattr_type != XATTR_ACL_ACCESS_T) { + if (sbi->ll_xattr_cache_enabled && type != XATTR_ACL_ACCESS_T) { rc = ll_xattr_cache_get(inode, name, buffer, size, valid); if (rc == -EAGAIN) goto getxattr_nocache; @@ -340,7 +289,7 @@ getxattr_nocache: } out_xattr: - if (rc == -EOPNOTSUPP && xattr_type == XATTR_USER_T) { + if (rc == -EOPNOTSUPP && type == XATTR_USER_T) { LCONSOLE_INFO( "%s: disabling user_xattr feature because it is not supported on the server: rc = %d\n", ll_get_fsname(inode->i_sb, NULL, 0), rc); @@ -351,6 +300,58 @@ out: return rc; } +static +int ll_getxattr_common(struct inode *inode, const char *name, + void *buffer, size_t size) +{ + struct ll_sb_info *sbi = ll_i2sbi(inode); + int xattr_type, rc; + struct ll_inode_info *lli = ll_i2info(inode); + + CDEBUG(D_VFSTRACE, "VFS Op:inode="DFID"(%p)\n", + PFID(ll_inode2fid(inode)), inode); + + xattr_type = get_xattr_type(name); + rc = xattr_type_filter(sbi, xattr_type); + if (rc) + return rc; + + /* b15587: ignore security.capability xattr for now */ + if ((xattr_type == XATTR_SECURITY_T && + strcmp(name, "security.capability") == 0)) + return -ENODATA; + + /* LU-549: Disable security.selinux when selinux is disabled */ + if (xattr_type == XATTR_SECURITY_T && !selinux_is_enabled() && + strcmp(name, "security.selinux") == 0) + return -EOPNOTSUPP; + +#ifdef CONFIG_FS_POSIX_ACL + /* posix acl is under protection of LOOKUP lock. when calling to this, + * we just have path resolution to the target inode, so we have great + * chance that cached ACL is uptodate. + */ + if (xattr_type == XATTR_ACL_ACCESS_T) { + struct posix_acl *acl; + + spin_lock(&lli->lli_lock); + acl = posix_acl_dup(lli->lli_posix_acl); + spin_unlock(&lli->lli_lock); + + if (!acl) + return -ENODATA; + + rc = posix_acl_to_xattr(&init_user_ns, acl, buffer, size); + posix_acl_release(acl); + return rc; + } + if (xattr_type == XATTR_ACL_DEFAULT_T && !S_ISDIR(inode->i_mode)) + return -ENODATA; +#endif + return ll_xattr_list(inode, name, xattr_type, buffer, size, + OBD_MD_FLXATTR); +} + ssize_t ll_getxattr(struct dentry *dentry, struct inode *inode, const char *name, void *buffer, size_t size) { @@ -439,7 +440,7 @@ out: return rc; } - return ll_getxattr_common(inode, name, buffer, size, OBD_MD_FLXATTR); + return ll_getxattr_common(inode, name, buffer, size); } ssize_t ll_listxattr(struct dentry *dentry, char *buffer, size_t size) @@ -457,7 +458,8 @@ ssize_t ll_listxattr(struct dentry *dentry, char *buffer, size_t size) ll_stats_ops_tally(ll_i2sbi(inode), LPROC_LL_LISTXATTR, 1); - rc = ll_getxattr_common(inode, NULL, buffer, size, OBD_MD_FLXATTRLS); + rc = ll_xattr_list(inode, NULL, XATTR_OTHER_T, buffer, size, + OBD_MD_FLXATTRLS); if (rc < 0) goto out; -- 1.7.1 From arnd at arndb.de Tue Jun 21 15:00:37 2016 From: arnd at arndb.de (Arnd Bergmann) Date: Tue, 21 Jun 2016 17:00:37 +0200 Subject: [lustre-devel] [Y2038] [PATCH v2 00/24] Delete CURRENT_TIME and CURRENT_TIME_SEC macros In-Reply-To: References: <1466382443-11063-1-git-send-email-deepa.kernel@gmail.com> Message-ID: <4953017.3z0GqUlq8o@wuerfel> On Monday, June 20, 2016 11:03:01 AM CEST you wrote: > On Sun, Jun 19, 2016 at 5:26 PM, Deepa Dinamani wrote: > > The series is aimed at getting rid of CURRENT_TIME and CURRENT_TIME_SEC macros. > Gcc handles 8-byte structure returns (on most architectures) by > returning them as two 32-bit registers (%edx:%eax on x86). But once it > is timespec64, that will no longer be the case, and the calling > convention will end up using a pointer to the local stack instead. I guess we already have that today, as the implementation of current_fs_time() is static inline struct timespec64 tk_xtime(struct timekeeper *tk) { struct timespec64 ts; ts.tv_sec = tk->xtime_sec; ts.tv_nsec = (long)(tk->tkr_mono.xtime_nsec >> tk->tkr_mono.shift); return ts; } extern struct timespec64 current_kernel_time64(void); struct timespec64 current_kernel_time64(void) { struct timekeeper *tk = &tk_core.timekeeper; struct timespec64 now; unsigned long seq; do { seq = read_seqcount_begin(&tk_core.seq); now = tk_xtime(tk); } while (read_seqcount_retry(&tk_core.seq, seq)); return now; } static inline struct timespec current_kernel_time(void) { struct timespec64 now = current_kernel_time64(); return timespec64_to_timespec(now); } extern struct timespec current_fs_time(struct super_block *sb); struct timespec current_fs_time(struct super_block *sb) { struct timespec now = current_kernel_time(); return timespec_trunc(now, sb->s_time_gran); } We can surely do a little better than this, independent of the conversion in Deepa's patch set. > So for 32-bit code generation, we *may* want to introduce a new model of doing > > set_inode_time(inode, ATTR_ATIME | ATTR_MTIME); > > which basically just does > > inode->i_atime = inode->i_mtime = current_time(inode); > > but with a much easier calling convention on 32-bit architectures. > > But that is entirely orthogonal to this patch-set, and should be seen > as a separate issue. I've played around with that, but found it hard to avoid going through memory other than going all the way to the tk_xtime() access to copy both tk->xtime_sec and the nanoseconds into the inode fields. Without that, the set_inode_time() implementation ends up being more expensive than inode->i_atime = inode->i_ctime = inode->i_mtime = current_time(inode); because we still copy through the stack but also have a couple of conditional branches that we don't have at the moment. At the moment, the triple assignment becomes (here on ARM) c: 4668 mov r0, sp 12: f7ff fffe bl 0 3e: f107 0520 add.w r5, r7, #32 12: R_ARM_THM_CALL current_kernel_time64 16: f106 0410 add.w r4, r6, #16 1a: e89d 000f ldmia.w sp, {r0, r1, r2, r3} # load from stack 1e: e885 000f stmia.w r5, {r0, r1, r2, r3} # store into i_atime 22: e884 000f stmia.w r4, {r0, r1, r2, r3} # i_ctime 26: e886 000f stmia.w r6, {r0, r1, r2, r3} # i_mtime and a slightly more verbose version of the same thing on x86 (storing only 12 bytes instead of 16 is cheaper there, while ARM does a store-multiple to copy the entire structure). Arnd From oleg.drokin at intel.com Wed Jun 22 01:11:12 2016 From: oleg.drokin at intel.com (Oleg Drokin) Date: Tue, 21 Jun 2016 21:11:12 -0400 Subject: [lustre-devel] New tag 2.8.55 Message-ID: Hello! I just tagged new version in master development tree: 2.8.55. Here's the changelog: Abrarahmed Momin (1): LU-7776 tests: lnet-selftest.sh local_mode failure Alex Zhuravlev (3): LU-7908 osp: fake precreate support LU-7901 osd: put sa_bulk_attr_t in osd_thread_info LU-7893 osd-zfs: fix error handling in osd_mount() Alexander Boyko (1): LU-7934 osp: fix tr->otr_next_id overflow Amitoj Kaur Chawla (1): LU-8057 ko2iblnd: Replace sg++ with sg = sg_next(sg) Andreas Dilger (7): LU-7372 tests: disable replay-dual test_26 LU-7418 tests: cancel all locks in sanity test_29 LU-5969 lustreapi: replace llapi_get_version() LU-1595 build: improve prepare-commit-msg git hook LU-3434 misc: style check whole patch when rebasing LU-7813 utils: improve lfs setstripe pool error message LU-7004 utils: remove "lctl conf_param" deprecation Andriy Skulysh (2): LU-7626 ldlm: refcount nonzero (1) after lock cleanup LU-7830 ost: do not evict during truncate Ann Koehler (1): LU-7997 obd: RCU stalls in lu_cache_shrink_count() Ben Evans (1): LU-8058 utils: Remove old commented out code Bob Glossman (2): LU-8196 obd: force very large allocations to use vmalloc LU-8227 kernel: kernel update RHEL6.8 [2.6.32-642.1.1.el6] Bobi Jam (1): LU-7860 ldlm: revert part of commit 657bbc49 Bruno Faccini (1): LU-7486 obdclass: health_check to report unhealthy upon LBUG Chris Horn (1): LU-8102 ldlm: Correlate ptlrpc req w/AST error Di Wang (1): LU-8044 mgs: Only add OSP for registered MDT Dmitry Eremin (5): LU-8241 ofed: fix compilation with MOFED 3.3 LU-7258 osc: fix signed one bit field LU-7259 osd-ldiskfs: fix signed one bit field LU-8056 libcfs: Support for linux 4.2 kernels LU-7747 lfs: fix help message for migrate Elena Gryaznova (1): LU-7445 test: combine dependent sanity 51b and 51ba tests Fan Yong (5): LU-6861 scrub: only trigger full OI scrub when necessary LU-7302 scrub: join the running OI scrub properly LU-8182 mdt: check connection data properly LU-8279 scrub: fix inode reference leak LU-6971 cleanup: not support remote client anymore Frank Zago (3): LU-8157 tests: functional testing for swap layout LU-8163 hsm: user_request_mask can't be unset in test 24c LU-8171 hsm: stack overrun in hai_dump_data_field Giuseppe Di Natale (1): LU-7334 lprocfs: Allow a new line before null terminator Henri Doreau (2): LU-8138 utils: misc fixes in wirecheck LU-8232 obdclass: remove dead code Hongchao Zhang (2): LU-7428 osd: set device read-only correctly LU-5564 mdt: skip permission check for close Jadhav Vikram (1): LU-7536 mdt: handling NULL dereference in mdt_reconstruct James Nunez (1): LU-4257 test: Correct error_ignore message James Shimek (1): LU-7955 gnilnd: Add ability to set bte_get/put_dlvr_mode James Simmons (1): LU-6245 libcfs: remove types abstraction from libcfs/LNet code Jeremy Filizetti (8): LU-3289 gss: Interface and code changes for shared key LU-3289 gss: Add Shared key and GSS Null functionality LU-3289 osp: osp_precreate_thread does not check for errors LU-3289 gss: Return GSS major and minor status LU-3289 gss: Add userspace support for GSS null and sk LU-3289 gss: Add option for loading keys during mount LU-3289 gss: Cleanup gss print statements and comments LU-3289 gss: Add two additional security flavors for sk Jinshan Xiong (1): LU-2766 llite: don't ignore layout for group lock request John L. Hammond (5): LU-8036 utils: remove ARRAY_SIZE() define from lustreapi.h LU-5560 obd: reserve connection flag OBD_CONNECT2_FILE_SECCTX LU-4781 utils: handle EEXIST in lustre_rsync LU-8277 scripts: add missing commas in checkpatch.pl LU-5969 procfs: restore missing newline for version param Kit Westneat (1): LU-5092 nodemap: handle config changes while mid-flight Li Xi (1): LU-8006 ptlrpc: cleanup codes of TBF command Minh Diep (1): LU-5953 build: use installed OFED by default with dpkg Nathaniel Clark (5): LU-8146 osd-zfs: Build against SPL/ZFS 0.6.5.7 LU-7890 lov: Ensure correct operation for large object sizes LU-7993 test: Fix division by 0 in info prints LU-7920 hsm: Account for decreasing max request count LU-3289 gss: Cleanup gss code Oleg Drokin (4): LU-8019 llite: Restore proper opencache operations LU-8179 libcfs: Do not include libcfs/util/ioctl.h in kernel code LU-7805 llite: Remove unused members of struct ll_sb_info New tag 2.8.55 Sebastien Buisson (2): LU-4048 build: fix 'control flow' errors LU-7846 tests: test for nodemap fileset in sanity-sec Sergey Cheremencev (1): LU-8178 lproc: fix negative recovery_duration Ulka Vaze (1): LU-6523 lmv: Error not handled for lmv_find_target Vitaly Fertman (1): LU-7434 ptlrpc: lost bulk leads to a hang Wang Shilong (1): LU-8216 ldiskfs: fix journal quota files akam kumar bharathi (1): LU-5954 IOC_MDC_GETFILEINFO returns the wrong ino From jsimmons at infradead.org Wed Jun 22 15:19:54 2016 From: jsimmons at infradead.org (James Simmons) Date: Wed, 22 Jun 2016 11:19:54 -0400 Subject: [lustre-devel] [PATCH] staging: lustre: lnet: Remove old commented out code Message-ID: <1466608794-27947-1-git-send-email-jsimmons@infradead.org> From: Ben Evans These #if 0 blocks have been in place for years. Assume they are not used and remove them Signed-off-by: Ben Evans Intel-bug-id: https://jira.hpdd.intel.com/browse/LU-8058 Reviewed-on: http://review.whamcloud.com/20414 Reviewed-by: Andreas Dilger Reviewed-by: James Simmons Reviewed-by: Oleg Drokin Signed-off-by: James Simmons --- .../staging/lustre/lnet/klnds/socklnd/socklnd.c | 5 ----- .../staging/lustre/lnet/klnds/socklnd/socklnd_cb.c | 7 ------- drivers/staging/lustre/lnet/lnet/lib-msg.c | 18 +----------------- 3 files changed, 1 insertions(+), 29 deletions(-) diff --git a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c index 07ec540..cbc9a9c 100644 --- a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c +++ b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c @@ -1468,11 +1468,6 @@ ksocknal_close_conn_locked(struct ksock_conn *conn, int error) conn->ksnc_route = NULL; -#if 0 /* irrelevant with only eager routes */ - /* make route least favourite */ - list_del(&route->ksnr_list); - list_add_tail(&route->ksnr_list, &peer->ksnp_routes); -#endif ksocknal_route_decref(route); /* drop conn's ref on route */ } diff --git a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c index 303576d..d53da55 100644 --- a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c +++ b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_cb.c @@ -2008,13 +2008,6 @@ ksocknal_connect(struct ksock_route *route) list_splice_init(&peer->ksnp_tx_queue, &zombies); } -#if 0 /* irrelevant with only eager routes */ - if (!route->ksnr_deleted) { - /* make this route least-favourite for re-selection */ - list_del(&route->ksnr_list); - list_add_tail(&route->ksnr_list, &peer->ksnp_routes); - } -#endif write_unlock_bh(&ksocknal_data.ksnd_global_lock); ksocknal_peer_failed(peer); diff --git a/drivers/staging/lustre/lnet/lnet/lib-msg.c b/drivers/staging/lustre/lnet/lnet/lib-msg.c index 910e106..0897e58 100644 --- a/drivers/staging/lustre/lnet/lnet/lib-msg.c +++ b/drivers/staging/lustre/lnet/lnet/lib-msg.c @@ -449,23 +449,7 @@ lnet_finalize(lnet_ni_t *ni, lnet_msg_t *msg, int status) if (!msg) return; -#if 0 - CDEBUG(D_WARNING, "%s msg->%s Flags:%s%s%s%s%s%s%s%s%s%s%s txp %s rxp %s\n", - lnet_msgtyp2str(msg->msg_type), libcfs_id2str(msg->msg_target), - msg->msg_target_is_router ? "t" : "", - msg->msg_routing ? "X" : "", - msg->msg_ack ? "A" : "", - msg->msg_sending ? "S" : "", - msg->msg_receiving ? "R" : "", - msg->msg_delayed ? "d" : "", - msg->msg_txcredit ? "C" : "", - msg->msg_peertxcredit ? "c" : "", - msg->msg_rtrcredit ? "F" : "", - msg->msg_peerrtrcredit ? "f" : "", - msg->msg_onactivelist ? "!" : "", - !msg->msg_txpeer ? "" : libcfs_nid2str(msg->msg_txpeer->lp_nid), - !msg->msg_rxpeer ? "" : libcfs_nid2str(msg->msg_rxpeer->lp_nid)); -#endif + msg->msg_ev.status = status; if (msg->msg_md) { -- 1.7.1 From arnd at arndb.de Wed Jun 22 15:49:48 2016 From: arnd at arndb.de (Arnd Bergmann) Date: Wed, 22 Jun 2016 17:49:48 +0200 Subject: [lustre-devel] [Y2038] [PATCH v2 00/24] Delete CURRENT_TIME and CURRENT_TIME_SEC macros In-Reply-To: <1466382443-11063-1-git-send-email-deepa.kernel@gmail.com> References: <1466382443-11063-1-git-send-email-deepa.kernel@gmail.com> Message-ID: <5119217.EGiBXE3Be4@wuerfel> On Sunday, June 19, 2016 5:26:59 PM CEST Deepa Dinamani wrote: > The series is aimed at getting rid of CURRENT_TIME and CURRENT_TIME_SEC macros. > The macros are not y2038 safe. There is no plan to transition them into being > y2038 safe. > ktime_get_* api's can be used in their place. And, these are y2038 safe. > > Thanks to Arnd Bergmann for all the guidance and discussions. > > Patches 2-4 were mostly generated using coccinelle scripts. > > All filesystem timestamps use current_fs_time() for right granularity as > mentioned in the respective commit texts of patches. This has a changed > signature, renamed to current_time() and moved to the fs/inode.c. > > This series also serves as a preparatory series to transition vfs to 64 bit > timestamps as outlined here: https://lkml.org/lkml/2016/2/12/104 . > > As per Linus's suggestion in https://lkml.org/lkml/2016/5/24/663 , all the > inode timestamp changes have been squashed into a single patch. Also, > current_time() now is used as a single generic vfs filesystem timestamp api. > It also takes struct inode* as argument instead of struct super_block*. > Posting all patches together in a bigger series so that the big picture is > clear. > > As per the suggestion in https://lwn.net/Articles/672598/, CURRENT_TIME macro > bug fixes are being handled in a series separate from transitioning vfs to use. I've looked in detail at all the patches in this version now, and while overall everything is fine, I found that two patches cannot be part of the series because of the dependency on the patch that John already took (adding time64_to_tm), but I think that's ok because we just need to change over all the users of CURRENT_TIME and CURRENT_TIME_SEC that assign to inode timestamps in order to prepare for the type change, the other ones can be changed later. I also found a few things that could be done differently to make the later conversion slightly easier, but it's also possible that I missed part of your bigger plan for those files, and none of them seem important. Arnd From Lidza.Louina at oracle.com Thu Jun 23 17:24:25 2016 From: Lidza.Louina at oracle.com (Lidza Louina) Date: Thu, 23 Jun 2016 13:24:25 -0400 Subject: [lustre-devel] [PATCH] staging/lustre/lnet: correctly casts value for arithmetic Message-ID: <1466702665.3759.5.camel@lidza-VirtualBox> The code attempted to add an unsigned int to a an unsigned 64-bit integer. This patch casts the unsigned regular int to suppress smatch warnings. Signed-off-by: Lidza Louina --- drivers/staging/lustre/lnet/lnet/api-ni.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lnet/lnet/api-ni.c b/drivers/staging/lustre/lnet/lnet/api-ni.c index 346db89..5ecb2c7 100644 --- a/drivers/staging/lustre/lnet/lnet/api-ni.c +++ b/drivers/staging/lustre/lnet/lnet/api-ni.c @@ -513,7 +513,7 @@ lnet_res_lh_initialize(struct lnet_res_container *rec, lnet_libhandle_t *lh) unsigned int hash; lh->lh_cookie = rec->rec_lh_cookie; - rec->rec_lh_cookie += 1 << ibits; + rec->rec_lh_cookie += (__u64)(1 << ibits); hash = (lh->lh_cookie >> ibits) & LNET_LH_HASH_MASK; -- 1.9.1 From oleg.drokin at intel.com Thu Jun 23 17:52:17 2016 From: oleg.drokin at intel.com (Oleg Drokin) Date: Thu, 23 Jun 2016 13:52:17 -0400 Subject: [lustre-devel] [PATCH] staging/lustre/lnet: correctly casts value for arithmetic In-Reply-To: <1466702665.3759.5.camel@lidza-VirtualBox> References: <1466702665.3759.5.camel@lidza-VirtualBox> Message-ID: <05FFA4DA-9EF9-40E5-BA9E-0FAB6B023C01@intel.com> NAK. On Jun 23, 2016, at 1:24 PM, Lidza Louina wrote: > The code attempted to add an unsigned int to a an unsigned 64-bit > integer. This patch casts the unsigned regular int to suppress > smatch warnings. > > Signed-off-by: Lidza Louina > --- > drivers/staging/lustre/lnet/lnet/api-ni.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/lustre/lnet/lnet/api-ni.c b/drivers/staging/lustre/lnet/lnet/api-ni.c > index 346db89..5ecb2c7 100644 > --- a/drivers/staging/lustre/lnet/lnet/api-ni.c > +++ b/drivers/staging/lustre/lnet/lnet/api-ni.c > @@ -513,7 +513,7 @@ lnet_res_lh_initialize(struct lnet_res_container *rec, lnet_libhandle_t *lh) > unsigned int hash; > > lh->lh_cookie = rec->rec_lh_cookie; > - rec->rec_lh_cookie += 1 << ibits; > + rec->rec_lh_cookie += (__u64)(1 << ibits); This does not do what you think it does? You want to convert 1 into 1ULL so that the value you are shifting if already wide enough bit-wise? But in fact ibits is: LNET_COOKIE_TYPE_BITS + LNET_CPT_BITS LNET_COOKIE_TYPE_BITS is 2 and LNET_CPT_BITS is at max 8, so 10 in total, this should fit into a regular 32 bit integer with zero problems. So we should be fine I imagine either way. And adding 32bit int to 64bit int should always be ok anyway, right? Is it that the addition of signed to unsigned is problematic? Or what was the smatch warning? > > hash = (lh->lh_cookie >> ibits) & LNET_LH_HASH_MASK; > > -- > 1.9.1 > > > > _______________________________________________ > lustre-devel mailing list > lustre-devel at lists.lustre.org > http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org From lidza.louina at oracle.com Thu Jun 23 18:07:28 2016 From: lidza.louina at oracle.com (Lidza Louina) Date: Thu, 23 Jun 2016 11:07:28 -0700 (PDT) Subject: [lustre-devel] [PATCH] staging/lustre/lnet: correctly casts value for arithmetic Message-ID: ----- Original Message ----- From: oleg.drokin at intel.com To: lidza.louina at oracle.com Cc: gregkh at linuxfoundation.org, lustre-devel at lists.lustre.org, devel at driverdev.osuosl.org, andreas.dilger at intel.com Sent: Thursday, June 23, 2016 10:52:24 AM GMT -08:00 US/Canada Pacific Subject: Re: [lustre-devel] [PATCH] staging/lustre/lnet: correctly casts value for arithmetic NAK. On Jun 23, 2016, at 1:24 PM, Lidza Louina wrote: > The code attempted to add an unsigned int to a an unsigned 64-bit > integer. This patch casts the unsigned regular int to suppress > smatch warnings. > > Signed-off-by: Lidza Louina > --- > drivers/staging/lustre/lnet/lnet/api-ni.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/lustre/lnet/lnet/api-ni.c b/drivers/staging/lustre/lnet/lnet/api-ni.c > index 346db89..5ecb2c7 100644 > --- a/drivers/staging/lustre/lnet/lnet/api-ni.c > +++ b/drivers/staging/lustre/lnet/lnet/api-ni.c > @@ -513,7 +513,7 @@ lnet_res_lh_initialize(struct lnet_res_container *rec, lnet_libhandle_t *lh) > unsigned int hash; > > lh->lh_cookie = rec->rec_lh_cookie; > - rec->rec_lh_cookie += 1 << ibits; > + rec->rec_lh_cookie += (__u64)(1 << ibits); This does not do what you think it does? You want to convert 1 into 1ULL so that the value you are shifting if already wide enough bit-wise? But in fact ibits is: LNET_COOKIE_TYPE_BITS + LNET_CPT_BITS LNET_COOKIE_TYPE_BITS is 2 and LNET_CPT_BITS is at max 8, so 10 in total, this should fit into a regular 32 bit integer with zero problems. So we should be fine I imagine either way. And adding 32bit int to 64bit int should always be ok anyway, right? Is it that the addition of signed to unsigned is problematic? Or what was the smatch warning? The smatch warning had to do with the type of value rec->rec_1h_cookie was expecting. It's expecting it to be an unsigned 64 bit integer (I realize I didn't make that clear in my log). The math is correct, it's just the assignment that should be cast. The smatch warning was "drivers/staging/lustre/lnet/lnet/api-ni.c:516 lnet_res_lh_initialize() warn: should '1 << ibits' be a 64 bit type?" > > hash = (lh->lh_cookie >> ibits) & LNET_LH_HASH_MASK; > > -- > 1.9.1 > > > > _______________________________________________ > lustre-devel mailing list > lustre-devel at lists.lustre.org > http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org From oleg.drokin at intel.com Thu Jun 23 18:10:59 2016 From: oleg.drokin at intel.com (Oleg Drokin) Date: Thu, 23 Jun 2016 14:10:59 -0400 Subject: [lustre-devel] [PATCH] staging/lustre/lnet: correctly casts value for arithmetic In-Reply-To: References: Message-ID: On Jun 23, 2016, at 2:07 PM, Lidza Louina wrote: > The smatch warning was "drivers/staging/lustre/lnet/lnet/api-ni.c:516 > lnet_res_lh_initialize() warn: should '1 << ibits' be a 64 bit type?" I think you misinterpreted it, it has nothing to do with the addition. What it actually means is: 1 is a 32bit integer, you do a right shift by some variable number of bits. So please check if there's risk to overflow the 32 bits unexpectedly. The way to fix this warning is to replace 1 with 1ULL (unsigned long long) and that is fine to do as a way of future proofing this stuff even if it's not yet broken yet, I guess. > >> >> hash = (lh->lh_cookie >> ibits) & LNET_LH_HASH_MASK; >> >> -- >> 1.9.1 >> >> >> >> _______________________________________________ >> lustre-devel mailing list >> lustre-devel at lists.lustre.org >> http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org > From lidza.louina at oracle.com Thu Jun 23 18:30:44 2016 From: lidza.louina at oracle.com (Lidza Louina) Date: Thu, 23 Jun 2016 11:30:44 -0700 (PDT) Subject: [lustre-devel] [PATCH] staging/lustre/lnet: correctly casts value for arithmetic Message-ID: <18d59750-e77c-4443-bdb5-d48066a4303a@default> ----- Original Message ----- From: oleg.drokin at intel.com To: lidza.louina at oracle.com Cc: devel at driverdev.osuosl.org, andreas.dilger at intel.com, lustre-devel at lists.lustre.org, gregkh at linuxfoundation.org Sent: Thursday, June 23, 2016 11:11:06 AM GMT -08:00 US/Canada Pacific Subject: Re: [lustre-devel] [PATCH] staging/lustre/lnet: correctly casts value for arithmetic On Jun 23, 2016, at 2:07 PM, Lidza Louina wrote: > The smatch warning was "drivers/staging/lustre/lnet/lnet/api-ni.c:516 > lnet_res_lh_initialize() warn: should '1 << ibits' be a 64 bit type?" I think you misinterpreted it, it has nothing to do with the addition. What it actually means is: 1 is a 32bit integer, you do a right shift by some variable number of bits. So please check if there's risk to overflow the 32 bits unexpectedly. The way to fix this warning is to replace 1 with 1ULL (unsigned long long) and that is fine to do as a way of future proofing this stuff even if it's not yet broken yet, I guess. Ahh, okay, I see what you're saying and I see what I did wrong. I'm going to update the patch to: - rec->rec_lh_cookie += 1 << ibits; + rec->rec_lh_cookie += (1ULL << ibits); Lidza > >> >> hash = (lh->lh_cookie >> ibits) & LNET_LH_HASH_MASK; >> >> -- >> 1.9.1 >> >> >> >> _______________________________________________ >> lustre-devel mailing list >> lustre-devel at lists.lustre.org >> http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org > From Lidza.Louina at oracle.com Thu Jun 23 18:56:36 2016 From: Lidza.Louina at oracle.com (Lidza Louina) Date: Thu, 23 Jun 2016 14:56:36 -0400 Subject: [lustre-devel] [PATCH v2] staging/lustre/lnet: changes value to correct type for assignment Message-ID: <1466708196.10566.1.camel@lidza-VirtualBox> The code attempted to add an unsigned int to a an unsigned 64-bit integer. This patch makes the code use the correct type of int to suppress a smatch warning. Signed-off-by: Lidza Louina --- drivers/staging/lustre/lnet/lnet/api-ni.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lnet/lnet/api-ni.c b/drivers/staging/lustre/lnet/lnet/api-ni.c index 346db89..fc5b763 100644 --- a/drivers/staging/lustre/lnet/lnet/api-ni.c +++ b/drivers/staging/lustre/lnet/lnet/api-ni.c @@ -513,7 +513,7 @@ lnet_res_lh_initialize(struct lnet_res_container *rec, lnet_libhandle_t *lh) unsigned int hash; lh->lh_cookie = rec->rec_lh_cookie; - rec->rec_lh_cookie += 1 << ibits; + rec->rec_lh_cookie += (1ULL << ibits); hash = (lh->lh_cookie >> ibits) & LNET_LH_HASH_MASK; -- 1.9.1 From oleg.drokin at intel.com Thu Jun 23 19:14:20 2016 From: oleg.drokin at intel.com (Oleg Drokin) Date: Thu, 23 Jun 2016 15:14:20 -0400 Subject: [lustre-devel] [PATCH v2] staging/lustre/lnet: changes value to correct type for assignment In-Reply-To: <1466708196.10566.1.camel@lidza-VirtualBox> References: <1466708196.10566.1.camel@lidza-VirtualBox> Message-ID: <700D06CB-A2AD-43BE-BA82-555E78AC252C@intel.com> On Jun 23, 2016, at 2:56 PM, Lidza Louina wrote: > The code attempted to add an unsigned int to a an unsigned 64-bit > integer. This patch makes the code use the correct type of int to > suppress a smatch warning. I think you might want to update the commit message too, because it does not really make much sense now. > > Signed-off-by: Lidza Louina > --- > drivers/staging/lustre/lnet/lnet/api-ni.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/lustre/lnet/lnet/api-ni.c b/drivers/staging/lustre/lnet/lnet/api-ni.c > index 346db89..fc5b763 100644 > --- a/drivers/staging/lustre/lnet/lnet/api-ni.c > +++ b/drivers/staging/lustre/lnet/lnet/api-ni.c > @@ -513,7 +513,7 @@ lnet_res_lh_initialize(struct lnet_res_container *rec, lnet_libhandle_t *lh) > unsigned int hash; > > lh->lh_cookie = rec->rec_lh_cookie; > - rec->rec_lh_cookie += 1 << ibits; > + rec->rec_lh_cookie += (1ULL << ibits); > > hash = (lh->lh_cookie >> ibits) & LNET_LH_HASH_MASK; > > -- > 1.9.1 > > > > _______________________________________________ > lustre-devel mailing list > lustre-devel at lists.lustre.org > http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org From lidza.louina at oracle.com Thu Jun 23 19:27:45 2016 From: lidza.louina at oracle.com (Lidza Louina) Date: Thu, 23 Jun 2016 12:27:45 -0700 (PDT) Subject: [lustre-devel] [PATCH v2] staging/lustre/lnet: changes value to correct type for assignment Message-ID: <21218c92-e429-45df-aa98-1d91c6333957@default> ----- Original Message ----- From: oleg.drokin at intel.com To: lidza.louina at oracle.com Cc: gregkh at linuxfoundation.org, lustre-devel at lists.lustre.org, devel at driverdev.osuosl.org, andreas.dilger at intel.com Sent: Thursday, June 23, 2016 12:14:28 PM GMT -08:00 US/Canada Pacific Subject: Re: [lustre-devel] [PATCH v2] staging/lustre/lnet: changes value to correct type for assignment On Jun 23, 2016, at 2:56 PM, Lidza Louina wrote: > The code attempted to add an unsigned int to a an unsigned 64-bit > integer. This patch makes the code use the correct type of int to > suppress a smatch warning. I think you might want to update the commit message too, because it does not really make much sense now. How about "The patch changes a value's type so it can be assigned correctly. This problem was caught by smatch." > > Signed-off-by: Lidza Louina > --- > drivers/staging/lustre/lnet/lnet/api-ni.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/staging/lustre/lnet/lnet/api-ni.c b/drivers/staging/lustre/lnet/lnet/api-ni.c > index 346db89..fc5b763 100644 > --- a/drivers/staging/lustre/lnet/lnet/api-ni.c > +++ b/drivers/staging/lustre/lnet/lnet/api-ni.c > @@ -513,7 +513,7 @@ lnet_res_lh_initialize(struct lnet_res_container *rec, lnet_libhandle_t *lh) > unsigned int hash; > > lh->lh_cookie = rec->rec_lh_cookie; > - rec->rec_lh_cookie += 1 << ibits; > + rec->rec_lh_cookie += (1ULL << ibits); > > hash = (lh->lh_cookie >> ibits) & LNET_LH_HASH_MASK; > > -- > 1.9.1 > > > > _______________________________________________ > lustre-devel mailing list > lustre-devel at lists.lustre.org > http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org From oleg.drokin at intel.com Thu Jun 23 19:49:55 2016 From: oleg.drokin at intel.com (Oleg Drokin) Date: Thu, 23 Jun 2016 15:49:55 -0400 Subject: [lustre-devel] [PATCH v2] staging/lustre/lnet: changes value to correct type for assignment In-Reply-To: <21218c92-e429-45df-aa98-1d91c6333957@default> References: <21218c92-e429-45df-aa98-1d91c6333957@default> Message-ID: <4238F4C0-29B1-4B6A-8618-EAF8748BDECC@intel.com> On Jun 23, 2016, at 3:27 PM, Lidza Louina wrote: > > ----- Original Message ----- > From: oleg.drokin at intel.com > To: lidza.louina at oracle.com > Cc: gregkh at linuxfoundation.org, lustre-devel at lists.lustre.org, devel at driverdev.osuosl.org, andreas.dilger at intel.com > Sent: Thursday, June 23, 2016 12:14:28 PM GMT -08:00 US/Canada Pacific > Subject: Re: [lustre-devel] [PATCH v2] staging/lustre/lnet: changes value to correct type for assignment > > > On Jun 23, 2016, at 2:56 PM, Lidza Louina wrote: > >> The code attempted to add an unsigned int to a an unsigned 64-bit >> integer. This patch makes the code use the correct type of int to >> suppress a smatch warning. > > I think you might want to update the commit message too, because > it does not really make much sense now. > > How about > > "The patch changes a value's type so it can be assigned correctly. > This problem was caught by smatch." I think that still does not convey the idea of teh change, also there's no assignment going on here. Perhaps To make the shift safer, have it operate on a 64 bit integer instead of default 32bit? There's no bug yet, so this is just for future-proofing. This potential problem was caught by smatch. Also you'll need to update the patch subject. > >> >> Signed-off-by: Lidza Louina >> --- >> drivers/staging/lustre/lnet/lnet/api-ni.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/staging/lustre/lnet/lnet/api-ni.c b/drivers/staging/lustre/lnet/lnet/api-ni.c >> index 346db89..fc5b763 100644 >> --- a/drivers/staging/lustre/lnet/lnet/api-ni.c >> +++ b/drivers/staging/lustre/lnet/lnet/api-ni.c >> @@ -513,7 +513,7 @@ lnet_res_lh_initialize(struct lnet_res_container *rec, lnet_libhandle_t *lh) >> unsigned int hash; >> >> lh->lh_cookie = rec->rec_lh_cookie; >> - rec->rec_lh_cookie += 1 << ibits; >> + rec->rec_lh_cookie += (1ULL << ibits); >> >> hash = (lh->lh_cookie >> ibits) & LNET_LH_HASH_MASK; >> >> -- >> 1.9.1 >> >> >> >> _______________________________________________ >> lustre-devel mailing list >> lustre-devel at lists.lustre.org >> http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org > > _______________________________________________ > lustre-devel mailing list > lustre-devel at lists.lustre.org > http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org From craig at craiginches.com Sat Jun 18 21:25:27 2016 From: craig at craiginches.com (Craig Inches) Date: Sat, 18 Jun 2016 22:25:27 +0100 Subject: [lustre-devel] [PATCH 0/3] staging: luster: cl_object.h Checkpatch Cleanup Message-ID: Fix three different issues from checkpatch: Line over 80 Chars Unsigned int prefered over unsigned Macros with complex values should be enclosed in parenthesis Craig Inches (3): checkpatch style issue: Line over 80 char Checkpatch style issue: Checkpatch error cleanup drivers/staging/lustre/lustre/include/cl_object.h | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) -- 2.7.3 From craig at craiginches.com Sat Jun 18 21:25:42 2016 From: craig at craiginches.com (Craig Inches) Date: Sat, 18 Jun 2016 22:25:42 +0100 Subject: [lustre-devel] [PATCH 1/3] staging: luster: cl_object.h Checkpatch Cleanup In-Reply-To: References: Message-ID: <4b26b82c7081f368835365ff18ecc812263b0430.1466279901.git.craig@craiginches.com> Line length greater than 80 char. Signed-off-by: Craig Inches --- drivers/staging/lustre/lustre/include/cl_object.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/lustre/lustre/include/cl_object.h b/drivers/staging/lustre/lustre/include/cl_object.h index 99fc28e..3004625 100644 --- a/drivers/staging/lustre/lustre/include/cl_object.h +++ b/drivers/staging/lustre/lustre/include/cl_object.h @@ -1054,7 +1054,7 @@ do { \ #define CL_PAGE_HEADER(mask, env, page, format, ...) \ do { \ if (cfs_cdebug_show(mask, DEBUG_SUBSYSTEM)) { \ - LIBCFS_DEBUG_MSG_DATA_DECL(msgdata, mask, NULL); \ + LIBCFS_DEBUG_MSG_DATA_DECL(msgdata, mask, NULL); \ cl_page_header_print(env, &msgdata, lu_cdebug_printer, page); \ CDEBUG(mask, format, ## __VA_ARGS__); \ } \ -- 2.7.3 From bauerj at iodoctors.com Fri Jun 10 15:28:01 2016 From: bauerj at iodoctors.com (John Bauer) Date: Fri, 10 Jun 2016 10:28:01 -0500 Subject: [lustre-devel] [lustre-discuss] more on lustre striping In-Reply-To: <575AB28E.7090404@pittman.co.uk> References: <1ef5a267-334c-be0d-13f4-c0fab917d1bf@iodoctors.com> <38EA9F32-3869-43BA-B215-EB2E5BA62FD5@intel.com> <01EE2B9D-2359-49B5-A50F-E7C2D97E6696@intel.com> <44e2353d-3bef-ddd7-f15e-ad4bfdda040f@iodoctors.com> <9ebe9f4c-d5a2-4c93-4f00-49029850cbbe@iodoctors.com> <575AB28E.7090404@pittman.co.uk> Message-ID: <75a3831b-04ad-f8fd-1ec6-17e540d67e1d@iodoctors.com> Ashley That is what I have done for this case. But it does not solve the entire problem. One stdio call that is problematic is the freopen(). There is no way to pass the fd from open() to an existing FILE *. Thanks, John On 6/10/2016 7:29 AM, Ashley Pittman wrote: > On 22/05/16 02:56, John Bauer wrote: >> >> Oleg >> >> I can intercept the fopen(), but that does me no good as I can't set >> the O_LOV_DELAY_CREATE bit. What I can not intercept is the open() >> downstream of fopen(). If one examines the symbols in libc you will >> see there are no unsatisfied externals relating to open, which means >> there is nothing for the runtime linker to find concerning open's. I >> will have a look at the Lustre 1.8 source, but I seriously doubt that >> the open beneath fopen() was intercepted with LD_PRELOAD. I would >> love to find a way to do that. I could throw away a lot of code. >> Thanks, John >> > > Could you not intercept fopen() and implement it with calls to open() > and fdopen() yourself which would give you full control over what > you're looking for here? > > Ashley. -- I/O Doctors, LLC 507-766-0378 bauerj at iodoctors.com From bauerj at iodoctors.com Fri Jun 10 16:04:52 2016 From: bauerj at iodoctors.com (John Bauer) Date: Fri, 10 Jun 2016 11:04:52 -0500 Subject: [lustre-devel] [lustre-discuss] more on lustre striping In-Reply-To: <575AB28E.7090404@pittman.co.uk> References: <1ef5a267-334c-be0d-13f4-c0fab917d1bf@iodoctors.com> <38EA9F32-3869-43BA-B215-EB2E5BA62FD5@intel.com> <01EE2B9D-2359-49B5-A50F-E7C2D97E6696@intel.com> <44e2353d-3bef-ddd7-f15e-ad4bfdda040f@iodoctors.com> <9ebe9f4c-d5a2-4c93-4f00-49029850cbbe@iodoctors.com> <575AB28E.7090404@pittman.co.uk> Message-ID: <8a9e4e45-ea99-1147-5c58-94a73d9010a8@iodoctors.com> To confirm the point that you can not intercept the open called by fopen by using LD_PRELOAD, I have written a simple test case. Note that the runtime linker never looks for open(). Only fopen() *$ cat a.c* #include #include #include #include int main(int argc, char ** argv ){ FILE *f = fopen("a", "r" ) ; fprintf(stderr,"f=%p\n",f); fclose(f); } *$ file a* a: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=dfe043b4ec8cf19d5fd3fab524d7c72ed1453574, not stripped *$ cat a.csh* #!/bin/csh setenv LD_DEBUG all ./a >&! a.cpr *$ ./a.csh* *$ grep -i open a.cpr* 120584: symbol=fopen; lookup in file=./a [0] 120584: symbol=fopen; lookup in file=/lib64/libc.so.6 [0] 120584: binding file ./a [0] to /lib64/libc.so.6 [0]: normal symbol `fopen' [GLIBC_2.2.5] *$* On 6/10/2016 7:29 AM, Ashley Pittman wrote: > On 22/05/16 02:56, John Bauer wrote: >> >> Oleg >> >> I can intercept the fopen(), but that does me no good as I can't set >> the O_LOV_DELAY_CREATE bit. What I can not intercept is the open() >> downstream of fopen(). If one examines the symbols in libc you will >> see there are no unsatisfied externals relating to open, which means >> there is nothing for the runtime linker to find concerning open's. I >> will have a look at the Lustre 1.8 source, but I seriously doubt that >> the open beneath fopen() was intercepted with LD_PRELOAD. I would >> love to find a way to do that. I could throw away a lot of code. >> Thanks, John >> > > Could you not intercept fopen() and implement it with calls to open() > and fdopen() yourself which would give you full control over what > you're looking for here? > > Ashley. -- I/O Doctors, LLC 507-766-0378 bauerj at iodoctors.com -------------- next part -------------- An HTML attachment was scrubbed... URL: From green at linuxhacker.ru Wed Jun 15 00:44:14 2016 From: green at linuxhacker.ru (Oleg Drokin) Date: Tue, 14 Jun 2016 20:44:14 -0400 Subject: [lustre-devel] [PATCH 1/5] staging/lustre: Remove the "Please contact SUN for GPL" from headers In-Reply-To: <1465951458-847547-1-git-send-email-green@linuxhacker.ru> References: <1465951458-847547-1-git-send-email-green@linuxhacker.ru> Message-ID: <1465951458-847547-2-git-send-email-green@linuxhacker.ru> Since SUN is no longer around and there's no point in contacting them, just remove that whole thing. Copy of GPL is available online anyway (URLs to be updated in next patch). This patch was generated with: find drivers/staging/lustre -name "*.[ch]" -exec perl -0777 -i -pe 's/ \* Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,\n \* CA 95054 USA or visit www.sun.com if you need additional information or\n \* have any questions.\n \*\n//igs' {} \; Signed-off-by: Oleg Drokin Reported-by: Xose Vazquez Perez --- drivers/staging/lustre/include/linux/libcfs/curproc.h | 4 ---- drivers/staging/lustre/include/linux/libcfs/libcfs.h | 4 ---- drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h | 4 ---- drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h | 4 ---- drivers/staging/lustre/include/linux/libcfs/libcfs_ioctl.h | 4 ---- drivers/staging/lustre/include/linux/libcfs/libcfs_prim.h | 4 ---- drivers/staging/lustre/include/linux/libcfs/libcfs_private.h | 4 ---- drivers/staging/lustre/include/linux/libcfs/libcfs_string.h | 4 ---- drivers/staging/lustre/include/linux/libcfs/libcfs_time.h | 4 ---- drivers/staging/lustre/include/linux/libcfs/libcfs_workitem.h | 4 ---- drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h | 4 ---- drivers/staging/lustre/include/linux/libcfs/linux/linux-time.h | 4 ---- drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c | 4 ---- drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h | 4 ---- drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c | 4 ---- drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_modparams.c | 4 ---- drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c | 4 ---- drivers/staging/lustre/lnet/klnds/socklnd/socklnd_lib.c | 4 ---- drivers/staging/lustre/lnet/libcfs/debug.c | 4 ---- drivers/staging/lustre/lnet/libcfs/hash.c | 4 ---- drivers/staging/lustre/lnet/libcfs/libcfs_string.c | 4 ---- drivers/staging/lustre/lnet/libcfs/linux/linux-curproc.c | 4 ---- drivers/staging/lustre/lnet/libcfs/linux/linux-debug.c | 4 ---- drivers/staging/lustre/lnet/libcfs/linux/linux-module.c | 4 ---- drivers/staging/lustre/lnet/libcfs/linux/linux-prim.c | 4 ---- drivers/staging/lustre/lnet/libcfs/linux/linux-tracefile.c | 4 ---- drivers/staging/lustre/lnet/libcfs/module.c | 4 ---- drivers/staging/lustre/lnet/libcfs/prng.c | 4 ---- drivers/staging/lustre/lnet/libcfs/tracefile.c | 4 ---- drivers/staging/lustre/lnet/libcfs/tracefile.h | 4 ---- drivers/staging/lustre/lnet/libcfs/workitem.c | 4 ---- drivers/staging/lustre/lnet/lnet/acceptor.c | 4 ---- drivers/staging/lustre/lnet/lnet/api-ni.c | 4 ---- drivers/staging/lustre/lnet/lnet/config.c | 4 ---- drivers/staging/lustre/lnet/lnet/lib-eq.c | 4 ---- drivers/staging/lustre/lnet/lnet/lib-md.c | 4 ---- drivers/staging/lustre/lnet/lnet/lib-me.c | 4 ---- drivers/staging/lustre/lnet/lnet/lib-move.c | 4 ---- drivers/staging/lustre/lnet/lnet/lib-msg.c | 4 ---- drivers/staging/lustre/lnet/lnet/lo.c | 4 ---- drivers/staging/lustre/lnet/lnet/module.c | 4 ---- drivers/staging/lustre/lnet/lnet/nidstrings.c | 4 ---- drivers/staging/lustre/lnet/lnet/peer.c | 4 ---- drivers/staging/lustre/lnet/selftest/brw_test.c | 4 ---- drivers/staging/lustre/lnet/selftest/conctl.c | 4 ---- drivers/staging/lustre/lnet/selftest/conrpc.c | 4 ---- drivers/staging/lustre/lnet/selftest/conrpc.h | 4 ---- drivers/staging/lustre/lnet/selftest/console.c | 4 ---- drivers/staging/lustre/lnet/selftest/console.h | 4 ---- drivers/staging/lustre/lnet/selftest/framework.c | 4 ---- drivers/staging/lustre/lnet/selftest/module.c | 4 ---- drivers/staging/lustre/lnet/selftest/ping_test.c | 4 ---- drivers/staging/lustre/lnet/selftest/rpc.c | 4 ---- drivers/staging/lustre/lnet/selftest/rpc.h | 4 ---- drivers/staging/lustre/lnet/selftest/selftest.h | 4 ---- drivers/staging/lustre/lnet/selftest/timer.c | 4 ---- drivers/staging/lustre/lnet/selftest/timer.h | 4 ---- drivers/staging/lustre/lustre/fid/fid_internal.h | 4 ---- drivers/staging/lustre/lustre/fid/fid_lib.c | 4 ---- drivers/staging/lustre/lustre/fid/fid_request.c | 4 ---- drivers/staging/lustre/lustre/fid/lproc_fid.c | 4 ---- drivers/staging/lustre/lustre/fld/fld_cache.c | 4 ---- drivers/staging/lustre/lustre/fld/fld_internal.h | 4 ---- drivers/staging/lustre/lustre/fld/fld_request.c | 4 ---- drivers/staging/lustre/lustre/fld/lproc_fld.c | 4 ---- drivers/staging/lustre/lustre/include/cl_object.h | 4 ---- drivers/staging/lustre/lustre/include/interval_tree.h | 4 ---- drivers/staging/lustre/lustre/include/linux/lustre_compat25.h | 4 ---- drivers/staging/lustre/lustre/include/linux/lustre_lite.h | 4 ---- drivers/staging/lustre/lustre/include/linux/lustre_patchless_compat.h | 4 ---- drivers/staging/lustre/lustre/include/linux/lustre_user.h | 4 ---- drivers/staging/lustre/lustre/include/lprocfs_status.h | 4 ---- drivers/staging/lustre/lustre/include/lu_object.h | 4 ---- drivers/staging/lustre/lustre/include/lustre/ll_fiemap.h | 4 ---- drivers/staging/lustre/lustre/include/lustre/lustre_idl.h | 4 ---- drivers/staging/lustre/lustre/include/lustre/lustre_user.h | 4 ---- drivers/staging/lustre/lustre/include/lustre_acl.h | 4 ---- drivers/staging/lustre/lustre/include/lustre_cfg.h | 4 ---- drivers/staging/lustre/lustre/include/lustre_debug.h | 4 ---- drivers/staging/lustre/lustre/include/lustre_disk.h | 4 ---- drivers/staging/lustre/lustre/include/lustre_dlm.h | 4 ---- drivers/staging/lustre/lustre/include/lustre_eacl.h | 4 ---- drivers/staging/lustre/lustre/include/lustre_export.h | 4 ---- drivers/staging/lustre/lustre/include/lustre_fid.h | 4 ---- drivers/staging/lustre/lustre/include/lustre_fld.h | 4 ---- drivers/staging/lustre/lustre/include/lustre_ha.h | 4 ---- drivers/staging/lustre/lustre/include/lustre_handles.h | 4 ---- drivers/staging/lustre/lustre/include/lustre_import.h | 4 ---- drivers/staging/lustre/lustre/include/lustre_intent.h | 4 ---- drivers/staging/lustre/lustre/include/lustre_lib.h | 4 ---- drivers/staging/lustre/lustre/include/lustre_lite.h | 4 ---- drivers/staging/lustre/lustre/include/lustre_log.h | 4 ---- drivers/staging/lustre/lustre/include/lustre_mdc.h | 4 ---- drivers/staging/lustre/lustre/include/lustre_mds.h | 4 ---- drivers/staging/lustre/lustre/include/lustre_net.h | 4 ---- drivers/staging/lustre/lustre/include/lustre_param.h | 4 ---- drivers/staging/lustre/lustre/include/lustre_req_layout.h | 4 ---- drivers/staging/lustre/lustre/include/lustre_sec.h | 4 ---- drivers/staging/lustre/lustre/include/obd.h | 4 ---- drivers/staging/lustre/lustre/include/obd_cksum.h | 4 ---- drivers/staging/lustre/lustre/include/obd_class.h | 4 ---- drivers/staging/lustre/lustre/include/obd_support.h | 4 ---- drivers/staging/lustre/lustre/ldlm/interval_tree.c | 4 ---- drivers/staging/lustre/lustre/ldlm/l_lock.c | 4 ---- drivers/staging/lustre/lustre/ldlm/ldlm_extent.c | 4 ---- drivers/staging/lustre/lustre/ldlm/ldlm_flock.c | 4 ---- drivers/staging/lustre/lustre/ldlm/ldlm_inodebits.c | 4 ---- drivers/staging/lustre/lustre/ldlm/ldlm_internal.h | 4 ---- drivers/staging/lustre/lustre/ldlm/ldlm_lib.c | 4 ---- drivers/staging/lustre/lustre/ldlm/ldlm_lock.c | 4 ---- drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c | 4 ---- drivers/staging/lustre/lustre/ldlm/ldlm_plain.c | 4 ---- drivers/staging/lustre/lustre/ldlm/ldlm_pool.c | 4 ---- drivers/staging/lustre/lustre/ldlm/ldlm_request.c | 4 ---- drivers/staging/lustre/lustre/ldlm/ldlm_resource.c | 4 ---- drivers/staging/lustre/lustre/llite/dcache.c | 4 ---- drivers/staging/lustre/lustre/llite/dir.c | 4 ---- drivers/staging/lustre/lustre/llite/file.c | 4 ---- drivers/staging/lustre/lustre/llite/glimpse.c | 4 ---- drivers/staging/lustre/lustre/llite/lcommon_cl.c | 4 ---- drivers/staging/lustre/lustre/llite/lcommon_misc.c | 4 ---- drivers/staging/lustre/lustre/llite/llite_close.c | 4 ---- drivers/staging/lustre/lustre/llite/llite_internal.h | 4 ---- drivers/staging/lustre/lustre/llite/llite_lib.c | 4 ---- drivers/staging/lustre/lustre/llite/llite_mmap.c | 4 ---- drivers/staging/lustre/lustre/llite/llite_nfs.c | 4 ---- drivers/staging/lustre/lustre/llite/llite_rmtacl.c | 4 ---- drivers/staging/lustre/lustre/llite/lproc_llite.c | 4 ---- drivers/staging/lustre/lustre/llite/namei.c | 4 ---- drivers/staging/lustre/lustre/llite/remote_perm.c | 4 ---- drivers/staging/lustre/lustre/llite/rw.c | 4 ---- drivers/staging/lustre/lustre/llite/rw26.c | 4 ---- drivers/staging/lustre/lustre/llite/statahead.c | 4 ---- drivers/staging/lustre/lustre/llite/super25.c | 4 ---- drivers/staging/lustre/lustre/llite/symlink.c | 4 ---- drivers/staging/lustre/lustre/llite/vvp_dev.c | 4 ---- drivers/staging/lustre/lustre/llite/vvp_internal.h | 4 ---- drivers/staging/lustre/lustre/llite/vvp_io.c | 4 ---- drivers/staging/lustre/lustre/llite/vvp_lock.c | 4 ---- drivers/staging/lustre/lustre/llite/vvp_object.c | 4 ---- drivers/staging/lustre/lustre/llite/vvp_page.c | 4 ---- drivers/staging/lustre/lustre/llite/xattr.c | 4 ---- drivers/staging/lustre/lustre/lmv/lmv_fld.c | 4 ---- drivers/staging/lustre/lustre/lmv/lmv_intent.c | 4 ---- drivers/staging/lustre/lustre/lmv/lmv_internal.h | 4 ---- drivers/staging/lustre/lustre/lmv/lmv_obd.c | 4 ---- drivers/staging/lustre/lustre/lmv/lproc_lmv.c | 4 ---- drivers/staging/lustre/lustre/lov/lov_cl_internal.h | 4 ---- drivers/staging/lustre/lustre/lov/lov_dev.c | 4 ---- drivers/staging/lustre/lustre/lov/lov_ea.c | 4 ---- drivers/staging/lustre/lustre/lov/lov_internal.h | 4 ---- drivers/staging/lustre/lustre/lov/lov_io.c | 4 ---- drivers/staging/lustre/lustre/lov/lov_lock.c | 4 ---- drivers/staging/lustre/lustre/lov/lov_merge.c | 4 ---- drivers/staging/lustre/lustre/lov/lov_obd.c | 4 ---- drivers/staging/lustre/lustre/lov/lov_object.c | 4 ---- drivers/staging/lustre/lustre/lov/lov_offset.c | 4 ---- drivers/staging/lustre/lustre/lov/lov_pack.c | 4 ---- drivers/staging/lustre/lustre/lov/lov_page.c | 4 ---- drivers/staging/lustre/lustre/lov/lov_pool.c | 4 ---- drivers/staging/lustre/lustre/lov/lov_request.c | 4 ---- drivers/staging/lustre/lustre/lov/lovsub_dev.c | 4 ---- drivers/staging/lustre/lustre/lov/lovsub_io.c | 4 ---- drivers/staging/lustre/lustre/lov/lovsub_lock.c | 4 ---- drivers/staging/lustre/lustre/lov/lovsub_object.c | 4 ---- drivers/staging/lustre/lustre/lov/lovsub_page.c | 4 ---- drivers/staging/lustre/lustre/lov/lproc_lov.c | 4 ---- drivers/staging/lustre/lustre/mdc/lproc_mdc.c | 4 ---- drivers/staging/lustre/lustre/mdc/mdc_internal.h | 4 ---- drivers/staging/lustre/lustre/mdc/mdc_lib.c | 4 ---- drivers/staging/lustre/lustre/mdc/mdc_locks.c | 4 ---- drivers/staging/lustre/lustre/mdc/mdc_reint.c | 4 ---- drivers/staging/lustre/lustre/mdc/mdc_request.c | 4 ---- drivers/staging/lustre/lustre/mgc/lproc_mgc.c | 4 ---- drivers/staging/lustre/lustre/mgc/mgc_internal.h | 4 ---- drivers/staging/lustre/lustre/mgc/mgc_request.c | 4 ---- drivers/staging/lustre/lustre/obdclass/acl.c | 4 ---- drivers/staging/lustre/lustre/obdclass/cl_internal.h | 4 ---- drivers/staging/lustre/lustre/obdclass/cl_io.c | 4 ---- drivers/staging/lustre/lustre/obdclass/cl_lock.c | 4 ---- drivers/staging/lustre/lustre/obdclass/cl_object.c | 4 ---- drivers/staging/lustre/lustre/obdclass/cl_page.c | 4 ---- drivers/staging/lustre/lustre/obdclass/class_obd.c | 4 ---- drivers/staging/lustre/lustre/obdclass/debug.c | 4 ---- drivers/staging/lustre/lustre/obdclass/genops.c | 4 ---- drivers/staging/lustre/lustre/obdclass/kernelcomm.c | 4 ---- drivers/staging/lustre/lustre/obdclass/linux/linux-module.c | 4 ---- drivers/staging/lustre/lustre/obdclass/linux/linux-obdo.c | 4 ---- drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c | 4 ---- drivers/staging/lustre/lustre/obdclass/llog.c | 4 ---- drivers/staging/lustre/lustre/obdclass/llog_cat.c | 4 ---- drivers/staging/lustre/lustre/obdclass/llog_internal.h | 4 ---- drivers/staging/lustre/lustre/obdclass/llog_obd.c | 4 ---- drivers/staging/lustre/lustre/obdclass/llog_swab.c | 4 ---- drivers/staging/lustre/lustre/obdclass/lprocfs_status.c | 4 ---- drivers/staging/lustre/lustre/obdclass/lu_object.c | 4 ---- drivers/staging/lustre/lustre/obdclass/lu_ref.c | 4 ---- drivers/staging/lustre/lustre/obdclass/lustre_handles.c | 4 ---- drivers/staging/lustre/lustre/obdclass/lustre_peer.c | 4 ---- drivers/staging/lustre/lustre/obdclass/obd_config.c | 4 ---- drivers/staging/lustre/lustre/obdclass/obd_mount.c | 4 ---- drivers/staging/lustre/lustre/obdclass/obdo.c | 4 ---- drivers/staging/lustre/lustre/obdclass/statfs_pack.c | 4 ---- drivers/staging/lustre/lustre/obdclass/uuid.c | 4 ---- drivers/staging/lustre/lustre/obdecho/echo_client.c | 4 ---- drivers/staging/lustre/lustre/osc/lproc_osc.c | 4 ---- drivers/staging/lustre/lustre/osc/osc_cache.c | 4 ---- drivers/staging/lustre/lustre/osc/osc_cl_internal.h | 4 ---- drivers/staging/lustre/lustre/osc/osc_dev.c | 4 ---- drivers/staging/lustre/lustre/osc/osc_internal.h | 4 ---- drivers/staging/lustre/lustre/osc/osc_io.c | 4 ---- drivers/staging/lustre/lustre/osc/osc_lock.c | 4 ---- drivers/staging/lustre/lustre/osc/osc_object.c | 4 ---- drivers/staging/lustre/lustre/osc/osc_page.c | 4 ---- drivers/staging/lustre/lustre/osc/osc_request.c | 4 ---- drivers/staging/lustre/lustre/ptlrpc/client.c | 4 ---- drivers/staging/lustre/lustre/ptlrpc/connection.c | 4 ---- drivers/staging/lustre/lustre/ptlrpc/events.c | 4 ---- drivers/staging/lustre/lustre/ptlrpc/import.c | 4 ---- drivers/staging/lustre/lustre/ptlrpc/layout.c | 4 ---- drivers/staging/lustre/lustre/ptlrpc/llog_client.c | 4 ---- drivers/staging/lustre/lustre/ptlrpc/llog_net.c | 4 ---- drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c | 4 ---- drivers/staging/lustre/lustre/ptlrpc/niobuf.c | 4 ---- drivers/staging/lustre/lustre/ptlrpc/pack_generic.c | 4 ---- drivers/staging/lustre/lustre/ptlrpc/pers.c | 4 ---- drivers/staging/lustre/lustre/ptlrpc/pinger.c | 4 ---- drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h | 4 ---- drivers/staging/lustre/lustre/ptlrpc/ptlrpc_module.c | 4 ---- drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c | 4 ---- drivers/staging/lustre/lustre/ptlrpc/recover.c | 4 ---- drivers/staging/lustre/lustre/ptlrpc/sec.c | 4 ---- drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c | 4 ---- drivers/staging/lustre/lustre/ptlrpc/sec_config.c | 4 ---- drivers/staging/lustre/lustre/ptlrpc/sec_gc.c | 4 ---- drivers/staging/lustre/lustre/ptlrpc/sec_lproc.c | 4 ---- drivers/staging/lustre/lustre/ptlrpc/sec_null.c | 4 ---- drivers/staging/lustre/lustre/ptlrpc/sec_plain.c | 4 ---- drivers/staging/lustre/lustre/ptlrpc/service.c | 4 ---- drivers/staging/lustre/lustre/ptlrpc/wiretest.c | 4 ---- 240 files changed, 960 deletions(-) diff --git a/drivers/staging/lustre/include/linux/libcfs/curproc.h b/drivers/staging/lustre/include/linux/libcfs/curproc.h index 1edfca5..c673dfc 100644 --- a/drivers/staging/lustre/include/linux/libcfs/curproc.h +++ b/drivers/staging/lustre/include/linux/libcfs/curproc.h @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs.h b/drivers/staging/lustre/include/linux/libcfs/libcfs.h index 4141afb..c93d58e 100644 --- a/drivers/staging/lustre/include/linux/libcfs/libcfs.h +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs.h @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h index 455c54d..ae8175c 100644 --- a/drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_debug.h @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h index 119986b..6a4387b 100644 --- a/drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_hash.h @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_ioctl.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_ioctl.h index 4b9102b..9bdff3f 100644 --- a/drivers/staging/lustre/include/linux/libcfs/libcfs_ioctl.h +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_ioctl.h @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_prim.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_prim.h index ac4e8cf..881aae0 100644 --- a/drivers/staging/lustre/include/linux/libcfs/libcfs_prim.h +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_prim.h @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_private.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_private.h index 2fd2a96..c44e11d 100644 --- a/drivers/staging/lustre/include/linux/libcfs/libcfs_private.h +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_private.h @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_string.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_string.h index e02cde5..03939ce 100644 --- a/drivers/staging/lustre/include/linux/libcfs/libcfs_string.h +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_string.h @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_time.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_time.h index 2c7ec2d..3f0ec7a 100644 --- a/drivers/staging/lustre/include/linux/libcfs/libcfs_time.h +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_time.h @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/include/linux/libcfs/libcfs_workitem.h b/drivers/staging/lustre/include/linux/libcfs/libcfs_workitem.h index f9b20c5..5ff23bb 100644 --- a/drivers/staging/lustre/include/linux/libcfs/libcfs_workitem.h +++ b/drivers/staging/lustre/include/linux/libcfs/libcfs_workitem.h @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h b/drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h index a268ef7..3652119 100644 --- a/drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h +++ b/drivers/staging/lustre/include/linux/libcfs/linux/libcfs.h @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/include/linux/libcfs/linux/linux-time.h b/drivers/staging/lustre/include/linux/libcfs/linux/linux-time.h index 7656b09..887811b 100644 --- a/drivers/staging/lustre/include/linux/libcfs/linux/linux-time.h +++ b/drivers/staging/lustre/include/linux/libcfs/linux/linux-time.h @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c index 4bb32f1..ebd1294 100644 --- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c +++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h index 45bbe93..8567941 100644 --- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h +++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd.h @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c index 0f7e3a1..ddfda67 100644 --- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c +++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_cb.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_modparams.c b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_modparams.c index f8fdd4a..3e0e3a1 100644 --- a/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_modparams.c +++ b/drivers/staging/lustre/lnet/klnds/o2iblnd/o2iblnd_modparams.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c index 406c0e7..e9152a4 100644 --- a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c +++ b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_lib.c b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_lib.c index 964b4e3..d83b5bd 100644 --- a/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_lib.c +++ b/drivers/staging/lustre/lnet/klnds/socklnd/socklnd_lib.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lnet/libcfs/debug.c b/drivers/staging/lustre/lnet/libcfs/debug.c index 8c260c3..0079a4c 100644 --- a/drivers/staging/lustre/lnet/libcfs/debug.c +++ b/drivers/staging/lustre/lnet/libcfs/debug.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lnet/libcfs/hash.c b/drivers/staging/lustre/lnet/libcfs/hash.c index cc45ed8..db51124 100644 --- a/drivers/staging/lustre/lnet/libcfs/hash.c +++ b/drivers/staging/lustre/lnet/libcfs/hash.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lnet/libcfs/libcfs_string.c b/drivers/staging/lustre/lnet/libcfs/libcfs_string.c index 50ac153..750691c 100644 --- a/drivers/staging/lustre/lnet/libcfs/libcfs_string.c +++ b/drivers/staging/lustre/lnet/libcfs/libcfs_string.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lnet/libcfs/linux/linux-curproc.c b/drivers/staging/lustre/lnet/libcfs/linux/linux-curproc.c index 13d31e8..4fe58dd 100644 --- a/drivers/staging/lustre/lnet/libcfs/linux/linux-curproc.c +++ b/drivers/staging/lustre/lnet/libcfs/linux/linux-curproc.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lnet/libcfs/linux/linux-debug.c b/drivers/staging/lustre/lnet/libcfs/linux/linux-debug.c index 638e4b3..808d09b 100644 --- a/drivers/staging/lustre/lnet/libcfs/linux/linux-debug.c +++ b/drivers/staging/lustre/lnet/libcfs/linux/linux-debug.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lnet/libcfs/linux/linux-module.c b/drivers/staging/lustre/lnet/libcfs/linux/linux-module.c index d89f71e..8caee5b 100644 --- a/drivers/staging/lustre/lnet/libcfs/linux/linux-module.c +++ b/drivers/staging/lustre/lnet/libcfs/linux/linux-module.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lnet/libcfs/linux/linux-prim.c b/drivers/staging/lustre/lnet/libcfs/linux/linux-prim.c index bbe19a6..c1152e6 100644 --- a/drivers/staging/lustre/lnet/libcfs/linux/linux-prim.c +++ b/drivers/staging/lustre/lnet/libcfs/linux/linux-prim.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lnet/libcfs/linux/linux-tracefile.c b/drivers/staging/lustre/lnet/libcfs/linux/linux-tracefile.c index 91c2ae8..6c9e3976 100644 --- a/drivers/staging/lustre/lnet/libcfs/linux/linux-tracefile.c +++ b/drivers/staging/lustre/lnet/libcfs/linux/linux-tracefile.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lnet/libcfs/module.c b/drivers/staging/lustre/lnet/libcfs/module.c index f2d0411..065f968 100644 --- a/drivers/staging/lustre/lnet/libcfs/module.c +++ b/drivers/staging/lustre/lnet/libcfs/module.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lnet/libcfs/prng.c b/drivers/staging/lustre/lnet/libcfs/prng.c index c75ae9a..f2e8426 100644 --- a/drivers/staging/lustre/lnet/libcfs/prng.c +++ b/drivers/staging/lustre/lnet/libcfs/prng.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lnet/libcfs/tracefile.c b/drivers/staging/lustre/lnet/libcfs/tracefile.c index 7739b94..ba0e7c3 100644 --- a/drivers/staging/lustre/lnet/libcfs/tracefile.c +++ b/drivers/staging/lustre/lnet/libcfs/tracefile.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lnet/libcfs/tracefile.h b/drivers/staging/lustre/lnet/libcfs/tracefile.h index ac84e7f..ae1c614 100644 --- a/drivers/staging/lustre/lnet/libcfs/tracefile.h +++ b/drivers/staging/lustre/lnet/libcfs/tracefile.h @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lnet/libcfs/workitem.c b/drivers/staging/lustre/lnet/libcfs/workitem.c index 92236ae..c51f389 100644 --- a/drivers/staging/lustre/lnet/libcfs/workitem.c +++ b/drivers/staging/lustre/lnet/libcfs/workitem.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lnet/lnet/acceptor.c b/drivers/staging/lustre/lnet/lnet/acceptor.c index 1452bb3..4456286 100644 --- a/drivers/staging/lustre/lnet/lnet/acceptor.c +++ b/drivers/staging/lustre/lnet/lnet/acceptor.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lnet/lnet/api-ni.c b/drivers/staging/lustre/lnet/lnet/api-ni.c index fe0dbe7..7662c3b 100644 --- a/drivers/staging/lustre/lnet/lnet/api-ni.c +++ b/drivers/staging/lustre/lnet/lnet/api-ni.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lnet/lnet/config.c b/drivers/staging/lustre/lnet/lnet/config.c index 480cc9c..358e5cf 100644 --- a/drivers/staging/lustre/lnet/lnet/config.c +++ b/drivers/staging/lustre/lnet/lnet/config.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lnet/lnet/lib-eq.c b/drivers/staging/lustre/lnet/lnet/lib-eq.c index adbcadb..d04c687 100644 --- a/drivers/staging/lustre/lnet/lnet/lib-eq.c +++ b/drivers/staging/lustre/lnet/lnet/lib-eq.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lnet/lnet/lib-md.c b/drivers/staging/lustre/lnet/lnet/lib-md.c index 75d3121..51145f1 100644 --- a/drivers/staging/lustre/lnet/lnet/lib-md.c +++ b/drivers/staging/lustre/lnet/lnet/lib-md.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lnet/lnet/lib-me.c b/drivers/staging/lustre/lnet/lnet/lib-me.c index e671aed..1c370f4 100644 --- a/drivers/staging/lustre/lnet/lnet/lib-me.c +++ b/drivers/staging/lustre/lnet/lnet/lib-me.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lnet/lnet/lib-move.c b/drivers/staging/lustre/lnet/lnet/lib-move.c index c5d5bed..f5c6eac 100644 --- a/drivers/staging/lustre/lnet/lnet/lib-move.c +++ b/drivers/staging/lustre/lnet/lnet/lib-move.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lnet/lnet/lib-msg.c b/drivers/staging/lustre/lnet/lnet/lib-msg.c index f879d7f..77ae4e6 100644 --- a/drivers/staging/lustre/lnet/lnet/lib-msg.c +++ b/drivers/staging/lustre/lnet/lnet/lib-msg.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lnet/lnet/lo.c b/drivers/staging/lustre/lnet/lnet/lo.c index 468eda6..6441ef3 100644 --- a/drivers/staging/lustre/lnet/lnet/lo.c +++ b/drivers/staging/lustre/lnet/lnet/lo.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lnet/lnet/module.c b/drivers/staging/lustre/lnet/lnet/module.c index 246b5c1..40f3c52 100644 --- a/drivers/staging/lustre/lnet/lnet/module.c +++ b/drivers/staging/lustre/lnet/lnet/module.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lnet/lnet/nidstrings.c b/drivers/staging/lustre/lnet/lnet/nidstrings.c index ebf468f..74bfda1 100644 --- a/drivers/staging/lustre/lnet/lnet/nidstrings.c +++ b/drivers/staging/lustre/lnet/lnet/nidstrings.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lnet/lnet/peer.c b/drivers/staging/lustre/lnet/lnet/peer.c index b026fee..5fde05a 100644 --- a/drivers/staging/lustre/lnet/lnet/peer.c +++ b/drivers/staging/lustre/lnet/lnet/peer.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lnet/selftest/brw_test.c b/drivers/staging/lustre/lnet/selftest/brw_test.c index a63d86c..6e25e1a 100644 --- a/drivers/staging/lustre/lnet/selftest/brw_test.c +++ b/drivers/staging/lustre/lnet/selftest/brw_test.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lnet/selftest/conctl.c b/drivers/staging/lustre/lnet/selftest/conctl.c index 408c614..9a22f33 100644 --- a/drivers/staging/lustre/lnet/selftest/conctl.c +++ b/drivers/staging/lustre/lnet/selftest/conctl.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lnet/selftest/conrpc.c b/drivers/staging/lustre/lnet/selftest/conrpc.c index 6f68758..e649d37 100644 --- a/drivers/staging/lustre/lnet/selftest/conrpc.c +++ b/drivers/staging/lustre/lnet/selftest/conrpc.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lnet/selftest/conrpc.h b/drivers/staging/lustre/lnet/selftest/conrpc.h index 90c3385..1d8bb63 100644 --- a/drivers/staging/lustre/lnet/selftest/conrpc.h +++ b/drivers/staging/lustre/lnet/selftest/conrpc.h @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lnet/selftest/console.c b/drivers/staging/lustre/lnet/selftest/console.c index a03e52d..31001f4 100644 --- a/drivers/staging/lustre/lnet/selftest/console.c +++ b/drivers/staging/lustre/lnet/selftest/console.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lnet/selftest/console.h b/drivers/staging/lustre/lnet/selftest/console.h index becd22e..b099946 100644 --- a/drivers/staging/lustre/lnet/selftest/console.h +++ b/drivers/staging/lustre/lnet/selftest/console.h @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lnet/selftest/framework.c b/drivers/staging/lustre/lnet/selftest/framework.c index 30e4f71..0d53307 100644 --- a/drivers/staging/lustre/lnet/selftest/framework.c +++ b/drivers/staging/lustre/lnet/selftest/framework.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lnet/selftest/module.c b/drivers/staging/lustre/lnet/selftest/module.c index cc046b1..b6a3bdf 100644 --- a/drivers/staging/lustre/lnet/selftest/module.c +++ b/drivers/staging/lustre/lnet/selftest/module.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lnet/selftest/ping_test.c b/drivers/staging/lustre/lnet/selftest/ping_test.c index ad26fe9..3030c07 100644 --- a/drivers/staging/lustre/lnet/selftest/ping_test.c +++ b/drivers/staging/lustre/lnet/selftest/ping_test.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lnet/selftest/rpc.c b/drivers/staging/lustre/lnet/selftest/rpc.c index 3c45a7c..e7aba01 100644 --- a/drivers/staging/lustre/lnet/selftest/rpc.c +++ b/drivers/staging/lustre/lnet/selftest/rpc.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lnet/selftest/rpc.h b/drivers/staging/lustre/lnet/selftest/rpc.h index c9b904c..3254f5d 100644 --- a/drivers/staging/lustre/lnet/selftest/rpc.h +++ b/drivers/staging/lustre/lnet/selftest/rpc.h @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lnet/selftest/selftest.h b/drivers/staging/lustre/lnet/selftest/selftest.h index 4eac1c9..4a1d2b2 100644 --- a/drivers/staging/lustre/lnet/selftest/selftest.h +++ b/drivers/staging/lustre/lnet/selftest/selftest.h @@ -18,10 +18,6 @@ * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * copy of GPLv2]. * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lnet/selftest/timer.c b/drivers/staging/lustre/lnet/selftest/timer.c index b6c4aae..c73ded9 100644 --- a/drivers/staging/lustre/lnet/selftest/timer.c +++ b/drivers/staging/lustre/lnet/selftest/timer.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lnet/selftest/timer.h b/drivers/staging/lustre/lnet/selftest/timer.h index f1fbebd..e86e44e 100644 --- a/drivers/staging/lustre/lnet/selftest/timer.h +++ b/drivers/staging/lustre/lnet/selftest/timer.h @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/fid/fid_internal.h b/drivers/staging/lustre/lustre/fid/fid_internal.h index b79a813..d6aebb3 100644 --- a/drivers/staging/lustre/lustre/fid/fid_internal.h +++ b/drivers/staging/lustre/lustre/fid/fid_internal.h @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/fid/fid_lib.c b/drivers/staging/lustre/lustre/fid/fid_lib.c index dd65159..ee7b272 100644 --- a/drivers/staging/lustre/lustre/fid/fid_lib.c +++ b/drivers/staging/lustre/lustre/fid/fid_lib.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/fid/fid_request.c b/drivers/staging/lustre/lustre/fid/fid_request.c index 9db21ba..00b19c7 100644 --- a/drivers/staging/lustre/lustre/fid/fid_request.c +++ b/drivers/staging/lustre/lustre/fid/fid_request.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/fid/lproc_fid.c b/drivers/staging/lustre/lustre/fid/lproc_fid.c index 1f0e786..0103af5 100644 --- a/drivers/staging/lustre/lustre/fid/lproc_fid.c +++ b/drivers/staging/lustre/lustre/fid/lproc_fid.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/fld/fld_cache.c b/drivers/staging/lustre/lustre/fld/fld_cache.c index 5a04e99..cb33d41 100644 --- a/drivers/staging/lustre/lustre/fld/fld_cache.c +++ b/drivers/staging/lustre/lustre/fld/fld_cache.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/fld/fld_internal.h b/drivers/staging/lustre/lustre/fld/fld_internal.h index 75d6a48..a85d86a 100644 --- a/drivers/staging/lustre/lustre/fld/fld_internal.h +++ b/drivers/staging/lustre/lustre/fld/fld_internal.h @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/fld/fld_request.c b/drivers/staging/lustre/lustre/fld/fld_request.c index 304c0ec..5f43af4 100644 --- a/drivers/staging/lustre/lustre/fld/fld_request.c +++ b/drivers/staging/lustre/lustre/fld/fld_request.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/fld/lproc_fld.c b/drivers/staging/lustre/lustre/fld/lproc_fld.c index ca898be..1b96880 100644 --- a/drivers/staging/lustre/lustre/fld/lproc_fld.c +++ b/drivers/staging/lustre/lustre/fld/lproc_fld.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/include/cl_object.h b/drivers/staging/lustre/lustre/include/cl_object.h index d4c33dd..a5a28f5 100644 --- a/drivers/staging/lustre/lustre/include/cl_object.h +++ b/drivers/staging/lustre/lustre/include/cl_object.h @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/include/interval_tree.h b/drivers/staging/lustre/lustre/include/interval_tree.h index f6df3f3..64cab4b 100644 --- a/drivers/staging/lustre/lustre/include/interval_tree.h +++ b/drivers/staging/lustre/lustre/include/interval_tree.h @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/include/linux/lustre_compat25.h b/drivers/staging/lustre/lustre/include/linux/lustre_compat25.h index 79d8f93..7690fa7 100644 --- a/drivers/staging/lustre/lustre/include/linux/lustre_compat25.h +++ b/drivers/staging/lustre/lustre/include/linux/lustre_compat25.h @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/include/linux/lustre_lite.h b/drivers/staging/lustre/lustre/include/linux/lustre_lite.h index 3420cfd..abefa93 100644 --- a/drivers/staging/lustre/lustre/include/linux/lustre_lite.h +++ b/drivers/staging/lustre/lustre/include/linux/lustre_lite.h @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/include/linux/lustre_patchless_compat.h b/drivers/staging/lustre/lustre/include/linux/lustre_patchless_compat.h index c6c7f54..6d138b2 100644 --- a/drivers/staging/lustre/lustre/include/linux/lustre_patchless_compat.h +++ b/drivers/staging/lustre/lustre/include/linux/lustre_patchless_compat.h @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/include/linux/lustre_user.h b/drivers/staging/lustre/lustre/include/linux/lustre_user.h index 9cc2849..7403139 100644 --- a/drivers/staging/lustre/lustre/include/linux/lustre_user.h +++ b/drivers/staging/lustre/lustre/include/linux/lustre_user.h @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/include/lprocfs_status.h b/drivers/staging/lustre/lustre/include/lprocfs_status.h index 4146c9c..4f5ab54 100644 --- a/drivers/staging/lustre/lustre/include/lprocfs_status.h +++ b/drivers/staging/lustre/lustre/include/lprocfs_status.h @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/include/lu_object.h b/drivers/staging/lustre/lustre/include/lu_object.h index 2816512..b7bfe39 100644 --- a/drivers/staging/lustre/lustre/include/lu_object.h +++ b/drivers/staging/lustre/lustre/include/lu_object.h @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/include/lustre/ll_fiemap.h b/drivers/staging/lustre/lustre/include/lustre/ll_fiemap.h index 07d45de..664f135 100644 --- a/drivers/staging/lustre/lustre/include/lustre/ll_fiemap.h +++ b/drivers/staging/lustre/lustre/include/lustre/ll_fiemap.h @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h index 9c53c17..e5031b1 100644 --- a/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h +++ b/drivers/staging/lustre/lustre/include/lustre/lustre_idl.h @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/include/lustre/lustre_user.h b/drivers/staging/lustre/lustre/include/lustre/lustre_user.h index 59ba48a..3b48ba5 100644 --- a/drivers/staging/lustre/lustre/include/lustre/lustre_user.h +++ b/drivers/staging/lustre/lustre/include/lustre/lustre_user.h @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/include/lustre_acl.h b/drivers/staging/lustre/lustre/include/lustre_acl.h index aa4cfa7..9773db7 100644 --- a/drivers/staging/lustre/lustre/include/lustre_acl.h +++ b/drivers/staging/lustre/lustre/include/lustre_acl.h @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/include/lustre_cfg.h b/drivers/staging/lustre/lustre/include/lustre_cfg.h index e229e91..f532af6 100644 --- a/drivers/staging/lustre/lustre/include/lustre_cfg.h +++ b/drivers/staging/lustre/lustre/include/lustre_cfg.h @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/include/lustre_debug.h b/drivers/staging/lustre/lustre/include/lustre_debug.h index 8a08941..bd531ff 100644 --- a/drivers/staging/lustre/lustre/include/lustre_debug.h +++ b/drivers/staging/lustre/lustre/include/lustre_debug.h @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/include/lustre_disk.h b/drivers/staging/lustre/lustre/include/lustre_disk.h index b36821f..f30c601 100644 --- a/drivers/staging/lustre/lustre/include/lustre_disk.h +++ b/drivers/staging/lustre/lustre/include/lustre_disk.h @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/include/lustre_dlm.h b/drivers/staging/lustre/lustre/include/lustre_dlm.h index 9cade14..bdc1da7 100644 --- a/drivers/staging/lustre/lustre/include/lustre_dlm.h +++ b/drivers/staging/lustre/lustre/include/lustre_dlm.h @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/include/lustre_eacl.h b/drivers/staging/lustre/lustre/include/lustre_eacl.h index 0b66593..caab6e3 100644 --- a/drivers/staging/lustre/lustre/include/lustre_eacl.h +++ b/drivers/staging/lustre/lustre/include/lustre_eacl.h @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/include/lustre_export.h b/drivers/staging/lustre/lustre/include/lustre_export.h index 3014d27..41b6a7c 100644 --- a/drivers/staging/lustre/lustre/include/lustre_export.h +++ b/drivers/staging/lustre/lustre/include/lustre_export.h @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/include/lustre_fid.h b/drivers/staging/lustre/lustre/include/lustre_fid.h index 12e8b58..e3794d6 100644 --- a/drivers/staging/lustre/lustre/include/lustre_fid.h +++ b/drivers/staging/lustre/lustre/include/lustre_fid.h @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/include/lustre_fld.h b/drivers/staging/lustre/lustre/include/lustre_fld.h index 4cf2b0e..6a91cbc 100644 --- a/drivers/staging/lustre/lustre/include/lustre_fld.h +++ b/drivers/staging/lustre/lustre/include/lustre_fld.h @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/include/lustre_ha.h b/drivers/staging/lustre/lustre/include/lustre_ha.h index 5488a69..152b0ee 100644 --- a/drivers/staging/lustre/lustre/include/lustre_ha.h +++ b/drivers/staging/lustre/lustre/include/lustre_ha.h @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/include/lustre_handles.h b/drivers/staging/lustre/lustre/include/lustre_handles.h index 27f169d..c1906c2 100644 --- a/drivers/staging/lustre/lustre/include/lustre_handles.h +++ b/drivers/staging/lustre/lustre/include/lustre_handles.h @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/include/lustre_import.h b/drivers/staging/lustre/lustre/include/lustre_import.h index 8325c82..d4f7680 100644 --- a/drivers/staging/lustre/lustre/include/lustre_import.h +++ b/drivers/staging/lustre/lustre/include/lustre_import.h @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/include/lustre_intent.h b/drivers/staging/lustre/lustre/include/lustre_intent.h index c491d52..d5b15a4 100644 --- a/drivers/staging/lustre/lustre/include/lustre_intent.h +++ b/drivers/staging/lustre/lustre/include/lustre_intent.h @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/include/lustre_lib.h b/drivers/staging/lustre/lustre/include/lustre_lib.h index 00b9767..f7b0ce8 100644 --- a/drivers/staging/lustre/lustre/include/lustre_lib.h +++ b/drivers/staging/lustre/lustre/include/lustre_lib.h @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/include/lustre_lite.h b/drivers/staging/lustre/lustre/include/lustre_lite.h index fcc5ebb..bd328e5 100644 --- a/drivers/staging/lustre/lustre/include/lustre_lite.h +++ b/drivers/staging/lustre/lustre/include/lustre_lite.h @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/include/lustre_log.h b/drivers/staging/lustre/lustre/include/lustre_log.h index 49618e1..7a3940a 100644 --- a/drivers/staging/lustre/lustre/include/lustre_log.h +++ b/drivers/staging/lustre/lustre/include/lustre_log.h @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/include/lustre_mdc.h b/drivers/staging/lustre/lustre/include/lustre_mdc.h index f267ff8..cc4158c 100644 --- a/drivers/staging/lustre/lustre/include/lustre_mdc.h +++ b/drivers/staging/lustre/lustre/include/lustre_mdc.h @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/include/lustre_mds.h b/drivers/staging/lustre/lustre/include/lustre_mds.h index 95d27dd..9bcd3cd 100644 --- a/drivers/staging/lustre/lustre/include/lustre_mds.h +++ b/drivers/staging/lustre/lustre/include/lustre_mds.h @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/include/lustre_net.h b/drivers/staging/lustre/lustre/include/lustre_net.h index a7973d5..ce31181 100644 --- a/drivers/staging/lustre/lustre/include/lustre_net.h +++ b/drivers/staging/lustre/lustre/include/lustre_net.h @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/include/lustre_param.h b/drivers/staging/lustre/lustre/include/lustre_param.h index a42cf90..dc6f2b2 100644 --- a/drivers/staging/lustre/lustre/include/lustre_param.h +++ b/drivers/staging/lustre/lustre/include/lustre_param.h @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/include/lustre_req_layout.h b/drivers/staging/lustre/lustre/include/lustre_req_layout.h index 0aac439..acbc310 100644 --- a/drivers/staging/lustre/lustre/include/lustre_req_layout.h +++ b/drivers/staging/lustre/lustre/include/lustre_req_layout.h @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/include/lustre_sec.h b/drivers/staging/lustre/lustre/include/lustre_sec.h index 01b4e67..7ca6204 100644 --- a/drivers/staging/lustre/lustre/include/lustre_sec.h +++ b/drivers/staging/lustre/lustre/include/lustre_sec.h @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/include/obd.h b/drivers/staging/lustre/lustre/include/obd.h index 2d926e0..6c94fa4 100644 --- a/drivers/staging/lustre/lustre/include/obd.h +++ b/drivers/staging/lustre/lustre/include/obd.h @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/include/obd_cksum.h b/drivers/staging/lustre/lustre/include/obd_cksum.h index f6c18df..02705a5 100644 --- a/drivers/staging/lustre/lustre/include/obd_cksum.h +++ b/drivers/staging/lustre/lustre/include/obd_cksum.h @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/include/obd_class.h b/drivers/staging/lustre/lustre/include/obd_class.h index 32863bc..c7a71b2 100644 --- a/drivers/staging/lustre/lustre/include/obd_class.h +++ b/drivers/staging/lustre/lustre/include/obd_class.h @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/include/obd_support.h b/drivers/staging/lustre/lustre/include/obd_support.h index 60034d3..ce5be73 100644 --- a/drivers/staging/lustre/lustre/include/obd_support.h +++ b/drivers/staging/lustre/lustre/include/obd_support.h @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/ldlm/interval_tree.c b/drivers/staging/lustre/lustre/ldlm/interval_tree.c index 3230606..59bb066 100644 --- a/drivers/staging/lustre/lustre/ldlm/interval_tree.c +++ b/drivers/staging/lustre/lustre/ldlm/interval_tree.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/ldlm/l_lock.c b/drivers/staging/lustre/lustre/ldlm/l_lock.c index 621323f..c6f7dfd 100644 --- a/drivers/staging/lustre/lustre/ldlm/l_lock.c +++ b/drivers/staging/lustre/lustre/ldlm/l_lock.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_extent.c b/drivers/staging/lustre/lustre/ldlm/ldlm_extent.c index cf1f178..16c1621 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_extent.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_extent.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c index 349bfcc..6c0dd7a 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_flock.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_inodebits.c b/drivers/staging/lustre/lustre/ldlm/ldlm_inodebits.c index b1bed1e..d98243d 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_inodebits.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_inodebits.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_internal.h b/drivers/staging/lustre/lustre/ldlm/ldlm_internal.h index 32f227f..cc5e654 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_internal.h +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_internal.h @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_lib.c b/drivers/staging/lustre/lustre/ldlm/ldlm_lib.c index b6a90b0..1a7eee3 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_lib.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_lib.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c b/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c index bff94ea..88e9192 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_lock.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c b/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c index 3303ffa..1da0eb2 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_lockd.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_plain.c b/drivers/staging/lustre/lustre/ldlm/ldlm_plain.c index 0c1965d..621a490 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_plain.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_plain.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_pool.c b/drivers/staging/lustre/lustre/ldlm/ldlm_pool.c index b913ba9..1d9ca31 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_pool.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_pool.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_request.c b/drivers/staging/lustre/lustre/ldlm/ldlm_request.c index 107314e..f6b30f6 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_request.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_request.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c index e99c89c..771c1f8 100644 --- a/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c +++ b/drivers/staging/lustre/lustre/ldlm/ldlm_resource.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/llite/dcache.c b/drivers/staging/lustre/lustre/llite/dcache.c index 1b6f82a..908bdc6 100644 --- a/drivers/staging/lustre/lustre/llite/dcache.c +++ b/drivers/staging/lustre/lustre/llite/dcache.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/llite/dir.c b/drivers/staging/lustre/lustre/llite/dir.c index 85c50e0..8854029a 100644 --- a/drivers/staging/lustre/lustre/llite/dir.c +++ b/drivers/staging/lustre/lustre/llite/dir.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/llite/file.c b/drivers/staging/lustre/lustre/llite/file.c index 26c6cd6..104129b 100644 --- a/drivers/staging/lustre/lustre/llite/file.c +++ b/drivers/staging/lustre/lustre/llite/file.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/llite/glimpse.c b/drivers/staging/lustre/lustre/llite/glimpse.c index d8ea754..8788ee0 100644 --- a/drivers/staging/lustre/lustre/llite/glimpse.c +++ b/drivers/staging/lustre/lustre/llite/glimpse.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/llite/lcommon_cl.c b/drivers/staging/lustre/lustre/llite/lcommon_cl.c index 6c00715..28b7482 100644 --- a/drivers/staging/lustre/lustre/llite/lcommon_cl.c +++ b/drivers/staging/lustre/lustre/llite/lcommon_cl.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/llite/lcommon_misc.c b/drivers/staging/lustre/lustre/llite/lcommon_misc.c index 12f3e71..e45bd6d 100644 --- a/drivers/staging/lustre/lustre/llite/lcommon_misc.c +++ b/drivers/staging/lustre/lustre/llite/lcommon_misc.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/llite/llite_close.c b/drivers/staging/lustre/lustre/llite/llite_close.c index 2df551d..2e2abc7 100644 --- a/drivers/staging/lustre/lustre/llite/llite_close.c +++ b/drivers/staging/lustre/lustre/llite/llite_close.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/llite/llite_internal.h b/drivers/staging/lustre/lustre/llite/llite_internal.h index 7fb949a..f541634 100644 --- a/drivers/staging/lustre/lustre/llite/llite_internal.h +++ b/drivers/staging/lustre/lustre/llite/llite_internal.h @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/llite/llite_lib.c b/drivers/staging/lustre/lustre/llite/llite_lib.c index b260f60..f513b74 100644 --- a/drivers/staging/lustre/lustre/llite/llite_lib.c +++ b/drivers/staging/lustre/lustre/llite/llite_lib.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/llite/llite_mmap.c b/drivers/staging/lustre/lustre/llite/llite_mmap.c index 7610799..b569df3 100644 --- a/drivers/staging/lustre/lustre/llite/llite_mmap.c +++ b/drivers/staging/lustre/lustre/llite/llite_mmap.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/llite/llite_nfs.c b/drivers/staging/lustre/lustre/llite/llite_nfs.c index c1eef61..086e827 100644 --- a/drivers/staging/lustre/lustre/llite/llite_nfs.c +++ b/drivers/staging/lustre/lustre/llite/llite_nfs.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/llite/llite_rmtacl.c b/drivers/staging/lustre/lustre/llite/llite_rmtacl.c index 8509b07..bae3ff0 100644 --- a/drivers/staging/lustre/lustre/llite/llite_rmtacl.c +++ b/drivers/staging/lustre/lustre/llite/llite_rmtacl.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/llite/lproc_llite.c b/drivers/staging/lustre/lustre/llite/lproc_llite.c index 55d62eb..2b3a777 100644 --- a/drivers/staging/lustre/lustre/llite/lproc_llite.c +++ b/drivers/staging/lustre/lustre/llite/lproc_llite.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/llite/namei.c b/drivers/staging/lustre/lustre/llite/namei.c index 95643bc..b7ec512 100644 --- a/drivers/staging/lustre/lustre/llite/namei.c +++ b/drivers/staging/lustre/lustre/llite/namei.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/llite/remote_perm.c b/drivers/staging/lustre/lustre/llite/remote_perm.c index e9d2531..0b96175 100644 --- a/drivers/staging/lustre/lustre/llite/remote_perm.c +++ b/drivers/staging/lustre/lustre/llite/remote_perm.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/llite/rw.c b/drivers/staging/lustre/lustre/llite/rw.c index fa42869..df6cb54 100644 --- a/drivers/staging/lustre/lustre/llite/rw.c +++ b/drivers/staging/lustre/lustre/llite/rw.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/llite/rw26.c b/drivers/staging/lustre/lustre/llite/rw26.c index 947a4f5..d45fdcb 100644 --- a/drivers/staging/lustre/lustre/llite/rw26.c +++ b/drivers/staging/lustre/lustre/llite/rw26.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/llite/statahead.c b/drivers/staging/lustre/lustre/llite/statahead.c index 6322f88..d533954 100644 --- a/drivers/staging/lustre/lustre/llite/statahead.c +++ b/drivers/staging/lustre/lustre/llite/statahead.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/llite/super25.c b/drivers/staging/lustre/lustre/llite/super25.c index 415750b..f7f8e23 100644 --- a/drivers/staging/lustre/lustre/llite/super25.c +++ b/drivers/staging/lustre/lustre/llite/super25.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/llite/symlink.c b/drivers/staging/lustre/lustre/llite/symlink.c index 3fc736c..12f945e 100644 --- a/drivers/staging/lustre/lustre/llite/symlink.c +++ b/drivers/staging/lustre/lustre/llite/symlink.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/llite/vvp_dev.c b/drivers/staging/lustre/lustre/llite/vvp_dev.c index c63def9..da84d95 100644 --- a/drivers/staging/lustre/lustre/llite/vvp_dev.c +++ b/drivers/staging/lustre/lustre/llite/vvp_dev.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/llite/vvp_internal.h b/drivers/staging/lustre/lustre/llite/vvp_internal.h index 27b9b0a..6708841 100644 --- a/drivers/staging/lustre/lustre/llite/vvp_internal.h +++ b/drivers/staging/lustre/lustre/llite/vvp_internal.h @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/llite/vvp_io.c b/drivers/staging/lustre/lustre/llite/vvp_io.c index 763d336..2200d57 100644 --- a/drivers/staging/lustre/lustre/llite/vvp_io.c +++ b/drivers/staging/lustre/lustre/llite/vvp_io.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/llite/vvp_lock.c b/drivers/staging/lustre/lustre/llite/vvp_lock.c index f5bd6c2..b5c307f 100644 --- a/drivers/staging/lustre/lustre/llite/vvp_lock.c +++ b/drivers/staging/lustre/lustre/llite/vvp_lock.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/llite/vvp_object.c b/drivers/staging/lustre/lustre/llite/vvp_object.c index 18c9df7..11c3004 100644 --- a/drivers/staging/lustre/lustre/llite/vvp_object.c +++ b/drivers/staging/lustre/lustre/llite/vvp_object.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/llite/vvp_page.c b/drivers/staging/lustre/lustre/llite/vvp_page.c index 6cd2af7..ae36c75 100644 --- a/drivers/staging/lustre/lustre/llite/vvp_page.c +++ b/drivers/staging/lustre/lustre/llite/vvp_page.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/llite/xattr.c b/drivers/staging/lustre/lustre/llite/xattr.c index 608014b..a286635 100644 --- a/drivers/staging/lustre/lustre/llite/xattr.c +++ b/drivers/staging/lustre/lustre/llite/xattr.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/lmv/lmv_fld.c b/drivers/staging/lustre/lustre/lmv/lmv_fld.c index 378691b..fcf1b1c 100644 --- a/drivers/staging/lustre/lustre/lmv/lmv_fld.c +++ b/drivers/staging/lustre/lustre/lmv/lmv_fld.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/lmv/lmv_intent.c b/drivers/staging/lustre/lustre/lmv/lmv_intent.c index e0958ea..bdf28cd 100644 --- a/drivers/staging/lustre/lustre/lmv/lmv_intent.c +++ b/drivers/staging/lustre/lustre/lmv/lmv_intent.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/lmv/lmv_internal.h b/drivers/staging/lustre/lustre/lmv/lmv_internal.h index 7007e4c..267deef 100644 --- a/drivers/staging/lustre/lustre/lmv/lmv_internal.h +++ b/drivers/staging/lustre/lustre/lmv/lmv_internal.h @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/lmv/lmv_obd.c b/drivers/staging/lustre/lustre/lmv/lmv_obd.c index 1d9875e..800033d 100644 --- a/drivers/staging/lustre/lustre/lmv/lmv_obd.c +++ b/drivers/staging/lustre/lustre/lmv/lmv_obd.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/lmv/lproc_lmv.c b/drivers/staging/lustre/lustre/lmv/lproc_lmv.c index b39e364..aa68623 100644 --- a/drivers/staging/lustre/lustre/lmv/lproc_lmv.c +++ b/drivers/staging/lustre/lustre/lmv/lproc_lmv.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/lov/lov_cl_internal.h b/drivers/staging/lustre/lustre/lov/lov_cl_internal.h index ac9744e..9a2e5e2 100644 --- a/drivers/staging/lustre/lustre/lov/lov_cl_internal.h +++ b/drivers/staging/lustre/lustre/lov/lov_cl_internal.h @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/lov/lov_dev.c b/drivers/staging/lustre/lustre/lov/lov_dev.c index dae8e89..21e3054 100644 --- a/drivers/staging/lustre/lustre/lov/lov_dev.c +++ b/drivers/staging/lustre/lustre/lov/lov_dev.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/lov/lov_ea.c b/drivers/staging/lustre/lustre/lov/lov_ea.c index 460f0fa..2f8972f 100644 --- a/drivers/staging/lustre/lustre/lov/lov_ea.c +++ b/drivers/staging/lustre/lustre/lov/lov_ea.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/lov/lov_internal.h b/drivers/staging/lustre/lustre/lov/lov_internal.h index eef9afa..55fb5bf 100644 --- a/drivers/staging/lustre/lustre/lov/lov_internal.h +++ b/drivers/staging/lustre/lustre/lov/lov_internal.h @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/lov/lov_io.c b/drivers/staging/lustre/lustre/lov/lov_io.c index 86cb3f8..cc70eeb 100644 --- a/drivers/staging/lustre/lustre/lov/lov_io.c +++ b/drivers/staging/lustre/lustre/lov/lov_io.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/lov/lov_lock.c b/drivers/staging/lustre/lustre/lov/lov_lock.c index 1b203d1..2d87cfa 100644 --- a/drivers/staging/lustre/lustre/lov/lov_lock.c +++ b/drivers/staging/lustre/lustre/lov/lov_lock.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/lov/lov_merge.c b/drivers/staging/lustre/lustre/lov/lov_merge.c index 56ef41d..f020656 100644 --- a/drivers/staging/lustre/lustre/lov/lov_merge.c +++ b/drivers/staging/lustre/lustre/lov/lov_merge.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/lov/lov_obd.c b/drivers/staging/lustre/lustre/lov/lov_obd.c index c179b31..9ca7e63 100644 --- a/drivers/staging/lustre/lustre/lov/lov_obd.c +++ b/drivers/staging/lustre/lustre/lov/lov_obd.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/lov/lov_object.c b/drivers/staging/lustre/lustre/lov/lov_object.c index 561d493..08f3d5c 100644 --- a/drivers/staging/lustre/lustre/lov/lov_object.c +++ b/drivers/staging/lustre/lustre/lov/lov_object.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/lov/lov_offset.c b/drivers/staging/lustre/lustre/lov/lov_offset.c index 7636bfa..2f568b5 100644 --- a/drivers/staging/lustre/lustre/lov/lov_offset.c +++ b/drivers/staging/lustre/lustre/lov/lov_offset.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/lov/lov_pack.c b/drivers/staging/lustre/lustre/lov/lov_pack.c index 0215ea5..69f4a68 100644 --- a/drivers/staging/lustre/lustre/lov/lov_pack.c +++ b/drivers/staging/lustre/lustre/lov/lov_pack.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/lov/lov_page.c b/drivers/staging/lustre/lustre/lov/lov_page.c index 0306f00..6c97e6f 100644 --- a/drivers/staging/lustre/lustre/lov/lov_page.c +++ b/drivers/staging/lustre/lustre/lov/lov_page.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/lov/lov_pool.c b/drivers/staging/lustre/lustre/lov/lov_pool.c index 690292e..75660c5 100644 --- a/drivers/staging/lustre/lustre/lov/lov_pool.c +++ b/drivers/staging/lustre/lustre/lov/lov_pool.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see [sun.com URL with a * copy of GPLv2]. * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/lov/lov_request.c b/drivers/staging/lustre/lustre/lov/lov_request.c index 1be4b92..83cd6e4 100644 --- a/drivers/staging/lustre/lustre/lov/lov_request.c +++ b/drivers/staging/lustre/lustre/lov/lov_request.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/lov/lovsub_dev.c b/drivers/staging/lustre/lustre/lov/lovsub_dev.c index 35f6b1d..cddf3d6 100644 --- a/drivers/staging/lustre/lustre/lov/lovsub_dev.c +++ b/drivers/staging/lustre/lustre/lov/lovsub_dev.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/lov/lovsub_io.c b/drivers/staging/lustre/lustre/lov/lovsub_io.c index 783ec68..c927406 100644 --- a/drivers/staging/lustre/lustre/lov/lovsub_io.c +++ b/drivers/staging/lustre/lustre/lov/lovsub_io.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/lov/lovsub_lock.c b/drivers/staging/lustre/lustre/lov/lovsub_lock.c index e92edfb..06bfdf9 100644 --- a/drivers/staging/lustre/lustre/lov/lovsub_lock.c +++ b/drivers/staging/lustre/lustre/lov/lovsub_lock.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/lov/lovsub_object.c b/drivers/staging/lustre/lustre/lov/lovsub_object.c index bcaae1e..a1a0f08 100644 --- a/drivers/staging/lustre/lustre/lov/lovsub_object.c +++ b/drivers/staging/lustre/lustre/lov/lovsub_object.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/lov/lovsub_page.c b/drivers/staging/lustre/lustre/lov/lovsub_page.c index 9badedc..e8e3475 100644 --- a/drivers/staging/lustre/lustre/lov/lovsub_page.c +++ b/drivers/staging/lustre/lustre/lov/lovsub_page.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/lov/lproc_lov.c b/drivers/staging/lustre/lustre/lov/lproc_lov.c index 0dcb6b6..c5f7aac 100644 --- a/drivers/staging/lustre/lustre/lov/lproc_lov.c +++ b/drivers/staging/lustre/lustre/lov/lproc_lov.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/mdc/lproc_mdc.c b/drivers/staging/lustre/lustre/mdc/lproc_mdc.c index 5c7a15d..95a8fcd 100644 --- a/drivers/staging/lustre/lustre/mdc/lproc_mdc.c +++ b/drivers/staging/lustre/lustre/mdc/lproc_mdc.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/mdc/mdc_internal.h b/drivers/staging/lustre/lustre/mdc/mdc_internal.h index c5519ae..cd57233 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_internal.h +++ b/drivers/staging/lustre/lustre/mdc/mdc_internal.h @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/mdc/mdc_lib.c b/drivers/staging/lustre/lustre/mdc/mdc_lib.c index 856c54e..8411729 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_lib.c +++ b/drivers/staging/lustre/lustre/mdc/mdc_lib.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/mdc/mdc_locks.c b/drivers/staging/lustre/lustre/mdc/mdc_locks.c index 3b1bc91..c14c9df 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_locks.c +++ b/drivers/staging/lustre/lustre/mdc/mdc_locks.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/mdc/mdc_reint.c b/drivers/staging/lustre/lustre/mdc/mdc_reint.c index 4ef3db1..8380c56 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_reint.c +++ b/drivers/staging/lustre/lustre/mdc/mdc_reint.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/mdc/mdc_request.c b/drivers/staging/lustre/lustre/mdc/mdc_request.c index 86b7445..e152429 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_request.c +++ b/drivers/staging/lustre/lustre/mdc/mdc_request.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/mgc/lproc_mgc.c b/drivers/staging/lustre/lustre/mgc/lproc_mgc.c index 8d5bc5a..c77e120 100644 --- a/drivers/staging/lustre/lustre/mgc/lproc_mgc.c +++ b/drivers/staging/lustre/lustre/mgc/lproc_mgc.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/mgc/mgc_internal.h b/drivers/staging/lustre/lustre/mgc/mgc_internal.h index 82fb8f4..0eb31cc 100644 --- a/drivers/staging/lustre/lustre/mgc/mgc_internal.h +++ b/drivers/staging/lustre/lustre/mgc/mgc_internal.h @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/mgc/mgc_request.c b/drivers/staging/lustre/lustre/mgc/mgc_request.c index 2311a43..2a80d85 100644 --- a/drivers/staging/lustre/lustre/mgc/mgc_request.c +++ b/drivers/staging/lustre/lustre/mgc/mgc_request.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/obdclass/acl.c b/drivers/staging/lustre/lustre/obdclass/acl.c index 0e02ae9..9f4eaba 100644 --- a/drivers/staging/lustre/lustre/obdclass/acl.c +++ b/drivers/staging/lustre/lustre/obdclass/acl.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/obdclass/cl_internal.h b/drivers/staging/lustre/lustre/obdclass/cl_internal.h index 7eb0ad7..09a1884 100644 --- a/drivers/staging/lustre/lustre/obdclass/cl_internal.h +++ b/drivers/staging/lustre/lustre/obdclass/cl_internal.h @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/obdclass/cl_io.c b/drivers/staging/lustre/lustre/obdclass/cl_io.c index 583fb5f..dcc1b4e 100644 --- a/drivers/staging/lustre/lustre/obdclass/cl_io.c +++ b/drivers/staging/lustre/lustre/obdclass/cl_io.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/obdclass/cl_lock.c b/drivers/staging/lustre/lustre/obdclass/cl_lock.c index 26a576b..737612a 100644 --- a/drivers/staging/lustre/lustre/obdclass/cl_lock.c +++ b/drivers/staging/lustre/lustre/obdclass/cl_lock.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/obdclass/cl_object.c b/drivers/staging/lustre/lustre/obdclass/cl_object.c index 5940f30..14da4b1 100644 --- a/drivers/staging/lustre/lustre/obdclass/cl_object.c +++ b/drivers/staging/lustre/lustre/obdclass/cl_object.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/obdclass/cl_page.c b/drivers/staging/lustre/lustre/obdclass/cl_page.c index b754f51..c014b69 100644 --- a/drivers/staging/lustre/lustre/obdclass/cl_page.c +++ b/drivers/staging/lustre/lustre/obdclass/cl_page.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/obdclass/class_obd.c b/drivers/staging/lustre/lustre/obdclass/class_obd.c index f48816a..b8dd638 100644 --- a/drivers/staging/lustre/lustre/obdclass/class_obd.c +++ b/drivers/staging/lustre/lustre/obdclass/class_obd.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/obdclass/debug.c b/drivers/staging/lustre/lustre/obdclass/debug.c index e4edfb2..0786683 100644 --- a/drivers/staging/lustre/lustre/obdclass/debug.c +++ b/drivers/staging/lustre/lustre/obdclass/debug.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/obdclass/genops.c b/drivers/staging/lustre/lustre/obdclass/genops.c index d95f11d..2ec9eae 100644 --- a/drivers/staging/lustre/lustre/obdclass/genops.c +++ b/drivers/staging/lustre/lustre/obdclass/genops.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/obdclass/kernelcomm.c b/drivers/staging/lustre/lustre/obdclass/kernelcomm.c index 8405ecc..407c41e 100644 --- a/drivers/staging/lustre/lustre/obdclass/kernelcomm.c +++ b/drivers/staging/lustre/lustre/obdclass/kernelcomm.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c b/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c index 2cd4522..e7beee4 100644 --- a/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c +++ b/drivers/staging/lustre/lustre/obdclass/linux/linux-module.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/obdclass/linux/linux-obdo.c b/drivers/staging/lustre/lustre/obdclass/linux/linux-obdo.c index b41b65e..1d4a8d6 100644 --- a/drivers/staging/lustre/lustre/obdclass/linux/linux-obdo.c +++ b/drivers/staging/lustre/lustre/obdclass/linux/linux-obdo.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c b/drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c index e6bf414..58d1a44 100644 --- a/drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c +++ b/drivers/staging/lustre/lustre/obdclass/linux/linux-sysctl.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/obdclass/llog.c b/drivers/staging/lustre/lustre/obdclass/llog.c index 55a9755..e100ada 100644 --- a/drivers/staging/lustre/lustre/obdclass/llog.c +++ b/drivers/staging/lustre/lustre/obdclass/llog.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/obdclass/llog_cat.c b/drivers/staging/lustre/lustre/obdclass/llog_cat.c index c27d4ec..e64a5e5 100644 --- a/drivers/staging/lustre/lustre/obdclass/llog_cat.c +++ b/drivers/staging/lustre/lustre/obdclass/llog_cat.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/obdclass/llog_internal.h b/drivers/staging/lustre/lustre/obdclass/llog_internal.h index 7fb48dd..bce65fe 100644 --- a/drivers/staging/lustre/lustre/obdclass/llog_internal.h +++ b/drivers/staging/lustre/lustre/obdclass/llog_internal.h @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/obdclass/llog_obd.c b/drivers/staging/lustre/lustre/obdclass/llog_obd.c index 826623f..b06dfe3 100644 --- a/drivers/staging/lustre/lustre/obdclass/llog_obd.c +++ b/drivers/staging/lustre/lustre/obdclass/llog_obd.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/obdclass/llog_swab.c b/drivers/staging/lustre/lustre/obdclass/llog_swab.c index 967ba2e..b5281d8 100644 --- a/drivers/staging/lustre/lustre/obdclass/llog_swab.c +++ b/drivers/staging/lustre/lustre/obdclass/llog_swab.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c b/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c index 5a1eae1..849deb1 100644 --- a/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c +++ b/drivers/staging/lustre/lustre/obdclass/lprocfs_status.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/obdclass/lu_object.c b/drivers/staging/lustre/lustre/obdclass/lu_object.c index e043857..1deaa2b 100644 --- a/drivers/staging/lustre/lustre/obdclass/lu_object.c +++ b/drivers/staging/lustre/lustre/obdclass/lu_object.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/obdclass/lu_ref.c b/drivers/staging/lustre/lustre/obdclass/lu_ref.c index 993697b..6363292 100644 --- a/drivers/staging/lustre/lustre/obdclass/lu_ref.c +++ b/drivers/staging/lustre/lustre/obdclass/lu_ref.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/obdclass/lustre_handles.c b/drivers/staging/lustre/lustre/obdclass/lustre_handles.c index 403ceea..6df2940 100644 --- a/drivers/staging/lustre/lustre/obdclass/lustre_handles.c +++ b/drivers/staging/lustre/lustre/obdclass/lustre_handles.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/obdclass/lustre_peer.c b/drivers/staging/lustre/lustre/obdclass/lustre_peer.c index b1abe02..e0e3a46 100644 --- a/drivers/staging/lustre/lustre/obdclass/lustre_peer.c +++ b/drivers/staging/lustre/lustre/obdclass/lustre_peer.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/obdclass/obd_config.c b/drivers/staging/lustre/lustre/obdclass/obd_config.c index cb1d65c..39cfbc51 100644 --- a/drivers/staging/lustre/lustre/obdclass/obd_config.c +++ b/drivers/staging/lustre/lustre/obdclass/obd_config.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/obdclass/obd_mount.c b/drivers/staging/lustre/lustre/obdclass/obd_mount.c index bc4e1e4..7dbf40e 100644 --- a/drivers/staging/lustre/lustre/obdclass/obd_mount.c +++ b/drivers/staging/lustre/lustre/obdclass/obd_mount.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/obdclass/obdo.c b/drivers/staging/lustre/lustre/obdclass/obdo.c index 748e33f..a62bf2b 100644 --- a/drivers/staging/lustre/lustre/obdclass/obdo.c +++ b/drivers/staging/lustre/lustre/obdclass/obdo.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/obdclass/statfs_pack.c b/drivers/staging/lustre/lustre/obdclass/statfs_pack.c index fb4e3ae..d633e22 100644 --- a/drivers/staging/lustre/lustre/obdclass/statfs_pack.c +++ b/drivers/staging/lustre/lustre/obdclass/statfs_pack.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/obdclass/uuid.c b/drivers/staging/lustre/lustre/obdclass/uuid.c index b0b0157..0dfa444 100644 --- a/drivers/staging/lustre/lustre/obdclass/uuid.c +++ b/drivers/staging/lustre/lustre/obdclass/uuid.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/obdecho/echo_client.c b/drivers/staging/lustre/lustre/obdecho/echo_client.c index 91ef06f..d92d85c 100644 --- a/drivers/staging/lustre/lustre/obdecho/echo_client.c +++ b/drivers/staging/lustre/lustre/obdecho/echo_client.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/osc/lproc_osc.c b/drivers/staging/lustre/lustre/osc/lproc_osc.c index 33a1132..f7bdd0a 100644 --- a/drivers/staging/lustre/lustre/osc/lproc_osc.c +++ b/drivers/staging/lustre/lustre/osc/lproc_osc.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/osc/osc_cache.c b/drivers/staging/lustre/lustre/osc/osc_cache.c index 2ca5045..4eb1f2af 100644 --- a/drivers/staging/lustre/lustre/osc/osc_cache.c +++ b/drivers/staging/lustre/lustre/osc/osc_cache.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/osc/osc_cl_internal.h b/drivers/staging/lustre/lustre/osc/osc_cl_internal.h index 7359fcb..78cab86 100644 --- a/drivers/staging/lustre/lustre/osc/osc_cl_internal.h +++ b/drivers/staging/lustre/lustre/osc/osc_cl_internal.h @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/osc/osc_dev.c b/drivers/staging/lustre/lustre/osc/osc_dev.c index d4fe507..1d2938d 100644 --- a/drivers/staging/lustre/lustre/osc/osc_dev.c +++ b/drivers/staging/lustre/lustre/osc/osc_dev.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/osc/osc_internal.h b/drivers/staging/lustre/lustre/osc/osc_internal.h index 7fad827..439118a 100644 --- a/drivers/staging/lustre/lustre/osc/osc_internal.h +++ b/drivers/staging/lustre/lustre/osc/osc_internal.h @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/osc/osc_io.c b/drivers/staging/lustre/lustre/osc/osc_io.c index d3bce45..79159d9 100644 --- a/drivers/staging/lustre/lustre/osc/osc_io.c +++ b/drivers/staging/lustre/lustre/osc/osc_io.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/osc/osc_lock.c b/drivers/staging/lustre/lustre/osc/osc_lock.c index d30ed2f..fef695b 100644 --- a/drivers/staging/lustre/lustre/osc/osc_lock.c +++ b/drivers/staging/lustre/lustre/osc/osc_lock.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/osc/osc_object.c b/drivers/staging/lustre/lustre/osc/osc_object.c index 738ab10..2a8b3c2 100644 --- a/drivers/staging/lustre/lustre/osc/osc_object.c +++ b/drivers/staging/lustre/lustre/osc/osc_object.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/osc/osc_page.c b/drivers/staging/lustre/lustre/osc/osc_page.c index 5a3e694..9ed91c4 100644 --- a/drivers/staging/lustre/lustre/osc/osc_page.c +++ b/drivers/staging/lustre/lustre/osc/osc_page.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/osc/osc_request.c b/drivers/staging/lustre/lustre/osc/osc_request.c index 7b1fc7e..740c362 100644 --- a/drivers/staging/lustre/lustre/osc/osc_request.c +++ b/drivers/staging/lustre/lustre/osc/osc_request.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/ptlrpc/client.c b/drivers/staging/lustre/lustre/ptlrpc/client.c index 8336ed1..325cce1 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/client.c +++ b/drivers/staging/lustre/lustre/ptlrpc/client.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/ptlrpc/connection.c b/drivers/staging/lustre/lustre/ptlrpc/connection.c index a14daff..a1f7d8c 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/connection.c +++ b/drivers/staging/lustre/lustre/ptlrpc/connection.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/ptlrpc/events.c b/drivers/staging/lustre/lustre/ptlrpc/events.c index fdcde9b..af841cc 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/events.c +++ b/drivers/staging/lustre/lustre/ptlrpc/events.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/ptlrpc/import.c b/drivers/staging/lustre/lustre/ptlrpc/import.c index a236e38..2930193 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/import.c +++ b/drivers/staging/lustre/lustre/ptlrpc/import.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/ptlrpc/layout.c b/drivers/staging/lustre/lustre/ptlrpc/layout.c index c0ecd16..f0dca8e 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/layout.c +++ b/drivers/staging/lustre/lustre/ptlrpc/layout.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/ptlrpc/llog_client.c b/drivers/staging/lustre/lustre/ptlrpc/llog_client.c index a23ac5f..f335b1f 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/llog_client.c +++ b/drivers/staging/lustre/lustre/ptlrpc/llog_client.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/ptlrpc/llog_net.c b/drivers/staging/lustre/lustre/ptlrpc/llog_net.c index fbccb62..ed3e88f 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/llog_net.c +++ b/drivers/staging/lustre/lustre/ptlrpc/llog_net.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c b/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c index ff40be2..8d67108 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c +++ b/drivers/staging/lustre/lustre/ptlrpc/lproc_ptlrpc.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/ptlrpc/niobuf.c b/drivers/staging/lustre/lustre/ptlrpc/niobuf.c index 10b8fe8..17dd6ea 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/niobuf.c +++ b/drivers/staging/lustre/lustre/ptlrpc/niobuf.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c b/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c index 811acf6..e7187a4 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c +++ b/drivers/staging/lustre/lustre/ptlrpc/pack_generic.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/ptlrpc/pers.c b/drivers/staging/lustre/lustre/ptlrpc/pers.c index ec3af10..14608ef 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/pers.c +++ b/drivers/staging/lustre/lustre/ptlrpc/pers.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/ptlrpc/pinger.c b/drivers/staging/lustre/lustre/ptlrpc/pinger.c index d9d4ca2..8ae6fd1 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/pinger.c +++ b/drivers/staging/lustre/lustre/ptlrpc/pinger.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h b/drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h index 6ca26c9..52eda29 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h +++ b/drivers/staging/lustre/lustre/ptlrpc/ptlrpc_internal.h @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/ptlrpc/ptlrpc_module.c b/drivers/staging/lustre/lustre/ptlrpc/ptlrpc_module.c index a8ec0e9..e7443f3 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/ptlrpc_module.c +++ b/drivers/staging/lustre/lustre/ptlrpc/ptlrpc_module.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c b/drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c index 76a355a..fd343819 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c +++ b/drivers/staging/lustre/lustre/ptlrpc/ptlrpcd.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/ptlrpc/recover.c b/drivers/staging/lustre/lustre/ptlrpc/recover.c index 30d9a16..5c69309 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/recover.c +++ b/drivers/staging/lustre/lustre/ptlrpc/recover.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/ptlrpc/sec.c b/drivers/staging/lustre/lustre/ptlrpc/sec.c index 657b41f..9ec6417 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/sec.c +++ b/drivers/staging/lustre/lustre/ptlrpc/sec.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c b/drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c index 02e6cda..34e2972 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c +++ b/drivers/staging/lustre/lustre/ptlrpc/sec_bulk.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/ptlrpc/sec_config.c b/drivers/staging/lustre/lustre/ptlrpc/sec_config.c index a51b18b..f7210c8 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/sec_config.c +++ b/drivers/staging/lustre/lustre/ptlrpc/sec_config.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/ptlrpc/sec_gc.c b/drivers/staging/lustre/lustre/ptlrpc/sec_gc.c index 9082da0..15d0586 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/sec_gc.c +++ b/drivers/staging/lustre/lustre/ptlrpc/sec_gc.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/ptlrpc/sec_lproc.c b/drivers/staging/lustre/lustre/ptlrpc/sec_lproc.c index e610a8d..bba4adf 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/sec_lproc.c +++ b/drivers/staging/lustre/lustre/ptlrpc/sec_lproc.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/ptlrpc/sec_null.c b/drivers/staging/lustre/lustre/ptlrpc/sec_null.c index af92e9e..04381af 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/sec_null.c +++ b/drivers/staging/lustre/lustre/ptlrpc/sec_null.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/ptlrpc/sec_plain.c b/drivers/staging/lustre/lustre/ptlrpc/sec_plain.c index ec8edbf..a2dd435 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/sec_plain.c +++ b/drivers/staging/lustre/lustre/ptlrpc/sec_plain.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/ptlrpc/service.c b/drivers/staging/lustre/lustre/ptlrpc/service.c index 17c7b97..f369a5e 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/service.c +++ b/drivers/staging/lustre/lustre/ptlrpc/service.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* diff --git a/drivers/staging/lustre/lustre/ptlrpc/wiretest.c b/drivers/staging/lustre/lustre/ptlrpc/wiretest.c index aacc810..4b9a23e 100644 --- a/drivers/staging/lustre/lustre/ptlrpc/wiretest.c +++ b/drivers/staging/lustre/lustre/ptlrpc/wiretest.c @@ -17,10 +17,6 @@ * version 2 along with this program; If not, see * http://www.sun.com/software/products/lustre/docs/GPLv2.pdf * - * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, - * CA 95054 USA or visit www.sun.com if you need additional information or - * have any questions. - * * GPL HEADER END */ /* -- 2.7.4 From craig at craiginches.com Sat Jun 18 21:25:55 2016 From: craig at craiginches.com (Craig Inches) Date: Sat, 18 Jun 2016 22:25:55 +0100 Subject: [lustre-devel] [PATCH 2/3] staging: luster: Checkpatch Cleanup In-Reply-To: References: Message-ID: <109b0da96b67ae70145433b585ada631a5f7c668.1466279901.git.craig@craiginches.com> Macros with complex values should be enclosed in parenthesis Signed-off-by: Craig Inches --- drivers/staging/lustre/lustre/include/cl_object.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/staging/lustre/lustre/include/cl_object.h b/drivers/staging/lustre/lustre/include/cl_object.h index 3004625..712355a 100644 --- a/drivers/staging/lustre/lustre/include/cl_object.h +++ b/drivers/staging/lustre/lustre/include/cl_object.h @@ -1207,8 +1207,8 @@ struct cl_lock_descr { #define DDESCR "%s(%d):[%lu, %lu]:%x" #define PDESCR(descr) \ - cl_lock_mode_name((descr)->cld_mode), (descr)->cld_mode, \ - (descr)->cld_start, (descr)->cld_end, (descr)->cld_enq_flags + (cl_lock_mode_name((descr)->cld_mode), (descr)->cld_mode, \ + (descr)->cld_start, (descr)->cld_end, (descr)->cld_enq_flags) const char *cl_lock_mode_name(const enum cl_lock_mode mode); -- 2.7.3 From xayto at xayto.net Sun Jun 19 19:53:12 2016 From: xayto at xayto.net (Craig Inches) Date: Sun, 19 Jun 2016 20:53:12 +0100 Subject: [lustre-devel] [PATCH 2/3] staging: luster: Checkpatch Cleanup In-Reply-To: <20160619020235.GA18034@kroah.com> References: <109b0da96b67ae70145433b585ada631a5f7c668.1466279901.git.craig@craiginches.com> <20160619020235.GA18034@kroah.com> Message-ID: <20160619195312.GA6855@voyager> I did build the kernel 1 for each change, then a final with all changes applied. Apologies if I missed something, Craig On Sat, Jun 18, 2016 at 07:02:35PM -0700, Greg Kroah-Hartman wrote: > On Sat, Jun 18, 2016 at 10:25:55PM +0100, Craig Inches wrote: > > Macros with complex values should be enclosed in parenthesis > > > > Signed-off-by: Craig Inches > > --- > > drivers/staging/lustre/lustre/include/cl_object.h | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > ALWAYS test build your patches, to not do so just makes maintainers > grumpy... > > Remember, checkpatch is a _hint_, it's not always right. > > greg k-h From jay.j.lan at nasa.gov Wed Jun 15 23:57:50 2016 From: jay.j.lan at nasa.gov (Jay Lan) Date: Wed, 15 Jun 2016 16:57:50 -0700 Subject: [lustre-devel] lustre 2.7.1 server 2.7.1-5.1nasS tarball Message-ID: <5761EB7E.1020100@nasa.gov> Hi Mahmoud, I cherry-picked LU-6911 ldiskfs: mds crash kernel at fs/inode.c:1358 patch set #4 and built a new 2.7.1 server 5.1nasS tarball. This patch is to fix the LU-8286 problem we experienced at nbp9 today: LU-8286: kernel BUG at fs/inode.c:1358! The patch I cherry-picked had conflicts at a rhel7 code. Since we are running centos 6.6, I cherry-picked the patch without the changes to ldiskfs/kernel_patches/patches/rhel7/ext4-large-eas.patch. When the fix (to conflicts) is available, today's patch will be reverted for the new patch. Here is the tarball at lfe:~jlan/swbuild/lustre271/ lustre-2.7.1-5.1nasS_mofed31v5.el66.20151008.tgz Thanks, Jay -------------- next part -------------- An HTML attachment was scrubbed... URL: From craig at craiginches.com Sat Jun 18 21:26:08 2016 From: craig at craiginches.com (Craig Inches) Date: Sat, 18 Jun 2016 22:26:08 +0100 Subject: [lustre-devel] [PATCH 3/3] staging: luster: Checkpatch Cleanup In-Reply-To: References: Message-ID: <34e8b044236880f37be45c5d8fd527071bdfe9f9.1466279901.git.craig@craiginches.com> WARNING: Prefer 'unsigned int' to bare use of 'unsigned' Signed-off-by: Craig Inches --- drivers/staging/lustre/lustre/include/cl_object.h | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/staging/lustre/lustre/include/cl_object.h b/drivers/staging/lustre/lustre/include/cl_object.h index 712355a..5c5e319 100644 --- a/drivers/staging/lustre/lustre/include/cl_object.h +++ b/drivers/staging/lustre/lustre/include/cl_object.h @@ -371,7 +371,7 @@ struct cl_object_operations { * cl_object_operations::coo_attr_get() is used. */ int (*coo_attr_set)(const struct lu_env *env, struct cl_object *obj, - const struct cl_attr *attr, unsigned valid); + const struct cl_attr *attr, unsigned int valid); /** * Update object configuration. Called top-to-bottom to modify object * configuration. @@ -761,7 +761,7 @@ struct cl_page { /** Link to a queue, for debugging. */ struct lu_ref_link cp_queue_ref; /** Per-page flags from enum cl_page_flags. Protected by a VM lock. */ - unsigned cp_flags; + unsigned int cp_flags; /** Assigned if doing a sync_io */ struct cl_sync_io *cp_sync_io; }; @@ -1320,7 +1320,7 @@ do { \ * @{ */ struct cl_page_list { - unsigned pl_nr; + unsigned int pl_nr; struct list_head pl_pages; struct task_struct *pl_owner; }; @@ -1838,7 +1838,7 @@ struct cl_io { /** * Number of pages owned by this IO. For invariant checking. */ - unsigned ci_owned_nr; + unsigned int ci_owned_nr; }; /** @} cl_io */ @@ -1996,11 +1996,11 @@ struct cl_req { /** A list of pages being transferred */ struct list_head crq_pages; /** Number of pages in cl_req::crq_pages */ - unsigned crq_nrpages; + unsigned int crq_nrpages; /** An array of objects which pages are in ->crq_pages */ struct cl_req_obj *crq_o; /** Number of elements in cl_req::crq_objs[] */ - unsigned crq_nrobjs; + unsigned int crq_nrobjs; struct list_head crq_layers; }; @@ -2181,7 +2181,7 @@ void cl_object_attr_unlock(struct cl_object *o); int cl_object_attr_get(const struct lu_env *env, struct cl_object *obj, struct cl_attr *attr); int cl_object_attr_set(const struct lu_env *env, struct cl_object *obj, - const struct cl_attr *attr, unsigned valid); + const struct cl_attr *attr, unsigned int valid); int cl_object_glimpse(const struct lu_env *env, struct cl_object *obj, struct ost_lvb *lvb); int cl_conf_set(const struct lu_env *env, struct cl_object *obj, -- 2.7.3 From lidza.louina at oracle.com Thu Jun 23 21:03:51 2016 From: lidza.louina at oracle.com (Lidza Louina) Date: Thu, 23 Jun 2016 14:03:51 -0700 (PDT) Subject: [lustre-devel] [PATCH v2] staging/lustre/lnet: changes value to correct type for assignment Message-ID: ----- Original Message ----- From: oleg.drokin at intel.com To: lidza.louina at oracle.com Cc: devel at driverdev.osuosl.org, gregkh at linuxfoundation.org, lustre-devel at lists.lustre.org Sent: Thursday, June 23, 2016 12:50:01 PM GMT -08:00 US/Canada Pacific Subject: Re: [lustre-devel] [PATCH v2] staging/lustre/lnet: changes value to correct type for assignment On Jun 23, 2016, at 3:27 PM, Lidza Louina wrote: > > ----- Original Message ----- > From: oleg.drokin at intel.com > To: lidza.louina at oracle.com > Cc: gregkh at linuxfoundation.org, lustre-devel at lists.lustre.org, devel at driverdev.osuosl.org, andreas.dilger at intel.com > Sent: Thursday, June 23, 2016 12:14:28 PM GMT -08:00 US/Canada Pacific > Subject: Re: [lustre-devel] [PATCH v2] staging/lustre/lnet: changes value to correct type for assignment > > > On Jun 23, 2016, at 2:56 PM, Lidza Louina wrote: > >> The code attempted to add an unsigned int to a an unsigned 64-bit >> integer. This patch makes the code use the correct type of int to >> suppress a smatch warning. > > I think you might want to update the commit message too, because > it does not really make much sense now. > > How about > > "The patch changes a value's type so it can be assigned correctly. > This problem was caught by smatch." I think that still does not convey the idea of teh change, also there's no assignment going on here. Perhaps To make the shift safer, have it operate on a 64 bit integer instead of default 32bit? There's no bug yet, so this is just for future-proofing. This potential problem was caught by smatch. Also you'll need to update the patch subject. I didn't want to copy you word-for-word: [PATCH v3] staging/lustre/lnet: changes type for safer shift The shift was potentially unsafe because of conflicting types. This patch changes the regular int (1) to an unsigned long long int because rec->rec_lh_cookie is an unsigned 64-bit value. This could be a problem down the line. This was caught by smatch. > >> >> Signed-off-by: Lidza Louina >> --- >> drivers/staging/lustre/lnet/lnet/api-ni.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/drivers/staging/lustre/lnet/lnet/api-ni.c b/drivers/staging/lustre/lnet/lnet/api-ni.c >> index 346db89..fc5b763 100644 >> --- a/drivers/staging/lustre/lnet/lnet/api-ni.c >> +++ b/drivers/staging/lustre/lnet/lnet/api-ni.c >> @@ -513,7 +513,7 @@ lnet_res_lh_initialize(struct lnet_res_container *rec, lnet_libhandle_t *lh) >> unsigned int hash; >> >> lh->lh_cookie = rec->rec_lh_cookie; >> - rec->rec_lh_cookie += 1 << ibits; >> + rec->rec_lh_cookie += (1ULL << ibits); >> >> hash = (lh->lh_cookie >> ibits) & LNET_LH_HASH_MASK; >> >> -- >> 1.9.1 >> >> >> >> _______________________________________________ >> lustre-devel mailing list >> lustre-devel at lists.lustre.org >> http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org > > _______________________________________________ > lustre-devel mailing list > lustre-devel at lists.lustre.org > http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org From oleg.drokin at intel.com Thu Jun 23 21:50:29 2016 From: oleg.drokin at intel.com (Oleg Drokin) Date: Thu, 23 Jun 2016 17:50:29 -0400 Subject: [lustre-devel] [lustre-discuss] more on lustre striping In-Reply-To: <8a9e4e45-ea99-1147-5c58-94a73d9010a8@iodoctors.com> References: <1ef5a267-334c-be0d-13f4-c0fab917d1bf@iodoctors.com> <38EA9F32-3869-43BA-B215-EB2E5BA62FD5@intel.com> <01EE2B9D-2359-49B5-A50F-E7C2D97E6696@intel.com> <44e2353d-3bef-ddd7-f15e-ad4bfdda040f@iodoctors.com> <9ebe9f4c-d5a2-4c93-4f00-49029850cbbe@iodoctors.com> <575AB28E.7090404@pittman.co.uk> <8a9e4e45-ea99-1147-5c58-94a73d9010a8@iodoctors.com> Message-ID: <22ECFBA2-BD72-4751-8B92-E58D6FEAD9FF@intel.com> I think what you are missing is that __open that you need to intercept comes from libc, so it does not need to be bound from your file because your binary does not call it, glibc calls it AND if your LD_PRELOAD'ed library defines it you'll catch it. The proper test would have been to write a LD_PRELOADable library that defines __open and then run your test application with it. On Jun 10, 2016, at 12:04 PM, John Bauer wrote: > To confirm the point that you can not intercept the open called by fopen by using LD_PRELOAD, I have written a simple test case. Note that the runtime linker never looks for open(). Only fopen() > $ cat a.c > #include > #include > #include > #include > > int > main(int argc, char ** argv ){ > FILE *f = fopen("a", "r" ) ; > fprintf(stderr,"f=%p\n",f); > fclose(f); > } > $ file a > a: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=dfe043b4ec8cf19d5fd3fab524d7c72ed1453574, not stripped > $ cat a.csh > #!/bin/csh > setenv LD_DEBUG all > ./a >&! a.cpr > $ ./a.csh > $ grep -i open a.cpr > 120584: symbol=fopen; lookup in file=./a [0] > 120584: symbol=fopen; lookup in file=/lib64/libc.so.6 [0] > 120584: binding file ./a [0] to /lib64/libc.so.6 [0]: normal symbol `fopen' [GLIBC_2.2.5] > $ > > On 6/10/2016 7:29 AM, Ashley Pittman wrote: >> On 22/05/16 02:56, John Bauer wrote: >>> Oleg >>> >>> I can intercept the fopen(), but that does me no good as I can't set the O_LOV_DELAY_CREATE bit. What I can not intercept is the open() downstream of fopen(). If one examines the symbols in libc you will see there are no unsatisfied externals relating to open, which means there is nothing for the runtime linker to find concerning open's. I will have a look at the Lustre 1.8 source, but I seriously doubt that the open beneath fopen() was intercepted with LD_PRELOAD. I would love to find a way to do that. I could throw away a lot of code. Thanks, John >> >> Could you not intercept fopen() and implement it with calls to open() and fdopen() yourself which would give you full control over what you're looking for here? >> >> Ashley. > > -- > I/O Doctors, LLC > 507-766-0378 > > bauerj at iodoctors.com > _______________________________________________ > lustre-devel mailing list > lustre-devel at lists.lustre.org > http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org From nathan.rutman at seagate.com Fri Jun 24 00:10:48 2016 From: nathan.rutman at seagate.com (Nathan Rutman) Date: Thu, 23 Jun 2016 17:10:48 -0700 Subject: [lustre-devel] HSM issues Message-ID: Hi all - I have a number of nagging concerns about current HSM implementation; maybe I'm just out of date, but I figure this is the place to ask: 1. Changelog size limits. Can changelogs still grow unbounded, resulting in ENOSPC (or worse) on the MDS? Should there be a size limit? What should be done at that limit -- stop recording changelogs? Turn FS read-only? 2. Coordinator queue limit. Can coordinator queue grow unbounded? Can we add some throttling from the coordinator to the PE, maybe an -EAGAIN if the coordinator queue is large? 3. Error-condition passthrough from hsmtool back to PE. Backend may have e.g. ENOSPC, reported back to coordinator, but then what? Can future PE requests be denied by the coordinator with an ENOSPC, presumably prompting Robinhood to issue hsm_remove commands? ENOSPC should continue to be returned, until some other rv is returned by copytool. 4. Coordinator should sort incoming requests so that "restores" and "removes" are placed before "archives". Restores are the highest priority from user point of view, and removes are next from a space available point of view. *--* *Nathan Rutman · Principal Systems ArchitectSeagate Technology** · *+1 503 877-9507* · *GMT-8 -------------- next part -------------- An HTML attachment was scrubbed... URL: From andreas.dilger at intel.com Fri Jun 24 00:36:33 2016 From: andreas.dilger at intel.com (Dilger, Andreas) Date: Fri, 24 Jun 2016 00:36:33 +0000 Subject: [lustre-devel] HSM issues In-Reply-To: References: Message-ID: <330D2386-1ACD-40A1-B39C-A5F50556668D@intel.com> The ChangeLogs do have limits on the number of records, but hitting that limit will _also_ result in ENOSPC, as would also happen if the MDT actually runs out of space. Alex has a patch in flight that reduces the maximum llog size if the MDT is running out of space, so that the old logs can be closed and cleaned up rather than continuing to grow even though they are mostly empty. There was also a patch landed from Artem to add a /proc file that reports the current ChangeLog size to userspace so that this can be tracked. We did discuss what should happen if the ChangeLog is running out of space for new records (e.g. because some consumer is not consuming). It should be tunable by the admin, either to drop the consumer and delete all of the records for that consumer, or to prevent new operations being performed in the filesystem (e.g. if it was critical to not lose any records for some reason). I'd suspect the first option would be the better default. No idea about the other items. Hopefully someone else can reply. Cheers, Andreas -- Andreas Dilger Lustre Principal Architect Intel High Performance Data Division On 2016/06/23, 18:10, "Nathan Rutman" > wrote: Hi all - I have a number of nagging concerns about current HSM implementation; maybe I'm just out of date, but I figure this is the place to ask: 1. Changelog size limits. Can changelogs still grow unbounded, resulting in ENOSPC (or worse) on the MDS? Should there be a size limit? What should be done at that limit -- stop recording changelogs? Turn FS read-only? 2. Coordinator queue limit. Can coordinator queue grow unbounded? Can we add some throttling from the coordinator to the PE, maybe an -EAGAIN if the coordinator queue is large? 3. Error-condition passthrough from hsmtool back to PE. Backend may have e.g. ENOSPC, reported back to coordinator, but then what? Can future PE requests be denied by the coordinator with an ENOSPC, presumably prompting Robinhood to issue hsm_remove commands? ENOSPC should continue to be returned, until some other rv is returned by copytool. 4. Coordinator should sort incoming requests so that "restores" and "removes" are placed before "archives". Restores are the highest priority from user point of view, and removes are next from a space available point of view. -- Nathan Rutman · Principal Systems Architect Seagate Technology · +1 503 877-9507 · GMT-8 -------------- next part -------------- An HTML attachment was scrubbed... URL: From aik at fnal.gov Fri Jun 24 01:04:54 2016 From: aik at fnal.gov (Alexander I Kulyavtsev) Date: Fri, 24 Jun 2016 01:04:54 +0000 Subject: [lustre-devel] HSM issues In-Reply-To: References: Message-ID: <9F43A013-9D35-4F93-A153-61C098A426DC@fnal.gov> On Jun 23, 2016, at 7:10 PM, Nathan Rutman > wrote: 4. Coordinator should sort incoming requests so that "restores" and "removes" are placed before "archives". Restores are the highest priority from user point of view, and removes are next from a space available point of view. Restores fill the space on lustre, "archives" with following "purge" release space on lustre. In situation when the file system is "almost" full it can be desirable to release space with higher priority, i.e. priority may change when space is limited. Not all restores are equal. It may suffice to have few priority levels: admin/interactive, normal, background (bulk IO). Tape HSM backend may have it's own priority preferences (due to slow tape mount/rewind ops) and the tape backend may do request reordering to optimize tape access. E.g. tape reads/write go to different hardware types(write to new technology tapes, read old data from old tapes) and one of them busy. Or, write and read requests come from different user groups, one of them has max mounted tapes but the other can continue. In this case it can be better to throw many requests (tens of thousands) to backend and let it figure out (delegate request prioritization and QoS to backend). The queue depth shall be configurable as the other simpler backend may not survive. Some workloads like data migration from old tapes to new tapes may not be happy if lustre HSM and backend tape system have conflicting priorities. There shall be configurable option to set the preference or noop. Alex. -------------- next part -------------- An HTML attachment was scrubbed... URL: From quentin.bouget.ocre at cea.fr Fri Jun 24 14:50:49 2016 From: quentin.bouget.ocre at cea.fr (Quentin BOUGET) Date: Fri, 24 Jun 2016 16:50:49 +0200 Subject: [lustre-devel] HSM issues In-Reply-To: <9F43A013-9D35-4F93-A153-61C098A426DC@fnal.gov> References: <9F43A013-9D35-4F93-A153-61C098A426DC@fnal.gov> Message-ID: <576D48C9.3020503@cea.fr> I am working on issue 4: Coordinator should sort incoming requests so that "restores" and "removes" are placed before "archives". Restores are the highest priority from user point of view, and removes are next from a space available point of Here is the related ticket LU-8324: https://jira.hpdd.intel.com/browse/LU-8324 On Jun 23, 2016, at 7:10 PM, Nathan Rutman > wrote: > 4. Coordinator should sort incoming requests so that "restores" and > "removes" are placed before "archives". Restores are the highest > priority from user point of view, and removes are next from a space > available point of view. -------------- next part -------------- An HTML attachment was scrubbed... URL: From oleg.drokin at intel.com Sat Jun 25 16:08:01 2016 From: oleg.drokin at intel.com (Oleg Drokin) Date: Sat, 25 Jun 2016 12:08:01 -0400 Subject: [lustre-devel] [PATCH v2] staging/lustre/lnet: changes value to correct type for assignment In-Reply-To: References: Message-ID: <05C753CF-5195-48BA-AA72-AF99BCA095B0@intel.com> On Jun 23, 2016, at 5:03 PM, Lidza Louina wrote: > > ----- Original Message ----- > From: oleg.drokin at intel.com > To: lidza.louina at oracle.com > Cc: devel at driverdev.osuosl.org, gregkh at linuxfoundation.org, lustre-devel at lists.lustre.org > Sent: Thursday, June 23, 2016 12:50:01 PM GMT -08:00 US/Canada Pacific > Subject: Re: [lustre-devel] [PATCH v2] staging/lustre/lnet: changes value to correct type for assignment > > > On Jun 23, 2016, at 3:27 PM, Lidza Louina wrote: > >> >> ----- Original Message ----- >> From: oleg.drokin at intel.com >> To: lidza.louina at oracle.com >> Cc: gregkh at linuxfoundation.org, lustre-devel at lists.lustre.org, devel at driverdev.osuosl.org, andreas.dilger at intel.com >> Sent: Thursday, June 23, 2016 12:14:28 PM GMT -08:00 US/Canada Pacific >> Subject: Re: [lustre-devel] [PATCH v2] staging/lustre/lnet: changes value to correct type for assignment >> >> >> On Jun 23, 2016, at 2:56 PM, Lidza Louina wrote: >> >>> The code attempted to add an unsigned int to a an unsigned 64-bit >>> integer. This patch makes the code use the correct type of int to >>> suppress a smatch warning. >> >> I think you might want to update the commit message too, because >> it does not really make much sense now. >> >> How about >> >> "The patch changes a value's type so it can be assigned correctly. >> This problem was caught by smatch." > > I think that still does not convey the idea of teh change, also there's no > assignment going on here. > Perhaps > To make the shift safer, have it operate on a 64 bit integer instead of > default 32bit? > There's no bug yet, so this is just for future-proofing. > This potential problem was caught by smatch. > > Also you'll need to update the patch subject. > > > I didn't want to copy you word-for-word: > > [PATCH v3] staging/lustre/lnet: changes type for safer shift > > The shift was potentially unsafe because of conflicting types. it's not that the types were conflicting, just potentially not wide enough. > This patch changes the regular int (1) to an unsigned long long int because > rec->rec_lh_cookie is an unsigned 64-bit value. This could be a problem down > the line. > This was caught by smatch. > > >> >>> >>> Signed-off-by: Lidza Louina >>> --- >>> drivers/staging/lustre/lnet/lnet/api-ni.c | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> diff --git a/drivers/staging/lustre/lnet/lnet/api-ni.c b/drivers/staging/lustre/lnet/lnet/api-ni.c >>> index 346db89..fc5b763 100644 >>> --- a/drivers/staging/lustre/lnet/lnet/api-ni.c >>> +++ b/drivers/staging/lustre/lnet/lnet/api-ni.c >>> @@ -513,7 +513,7 @@ lnet_res_lh_initialize(struct lnet_res_container *rec, lnet_libhandle_t *lh) >>> unsigned int hash; >>> >>> lh->lh_cookie = rec->rec_lh_cookie; >>> - rec->rec_lh_cookie += 1 << ibits; >>> + rec->rec_lh_cookie += (1ULL << ibits); >>> >>> hash = (lh->lh_cookie >> ibits) & LNET_LH_HASH_MASK; >>> >>> -- >>> 1.9.1 >>> >>> >>> >>> _______________________________________________ >>> lustre-devel mailing list >>> lustre-devel at lists.lustre.org >>> http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org >> >> _______________________________________________ >> lustre-devel mailing list >> lustre-devel at lists.lustre.org >> http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org > From deepa.kernel at gmail.com Sat Jun 25 21:37:24 2016 From: deepa.kernel at gmail.com (Deepa Dinamani) Date: Sat, 25 Jun 2016 14:37:24 -0700 Subject: [lustre-devel] [PATCH v3 00/24] Delete CURRENT_TIME_SEC and replace current_fs_time() Message-ID: <1466890668-23400-1-git-send-email-deepa.kernel@gmail.com> The series is aimed at getting rid of CURRENT_TIME, CURRENT_TIME_SEC macros and replacing current_fs_time() with current_time(). The macros are not y2038 safe. There is no plan to transition them into being y2038 safe. ktime_get_* api's can be used in their place. And, these are y2038 safe. CURRENT_TIME will be deleted after 4.8 rc1 as there is a dependency function time64_to_tm() for one of the CURRENT_TIME occurance. Thanks to Arnd Bergmann for all the guidance and discussions. Patches 3-5 were mostly generated using coccinelle. All filesystem timestamps use current_fs_time() for right granularity as mentioned in the respective commit texts of patches. This has a changed signature, renamed to current_time() and moved to the fs/inode.c. This series also serves as a preparatory series to transition vfs to 64 bit timestamps as outlined here: https://lkml.org/lkml/2016/2/12/104 . As per Linus's suggestion in https://lkml.org/lkml/2016/5/24/663 , all the inode timestamp changes have been squashed into a single patch. Also, current_time() now is used as a single generic vfs filesystem timestamp api. It also takes struct inode* as argument instead of struct super_block*. Posting all patches together in a bigger series so that the big picture is clear. As per the suggestion in https://lwn.net/Articles/672598/, CURRENT_TIME macro bug fixes are being handled in a series separate from transitioning vfs to use. Changes since v2: * Fix buildbot error for uninitalized sb in inode. * Minor fixes according to Arnd's comments. * Leave out the fnic and deletion of CURRENT_TIME to be submitted after 4.8 rc1. Deepa Dinamani (24): vfs: Add current_time() api fs: proc: Delete inode time initializations in proc_alloc_inode() fs: Replace CURRENT_TIME with current_time() for inode timestamps fs: Replace CURRENT_TIME_SEC with current_time() for inode timestamps fs: Replace current_fs_time() with current_time() fs: jfs: Replace CURRENT_TIME_SEC by current_time() fs: ext4: Use current_time() for inode timestamps fs: ubifs: Replace CURRENT_TIME_SEC with current_time fs: btrfs: Use ktime_get_real_ts for root ctime fs: udf: Replace CURRENT_TIME with current_time() fs: cifs: Replace CURRENT_TIME by current_time() fs: cifs: Replace CURRENT_TIME with ktime_get_real_ts() fs: cifs: Replace CURRENT_TIME by get_seconds fs: f2fs: Use ktime_get_real_seconds for sit_info times drivers: staging: lustre: Replace CURRENT_TIME with current_time() fs: ocfs2: Use time64_t to represent orphan scan times fs: ocfs2: Replace CURRENT_TIME with ktime_get_real_seconds() audit: Use timespec64 to represent audit timestamps fs: nfs: Make nfs boot time y2038 safe block: Replace CURRENT_TIME with ktime_get_real_ts libceph: Replace CURRENT_TIME with ktime_get_real_ts fs: ceph: Replace current_fs_time for request stamp time: Delete current_fs_time() function time: Delete CURRENT_TIME_SEC arch/powerpc/platforms/cell/spufs/inode.c | 2 +- arch/s390/hypfs/inode.c | 4 +-- drivers/block/rbd.c | 2 +- drivers/char/sonypi.c | 2 +- drivers/infiniband/hw/qib/qib_fs.c | 2 +- drivers/misc/ibmasm/ibmasmfs.c | 2 +- drivers/oprofile/oprofilefs.c | 2 +- drivers/platform/x86/sony-laptop.c | 2 +- drivers/staging/lustre/lustre/llite/llite_lib.c | 16 ++++++------ drivers/staging/lustre/lustre/llite/namei.c | 4 +-- drivers/staging/lustre/lustre/mdc/mdc_reint.c | 6 ++--- .../lustre/lustre/obdclass/linux/linux-obdo.c | 6 ++--- drivers/staging/lustre/lustre/obdclass/obdo.c | 6 ++--- drivers/staging/lustre/lustre/osc/osc_io.c | 2 +- drivers/usb/core/devio.c | 18 +++++++------- drivers/usb/gadget/function/f_fs.c | 8 +++--- drivers/usb/gadget/legacy/inode.c | 2 +- fs/9p/vfs_inode.c | 2 +- fs/adfs/inode.c | 2 +- fs/affs/amigaffs.c | 6 ++--- fs/affs/inode.c | 2 +- fs/attr.c | 2 +- fs/autofs4/inode.c | 2 +- fs/autofs4/root.c | 6 ++--- fs/bad_inode.c | 2 +- fs/bfs/dir.c | 14 +++++------ fs/binfmt_misc.c | 2 +- fs/btrfs/file.c | 6 ++--- fs/btrfs/inode.c | 22 ++++++++-------- fs/btrfs/ioctl.c | 8 +++--- fs/btrfs/root-tree.c | 3 ++- fs/btrfs/transaction.c | 4 +-- fs/btrfs/xattr.c | 2 +- fs/ceph/file.c | 4 +-- fs/ceph/inode.c | 2 +- fs/ceph/mds_client.c | 4 ++- fs/ceph/xattr.c | 2 +- fs/cifs/cifsencrypt.c | 4 ++- fs/cifs/cifssmb.c | 10 ++++---- fs/cifs/file.c | 4 +-- fs/cifs/inode.c | 28 +++++++++++---------- fs/coda/dir.c | 2 +- fs/coda/file.c | 2 +- fs/coda/inode.c | 2 +- fs/configfs/inode.c | 6 ++--- fs/debugfs/inode.c | 2 +- fs/devpts/inode.c | 6 ++--- fs/efivarfs/inode.c | 2 +- fs/exofs/dir.c | 6 ++--- fs/exofs/inode.c | 4 +-- fs/exofs/namei.c | 6 ++--- fs/ext2/acl.c | 2 +- fs/ext2/dir.c | 6 ++--- fs/ext2/ialloc.c | 2 +- fs/ext2/inode.c | 4 +-- fs/ext2/ioctl.c | 4 +-- fs/ext2/namei.c | 6 ++--- fs/ext2/super.c | 2 +- fs/ext2/xattr.c | 2 +- fs/ext4/acl.c | 2 +- fs/ext4/ext4.h | 6 ----- fs/ext4/extents.c | 10 ++++---- fs/ext4/ialloc.c | 2 +- fs/ext4/inline.c | 4 +-- fs/ext4/inode.c | 6 ++--- fs/ext4/ioctl.c | 8 +++--- fs/ext4/namei.c | 24 ++++++++++-------- fs/ext4/super.c | 2 +- fs/ext4/xattr.c | 2 +- fs/f2fs/dir.c | 8 +++--- fs/f2fs/file.c | 8 +++--- fs/f2fs/inline.c | 2 +- fs/f2fs/namei.c | 12 ++++----- fs/f2fs/segment.c | 2 +- fs/f2fs/segment.h | 5 ++-- fs/f2fs/xattr.c | 2 +- fs/fat/dir.c | 2 +- fs/fat/file.c | 6 ++--- fs/fat/inode.c | 2 +- fs/fat/namei_msdos.c | 12 ++++----- fs/fat/namei_vfat.c | 10 ++++---- fs/fuse/control.c | 2 +- fs/fuse/dir.c | 2 +- fs/gfs2/bmap.c | 8 +++--- fs/gfs2/dir.c | 12 ++++----- fs/gfs2/inode.c | 8 +++--- fs/gfs2/quota.c | 2 +- fs/gfs2/xattr.c | 8 +++--- fs/hfs/catalog.c | 8 +++--- fs/hfs/dir.c | 2 +- fs/hfs/inode.c | 2 +- fs/hfsplus/catalog.c | 8 +++--- fs/hfsplus/dir.c | 6 ++--- fs/hfsplus/inode.c | 2 +- fs/hfsplus/ioctl.c | 2 +- fs/hugetlbfs/inode.c | 10 ++++---- fs/inode.c | 29 +++++++++++++++++++--- fs/jffs2/acl.c | 2 +- fs/jffs2/fs.c | 2 +- fs/jfs/acl.c | 2 +- fs/jfs/inode.c | 2 +- fs/jfs/ioctl.c | 2 +- fs/jfs/jfs_inode.c | 2 +- fs/jfs/namei.c | 24 +++++++++--------- fs/jfs/super.c | 2 +- fs/jfs/xattr.c | 2 +- fs/kernfs/inode.c | 2 +- fs/libfs.c | 14 +++++------ fs/locks.c | 2 +- fs/logfs/dir.c | 6 ++--- fs/logfs/file.c | 2 +- fs/logfs/inode.c | 4 +-- fs/logfs/readwrite.c | 4 +-- fs/minix/bitmap.c | 2 +- fs/minix/dir.c | 6 ++--- fs/minix/itree_common.c | 4 +-- fs/minix/namei.c | 4 +-- fs/nfs/client.c | 2 +- fs/nfs/netns.h | 2 +- fs/nfs/nfs4proc.c | 10 +++++--- fs/nfs/nfs4xdr.c | 2 +- fs/nfsd/blocklayout.c | 2 +- fs/nilfs2/dir.c | 6 ++--- fs/nilfs2/inode.c | 4 +-- fs/nilfs2/ioctl.c | 2 +- fs/nilfs2/namei.c | 6 ++--- fs/nsfs.c | 2 +- fs/ntfs/inode.c | 2 +- fs/ntfs/mft.c | 2 +- fs/ocfs2/acl.c | 2 +- fs/ocfs2/alloc.c | 2 +- fs/ocfs2/aops.c | 2 +- fs/ocfs2/cluster/heartbeat.c | 2 +- fs/ocfs2/dir.c | 4 +-- fs/ocfs2/dlmfs/dlmfs.c | 4 +-- fs/ocfs2/file.c | 12 ++++----- fs/ocfs2/inode.c | 2 +- fs/ocfs2/journal.c | 4 +-- fs/ocfs2/move_extents.c | 2 +- fs/ocfs2/namei.c | 16 ++++++------ fs/ocfs2/ocfs2.h | 2 +- fs/ocfs2/refcounttree.c | 4 +-- fs/ocfs2/super.c | 2 +- fs/ocfs2/xattr.c | 2 +- fs/omfs/dir.c | 4 +-- fs/omfs/inode.c | 2 +- fs/openpromfs/inode.c | 2 +- fs/orangefs/file.c | 2 +- fs/orangefs/inode.c | 2 +- fs/orangefs/namei.c | 10 ++++---- fs/pipe.c | 2 +- fs/posix_acl.c | 2 +- fs/proc/base.c | 2 +- fs/proc/inode.c | 3 +-- fs/proc/proc_sysctl.c | 2 +- fs/proc/self.c | 2 +- fs/proc/thread_self.c | 2 +- fs/pstore/inode.c | 2 +- fs/ramfs/inode.c | 6 ++--- fs/reiserfs/inode.c | 2 +- fs/reiserfs/ioctl.c | 4 +-- fs/reiserfs/namei.c | 12 ++++----- fs/reiserfs/stree.c | 8 +++--- fs/reiserfs/super.c | 2 +- fs/reiserfs/xattr.c | 6 ++--- fs/reiserfs/xattr_acl.c | 2 +- fs/sysv/dir.c | 6 ++--- fs/sysv/ialloc.c | 2 +- fs/sysv/itree.c | 4 +-- fs/sysv/namei.c | 4 +-- fs/tracefs/inode.c | 2 +- fs/ubifs/dir.c | 10 ++++---- fs/ubifs/file.c | 12 ++++----- fs/ubifs/ioctl.c | 2 +- fs/ubifs/misc.h | 10 -------- fs/ubifs/sb.c | 14 ++++++++--- fs/ubifs/xattr.c | 6 ++--- fs/udf/ialloc.c | 2 +- fs/udf/inode.c | 4 +-- fs/udf/namei.c | 20 +++++++-------- fs/udf/super.c | 9 ++++--- fs/ufs/dir.c | 6 ++--- fs/ufs/ialloc.c | 8 +++--- fs/ufs/inode.c | 6 ++--- fs/ufs/namei.c | 6 ++--- fs/xfs/xfs_acl.c | 2 +- fs/xfs/xfs_inode.c | 2 +- fs/xfs/xfs_iops.c | 2 +- fs/xfs/xfs_trans_inode.c | 2 +- include/linux/audit.h | 4 +-- include/linux/fs.h | 2 +- include/linux/time.h | 1 - ipc/mqueue.c | 18 +++++++------- kernel/audit.c | 10 ++++---- kernel/audit.h | 2 +- kernel/auditsc.c | 6 ++--- kernel/bpf/inode.c | 2 +- kernel/time/time.c | 14 ----------- mm/shmem.c | 20 +++++++-------- net/ceph/messenger.c | 6 +++-- net/ceph/osd_client.c | 4 +-- net/sunrpc/rpc_pipe.c | 2 +- security/inode.c | 2 +- security/selinux/selinuxfs.c | 2 +- 204 files changed, 536 insertions(+), 518 deletions(-) -- 1.9.1 Cc: adilger.kernel at dilger.ca Cc: adrian.hunter at intel.com Cc: anna.schumaker at netapp.com Cc: ceph-devel at vger.kernel.org Cc: clm at fb.com Cc: cm224.lee at samsung.com Cc: dedekind1 at gmail.com Cc: dsterba at suse.com Cc: elder at kernel.org Cc: eparis at redhat.com Cc: gregkh at linuxfoundation.org Cc: idryomov at gmail.com Cc: jack at suse.com Cc: jaegeuk at kernel.org Cc: jbacik at fb.com Cc: jfs-discussion at lists.sourceforge.net Cc: jlbec at evilplan.org Cc: john.stultz at linaro.org Cc: linux-audit at redhat.com Cc: linux-btrfs at vger.kernel.org Cc: linux-ext4 at vger.kernel.org Cc: linux-f2fs-devel at lists.sourceforge.net Cc: linux-mtd at lists.infradead.org Cc: linux-nfs at vger.kernel.org Cc: lustre-devel at lists.lustre.org Cc: mfasheh at suse.com Cc: ocfs2-devel at oss.oracle.com Cc: paul at paul-moore.com Cc: sage at redhat.com Cc: sfrench at samba.org Cc: shaggy at kernel.org Cc: trond.myklebust at primarydata.com Cc: zyan at redhat.com From deepa.kernel at gmail.com Sat Jun 25 21:37:39 2016 From: deepa.kernel at gmail.com (Deepa Dinamani) Date: Sat, 25 Jun 2016 14:37:39 -0700 Subject: [lustre-devel] [PATCH v3 15/24] drivers: staging: lustre: Replace CURRENT_TIME with current_time() In-Reply-To: <1466890668-23400-1-git-send-email-deepa.kernel@gmail.com> References: <1466890668-23400-1-git-send-email-deepa.kernel@gmail.com> Message-ID: <1466890668-23400-16-git-send-email-deepa.kernel@gmail.com> CURRENT_TIME macro is not appropriate for filesystems as it doesn't use the right granularity for filesystem timestamps. Use current_time() instead. This is also in preparation for the patch that transitions vfs timestamps to use 64 bit time and hence make them y2038 safe. As part of the effort current_time() will be extended to do range checks. Hence, it is necessary for all file system timestamps to use current_time(). Also change format string for prints so that these are valid when vfs is transitioned to use 64 bit timestamps. Signed-off-by: Deepa Dinamani Cc: Greg Kroah-Hartman Cc: lustre-devel at lists.lustre.org Acked-by: James Simmons --- drivers/staging/lustre/lustre/llite/llite_lib.c | 16 ++++++++-------- drivers/staging/lustre/lustre/llite/namei.c | 4 ++-- drivers/staging/lustre/lustre/mdc/mdc_reint.c | 6 +++--- .../staging/lustre/lustre/obdclass/linux/linux-obdo.c | 6 +++--- drivers/staging/lustre/lustre/obdclass/obdo.c | 6 +++--- drivers/staging/lustre/lustre/osc/osc_io.c | 2 +- 6 files changed, 20 insertions(+), 20 deletions(-) diff --git a/drivers/staging/lustre/lustre/llite/llite_lib.c b/drivers/staging/lustre/lustre/llite/llite_lib.c index 546063e..71a5b25 100644 --- a/drivers/staging/lustre/lustre/llite/llite_lib.c +++ b/drivers/staging/lustre/lustre/llite/llite_lib.c @@ -1201,23 +1201,23 @@ int ll_setattr_raw(struct dentry *dentry, struct iattr *attr, bool hsm_import) /* We mark all of the fields "set" so MDS/OST does not re-set them */ if (attr->ia_valid & ATTR_CTIME) { - attr->ia_ctime = CURRENT_TIME; + attr->ia_ctime = current_time(inode); attr->ia_valid |= ATTR_CTIME_SET; } if (!(attr->ia_valid & ATTR_ATIME_SET) && (attr->ia_valid & ATTR_ATIME)) { - attr->ia_atime = CURRENT_TIME; + attr->ia_atime = current_time(inode); attr->ia_valid |= ATTR_ATIME_SET; } if (!(attr->ia_valid & ATTR_MTIME_SET) && (attr->ia_valid & ATTR_MTIME)) { - attr->ia_mtime = CURRENT_TIME; + attr->ia_mtime = current_time(inode); attr->ia_valid |= ATTR_MTIME_SET; } if (attr->ia_valid & (ATTR_MTIME | ATTR_CTIME)) - CDEBUG(D_INODE, "setting mtime %lu, ctime %lu, now = %llu\n", - LTIME_S(attr->ia_mtime), LTIME_S(attr->ia_ctime), + CDEBUG(D_INODE, "setting mtime %llu, ctime %llu, now = %llu\n", + (long long)LTIME_S(attr->ia_mtime), (long long)LTIME_S(attr->ia_ctime), (s64)ktime_get_real_seconds()); /* We always do an MDS RPC, even if we're only changing the size; @@ -1503,9 +1503,9 @@ void ll_update_inode(struct inode *inode, struct lustre_md *md) } if (body->valid & OBD_MD_FLMTIME) { if (body->mtime > LTIME_S(inode->i_mtime)) { - CDEBUG(D_INODE, "setting ino %lu mtime from %lu to %llu\n", - inode->i_ino, LTIME_S(inode->i_mtime), - body->mtime); + CDEBUG(D_INODE, "setting ino %lu mtime from %llu to %llu\n", + inode->i_ino, (unsigned long long)LTIME_S(inode->i_mtime), + (unsigned long long)body->mtime); LTIME_S(inode->i_mtime) = body->mtime; } lli->lli_mtime = body->mtime; diff --git a/drivers/staging/lustre/lustre/llite/namei.c b/drivers/staging/lustre/lustre/llite/namei.c index 3664bfd..2c823fe 100644 --- a/drivers/staging/lustre/lustre/llite/namei.c +++ b/drivers/staging/lustre/lustre/llite/namei.c @@ -725,8 +725,8 @@ static void ll_update_times(struct ptlrpc_request *request, LASSERT(body); if (body->valid & OBD_MD_FLMTIME && body->mtime > LTIME_S(inode->i_mtime)) { - CDEBUG(D_INODE, "setting fid "DFID" mtime from %lu to %llu\n", - PFID(ll_inode2fid(inode)), LTIME_S(inode->i_mtime), + CDEBUG(D_INODE, "setting fid "DFID" mtime from %llu to %llu\n", + PFID(ll_inode2fid(inode)), (unsigned long long)LTIME_S(inode->i_mtime), body->mtime); LTIME_S(inode->i_mtime) = body->mtime; } diff --git a/drivers/staging/lustre/lustre/mdc/mdc_reint.c b/drivers/staging/lustre/lustre/mdc/mdc_reint.c index 5dba2c8..f78819e 100644 --- a/drivers/staging/lustre/lustre/mdc/mdc_reint.c +++ b/drivers/staging/lustre/lustre/mdc/mdc_reint.c @@ -139,9 +139,9 @@ int mdc_setattr(struct obd_export *exp, struct md_op_data *op_data, rpc_lock = obd->u.cli.cl_rpc_lock; if (op_data->op_attr.ia_valid & (ATTR_MTIME | ATTR_CTIME)) - CDEBUG(D_INODE, "setting mtime %ld, ctime %ld\n", - LTIME_S(op_data->op_attr.ia_mtime), - LTIME_S(op_data->op_attr.ia_ctime)); + CDEBUG(D_INODE, "setting mtime %lld, ctime %lld\n", + (long long)LTIME_S(op_data->op_attr.ia_mtime), + (long long)LTIME_S(op_data->op_attr.ia_ctime)); mdc_setattr_pack(req, op_data, ea, ealen, ea2, ea2len); ptlrpc_request_set_replen(req); diff --git a/drivers/staging/lustre/lustre/obdclass/linux/linux-obdo.c b/drivers/staging/lustre/lustre/obdclass/linux/linux-obdo.c index c6cc6a7..2eef43c 100644 --- a/drivers/staging/lustre/lustre/obdclass/linux/linux-obdo.c +++ b/drivers/staging/lustre/lustre/obdclass/linux/linux-obdo.c @@ -50,9 +50,9 @@ void obdo_refresh_inode(struct inode *dst, struct obdo *src, u32 valid) if (valid & (OBD_MD_FLCTIME | OBD_MD_FLMTIME)) CDEBUG(D_INODE, - "valid %#llx, cur time %lu/%lu, new %llu/%llu\n", - src->o_valid, LTIME_S(dst->i_mtime), - LTIME_S(dst->i_ctime), src->o_mtime, src->o_ctime); + "valid %#llx, cur time %llu/%llu, new %llu/%llu\n", + src->o_valid, (unsigned long long)LTIME_S(dst->i_mtime), + (unsigned long long)LTIME_S(dst->i_ctime), src->o_mtime, src->o_ctime); if (valid & OBD_MD_FLATIME && src->o_atime > LTIME_S(dst->i_atime)) LTIME_S(dst->i_atime) = src->o_atime; diff --git a/drivers/staging/lustre/lustre/obdclass/obdo.c b/drivers/staging/lustre/lustre/obdclass/obdo.c index 8583a4a..3c7aedc 100644 --- a/drivers/staging/lustre/lustre/obdclass/obdo.c +++ b/drivers/staging/lustre/lustre/obdclass/obdo.c @@ -58,9 +58,9 @@ void obdo_from_inode(struct obdo *dst, struct inode *src, u32 valid) u32 newvalid = 0; if (valid & (OBD_MD_FLCTIME | OBD_MD_FLMTIME)) - CDEBUG(D_INODE, "valid %x, new time %lu/%lu\n", - valid, LTIME_S(src->i_mtime), - LTIME_S(src->i_ctime)); + CDEBUG(D_INODE, "valid %x, new time %llu/%llu\n", + valid, (unsigned long long)LTIME_S(src->i_mtime), + (unsigned long long)LTIME_S(src->i_ctime)); if (valid & OBD_MD_FLATIME) { dst->o_atime = LTIME_S(src->i_atime); diff --git a/drivers/staging/lustre/lustre/osc/osc_io.c b/drivers/staging/lustre/lustre/osc/osc_io.c index 6e3dcd3..dfd3e11 100644 --- a/drivers/staging/lustre/lustre/osc/osc_io.c +++ b/drivers/staging/lustre/lustre/osc/osc_io.c @@ -217,7 +217,7 @@ static void osc_page_touch_at(const struct lu_env *env, kms > loi->loi_kms ? "" : "not ", loi->loi_kms, kms, loi->loi_lvb.lvb_size); - attr->cat_ctime = LTIME_S(CURRENT_TIME); + attr->cat_ctime = ktime_get_real_seconds(); attr->cat_mtime = attr->cat_ctime; valid = CAT_MTIME | CAT_CTIME; if (kms > loi->loi_kms) { -- 1.9.1 From gregkh at linuxfoundation.org Sat Jun 25 21:45:14 2016 From: gregkh at linuxfoundation.org (Greg Kroah-Hartman) Date: Sat, 25 Jun 2016 14:45:14 -0700 Subject: [lustre-devel] [PATCH v3 15/24] drivers: staging: lustre: Replace CURRENT_TIME with current_time() In-Reply-To: <1466890668-23400-16-git-send-email-deepa.kernel@gmail.com> References: <1466890668-23400-1-git-send-email-deepa.kernel@gmail.com> <1466890668-23400-16-git-send-email-deepa.kernel@gmail.com> Message-ID: <20160625214514.GA11267@kroah.com> On Sat, Jun 25, 2016 at 02:37:39PM -0700, Deepa Dinamani wrote: > CURRENT_TIME macro is not appropriate for filesystems as it > doesn't use the right granularity for filesystem timestamps. > Use current_time() instead. > > This is also in preparation for the patch that transitions > vfs timestamps to use 64 bit time and hence make them > y2038 safe. As part of the effort current_time() will be > extended to do range checks. Hence, it is necessary for all > file system timestamps to use current_time(). > > Also change format string for prints so that these are valid > when vfs is transitioned to use 64 bit timestamps. > > Signed-off-by: Deepa Dinamani > Cc: Greg Kroah-Hartman > Cc: lustre-devel at lists.lustre.org > Acked-by: James Simmons Acked-by: Greg Kroah-Hartman From bauerj at iodoctors.com Sun Jun 26 19:17:15 2016 From: bauerj at iodoctors.com (John Bauer) Date: Sun, 26 Jun 2016 14:17:15 -0500 Subject: [lustre-devel] [lustre-discuss] more on lustre striping In-Reply-To: <22ECFBA2-BD72-4751-8B92-E58D6FEAD9FF@intel.com> References: <1ef5a267-334c-be0d-13f4-c0fab917d1bf@iodoctors.com> <38EA9F32-3869-43BA-B215-EB2E5BA62FD5@intel.com> <01EE2B9D-2359-49B5-A50F-E7C2D97E6696@intel.com> <44e2353d-3bef-ddd7-f15e-ad4bfdda040f@iodoctors.com> <9ebe9f4c-d5a2-4c93-4f00-49029850cbbe@iodoctors.com> <575AB28E.7090404@pittman.co.uk> <8a9e4e45-ea99-1147-5c58-94a73d9010a8@iodoctors.com> <22ECFBA2-BD72-4751-8B92-E58D6FEAD9FF@intel.com> Message-ID: Oleg I have written a simple test case that addresses your suggestions. My simple test program now calls __open() and the LD_PRELOAD'd shared object, libopen.so, exports __open(). The attached tar file creates a directory stdio. cd into it and *make clean all*. Then run *./stdio.csh*. You will see that the program's call to __open() is intercepted, as evidenced by the fprintf() from the preloaded __open(). But the open() call made by fopen() is still not reported by the preloaded function. I am thoroughly convinced fopen()'s call to open(), by whatever name it is using for open(), can not be intercepted. The most compelling evidence is the output from the run-time loader when LD_DEBUG=all is set. If I remove the call to __open() from the test program, the only function with open in its name that the run-time loader reports searching for is fopen(). The call that fopen() makes to open() is probably satisfied when libc is built. Per Andreas's suggestion, I have tried to build a debug version of glibc, but I think this is a bit outside my wheelhouse. It always turns into some type of struggle to get glibc to build correctly for the system I am on. I am seeking assistance on that front from admins on the system I am using. This URL is an interesting read, http://blog.hostilefork.com/where-printf-rubber-meets-road/ . It covers the write() call from fprintf(), but I assume open() would have the same issues. If I understand this correctly, the write() call from fprintf() boils down to a syscall at compile time. It doesn't even bother will calling write(). glibc skips the step of calling write() and goes straight to syscall() when calling write() from inside of glibc. Thanks again. John On 6/23/2016 4:50 PM, Oleg Drokin wrote: > #include > >#include > >#include > >#include > > > >int > >main(int argc, char ** argv ){ > > FILE *f = fopen("a", "r" ) ; > > fprintf(stderr,"f=%p\n",f); > > fclose(f); > >} -- I/O Doctors, LLC 507-766-0378 bauerj at iodoctors.com -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: stdio.tgz Type: application/octet-stream Size: 806 bytes Desc: not available URL: From arnd at arndb.de Wed Jun 29 19:48:02 2016 From: arnd at arndb.de (Arnd Bergmann) Date: Wed, 29 Jun 2016 21:48:02 +0200 Subject: [lustre-devel] [Y2038] [PATCH v3 00/24] Delete CURRENT_TIME_SEC and replace current_fs_time() In-Reply-To: <1466890668-23400-1-git-send-email-deepa.kernel@gmail.com> References: <1466890668-23400-1-git-send-email-deepa.kernel@gmail.com> Message-ID: <4878160.cRxJJ9CCsj@wuerfel> On Saturday, June 25, 2016 2:37:24 PM CEST Deepa Dinamani wrote: > The series is aimed at getting rid of CURRENT_TIME, CURRENT_TIME_SEC macros > and replacing current_fs_time() with current_time(). > The macros are not y2038 safe. There is no plan to transition them into being > y2038 safe. > ktime_get_* api's can be used in their place. And, these are y2038 safe. > > CURRENT_TIME will be deleted after 4.8 rc1 as there is a dependency function > time64_to_tm() for one of the CURRENT_TIME occurance. > > Thanks to Arnd Bergmann for all the guidance and discussions. > > Patches 3-5 were mostly generated using coccinelle. > > All filesystem timestamps use current_fs_time() for right granularity as > mentioned in the respective commit texts of patches. This has a changed > signature, renamed to current_time() and moved to the fs/inode.c. > > This series also serves as a preparatory series to transition vfs to 64 bit > timestamps as outlined here: https://lkml.org/lkml/2016/2/12/104 . > > As per Linus's suggestion in https://lkml.org/lkml/2016/5/24/663 , all the > inode timestamp changes have been squashed into a single patch. Also, > current_time() now is used as a single generic vfs filesystem timestamp api. > It also takes struct inode* as argument instead of struct super_block*. > Posting all patches together in a bigger series so that the big picture is > clear. > > As per the suggestion in https://lwn.net/Articles/672598/, CURRENT_TIME macro > bug fixes are being handled in a series separate from transitioning vfs to use. > Everything in this version looks good to me. Please add Reviewed-by: Arnd Bergmann and send a pull request to Al Viro, based on the latest linux-4.7-rc release. Arnd