Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp8608624ybi; Thu, 6 Jun 2019 15:47:30 -0700 (PDT) X-Google-Smtp-Source: APXvYqwW3YZafIMQ3MrG4XxYojByOByFY0nbl0jWABUkdCtIAz0hxxEi5UmlYV3Bm80WxjuhV7QN X-Received: by 2002:a62:b609:: with SMTP id j9mr41263037pff.145.1559861250867; Thu, 06 Jun 2019 15:47:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559861250; cv=none; d=google.com; s=arc-20160816; b=n5WjjAYcopHgPeT5mFTif5K/LpAIxtiU0T90BY6iTg87RciN1c/x0u0AQEUCK1fys1 MjQUgviaMy6uhy+wxWkj9RXUpIOuHZkH67DYRp+z5hcOXWOloDbYrWuDRrnZpiPcYsqC I+THpIAbujlRPr0vc36P7CaixfQcP3Jj0D/tCTZ2epV32Ew8Lj4SWQ07L1453cSkDxEy 0+gf7orulv1LZ2Gq7vzMjroTv/CnFjdvGmmyS4m4lDmWykA8e1sOCuNY4iTtEg3rJNiG wRnQ9Zu4xVjumPoG3SrSvGeraorbuVrUPEq4YJX/B1YH92EY3LCGjJgcAYX43HyK0ERb OXew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=60ZvyIPF+iPnvub6c7mLgTNNTXfYDKZbh+I6uumXK40=; b=OaIBob1FrJBy1LR6Y1GThVP+tuxb2nqV3ZKzESSuULKbXsyNmDw78RsUR5AAtEXizD hRaykv9LQczll/CBBINySkNZRDMoNtLahH3NJMDpZRyu0MIwAuWopfVrdFUUNdVMCPAO PshmLNsx+lRTQ/1OVNKQ/G6rvwir6pIFyQPFOr27ITZK1qRnPeEmuDz9zrZFUzZ1DZvR 7W3EGA3pOiL6zwI5+vkGBwlQj2O4b8JI2mCrGXgbb78/IeAabHKkphltF9Sub9fvIjx3 E9CAWjUkViJWR8lajG4Up+AUw/jKDzol7y+JnQmvg8Lrbp9YAVQlkLL8n9Ir3sY4cfl+ 3Fww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=EjEhdUBy; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z33si271848pgk.516.2019.06.06.15.47.16; Thu, 06 Jun 2019 15:47:30 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-ext4-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=@kernel.org header.s=default header.b=EjEhdUBy; spf=pass (google.com: best guess record for domain of linux-ext4-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-ext4-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726948AbfFFWp2 (ORCPT + 99 others); Thu, 6 Jun 2019 18:45:28 -0400 Received: from mail.kernel.org ([198.145.29.99]:39372 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726567AbfFFWp2 (ORCPT ); Thu, 6 Jun 2019 18:45:28 -0400 Received: from gmail.com (unknown [104.132.1.77]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 66C1D20868; Thu, 6 Jun 2019 22:45:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559861127; bh=IpeP4llY6H8KG7+vBFY5WZTqeGaAD5HxVZl5eZNKYbc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=EjEhdUByVca2KOEz9p6NHR2DzDlvCiSfwrexPZ54Ql+CrCOEMFlgSCRsBsssPLMPl bff+yIbFliFhncDBeyopUAVMVuUiq8mYp9QVZZX2Vp899XXpO+bK6s/dnzReJXP77D ILdIA0wDj5XPOIjoU8HT4qu9g7iBgEi7CLt0SLLA= Date: Thu, 6 Jun 2019 15:45:25 -0700 From: Eric Biggers To: Wang Shilong Cc: linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, Andreas Dilger , Wang Shilong Subject: Re: [f2fs-dev] [PATCH 1/2] ext4: only set project inherit bit for directory Message-ID: <20190606224525.GB84833@gmail.com> References: <1559795545-17290-1-git-send-email-wshilong1991@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1559795545-17290-1-git-send-email-wshilong1991@gmail.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-ext4-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-ext4@vger.kernel.org On Thu, Jun 06, 2019 at 01:32:24PM +0900, Wang Shilong wrote: > From: Wang Shilong > > It doesn't make any sense to have project inherit bits > for regular files, even though this won't cause any > problem, but it is better fix this. > > Cc: Andreas Dilger > Signed-off-by: Wang Shilong > --- > fs/ext4/ext4.h | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/fs/ext4/ext4.h b/fs/ext4/ext4.h > index 1cb67859e051..ceb74093e138 100644 > --- a/fs/ext4/ext4.h > +++ b/fs/ext4/ext4.h > @@ -421,7 +421,8 @@ struct flex_groups { > EXT4_PROJINHERIT_FL | EXT4_CASEFOLD_FL) > > /* Flags that are appropriate for regular files (all but dir-specific ones). */ > -#define EXT4_REG_FLMASK (~(EXT4_DIRSYNC_FL | EXT4_TOPDIR_FL | EXT4_CASEFOLD_FL)) > +#define EXT4_REG_FLMASK (~(EXT4_DIRSYNC_FL | EXT4_TOPDIR_FL | EXT4_CASEFOLD_FL |\ > + EXT4_PROJINHERIT_FL)) > > /* Flags that are appropriate for non-directories/regular files. */ > #define EXT4_OTHER_FLMASK (EXT4_NODUMP_FL | EXT4_NOATIME_FL) > -- > 2.21.0 Won't this break 'chattr' on files that already have this flag set? FS_IOC_GETFLAGS will return this flag, so 'chattr' will pass it back to FS_IOC_SETFLAGS which will return EOPNOTSUPP due to this: if (ext4_mask_flags(inode->i_mode, flags) != flags) return -EOPNOTSUPP; - Eric