linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephen Rothwell <sfr@canb.auug.org.au>
To: David Sterba <dsterba@suse.cz>
Cc: Christian Brauner <brauner@kernel.org>,
	David Sterba <dsterba@suse.com>,
	Filipe Manana <fdmanana@suse.com>,
	Jeff Layton <jlayton@kernel.org>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Next Mailing List <linux-next@vger.kernel.org>
Subject: linux-next: manual merge of the btrfs tree with Linus' tree
Date: Tue, 31 Oct 2023 11:18:36 +1100	[thread overview]
Message-ID: <20231031111836.0ac433a9@canb.auug.org.au> (raw)

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

Hi all,

Today's linux-next merge of the btrfs tree got conflicts in:

  fs/btrfs/file.c
  fs/btrfs/inode.c
  fs/btrfs/transaction.c

between commit:

  b1c38a1338c9 ("btrfs: convert to new timestamp accessors")

from Linus' tree and commits:

  8b9d032225be ("btrfs: remove redundant root argument from btrfs_update_inode()")
  0a5d0dc55fcb ("btrfs: remove redundant root argument from btrfs_update_inode_fallback()")
  8b9d032225be ("btrfs: remove redundant root argument from btrfs_update_inode()")
  c6e8f898f56f ("btrfs: open code timespec64 in struct btrfs_inode")

from the btrfs 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.

-- 
Cheers,
Stephen Rothwell

diff --cc fs/btrfs/file.c
index 278a4ea651e1,92419cb8508a..000000000000
--- a/fs/btrfs/file.c
+++ b/fs/btrfs/file.c
@@@ -2474,10 -2476,9 +2477,10 @@@ int btrfs_replace_file_extents(struct b
  		inode_inc_iversion(&inode->vfs_inode);
  
  		if (!extent_info || extent_info->update_times)
 -			inode->vfs_inode.i_mtime = inode_set_ctime_current(&inode->vfs_inode);
 +			inode_set_mtime_to_ts(&inode->vfs_inode,
 +					      inode_set_ctime_current(&inode->vfs_inode));
  
- 		ret = btrfs_update_inode(trans, root, inode);
+ 		ret = btrfs_update_inode(trans, inode);
  		if (ret)
  			break;
  
@@@ -2716,8 -2717,8 +2719,8 @@@ static int btrfs_punch_hole(struct fil
  
  	ASSERT(trans != NULL);
  	inode_inc_iversion(inode);
 -	inode->i_mtime = inode_set_ctime_current(inode);
 +	inode_set_mtime_to_ts(inode, inode_set_ctime_current(inode));
- 	ret = btrfs_update_inode(trans, root, BTRFS_I(inode));
+ 	ret = btrfs_update_inode(trans, BTRFS_I(inode));
  	updated_inode = true;
  	btrfs_end_transaction(trans);
  	btrfs_btree_balance_dirty(fs_info);
diff --cc fs/btrfs/inode.c
index 6e3ce1aecb6e,b388505c91cc..000000000000
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@@ -3922,24 -3928,22 +3928,22 @@@ static void fill_inode_item(struct btrf
  	btrfs_set_token_inode_nlink(&token, item, inode->i_nlink);
  
  	btrfs_set_token_timespec_sec(&token, &item->atime,
 -				     inode->i_atime.tv_sec);
 +				     inode_get_atime_sec(inode));
  	btrfs_set_token_timespec_nsec(&token, &item->atime,
 -				      inode->i_atime.tv_nsec);
 +				      inode_get_atime_nsec(inode));
  
  	btrfs_set_token_timespec_sec(&token, &item->mtime,
 -				     inode->i_mtime.tv_sec);
 +				     inode_get_mtime_sec(inode));
  	btrfs_set_token_timespec_nsec(&token, &item->mtime,
 -				      inode->i_mtime.tv_nsec);
 +				      inode_get_mtime_nsec(inode));
  
  	btrfs_set_token_timespec_sec(&token, &item->ctime,
 -				     inode_get_ctime(inode).tv_sec);
 +				     inode_get_ctime_sec(inode));
  	btrfs_set_token_timespec_nsec(&token, &item->ctime,
 -				      inode_get_ctime(inode).tv_nsec);
 +				      inode_get_ctime_nsec(inode));
  
- 	btrfs_set_token_timespec_sec(&token, &item->otime,
- 				     BTRFS_I(inode)->i_otime.tv_sec);
- 	btrfs_set_token_timespec_nsec(&token, &item->otime,
- 				      BTRFS_I(inode)->i_otime.tv_nsec);
+ 	btrfs_set_token_timespec_sec(&token, &item->otime, BTRFS_I(inode)->i_otime_sec);
+ 	btrfs_set_token_timespec_nsec(&token, &item->otime, BTRFS_I(inode)->i_otime_nsec);
  
  	btrfs_set_token_inode_nbytes(&token, item, inode_get_bytes(inode));
  	btrfs_set_token_inode_generation(&token, item,
@@@ -4132,8 -4135,9 +4135,8 @@@ err
  	btrfs_i_size_write(dir, dir->vfs_inode.i_size - name->len * 2);
  	inode_inc_iversion(&inode->vfs_inode);
  	inode_inc_iversion(&dir->vfs_inode);
 -	inode_set_ctime_current(&inode->vfs_inode);
 -	dir->vfs_inode.i_mtime = inode_set_ctime_current(&dir->vfs_inode);
 + 	inode_set_mtime_to_ts(&dir->vfs_inode, inode_set_ctime_current(&dir->vfs_inode));
- 	ret = btrfs_update_inode(trans, root, dir);
+ 	ret = btrfs_update_inode(trans, dir);
  out:
  	return ret;
  }
@@@ -4305,8 -4309,8 +4308,8 @@@ static int btrfs_unlink_subvol(struct b
  
  	btrfs_i_size_write(dir, dir->vfs_inode.i_size - fname.disk_name.len * 2);
  	inode_inc_iversion(&dir->vfs_inode);
 -	dir->vfs_inode.i_mtime = inode_set_ctime_current(&dir->vfs_inode);
 +	inode_set_mtime_to_ts(&dir->vfs_inode, inode_set_ctime_current(&dir->vfs_inode));
- 	ret = btrfs_update_inode_fallback(trans, root, dir);
+ 	ret = btrfs_update_inode_fallback(trans, dir);
  	if (ret)
  		btrfs_abort_transaction(trans, ret);
  out:
@@@ -5583,6 -5586,6 +5586,7 @@@ static struct inode *new_simple_dir(str
  				    struct btrfs_root *root)
  {
  	struct inode *inode = new_inode(dir->i_sb);
++	struct timespec64 mtime;
  
  	if (!inode)
  		return ERR_PTR(-ENOMEM);
@@@ -5600,9 -5603,10 +5604,11 @@@
  	inode->i_opflags &= ~IOP_XATTR;
  	inode->i_fop = &simple_dir_operations;
  	inode->i_mode = S_IFDIR | S_IRUGO | S_IWUSR | S_IXUGO;
 -	inode->i_mtime = inode_set_ctime_current(inode);
 -	inode->i_atime = dir->i_atime;
 -	BTRFS_I(inode)->i_otime_sec = inode->i_mtime.tv_sec;
 -	BTRFS_I(inode)->i_otime_nsec = inode->i_mtime.tv_nsec;
 +	inode_set_mtime_to_ts(inode, inode_set_ctime_current(inode));
 +	inode_set_atime_to_ts(inode, inode_get_atime(dir));
- 	BTRFS_I(inode)->i_otime = inode_get_mtime(inode);
++	mtime = inode_get_mtime(inode);
++	BTRFS_I(inode)->i_otime_sec = mtime.tv_sec;
++	BTRFS_I(inode)->i_otime_nsec = mtime.tv_nsec;
  	inode->i_uid = dir->i_uid;
  	inode->i_gid = dir->i_gid;
  
@@@ -6173,6 -6177,6 +6179,7 @@@ int btrfs_create_new_inode(struct btrfs
  	struct btrfs_key key[2];
  	u32 sizes[2];
  	struct btrfs_item_batch batch;
++	struct timespec64 otime;
  	unsigned long ptr;
  	int ret;
  
@@@ -6277,8 -6281,10 +6284,10 @@@
  		goto discard;
  	}
  
 -	inode->i_mtime = inode_set_ctime_current(inode);
 -	inode->i_atime = inode->i_mtime;
 -	BTRFS_I(inode)->i_otime_sec = inode->i_mtime.tv_sec;
 -	BTRFS_I(inode)->i_otime_nsec = inode->i_mtime.tv_nsec;
 +	simple_inode_init_ts(inode);
- 	BTRFS_I(inode)->i_otime = inode_get_mtime(inode);
++	otime = inode_get_mtime(inode);
++	BTRFS_I(inode)->i_otime_sec = otime.tv_sec;
++	BTRFS_I(inode)->i_otime_nsec = otime.tv_nsec;
  
  	/*
  	 * We're going to fill the inode item now, so at this point the inode
@@@ -6443,10 -6449,10 +6452,10 @@@ int btrfs_add_link(struct btrfs_trans_h
  	 * values (the ones it had when the fsync was done).
  	 */
  	if (!test_bit(BTRFS_FS_LOG_RECOVERING, &root->fs_info->flags))
 -		parent_inode->vfs_inode.i_mtime =
 -			inode_set_ctime_current(&parent_inode->vfs_inode);
 +		inode_set_mtime_to_ts(&parent_inode->vfs_inode,
 +				      inode_set_ctime_current(&parent_inode->vfs_inode));
  
- 	ret = btrfs_update_inode(trans, root, parent_inode);
+ 	ret = btrfs_update_inode(trans, parent_inode);
  	if (ret)
  		btrfs_abort_transaction(trans, ret);
  	return ret;
diff --cc fs/btrfs/transaction.c
index 38a2775c5c7b,9694a3ca1739..000000000000
--- a/fs/btrfs/transaction.c
+++ b/fs/btrfs/transaction.c
@@@ -1860,9 -1911,8 +1911,9 @@@ static noinline int create_pending_snap
  
  	btrfs_i_size_write(BTRFS_I(parent_inode), parent_inode->i_size +
  						  fname.disk_name.len * 2);
 -	parent_inode->i_mtime = inode_set_ctime_current(parent_inode);
 +	inode_set_mtime_to_ts(parent_inode,
 +			      inode_set_ctime_current(parent_inode));
- 	ret = btrfs_update_inode_fallback(trans, parent_root, BTRFS_I(parent_inode));
+ 	ret = btrfs_update_inode_fallback(trans, BTRFS_I(parent_inode));
  	if (ret) {
  		btrfs_abort_transaction(trans, ret);
  		goto fail;

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

             reply	other threads:[~2023-10-31  0:18 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-31  0:18 Stephen Rothwell [this message]
  -- strict thread matches above, loose matches on Subject: below --
2024-01-10 23:03 linux-next: manual merge of the btrfs tree with Linus' tree Stephen Rothwell
2024-01-08 22:54 Stephen Rothwell
2021-10-31 23:53 Stephen Rothwell
2021-11-02 10:42 ` David Sterba
2021-11-02 11:44   ` Stephen Rothwell
2020-10-15  0:35 Stephen Rothwell
2020-10-15 14:42 ` David Sterba
2014-02-03  0:13 Stephen Rothwell
2014-01-29  0:54 Stephen Rothwell
2014-01-29 13:07 ` Michal Nazarewicz

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=20231031111836.0ac433a9@canb.auug.org.au \
    --to=sfr@canb.auug.org.au \
    --cc=brauner@kernel.org \
    --cc=dsterba@suse.com \
    --cc=dsterba@suse.cz \
    --cc=fdmanana@suse.com \
    --cc=jlayton@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    /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).