[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Y1lotu35Z/l6YzwR@google.com>
Date: Wed, 26 Oct 2022 10:04:54 -0700
From: Jaegeuk Kim <jaegeuk@...nel.org>
To: Chao Yu <chao@...nel.org>
Cc: linux-kernel@...r.kernel.org,
linux-f2fs-devel@...ts.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH] f2fs: allow to set compression for inlined
file
On 10/26, Chao Yu wrote:
> On 2022/10/26 1:46, Jaegeuk Kim wrote:
> > On 10/25, Chao Yu wrote:
> > > On 2022/10/25 7:36, Jaegeuk Kim wrote:
> > > > The below commit disallows to set compression on empty created file which
> > > > has a inline_data. Let's fix it.
> > > >
> > > > Fixes: 7165841d578e ("f2fs: fix to check inline_data during compressed inode conversion")
> > > > Signed-off-by: Jaegeuk Kim <jaegeuk@...nel.org>
> > > > ---
> > > > fs/f2fs/file.c | 3 +++
> > > > 1 file changed, 3 insertions(+)
> > > >
> > > > diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c
> > > > index 1c4004c9245f..304fe08edc61 100644
> > > > --- a/fs/f2fs/file.c
> > > > +++ b/fs/f2fs/file.c
> > > > @@ -1915,6 +1915,9 @@ static int f2fs_setflags_common(struct inode *inode, u32 iflags, u32 mask)
> > > > if (!f2fs_disable_compressed_file(inode))
> > > > return -EINVAL;
> > > > } else {
> > > > + /* try to convert inline_data to support compression */
> > > > + f2fs_convert_inline_inode(inode);
> > >
> > > It needs to check return value of f2fs_convert_inline_inode()?
> >
> > I intended to catch that in the below checks?
>
> But it may hide the real error number, e.g. -ENOMEM returned from
> f2fs_convert_inline_inode()?
Fair enough. Let me send v2.
>
> Thanks,
>
> >
> > >
> > > Thanks,
> > >
> > > > +
> > > > if (!f2fs_may_compress(inode))
> > > > return -EINVAL;
> > > > if (S_ISREG(inode->i_mode) && F2FS_HAS_BLOCKS(inode))
Powered by blists - more mailing lists