Re: [GIT PULL] f2fs update for 4.16-rc1

From: Stephen Rothwell
Date: Tue Mar 13 2018 - 19:17:41 EST


Hi all,

On Thu, 1 Feb 2018 09:25:51 +1100 Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx> wrote:
>
> On Tue, 30 Jan 2018 16:25:35 -0800 Jaegeuk Kim <jaegeuk@xxxxxxxxxx> wrote:
> >
> > On 01/31, Stephen Rothwell wrote:
> > >
> > > On Tue, 30 Jan 2018 14:32:20 -0800 Jaegeuk Kim <jaegeuk@xxxxxxxxxx> wrote:
> > > >
> > > > Could you please consider the below pull request?
> > > >
> > > > Thanks,
> > > >
> > > > The following changes since commit ace52288edf0cb5e7a52b681f057f86224c49c27:
> > > >
> > > > Merge tag 'for-linus-20171218' of git://git.infradead.org/linux-mtd (2017-12-18 16:18:01 -0800)
> > > >
> > > > are available in the Git repository at:
> > > >
> > > > git://git.kernel.org/pub/scm/linux/kernel/git/jaegeuk/f2fs.git tags/f2fs-for-4.16-rc1
> > > >
> > > > for you to fetch changes up to 1c1d35df71104c76a4a2e25862926f22c334c9d6:
> > > >
> > > > f2fs: support inode creation time (2018-01-25 14:10:39 -0800)
> > >
> > > This has an interesting conflict with the btrfs tree:
> > >
> > > -----------------------------------------------------------------------
> > > After merging the f2fs tree, today's linux-next build (x86_64
> > > allmodconfig) failed like this:
> > >
> > > /home/sfr/next/next/fs/f2fs/super.c: In function 'f2fs_fill_super':
> > > /home/sfr/next/next/fs/f2fs/super.c:2563:18: error: 'SB_I_CGROUPWB' undeclared (first use in this function); did you mean 'S_CGROUPWB'?
> > > sb->s_iflags |= SB_I_CGROUPWB;
> > > ^~~~~~~~~~~~~
> > > S_CGROUPWB
> > >
> > > Caused by commit
> > >
> > > 578c647879f7 ("f2fs: implement cgroup writeback support")
> > >
> > > interacting with commit
> > >
> > > 34934189a3dd ("cgroup, writeback: replace SB_I_CGROUPWB with per-inode S_CGROUPWB"
> > >
> > > from the btrfs tree.
> > >
> > > I have reverted the f2fs tree commit for today, but a better resolution
> > > would be appreciated.
> > > -----------------------------------------------------------------------
> > >
> > > I have seen no response to the above email and have been reverting that
> > > commit since Jan 18.
> >
> > I think this can be addressed by:
> >
> > diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c
> > index 89c838bfb067..c743b73976d0 100644
> > --- a/fs/f2fs/inode.c
> > +++ b/fs/f2fs/inode.c
> > @@ -48,9 +48,10 @@ void f2fs_set_inode_flags(struct inode *inode)
> > new_fl |= S_DIRSYNC;
> > if (f2fs_encrypted_inode(inode))
> > new_fl |= S_ENCRYPTED;
> > + new_fl |= S_CGROUPWB;
> > inode_set_flags(inode, new_fl,
> > S_SYNC|S_APPEND|S_IMMUTABLE|S_NOATIME|S_DIRSYNC|
> > - S_ENCRYPTED);
> > + S_ENCRYPTED|S_CGROUPWB);
> > }
> >
> > static void __get_inode_rdev(struct inode *inode, struct f2fs_inode *ri)
> > diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
> > index 8173ae688814..ebcd58476fc7 100644
> > --- a/fs/f2fs/super.c
> > +++ b/fs/f2fs/super.c
> > @@ -2560,7 +2560,6 @@ static int f2fs_fill_super(struct super_block *sb, void *data, int silent)
> > sb->s_flags = (sb->s_flags & ~SB_POSIXACL) |
> > (test_opt(sbi, POSIX_ACL) ? SB_POSIXACL : 0);
> > memcpy(&sb->s_uuid, raw_super->uuid, sizeof(raw_super->uuid));
> > - sb->s_iflags |= SB_I_CGROUPWB;
> >
> > /* init f2fs-specific super block info */
> > sbi->valid_super_block = valid_super_block;
> >
>
> I have applied that (by hand) as a merge fix patch for the merge of teh
> btrfs tree for today. Thanks for the resolution.

I am still applying this to the merge of the btrfs tree every day ...

Commit
578c647879f7 ("f2fs: implement cgroup writeback support")
was merged into Linus' tree on Jan 31.

Here is the actual merge fix patch:

From: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
Date: Thu, 1 Feb 2018 09:21:06 +1100
Subject: [PATCH] f2fs: fixup for cgroup/writeback change

Signed-off-by: Stephen Rothwell <sfr@xxxxxxxxxxxxxxxx>
---
fs/f2fs/inode.c | 3 ++-
fs/f2fs/super.c | 1 -
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/f2fs/inode.c b/fs/f2fs/inode.c
index 205add3d0f3a..f34652c4288f 100644
--- a/fs/f2fs/inode.c
+++ b/fs/f2fs/inode.c
@@ -48,9 +48,10 @@ void f2fs_set_inode_flags(struct inode *inode)
new_fl |= S_DIRSYNC;
if (f2fs_encrypted_inode(inode))
new_fl |= S_ENCRYPTED;
+ new_fl |= S_CGROUPWB;
inode_set_flags(inode, new_fl,
S_SYNC|S_APPEND|S_IMMUTABLE|S_NOATIME|S_DIRSYNC|
- S_ENCRYPTED);
+ S_ENCRYPTED|S_CGROUPWB);
}

static void __get_inode_rdev(struct inode *inode, struct f2fs_inode *ri)
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 8173ae688814..ebcd58476fc7 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -2560,7 +2560,6 @@ static int f2fs_fill_super(struct super_block *sb, void *data, int silent)
sb->s_flags = (sb->s_flags & ~SB_POSIXACL) |
(test_opt(sbi, POSIX_ACL) ? SB_POSIXACL : 0);
memcpy(&sb->s_uuid, raw_super->uuid, sizeof(raw_super->uuid));
- sb->s_iflags |= SB_I_CGROUPWB;

/* init f2fs-specific super block info */
sbi->valid_super_block = valid_super_block;
--
2.15.1

--
Cheers,
Stephen Rothwell

Attachment: pgphPvNLIx58O.pgp
Description: OpenPGP digital signature