Received: by 2002:a05:7412:d1aa:b0:fc:a2b0:25d7 with SMTP id ba42csp2052883rdb; Wed, 31 Jan 2024 18:48:42 -0800 (PST) X-Google-Smtp-Source: AGHT+IEW2VghLigi2M7CxL+Ni1uxOuul6f3UjVFM1j0z/FWh93dos0a7uoYlCfRUkg/N4FKHn5rg X-Received: by 2002:a17:906:f855:b0:a36:7903:a2ed with SMTP id ks21-20020a170906f85500b00a367903a2edmr3503369ejb.1.1706755722478; Wed, 31 Jan 2024 18:48:42 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1706755722; cv=pass; d=google.com; s=arc-20160816; b=UKv6V1sLz0jOaxNSkWV5HQdIh+YX1PBH0Ret4/0ColW9Q0b9C+FFHylMR8X/eZsKuo ZZxzH7G+h1wHh5ZAw10nv53pCgoeXE8r3DfAmrHm1cwovD5MN++LeBykpZ8F44gviVfQ oVQKseYPPZQKYEdTTkxKey92dxQStiXe0iFSCAD7GiXwmfwUTwUrmfQ0WG/mtc06bLGD qOsYjHLdsdLSSf3bfssXfcAdrgN70TU/QNc5kymc8TJBp8ilgm+NC5Ro2msmDEuFF/h/ WWkbQ7xjo3v10W2lN3pkZrDGLRRV+0KY624HDtVM7Wjohl+bduNyz4SzvQhl2f11uZEl S7og== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=xwQ8drimoCPudufhCBDXajrGCRMPbI4x2VBlwNqL0cg=; fh=cIV2rYF88aUD0LLgi6c7WpADT57IaJpsxVlMq8r6Jek=; b=BLO/FMZSK0DQK62plIgttyHOVX2K7AQyzEm2/849SAbzP3YYmnRYrlQQxNO/jvpxbT Upsy4aXWWTE8QCwSwIIG2UgmNU68a1pKsfkTpfUeVgmZ+dzS7Mx/u0OzEYCOcFCtFeow qd0ASiCgEkKH6rpszXoI8Dkdctz9DAYy9ueiWZw94uc1YpjX1wekL+uaGfuxHmzdFNUL sP8jelKncWHeogyd6K/qGHMNAyty/zNXfmrq1dIFJJza0wbajWcDDeBDBD3I914ApfRA Uh7MXTCX9mOze6A3jLTA0RWLnQWa9YgqCAr+hTyH/X8jgcMp6JGmAs2z7DTMer/4q9yd lgmQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Sr2Zc4jK; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-47548-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47548-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=1; AJvYcCWr0mGjTuLfqtlQYuWaoqIs4OCXRZEoGCbuBDm8/8R547cPbKJ7iip7l0EMGT6UJterKAxFXSql60GU+H1XPDhtCEcsQKvsbPJ6w8Or6g== Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id p27-20020a1709060ddb00b00a35283110a0si5500085eji.120.2024.01.31.18.48.42 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 31 Jan 2024 18:48:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-47548-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=Sr2Zc4jK; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-47548-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-47548-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 3DE021F293F4 for ; Thu, 1 Feb 2024 02:48:42 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2135139FFF; Thu, 1 Feb 2024 02:48:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Sr2Zc4jK" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3F5181DDD7; Thu, 1 Feb 2024 02:48:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706755711; cv=none; b=Yp4dGLAVAquae/hQ+pqdVKzhqcSe33yl+gUhESPND10JB+8z9TmYTwjLpA5pMMb72s6+6HhyKhD+3UsboqH20ng0heyP/5LiK4Lqr3KXUUsRtIqaQjrXqhvnUcR1Y1/7lewkDUtefN3verwYIbGf2FPIkJcDB/OHA8LKiKSmJsw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1706755711; c=relaxed/simple; bh=FN5XfhSsaXvGyUBOUb4XdancJXjLT/ohiZnt1W70K2I=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=tLJnMJpHcnePfehdBGjeaCd37KXfz8XZSrHctgXZaEZFhOMj4nakD1T9lNd4RsigHcGFMd8WQv7V9LzGZQDEeE1iXPR1MSKu+lyFp9CAOKjZqOrutVEm/+sma/wSt9gYR59rmifFNwJyD5cvloMI0/8xax68ON9Kt9irVffdjIQ= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Sr2Zc4jK; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 602FCC433C7; Thu, 1 Feb 2024 02:48:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1706755710; bh=FN5XfhSsaXvGyUBOUb4XdancJXjLT/ohiZnt1W70K2I=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Sr2Zc4jK/92uPyoJbPenayP+0RoWlz94dkHb49IWpFupUy6i9rQSNS6DRNeODO6yW M0u/ZH9YPcDpQ9bME9wA+tba/OUPAA43a3L9ZGnKqwiq+HEKVoFtl0+8sTEfrUJNL+ qH2Hi/h80bCaH6mlplYb/YVWXJRhIqeW+oghvoqChqgCn65tyhJjNRedxB49tlLDVE obFVt0erSYJMWx45oDbPwodV99IyjpfHZQsTRxIEiKEsjzwsFAK7HbVq9wNvzjJdPV OtQ7cIWMXGX44arZyKaZXKTMyWBVXsBCDoDqi6Ps/aTBNst2rmoZ2Sc3N8EaAkcAfy d9PjNvCW2wWfg== Date: Wed, 31 Jan 2024 18:48:28 -0800 From: Eric Biggers To: xiubli@redhat.com Cc: linux-fscrypt@vger.kernel.org, tytso@mit.edu, jaegeuk@kernel.org, linux-kernel@vger.kernel.org, idryomov@gmail.com, ceph-devel@vger.kernel.org, jlayton@kernel.org, vshankar@redhat.com, mchangir@redhat.com Subject: Re: [PATCH v2] fscrypt: to make sure the inode->i_blkbits is correctly set Message-ID: <20240201024828.GA1526@sol.localdomain> References: <20240201003525.1788594-1-xiubli@redhat.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240201003525.1788594-1-xiubli@redhat.com> On Thu, Feb 01, 2024 at 08:35:25AM +0800, xiubli@redhat.com wrote: > From: Xiubo Li > > The inode->i_blkbits should be already set before calling > fscrypt_get_encryption_info() and it will use this to setup the > ci_data_unit_bits later. > > URL: https://tracker.ceph.com/issues/64035 > Signed-off-by: Xiubo Li Thanks, applied. I adjusted the commit message to make it clear what the patch actually does: commit 5befc19caec93f0088595b4d28baf10658c27a0f Author: Xiubo Li Date: Thu Feb 1 08:35:25 2024 +0800 fscrypt: explicitly require that inode->i_blkbits be set Document that fscrypt_prepare_new_inode() requires inode->i_blkbits to be set, and make it WARN if it's not. This would have made the CephFS bug https://tracker.ceph.com/issues/64035 a bit easier to debug. Signed-off-by: Xiubo Li Link: https://lore.kernel.org/r/20240201003525.1788594-1-xiubli@redhat.com Signed-off-by: Eric Biggers