Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp2301833yba; Thu, 25 Apr 2019 14:06:44 -0700 (PDT) X-Google-Smtp-Source: APXvYqw5Q8tdUzgYmYYJdovi33ui5UQNz9g6cqOttgRrVnFyUibuRIQy4P7yKiGN132pZ3MI6rM7 X-Received: by 2002:a63:6942:: with SMTP id e63mr38914347pgc.102.1556226404568; Thu, 25 Apr 2019 14:06:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1556226404; cv=none; d=google.com; s=arc-20160816; b=DGLVBKV7vF+o+ZmFKbgobcWuUe0PZFF6ZqwkL4fsoshfBQHVRFDVW/OX/JEpNqdDqV 0mXF6RyfuwH6Y1qwZNiB3R6inYZjxajxj2oKYnbsCp05j/IRZAC9oiZEyYA4SY76kqbh nFhCUuJ4RUs7sEr+bMwoNAOEB2y5Qld0d4ieL3BIMVnRDbfqY8fjTswQoS3Wlvc2eETK Yiypqt7ocgFg8aY6QrWPX9l4qi4JQPFxzxWajoVSwJp3Swn/8tMY1Wy5A8QYPEAxQYpH ktFCj4Q31yn1alfNqWRfancv0TI6vacW5cVjeDygmuKW+ZxKTdWYlqv1BRbyCR3/ZAa1 JCFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=wyZAYSHu1LajQMoMWHpQO7QvTyyTgInrg6r4Gak6t7c=; b=VRKu768czSva9wZOiwdaHLmPRs9Zm7adkWpV3TIVuouTSfbJOy5gC2Lx1s0hnjK8rd +SkEwK4Mt+c1ucuSsqNxjEpaUz7cwWTUf+0hG6KD9olDK8oWAWySy9/ffW7AmZPeU2yk q5gX2YVwWbLrSbUX/Q3YhY9IU1UEkyeRJIxAC8MyKxnmWZ9C2U8jGcJH8W8S+Czcx3K3 pHX92YDZJWVa65aI8h7LYyvXo24s5zQ9GO6GR7QgYh78E1L3m3HbgXmOAbsPdG6sZl34 ZB+k7WFNSXtrJUjoyUTzKo7YE8zsaf64ZI3EIvmtUQb3y72YHzsLtTqX8zReCJBuuflt zNCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=Dy0sWirr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id i24si22209384pgh.434.2019.04.25.14.06.29; Thu, 25 Apr 2019 14:06:44 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@linux-foundation.org header.s=google header.b=Dy0sWirr; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387409AbfDYSDO (ORCPT + 99 others); Thu, 25 Apr 2019 14:03:14 -0400 Received: from mail-lf1-f67.google.com ([209.85.167.67]:38736 "EHLO mail-lf1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728005AbfDYSDO (ORCPT ); Thu, 25 Apr 2019 14:03:14 -0400 Received: by mail-lf1-f67.google.com with SMTP id v1so457059lfg.5 for ; Thu, 25 Apr 2019 11:03:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=wyZAYSHu1LajQMoMWHpQO7QvTyyTgInrg6r4Gak6t7c=; b=Dy0sWirr0QwFOPm0eDuzgyxTW2b6C5hpX6p2HWdQtlXDzV3j2TrAB7gZg6Yn/QN9hK TJczCoO7YAuZSaYoZLlj6xd/RKfIDg9gzN3STrJG+xPQnly9RJ9ZXBUrWl4GNTgMPWBz JFzWUY45N7Ux3otgGiixw3ebOt5Tx6em+4Iw0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=wyZAYSHu1LajQMoMWHpQO7QvTyyTgInrg6r4Gak6t7c=; b=IweuaDP8emHhej2WxAvsXTz0vcKF2/QvGcNd+SXNwsfFZ4KIP7BIqCjdI/3d+RxqJR Us1BVLpWyEBI+4kA/1TPN+dgj52ozuXeTV+t9aZeRmsSMsV80NP9tJLX9jdrXpY0dlUM U4/etGxzGz9zjSGZ4bFjY0XxFf5/7Yftco1qrw/5Wy091PZeiH+rnhdgWlL44r1YT1yV 0nDo3liBxBleR6/pqGwvt9abvajILzL1fh3JseuitySOWq1Kd+h5XPoqn3LPkgaafAfT kUjKRpHzN58C13ksY0CwcZ7mFAKSzO8pShAByN7KAq+DKIbkm3Km32ahpZCRFsme0Qye TNWQ== X-Gm-Message-State: APjAAAXLWEqfYeCbo118FTNMAaO2e3Ty77BMmSms/r3jGux52umEkM6H Q1bc9ymlUzchS647Ayq92m2MsfacXMQ= X-Received: by 2002:a19:9792:: with SMTP id z140mr4066414lfd.75.1556215391623; Thu, 25 Apr 2019 11:03:11 -0700 (PDT) Received: from mail-lj1-f176.google.com (mail-lj1-f176.google.com. [209.85.208.176]) by smtp.gmail.com with ESMTPSA id z17sm4739155lja.26.2019.04.25.11.03.10 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 25 Apr 2019 11:03:10 -0700 (PDT) Received: by mail-lj1-f176.google.com with SMTP id l6so487365ljb.3 for ; Thu, 25 Apr 2019 11:03:10 -0700 (PDT) X-Received: by 2002:a2e:9213:: with SMTP id k19mr7412241ljg.118.1556215390270; Thu, 25 Apr 2019 11:03:10 -0700 (PDT) MIME-Version: 1.0 References: <20190425174739.27604-1-idryomov@gmail.com> In-Reply-To: <20190425174739.27604-1-idryomov@gmail.com> From: Linus Torvalds Date: Thu, 25 Apr 2019 11:02:54 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [GIT PULL] Ceph fixes for 5.1-rc7 To: Ilya Dryomov , Jeff Layton Cc: ceph-devel@vger.kernel.org, Linux List Kernel Mailing Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Apr 25, 2019 at 10:48 AM Ilya Dryomov wrote: > > dentry name handling fixes from Jeff and a memory leak fix from Zheng. > Both are old issues, marked for stable. Hmm. You probably should have talked to Al about the dentry name issue, because he'd most likely have pointed you towards our helper function for exactly this thing: struct name_snapshot stable; take_dentry_name_snapshot(&stable, dentry); ... use stable.name .. release_dentry_name_snapshot(&stable); which doesn't need any extra memory allocation outside of some fairly limited stack allocation for the 'name_snapshot' itself, because it knows about the dentry name rules, and - for inline names, it copies it under the d_lock into the fixed DNAME_INLINE_LEN-sized buffer - for out-of-line names, it knows that the name allocation is stable and ref-counted, and just increments the refcount and uses the existing name pointer. now, maybe you need to always do that name allocation anyway (looking at the diff it looks like you often do that for other cases), so maybe the name snapshot capability isn't all that useful for you and the above wouldn't have helped, but I suspect you might not even have realized that there was an option like this. I've pulled this, but maybe Jeff wants to look at whether that snapshotting model could have helped. Linus