From patchwork Fri Oct 27 16:53:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dimitri John Ledkov X-Patchwork-Id: 1856338 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SH8056TxMz202k for ; Sat, 28 Oct 2023 03:54:28 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1qwQ6C-0000pO-5i; Fri, 27 Oct 2023 16:54:16 +0000 Received: from smtp-relay-internal-0.internal ([10.131.114.225] helo=smtp-relay-internal-0.canonical.com) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1qwQ5x-0000oZ-Md for kernel-team@lists.ubuntu.com; Fri, 27 Oct 2023 16:54:02 +0000 Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com [209.85.128.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id F328A3FD46 for ; Fri, 27 Oct 2023 16:54:00 +0000 (UTC) Received: by mail-wm1-f72.google.com with SMTP id 5b1f17b1804b1-3fe1521678fso17309215e9.1 for ; Fri, 27 Oct 2023 09:54:00 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698425639; x=1699030439; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hn51xeL7W7+jIG1GyE8hLBjVF0FJJmecKXqeH4bVz4Y=; b=QapsXW+FX70/4VMHt473UbR5fqTYGj4KKrm3FZJLM/EC4+NOzsDw/tem76eQ89v/L9 OxASBaJgrd5M/m5gfj1ylFjUiI9B0s5EZKulodbBxbGx3vMH3ktBTmDBmkWQs/IcFVUH kUEkoGJjICuXWrtrrtJfC7V0mctVYDpW+aSu2d7EWkEjiYVBEJACfd7wutLuC0kqZwZq kgB65u/NjGy5Zn1Rw0Jz65NLsD6uvw1i6ecdtd3HBBCclLAZzkixrHbyYRrHDprPKXdZ u567c19opatgzK+vK037GYimJ/NDqaxcqIfhMW86BDT/sW+fy1QBl9h9kZJFUE03xMV+ 3g/w== X-Gm-Message-State: AOJu0YyIGIW0U1rYm4kyTGJ0lC+xRf7wvwXOwgkdMD889V2ZCj/tyBSi z3SdLXyj5mFsSRmObSxOJUMjrJckpcXdNCnmBILdxE3clSDrxqn4qpkC+hwwQtdHCDbV8wv//8S 5BqetLupRtnl3Rqa4elKrhlOMmrkxc2Qqmp+WqXZL/8enhYjoK2uT7j0= X-Received: by 2002:adf:ef02:0:b0:32d:8220:8991 with SMTP id e2-20020adfef02000000b0032d82208991mr2820519wro.8.1698425639459; Fri, 27 Oct 2023 09:53:59 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGOouO6gNdJG1mQq1VhfAIGru9i+iII3XVMHyLBXD8/Ko8TLlhqNI6LEmnIoOOL9TaKYuw4Bw== X-Received: by 2002:adf:ef02:0:b0:32d:8220:8991 with SMTP id e2-20020adfef02000000b0032d82208991mr2820507wro.8.1698425639168; Fri, 27 Oct 2023 09:53:59 -0700 (PDT) Received: from localhost ([2001:67c:1560:8007::aac:c15c]) by smtp.gmail.com with ESMTPSA id d12-20020adffd8c000000b003143c9beeaesm2125588wrr.44.2023.10.27.09.53.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Oct 2023 09:53:58 -0700 (PDT) From: Dimitri John Ledkov To: kernel-team@lists.ubuntu.com Subject: [SRU][MANTIC][PATCH 1/5] Revert "UBUNTU: SAUCE: ceph: BUG if MDS changed truncate_seq with client caps still outstanding" Date: Fri, 27 Oct 2023 19:53:43 +0300 Message-Id: <20231027165347.1462441-2-dimitri.ledkov@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231027165347.1462441-1-dimitri.ledkov@canonical.com> References: <20231027165347.1462441-1-dimitri.ledkov@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/2041613 This reverts commit 8f6163966729043ebfc30b1acd1c031e4d8c9f2b. Signed-off-by: Dimitri John Ledkov --- fs/ceph/caps.c | 5 ++--- fs/ceph/inode.c | 27 ++++++--------------------- fs/ceph/super.h | 3 +-- 3 files changed, 9 insertions(+), 26 deletions(-) diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index dc04022583..b9811b5d6d 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c @@ -3658,7 +3658,7 @@ static void handle_cap_grant(struct inode *inode, queue_trunc = ceph_fill_file_size(inode, extra_info->issued, le32_to_cpu(grant->truncate_seq), le64_to_cpu(grant->truncate_size), - size, newcaps); + size); } if (ci->i_auth_cap == cap && (newcaps & CEPH_CAP_ANY_FILE_WR)) { @@ -4053,8 +4053,7 @@ static bool handle_cap_trunc(struct inode *inode, doutc(cl, "%p %llx.%llx mds%d seq %d to %lld truncate seq %d\n", inode, ceph_vinop(inode), mds, seq, truncate_size, truncate_seq); queue_trunc = ceph_fill_file_size(inode, issued, - truncate_seq, truncate_size, - size, 0); + truncate_seq, truncate_size, size); return queue_trunc; } diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c index 76c5a30c0b..bb8f27d738 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c @@ -15,7 +15,6 @@ #include #include #include -#include #include "super.h" #include "mds_client.h" @@ -754,8 +753,7 @@ static inline blkcnt_t calc_inode_blocks(u64 size) * truncate() increments the corresponding _seq values.) */ int ceph_fill_file_size(struct inode *inode, int issued, - u32 truncate_seq, u64 truncate_size, - u64 size, int newcaps) + u32 truncate_seq, u64 truncate_size, u64 size) { struct ceph_client *cl = ceph_inode_to_client(inode); struct ceph_inode_info *ci = ceph_inode(inode); @@ -784,23 +782,10 @@ int ceph_fill_file_size(struct inode *inode, int issued, ci->i_truncate_seq = truncate_seq; /* the MDS should have revoked these caps */ - if (issued & (CEPH_CAP_FILE_EXCL | - CEPH_CAP_FILE_RD | - CEPH_CAP_FILE_WR | - CEPH_CAP_FILE_LAZYIO)) { - pr_err_client(cl, - "%p ino %llx.%llx already issued %s, newcaps %s\n", - inode, ceph_vinop(inode), - ceph_cap_string(issued), - ceph_cap_string(newcaps)); - pr_err_client(cl, " truncate_seq %u -> %u\n", - ci->i_truncate_seq, - truncate_seq); - pr_err_client(cl, " size %lld -> %llu\n", - isize, size); - msleep(1000); - BUG(); - } + WARN_ON_ONCE(issued & (CEPH_CAP_FILE_EXCL | + CEPH_CAP_FILE_RD | + CEPH_CAP_FILE_WR | + CEPH_CAP_FILE_LAZYIO)); /* * If we hold relevant caps, or in the case where we're * not the only client referencing this file and we @@ -1137,7 +1122,7 @@ int ceph_fill_inode(struct inode *inode, struct page *locked_page, queue_trunc = ceph_fill_file_size(inode, issued, le32_to_cpu(info->truncate_seq), le64_to_cpu(info->truncate_size), - size, info_caps); + size); /* only update max_size on auth cap */ if ((info->cap.flags & CEPH_CAP_FLAG_AUTH) && ci->i_max_size != le64_to_cpu(info->max_size)) { diff --git a/fs/ceph/super.h b/fs/ceph/super.h index a76a504d13..7fb990c212 100644 --- a/fs/ceph/super.h +++ b/fs/ceph/super.h @@ -1041,8 +1041,7 @@ extern struct inode *ceph_get_inode(struct super_block *sb, struct inode *newino); extern struct inode *ceph_get_snapdir(struct inode *parent); extern int ceph_fill_file_size(struct inode *inode, int issued, - u32 truncate_seq, u64 truncate_size, - u64 size, int newcaps); + u32 truncate_seq, u64 truncate_size, u64 size); extern void ceph_fill_file_time(struct inode *inode, int issued, u64 time_warp_seq, struct timespec64 *ctime, struct timespec64 *mtime, From patchwork Fri Oct 27 16:53:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dimitri John Ledkov X-Patchwork-Id: 1856342 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SH81s4tl0z23jP for ; Sat, 28 Oct 2023 03:56:01 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1qwQ7f-0001Rf-5Q; Fri, 27 Oct 2023 16:55:50 +0000 Received: from smtp-relay-internal-1.internal ([10.131.114.114] helo=smtp-relay-internal-1.canonical.com) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1qwQ5z-0000oc-Ed for kernel-team@lists.ubuntu.com; Fri, 27 Oct 2023 16:54:04 +0000 Received: from mail-lj1-f200.google.com (mail-lj1-f200.google.com [209.85.208.200]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 750B64134E for ; Fri, 27 Oct 2023 16:54:02 +0000 (UTC) Received: by mail-lj1-f200.google.com with SMTP id 38308e7fff4ca-2c5161838d8so25714461fa.1 for ; Fri, 27 Oct 2023 09:54:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698425641; x=1699030441; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=rSp2UIyt7dYj1zltjKtS6Qk3N69TWpFVLP9LDPyltIg=; b=Rw+mpf2+vRUAKoaMZ6BvYnFDpY+F8muwLTiIn3V5OncUQ4vA3UkqLcDOPtmqDpXe8Y wLHE0r2+ko1WRLsD/U2zoJxDdsjyulPjiKAQWhSeVB96F3NILCyrZdsCW3mTaEPN1nf9 SZ/SABuFb4DnLoUe9iv28HKr4IX9gvRaIZidKQtu/k+95jZ7NQe1gHOZvqyxKnBdJZIG b3dcWsr1emrESj4AsuijKvWwRcLNGUz0x463a7T9ImlcLMQXUM0mnrYtCrIvuIFMWaFJ NOeE5GWXg58Pp7GVY7dbuTM7pD2PnXS53uzzKqifwVWVHBCpN5vpcsDIbIqipxABOVHE AcQw== X-Gm-Message-State: AOJu0YxMd0WqRqiwheMH+KNl3oZvIy+AbtnJGQJCURU+c3mcleXeOHgF A5ezFaowvLO7+H61MtcnwJVHN3lbGseDojbmBK+KJIXYt0CH9sp+FWZwoxrTOS97T3/6IZpWwIr /fKeO9ADmOKlHbm2jZ3L3gp2gmwauFmOE/ybV/FOP3m/1wh/rhifyxvc= X-Received: by 2002:a2e:2e12:0:b0:2c5:582:fd8d with SMTP id u18-20020a2e2e12000000b002c50582fd8dmr2675967lju.30.1698425641241; Fri, 27 Oct 2023 09:54:01 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEqxSmis8SXOXE5wEue6EeHe/qigDRQySqcc5IlnCgiwsCSWkkONAvyQJUoz6m/C96EvVjozw== X-Received: by 2002:a2e:2e12:0:b0:2c5:582:fd8d with SMTP id u18-20020a2e2e12000000b002c50582fd8dmr2675956lju.30.1698425640892; Fri, 27 Oct 2023 09:54:00 -0700 (PDT) Received: from localhost ([2001:67c:1560:8007::aac:c15c]) by smtp.gmail.com with ESMTPSA id o5-20020adfe805000000b003247d3e5d99sm2115036wrm.55.2023.10.27.09.54.00 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Oct 2023 09:54:00 -0700 (PDT) From: Dimitri John Ledkov To: kernel-team@lists.ubuntu.com Subject: [SRU][MANTIC][PATCH 2/5] Revert "UBUNTU: SAUCE: ceph: make sure all the files successfully put before unmounting" Date: Fri, 27 Oct 2023 19:53:44 +0300 Message-Id: <20231027165347.1462441-3-dimitri.ledkov@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231027165347.1462441-1-dimitri.ledkov@canonical.com> References: <20231027165347.1462441-1-dimitri.ledkov@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/2041613 This reverts commit a53dba9297be9597eac7b17738723bd44bac97ea. Signed-off-by: Dimitri John Ledkov --- fs/crypto/keyring.c | 6 +----- fs/inode.c | 5 +---- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/fs/crypto/keyring.c b/fs/crypto/keyring.c index 147b9a11c6..7cbb1fd872 100644 --- a/fs/crypto/keyring.c +++ b/fs/crypto/keyring.c @@ -237,11 +237,7 @@ void fscrypt_destroy_keyring(struct super_block *sb) * with ->mk_secret. There should be no structural refs * beyond the one associated with the active ref. */ - if (refcount_read(&mk->mk_active_refs) != 1) { - printk("fscrypt_destroy_keyring: mk_active_refs = %d\n", - refcount_read(&mk->mk_active_refs)); - WARN_ON_ONCE(refcount_read(&mk->mk_active_refs) != 1); - } + WARN_ON_ONCE(refcount_read(&mk->mk_active_refs) != 1); WARN_ON_ONCE(refcount_read(&mk->mk_struct_refs) != 1); WARN_ON_ONCE(!is_master_key_secret_present(&mk->mk_secret)); wipe_master_key_secret(&mk->mk_secret); diff --git a/fs/inode.c b/fs/inode.c index 3b8abad427..67611a3600 100644 --- a/fs/inode.c +++ b/fs/inode.c @@ -716,11 +716,8 @@ void evict_inodes(struct super_block *sb) again: spin_lock(&sb->s_inode_list_lock); list_for_each_entry_safe(inode, next, &sb->s_inodes, i_sb_list) { - if (atomic_read(&inode->i_count)) { - printk("evict_inodes inode %p, i_count = %d, was skipped!\n", - inode, atomic_read(&inode->i_count)); + if (atomic_read(&inode->i_count)) continue; - } spin_lock(&inode->i_lock); if (inode->i_state & (I_NEW | I_FREEING | I_WILL_FREE)) { From patchwork Fri Oct 27 16:53:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dimitri John Ledkov X-Patchwork-Id: 1856340 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SH81G0xDpz23jP for ; Sat, 28 Oct 2023 03:55:30 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1qwQ7B-00016V-2D; Fri, 27 Oct 2023 16:55:19 +0000 Received: from smtp-relay-internal-1.internal ([10.131.114.114] helo=smtp-relay-internal-1.canonical.com) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1qwQ62-0000op-OC for kernel-team@lists.ubuntu.com; Fri, 27 Oct 2023 16:54:08 +0000 Received: from mail-lj1-f197.google.com (mail-lj1-f197.google.com [209.85.208.197]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id A8E0D420BD for ; Fri, 27 Oct 2023 16:54:03 +0000 (UTC) Received: by mail-lj1-f197.google.com with SMTP id 38308e7fff4ca-2c51a7df557so25848281fa.0 for ; Fri, 27 Oct 2023 09:54:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698425642; x=1699030442; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5iJVeg9Phb+ygj/largJCJTrE/ZM5NHWmNJD2p14RI0=; b=TKO8E3wdfAxkJa6pzWUePsyEpL4U++cA+FbzA193TlMVjrNDyR+fqiQUHzEyFVGzWN Jn28BiIYtngx+Wf4D3yDmethwxWARv/EiZP9Jr96sZ3ZtqBeyU9hqFQ0nFLyEf8WgQgp 3Exp33x5b2kYgGjjypMpASuWZRSkFNfg2nNJDdtP64A+PmYmJ5pwKEHHoK86ljX98c88 QrNPRp6aIVr4Cq+SCHR6IbrzVylotp0DFer20WwqMzeTybgxVEuE6zV/g4zBua8kxIla mVtF2Qs1C0p0Cy66r07NCmQuLhwtVOELwsxJQUqNL5sJesB5RJxMf8PpQ8hiRagJPLF9 rQ1g== X-Gm-Message-State: AOJu0YyCVLQJuIW6wuLmP3BvYI+jNyc/2G7lWVCV7A/a+x8IGaWQCMTV e8WYnlROxi6kw1hxLHXlphS9XQ8MCF7FGmnFu5ZdpVK5BbkNoTpo2kluNORCMqFtoMqMREAGypB rjj13zZFuvMGoqy6HGaofrtJ7gY/2HrIuTqG0EILnfI2UhdIVRsP8etQ= X-Received: by 2002:a2e:9b13:0:b0:2c0:14e2:1f5c with SMTP id u19-20020a2e9b13000000b002c014e21f5cmr2401154lji.5.1698425642730; Fri, 27 Oct 2023 09:54:02 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHcgPoq03spOEqoMZcX9Bfotce1ObaxXsTZcUVwLX56YHgHFaEauXRMf4EQJ+d76bN+QPSGKg== X-Received: by 2002:a2e:9b13:0:b0:2c0:14e2:1f5c with SMTP id u19-20020a2e9b13000000b002c014e21f5cmr2401143lji.5.1698425642416; Fri, 27 Oct 2023 09:54:02 -0700 (PDT) Received: from localhost ([2001:67c:1560:8007::aac:c15c]) by smtp.gmail.com with ESMTPSA id j7-20020a05600c1c0700b003fefb94ccc9sm2056253wms.11.2023.10.27.09.54.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Oct 2023 09:54:02 -0700 (PDT) From: Dimitri John Ledkov To: kernel-team@lists.ubuntu.com Subject: [SRU][MANTIC][PATCH 3/5] Revert "UBUNTU: SAUCE: mm: BUG if filemap_alloc_folio gives us a folio with a non-NULL ->private" Date: Fri, 27 Oct 2023 19:53:45 +0300 Message-Id: <20231027165347.1462441-4-dimitri.ledkov@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231027165347.1462441-1-dimitri.ledkov@canonical.com> References: <20231027165347.1462441-1-dimitri.ledkov@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/2041613 This reverts commit 17fcf5d75d4a433d48d7e74b9020b4e0a566200e. Signed-off-by: Dimitri John Ledkov --- mm/filemap.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/mm/filemap.c b/mm/filemap.c index af405453ab..9e44a49bbd 100644 --- a/mm/filemap.c +++ b/mm/filemap.c @@ -973,12 +973,10 @@ struct folio *filemap_alloc_folio(gfp_t gfp, unsigned int order) n = cpuset_mem_spread_node(); folio = __folio_alloc_node(gfp, order, n); } while (!folio && read_mems_allowed_retry(cpuset_mems_cookie)); - } else { - folio = folio_alloc(gfp, order); + + return folio; } - if (folio) - VM_BUG_ON_FOLIO(folio->private, folio); - return folio; + return folio_alloc(gfp, order); } EXPORT_SYMBOL(filemap_alloc_folio); #endif From patchwork Fri Oct 27 16:53:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dimitri John Ledkov X-Patchwork-Id: 1856337 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SH8060CGwz23jc for ; Sat, 28 Oct 2023 03:54:29 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1qwQ6J-0000qI-4K; Fri, 27 Oct 2023 16:54:23 +0000 Received: from smtp-relay-internal-0.internal ([10.131.114.225] helo=smtp-relay-internal-0.canonical.com) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1qwQ61-0000oo-70 for kernel-team@lists.ubuntu.com; Fri, 27 Oct 2023 16:54:08 +0000 Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id B274B3F6AE for ; Fri, 27 Oct 2023 16:54:04 +0000 (UTC) Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-408f9e9e9b0so17352025e9.2 for ; Fri, 27 Oct 2023 09:54:04 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698425644; x=1699030444; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=SQNSz4fBCIsbIbCZNTavFM6ZmtR60zYBGNNBxnxkjQo=; b=W8hZbmctdzBYhKzYmED83lRE69B+w1+ccJsnrXhJBxPxGDLyIVMYwzTU9Zvn4Q/oCX GKrP+T82XCfz0GJ5ihKeejyhL2a30slYQiPEYP6JyWUDNpadOFzHDFcn0Da5ZXycSel9 7qWVi+e/umYvfXKqbFMGr9lEJDOFwrQX3O0M/QnAwLeT6ohgReUdV44bN/fAD/8YkRDu 5/7PszOkkiFsCcCcWr1hvZsHCxX0wSVkm+KMTUH5IZhXsIv4Ya71arf4815s8FR4qDrS 9B9YeBD3l8c63mfdRORUpZIwMcuWkowvrnTBf6RQDO2vAETGmSVdbdELSjj4lX62w3fk 31fA== X-Gm-Message-State: AOJu0Yz+BNTS2aXHv9WwFgM+nyaJ6dig4f4ebeJ9sJkRa229fXZ68y5Y Bo9hdq5jPkbIqD8Vf5IbOxAnLrzStFDgnhu5hCAOAb7jIFdUt0GhPg3ZUQh6qATeQuo69Fu0WyM 17hhIf/4I7YLDR/pjTJKXBYyRFzT3MHBs9P+xS03E+AJdAGPtZJMLrK4= X-Received: by 2002:a05:600c:4fc6:b0:408:3ea0:3026 with SMTP id o6-20020a05600c4fc600b004083ea03026mr2851347wmq.11.1698425644179; Fri, 27 Oct 2023 09:54:04 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH29526jUNgyfbVIIzf5Po/hOv1bpZXQHV1RUN43lrSw6pkr7HMrhHeSybb4DD8gnPN2V1vIQ== X-Received: by 2002:a05:600c:4fc6:b0:408:3ea0:3026 with SMTP id o6-20020a05600c4fc600b004083ea03026mr2851335wmq.11.1698425643861; Fri, 27 Oct 2023 09:54:03 -0700 (PDT) Received: from localhost ([2001:67c:1560:8007::aac:c15c]) by smtp.gmail.com with ESMTPSA id t3-20020a1c7703000000b004042dbb8925sm5433289wmi.38.2023.10.27.09.54.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Oct 2023 09:54:03 -0700 (PDT) From: Dimitri John Ledkov To: kernel-team@lists.ubuntu.com Subject: [SRU][MANTIC][PATCH 4/5] Revert "UBUNTU: SAUCE: ceph: dump info about cap flushes when we're waiting too long for them" Date: Fri, 27 Oct 2023 19:53:46 +0300 Message-Id: <20231027165347.1462441-5-dimitri.ledkov@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231027165347.1462441-1-dimitri.ledkov@canonical.com> References: <20231027165347.1462441-1-dimitri.ledkov@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/2041613 This reverts commit 834ebb591fa2a739892b2d19ccaa77ca6178660f. Signed-off-by: Dimitri John Ledkov --- fs/ceph/caps.c | 15 +-------------- fs/ceph/inode.c | 1 - fs/ceph/mds_client.c | 36 ++---------------------------------- fs/ceph/snap.c | 1 - fs/ceph/super.h | 2 -- 5 files changed, 3 insertions(+), 52 deletions(-) diff --git a/fs/ceph/caps.c b/fs/ceph/caps.c index b9811b5d6d..9588801bcd 100644 --- a/fs/ceph/caps.c +++ b/fs/ceph/caps.c @@ -1944,7 +1944,6 @@ static u64 __mark_caps_flushing(struct inode *inode, swap(cf, ci->i_prealloc_cap_flush); cf->caps = flushing; cf->wake = wake; - cf->ci = ci; spin_lock(&mdsc->cap_dirty_lock); list_del_init(&ci->i_dirty_item); @@ -3825,10 +3824,6 @@ static void handle_cap_flush_ack(struct inode *inode, u64 flush_tid, bool wake_ci = false; bool wake_mdsc = false; - /* track latest cap flush ack seen for this inode */ - if (flush_tid > ci->i_last_cap_flush_ack) - ci->i_last_cap_flush_ack = flush_tid; - list_for_each_entry_safe(cf, tmp_cf, &ci->i_cap_flush_list, i_list) { /* Is this the one that was flushed? */ if (cf->tid == flush_tid) @@ -4460,11 +4455,7 @@ void ceph_handle_caps(struct ceph_mds_session *session, session->s_seq, (unsigned)seq); if (!inode) { - if (op == CEPH_CAP_OP_FLUSH_ACK) - pr_info_client(cl, "can't find ino %llx:%llx for flush_ack!\n", - vino.snap, vino.ino); - else - doutc(cl, " i don't have ino %llx\n", vino.ino); + doutc(cl, " i don't have ino %llx\n", vino.ino); switch (op) { case CEPH_CAP_OP_IMPORT: @@ -4522,10 +4513,6 @@ void ceph_handle_caps(struct ceph_mds_session *session, doutc(cl, " no cap on %p %llx.%llx from mds%d\n", inode, ceph_vinop(inode), session->s_mds); spin_unlock(&ci->i_ceph_lock); - if (op == CEPH_CAP_OP_FLUSH_ACK) - pr_info_client(cl, "no cap on %p %llx.%llx from " - "mds%d for flush_ack!\n", - inode, ceph_vinop(inode), session->s_mds); switch (op) { case CEPH_CAP_OP_REVOKE: case CEPH_CAP_OP_GRANT: diff --git a/fs/ceph/inode.c b/fs/ceph/inode.c index bb8f27d738..6c6b0fe1dd 100644 --- a/fs/ceph/inode.c +++ b/fs/ceph/inode.c @@ -622,7 +622,6 @@ struct inode *ceph_alloc_inode(struct super_block *sb) INIT_LIST_HEAD(&ci->i_cap_snaps); ci->i_head_snapc = NULL; ci->i_snap_caps = 0; - ci->i_last_cap_flush_ack = 0; ci->i_last_rd = ci->i_last_wr = jiffies - 3600 * HZ; for (i = 0; i < CEPH_FILE_MODE_BITS; i++) diff --git a/fs/ceph/mds_client.c b/fs/ceph/mds_client.c index a6f54b7e58..289444bc3f 100644 --- a/fs/ceph/mds_client.c +++ b/fs/ceph/mds_client.c @@ -2277,28 +2277,6 @@ static int check_caps_flush(struct ceph_mds_client *mdsc, return ret; } -static void dump_cap_flushes(struct ceph_mds_client *mdsc, u64 want_tid) -{ - struct ceph_client *cl = mdsc->fsc->client; - struct ceph_cap_flush *cf; - - pr_info_client(cl, "still waiting for cap flushes through %llu:\n", - want_tid); - spin_lock(&mdsc->cap_dirty_lock); - list_for_each_entry(cf, &mdsc->cap_flush_list, g_list) { - struct inode *inode = &cf->ci->netfs.inode; - - if (cf->tid > want_tid) - break; - pr_info_client(cl, "%p %llx.%llx %s %llu %llu %d%s\n", - inode, ceph_vinop(inode), - ceph_cap_string(cf->caps), cf->tid, - cf->ci->i_last_cap_flush_ack, cf->wake, - cf->is_capsnap ? " is_capsnap" : ""); - } - spin_unlock(&mdsc->cap_dirty_lock); -} - /* * flush all dirty inode data to disk. * @@ -2308,19 +2286,11 @@ static void wait_caps_flush(struct ceph_mds_client *mdsc, u64 want_flush_tid) { struct ceph_client *cl = mdsc->fsc->client; - int i = 0; - long ret; doutc(cl, "want %llu\n", want_flush_tid); - do { - ret = wait_event_timeout(mdsc->cap_flushing_wq, - check_caps_flush(mdsc, want_flush_tid), 60 * HZ); - if (ret == 0 && ++i < 5) - dump_cap_flushes(mdsc, want_flush_tid); - else if (ret == 1) - pr_info_client(cl, "condition evaluated to true after timeout!\n"); - } while (ret == 0); + wait_event(mdsc->cap_flushing_wq, + check_caps_flush(mdsc, want_flush_tid)); doutc(cl, "ok, flushed thru %llu\n", want_flush_tid); } @@ -5904,8 +5874,6 @@ static void mds_dispatch(struct ceph_connection *con, struct ceph_msg *msg) mutex_lock(&mdsc->mutex); if (__verify_registered_session(mdsc, s) < 0) { - pr_info_client(cl, "dropping tid %llu from unregistered session %d\n", - msg->hdr.tid, s->s_mds); mutex_unlock(&mdsc->mutex); goto out; } diff --git a/fs/ceph/snap.c b/fs/ceph/snap.c index 0e6d9eed18..68964e5beb 100644 --- a/fs/ceph/snap.c +++ b/fs/ceph/snap.c @@ -595,7 +595,6 @@ static void ceph_queue_cap_snap(struct ceph_inode_info *ci, ceph_cap_string(dirty), capsnap->need_flush ? "" : "no_flush"); ihold(inode); - capsnap->cap_flush.ci = ci; capsnap->follows = old_snapc->seq; capsnap->issued = __ceph_caps_issued(ci, NULL); capsnap->dirty = dirty; diff --git a/fs/ceph/super.h b/fs/ceph/super.h index 7fb990c212..a5faebed40 100644 --- a/fs/ceph/super.h +++ b/fs/ceph/super.h @@ -210,7 +210,6 @@ struct ceph_cap_flush { bool is_capsnap; /* true means capsnap */ struct list_head g_list; // global struct list_head i_list; // per inode - struct ceph_inode_info *ci; }; /* @@ -416,7 +415,6 @@ struct ceph_inode_info { struct ceph_snap_context *i_head_snapc; /* set if wr_buffer_head > 0 or dirty|flushing caps */ unsigned i_snap_caps; /* cap bits for snapped files */ - u64 i_last_cap_flush_ack; /* latest cap flush_ack tid for this inode */ unsigned long i_last_rd; unsigned long i_last_wr; From patchwork Fri Oct 27 16:53:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dimitri John Ledkov X-Patchwork-Id: 1856339 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4SH80M0h6Xz202k for ; Sat, 28 Oct 2023 03:54:43 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1qwQ6L-0000ql-Nk; Fri, 27 Oct 2023 16:54:26 +0000 Received: from smtp-relay-internal-1.internal ([10.131.114.114] helo=smtp-relay-internal-1.canonical.com) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1qwQ63-0000oq-8U for kernel-team@lists.ubuntu.com; Fri, 27 Oct 2023 16:54:09 +0000 Received: from mail-lf1-f70.google.com (mail-lf1-f70.google.com [209.85.167.70]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id E091B3FB61 for ; Fri, 27 Oct 2023 16:54:06 +0000 (UTC) Received: by mail-lf1-f70.google.com with SMTP id 2adb3069b0e04-5079a3362afso2670057e87.3 for ; Fri, 27 Oct 2023 09:54:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1698425646; x=1699030446; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=5BcfW1jXe6/6j8zyv63u5a+jA4/VLDcCBWK4Qjni9Ds=; b=OcYShKkLgp8X4MrozQbIcjDorx68aM2B5uPdqH4YddjYWvO0zl+0huVXhcsGUUsuqH OQBE6pkZrkT5PBCLnXKZ67B/lDAm1arPKurLFkzytPEIRqlyFbcKBz6BZW4cOSjm+Tiv zC3M8o8gmbuMlF/wiIp67NuQLs+P6qdUO6v+FkZruUZh+0xi+DZ6NM0nmXONco+pEvyy +v2tAYWrK4iSwNj0cxm37R7ukt12NXQjGDOhD9uj2j9shTKWCWjL37TBhcRZzFfUcCl1 xAkAWo8OwA3RaQnyWZqwza2ktPbHRvn8PdOn0O8d80HTyTKOhd9F+NMAArIfyj9hKWnf WmFQ== X-Gm-Message-State: AOJu0YzULH4TxAM6SpYSRlTrtRyo7AaGuCeHggLv9sojIQoliNxwm5hk l6E/rsRG4RVmTNs8EMzCVSPYrBRXxt07/MkNOp0HHYdyCOoIbsWk72vgkZENDiQR61+a771FzL6 v8toeoKUbUCuBh4nijggRFplITnMBMjm+fAmd8pV2eFoWIsKdMkTsqd4= X-Received: by 2002:a05:6512:282c:b0:4fe:993:2218 with SMTP id cf44-20020a056512282c00b004fe09932218mr2434835lfb.31.1698425645801; Fri, 27 Oct 2023 09:54:05 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFJsv+IrBtlDongBh/2QrN6/e83YCkxAA5AR91oS1SKg99iP7m0cDUmxtI+FKPBllGPHS7V3g== X-Received: by 2002:a05:6512:282c:b0:4fe:993:2218 with SMTP id cf44-20020a056512282c00b004fe09932218mr2434822lfb.31.1698425645571; Fri, 27 Oct 2023 09:54:05 -0700 (PDT) Received: from localhost ([2001:67c:1560:8007::aac:c15c]) by smtp.gmail.com with ESMTPSA id i1-20020a5d6301000000b003176c6e87b1sm2106286wru.81.2023.10.27.09.54.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Oct 2023 09:54:05 -0700 (PDT) From: Dimitri John Ledkov To: kernel-team@lists.ubuntu.com Subject: [SRU][MANTIC][PATCH 5/5] Revert "UBUNTU: SAUCE: rbd: bump RBD_MAX_PARENT_CHAIN_LEN to 128" Date: Fri, 27 Oct 2023 19:53:47 +0300 Message-Id: <20231027165347.1462441-6-dimitri.ledkov@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231027165347.1462441-1-dimitri.ledkov@canonical.com> References: <20231027165347.1462441-1-dimitri.ledkov@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" BugLink: https://bugs.launchpad.net/bugs/2041613 This reverts commit 498d08b9bd07f84e5d086d959c14510f930dff73. Signed-off-by: Dimitri John Ledkov --- drivers/block/rbd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/block/rbd.c b/drivers/block/rbd.c index e99c8382dd..2328cc05be 100644 --- a/drivers/block/rbd.c +++ b/drivers/block/rbd.c @@ -89,7 +89,7 @@ static int atomic_dec_return_safe(atomic_t *v) #define RBD_MINORS_PER_MAJOR 256 #define RBD_SINGLE_MAJOR_PART_SHIFT 4 -#define RBD_MAX_PARENT_CHAIN_LEN 128 +#define RBD_MAX_PARENT_CHAIN_LEN 16 #define RBD_SNAP_DEV_NAME_PREFIX "snap_" #define RBD_MAX_SNAP_NAME_LEN \