* linux-next: manual merge of the f2fs tree with the vfs-idmapping tree
@ 2023-01-30 23:07 Stephen Rothwell
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Rothwell @ 2023-01-30 23:07 UTC (permalink / raw)
To: Jaegeuk Kim, Christian Brauner, Seth Forshee
Cc: Christian Brauner, Daeho Jeong, Linux Kernel Mailing List,
Linux Next Mailing List
[-- Attachment #1: Type: text/plain, Size: 2102 bytes --]
Hi all,
Today's linux-next merge of the f2fs tree got a conflict in:
fs/f2fs/file.c
between commit:
f2d40141d5d9 ("fs: port inode_init_owner() to mnt_idmap")
from the vfs-idmapping tree and commit:
81712a1f56dc ("f2fs: synchronize atomic write aborts")
from the f2fs 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/f2fs/file.c
index b90617639743,3efb0852fd48..000000000000
--- a/fs/f2fs/file.c
+++ b/fs/f2fs/file.c
@@@ -2087,19 -2090,28 +2090,28 @@@ static int f2fs_ioc_start_atomic_write(
goto out;
}
- /* Create a COW inode for atomic write */
- pinode = f2fs_iget(inode->i_sb, fi->i_pino);
- if (IS_ERR(pinode)) {
- f2fs_up_write(&fi->i_gc_rwsem[WRITE]);
- ret = PTR_ERR(pinode);
- goto out;
- }
+ /* Check if the inode already has a COW inode */
+ if (fi->cow_inode == NULL) {
+ /* Create a COW inode for atomic write */
+ pinode = f2fs_iget(inode->i_sb, fi->i_pino);
+ if (IS_ERR(pinode)) {
+ f2fs_up_write(&fi->i_gc_rwsem[WRITE]);
+ ret = PTR_ERR(pinode);
+ goto out;
+ }
- ret = f2fs_get_tmpfile(idmap, pinode, &fi->cow_inode);
- iput(pinode);
- if (ret) {
- f2fs_up_write(&fi->i_gc_rwsem[WRITE]);
- goto out;
- ret = f2fs_get_tmpfile(mnt_userns, pinode, &fi->cow_inode);
++ ret = f2fs_get_tmpfile(idmap, pinode, &fi->cow_inode);
+ iput(pinode);
+ if (ret) {
+ f2fs_up_write(&fi->i_gc_rwsem[WRITE]);
+ goto out;
+ }
+
+ set_inode_flag(fi->cow_inode, FI_COW_FILE);
+ clear_inode_flag(fi->cow_inode, FI_INLINE_DATA);
+ } else {
+ /* Reuse the already created COW inode */
+ f2fs_do_truncate_blocks(fi->cow_inode, 0, true);
}
f2fs_write_inode(inode, NULL);
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
* linux-next: manual merge of the f2fs tree with the vfs-idmapping tree
@ 2023-01-30 23:12 Stephen Rothwell
0 siblings, 0 replies; 2+ messages in thread
From: Stephen Rothwell @ 2023-01-30 23:12 UTC (permalink / raw)
To: Jaegeuk Kim, Christian Brauner, Seth Forshee
Cc: Chao Yu, Christian Brauner, Linux Kernel Mailing List,
Linux Next Mailing List
[-- Attachment #1: Type: text/plain, Size: 1393 bytes --]
Hi all,
Today's linux-next merge of the f2fs tree got a conflict in:
fs/f2fs/namei.c
between commit:
f2d40141d5d9 ("fs: port inode_init_owner() to mnt_idmap")
from the vfs-idmapping tree and commit:
8abe4be45132 ("f2fs: remove unneeded f2fs_cp_error() in f2fs_create_whiteout()")
from the f2fs 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/f2fs/namei.c
index d8e01bbbf27f,82923273f4bb..000000000000
--- a/fs/f2fs/namei.c
+++ b/fs/f2fs/namei.c
@@@ -923,13 -923,10 +923,10 @@@ static int f2fs_tmpfile(struct mnt_idma
return finish_open_simple(file, err);
}
-static int f2fs_create_whiteout(struct user_namespace *mnt_userns,
+static int f2fs_create_whiteout(struct mnt_idmap *idmap,
struct inode *dir, struct inode **whiteout)
{
- if (unlikely(f2fs_cp_error(F2FS_I_SB(dir))))
- return -EIO;
-
- return __f2fs_tmpfile(mnt_userns, dir, NULL,
+ return __f2fs_tmpfile(idmap, dir, NULL,
S_IFCHR | WHITEOUT_MODE, true, whiteout);
}
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-01-30 23:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-30 23:07 linux-next: manual merge of the f2fs tree with the vfs-idmapping tree Stephen Rothwell
-- strict thread matches above, loose matches on Subject: below --
2023-01-30 23:12 Stephen Rothwell
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox