From patchwork Wed Jan 9 06:24:00 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: NeilBrown X-Patchwork-Id: 10753445 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1D8F16C2 for ; Wed, 9 Jan 2019 06:25:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 08D9C28E16 for ; Wed, 9 Jan 2019 06:25:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id ED5DD28E19; Wed, 9 Jan 2019 06:25:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from pdx1-mailman02.dreamhost.com (pdx1-mailman02.dreamhost.com [64.90.62.194]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id CCEF628E16 for ; Wed, 9 Jan 2019 06:25:04 +0000 (UTC) Received: from pdx1-mailman02.dreamhost.com (localhost [IPv6:::1]) by pdx1-mailman02.dreamhost.com (Postfix) with ESMTP id 596ED21FAF7; Tue, 8 Jan 2019 22:25:04 -0800 (PST) X-Original-To: lustre-devel@lists.lustre.org Delivered-To: lustre-devel-lustre.org@pdx1-mailman02.dreamhost.com Received: from mx1.suse.de (mx2.suse.de [195.135.220.15]) by pdx1-mailman02.dreamhost.com (Postfix) with ESMTP id BDC6421F656 for ; Tue, 8 Jan 2019 22:25:01 -0800 (PST) X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay1.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 645F5AF0B; Wed, 9 Jan 2019 06:25:00 +0000 (UTC) From: NeilBrown To: James Simmons , Oleg Drokin , Andreas Dilger Date: Wed, 09 Jan 2019 17:24:00 +1100 Message-ID: <154701488711.26726.17363928508883972338.stgit@noble> User-Agent: StGit/0.17.1-dirty MIME-Version: 1.0 Subject: [lustre-devel] [PATCH 00/29] assorted osc cleanups. X-BeenThere: lustre-devel@lists.lustre.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "For discussing Lustre software development." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Lustre Development List Errors-To: lustre-devel-bounces@lists.lustre.org Sender: "lustre-devel" X-Virus-Scanned: ClamAV using ClamSMTP I was reading through the osc code recently trying to understand it, and tripped over various things that made it harded to understand. So I wrote patches to clean those things up. As you can see below, this deleted nearly 300 lines of code. None of these are bug-fixes, and some may only be subjective improvements, so I can drop any that anyone objects to. This seems to fit well with James' recent suggesting to focus on house-cleaning for a while (which I support). Thanks, NeilBrown --- NeilBrown (29): lustre: osc_cache: discard oe_intree lustre: osc_cache: use assert_spin_locked() lustre: osc: simplify osc_extent_wait() lustre: osc: simplify list manipulation lustre: osc: convert oe_refc and oe_users to kref and refcount_ lustre: osc: use overlapped() consistently. lustre: osc: convert a while loop to for lustre: osc: simplify osc_extent_find() lustre: osc: remove test on 'found' being an error. lustre: osc_cache: avoid list_for_each_entry_safe when clearing list. lustre: osc_cache: simplify osc_wake_cache_waiters() lustre: osc_cache: avoid confusing variable reuse. lustre: osc_cache: change osc_enter_cache_try to return bool. lustre: osc_cache: convert cl_cache_waiters to a wait_queue. lustre: osc_cache: change osc_make_rpc() to return bool. lustre: osc_cache: use osc_makes_hprpc() more consistently. lustre: osc_cache: simplify list walk in get_write_extents(). lustre: osc_cache: avoid unnecessary tests. lustre: osc_cache: convert while to for in get_write_extents() lustre: osc_cache: don't drop a lock we didn't take. lustre: osc_cache: don't drop a lock we didn't take - two lustre: osc_cache: osc_prep_async_page() has meaningless return lustre: osc_cache: remove 'transient' arg from osc_enter_cache_try lustre: osc_cache: change need_release to bool lustre: remove cl_page_cancel() lustre: osc_cache: simplify osc_page_gang_lookup() lustre: osc_cache: white-space and other checkpatch fixes. lustre: osc_request: assorted white-space and check-patch fixes. lustre: centralize handling of PTLRPCD_SET drivers/staging/lustre/lustre/include/cl_object.h | 25 - drivers/staging/lustre/lustre/include/lustre_net.h | 2 drivers/staging/lustre/lustre/include/obd.h | 2 drivers/staging/lustre/lustre/ldlm/ldlm_lib.c | 2 drivers/staging/lustre/lustre/obdclass/cl_page.c | 20 - drivers/staging/lustre/lustre/osc/osc_cache.c | 722 +++++++------------- .../staging/lustre/lustre/osc/osc_cl_internal.h | 33 - drivers/staging/lustre/lustre/osc/osc_internal.h | 15 drivers/staging/lustre/lustre/osc/osc_io.c | 4 drivers/staging/lustre/lustre/osc/osc_lock.c | 27 - drivers/staging/lustre/lustre/osc/osc_page.c | 22 - drivers/staging/lustre/lustre/osc/osc_request.c | 199 +++--- drivers/staging/lustre/lustre/ptlrpc/client.c | 20 - 13 files changed, 399 insertions(+), 694 deletions(-) -- Signature