linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mark Brown <broonie@kernel.org>
To: "Theodore Ts'o" <tytso@mit.edu>,
	Eric Biggers <ebiggers@google.com>,
	Ross Zwisler <ross.zwisler@linux.intel.com>,
	Jan Kara <jack@suse.cz>
Cc: Linux-Next Mailing List <linux-next@vger.kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: linux-next: manual merge of the ext4 tree with the fscrypt tree
Date: Mon, 30 Oct 2017 14:48:04 +0000	[thread overview]
Message-ID: <20171030144804.dkjusjfvl4cvlzoh@sirena.co.uk> (raw)

[-- Attachment #1: Type: text/plain, Size: 2170 bytes --]

Hi Theodore,

Today's linux-next merge of the ext4 tree got a conflict in:

  fs/ext4/inode.c

between commit:

  2ee6a576be564272 ("fs, fscrypt: add an S_ENCRYPTED inode flag")

from the fscrypt tree and commit:

  d4e50e6d43b2620f ("ext4: add ext4_should_use_dax()")

from the ext4 tree.

I fixed it up (see below) and can carry the fix as necessary. This
is now fixed as far as linux-next is concerned, but any non trivial
conflicts should be mentioned to your upstream maintainer when your tree
is submitted for merging.  You may also want to consider cooperating
with the maintainer of the conflicting tree to minimise any particularly
complex conflicts.

diff --cc fs/ext4/inode.c
index 617c7feced24,9f836e2ec18c..000000000000
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@@ -4572,6 -4610,21 +4610,23 @@@ int ext4_get_inode_loc(struct inode *in
  		!ext4_test_inode_state(inode, EXT4_STATE_XATTR));
  }
  
+ static bool ext4_should_use_dax(struct inode *inode)
+ {
++	unsigned int flags = EXT4_I(inode)->i_flags;
++
+ 	if (!test_opt(inode->i_sb, DAX))
+ 		return false;
+ 	if (!S_ISREG(inode->i_mode))
+ 		return false;
+ 	if (ext4_should_journal_data(inode))
+ 		return false;
+ 	if (ext4_has_inline_data(inode))
+ 		return false;
 -	if (ext4_encrypted_inode(inode))
++	if (flags & EXT4_ENCRYPT_FL)
+ 		return false;
+ 	return true;
+ }
+ 
  void ext4_set_inode_flags(struct inode *inode)
  {
  	unsigned int flags = EXT4_I(inode)->i_flags;
@@@ -4587,15 -4640,10 +4642,13 @@@
  		new_fl |= S_NOATIME;
  	if (flags & EXT4_DIRSYNC_FL)
  		new_fl |= S_DIRSYNC;
- 	if (test_opt(inode->i_sb, DAX) && S_ISREG(inode->i_mode) &&
- 	    !ext4_should_journal_data(inode) && !ext4_has_inline_data(inode) &&
- 	    !(flags & EXT4_ENCRYPT_FL))
+ 	if (ext4_should_use_dax(inode))
  		new_fl |= S_DAX;
 +	if (flags & EXT4_ENCRYPT_FL)
 +		new_fl |= S_ENCRYPTED;
  	inode_set_flags(inode, new_fl,
 -			S_SYNC|S_APPEND|S_IMMUTABLE|S_NOATIME|S_DIRSYNC|S_DAX);
 +			S_SYNC|S_APPEND|S_IMMUTABLE|S_NOATIME|S_DIRSYNC|S_DAX|
 +			S_ENCRYPTED);
  }
  
  static blkcnt_t ext4_inode_blocks(struct ext4_inode *raw_inode,

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

             reply	other threads:[~2017-10-30 14:48 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-30 14:48 Mark Brown [this message]
2017-11-13  5:56 ` linux-next: manual merge of the ext4 tree with the fscrypt tree Stephen Rothwell
2019-08-18 23:56 Stephen Rothwell
2020-05-22  1:26 Stephen Rothwell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20171030144804.dkjusjfvl4cvlzoh@sirena.co.uk \
    --to=broonie@kernel.org \
    --cc=ebiggers@google.com \
    --cc=jack@suse.cz \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=ross.zwisler@linux.intel.com \
    --cc=tytso@mit.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).