Message ID | 20220825133132.153657-2-jlayton@kernel.org |
---|---|
State | New |
Headers | show
Return-Path: <ceph-devel-owner@kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5703FC04AA5 for <ceph-devel@archiver.kernel.org>; Thu, 25 Aug 2022 13:31:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242697AbiHYNbl (ORCPT <rfc822;ceph-devel@archiver.kernel.org>); Thu, 25 Aug 2022 09:31:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36244 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237455AbiHYNbi (ORCPT <rfc822;ceph-devel@vger.kernel.org>); Thu, 25 Aug 2022 09:31:38 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 888A0AE86A for <ceph-devel@vger.kernel.org>; Thu, 25 Aug 2022 06:31:37 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 4A40EB829AB for <ceph-devel@vger.kernel.org>; Thu, 25 Aug 2022 13:31:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9DD09C433D7; Thu, 25 Aug 2022 13:31:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1661434295; bh=b6q/dgHZqMFAdJscDxeo6FAPg7tPcikrLJzB0zEnC9s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qV0jIuovUwadHnDpsJjqtu4cTCFVHxvenm+x+Kqbrlb4RplZboLCncV8W7cpFBwG5 fnPJcVFzlvdryHokPlair7JRm7RLpF9t/TWizndDvIRHdaYOGy8yKEYcu9T4Fp7Gxx 7iFa3FiiGJAQJ3j4rrN1N0QnNCVu4/iwWc//3n72pYwUPOhRfcXyjfBTov4DKHtjgy iB1PqcSsIkKLrc3bk0UEvYf7CpSeOHcli3dIAqty8JUhT47e+AI9wsMpzcdkCSQlLM 9PaV+YH6NsG0Vjn+zp9Gsm1/7ovFeWkiNDd4Gpp/8QmhyTiqsjt1d8dAD2x1DFWeHY s8A1iR+GFnLwg== From: Jeff Layton <jlayton@kernel.org> To: xiubli@redhat.com, idryomov@gmail.com Cc: lhenriques@suse.de, ceph-devel@vger.kernel.org Subject: [PATCH v15 01/29] ceph: don't allow changing layout on encrypted files/directories Date: Thu, 25 Aug 2022 09:31:04 -0400 Message-Id: <20220825133132.153657-2-jlayton@kernel.org> X-Mailer: git-send-email 2.37.2 In-Reply-To: <20220825133132.153657-1-jlayton@kernel.org> References: <20220825133132.153657-1-jlayton@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: <ceph-devel.vger.kernel.org> X-Mailing-List: ceph-devel@vger.kernel.org |
Series |
ceph: remaining patches for fscrypt support
|
expand
|
diff --git a/fs/ceph/ioctl.c b/fs/ceph/ioctl.c index b9f0f4e460ab..9675ef3a6c47 100644 --- a/fs/ceph/ioctl.c +++ b/fs/ceph/ioctl.c @@ -294,6 +294,10 @@ static long ceph_set_encryption_policy(struct file *file, unsigned long arg) struct inode *inode = file_inode(file); struct ceph_inode_info *ci = ceph_inode(inode); + /* encrypted directories can't have striped layout */ + if (ci->i_layout.stripe_count > 1) + return -EINVAL; + ret = vet_mds_for_fscrypt(file); if (ret) return ret;