[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YakX38onzsW5Ef8B@google.com>
Date: Thu, 2 Dec 2021 11:00:47 -0800
From: Jaegeuk Kim <jaegeuk@...nel.org>
To: Eric Biggers <ebiggers@...nel.org>
Cc: linux-kernel@...r.kernel.org,
linux-f2fs-devel@...ts.sourceforge.net
Subject: Re: [f2fs-dev] [PATCH 5/6] f2fs: implement iomap operations
On 12/02, Jaegeuk Kim wrote:
> On 12/02, Eric Biggers wrote:
> > On Thu, Dec 02, 2021 at 10:04:11PM +0800, Chao Yu wrote:
> > > On 2021/12/2 12:15, Eric Biggers wrote:
> > > > On Thu, Dec 02, 2021 at 11:10:41AM +0800, Chao Yu wrote:
> > > > > Why not relocating this check before f2fs_map_blocks()?
> > >
> > > Wait, it supports DIO in multi-device image after commit 71f2c8206202
> > > ("f2fs: multidevice: support direct IO"), how about
> > > checking with f2fs_allow_multi_device_dio()?
> > >
> > > Thanks,
> > >
> >
> > Okay, that was not the case when I sent this patch originally. We'll need to
> > update this to support multiple devices.
>
> Chao/Eric, does this make sense?
>
> --- a/fs/f2fs/data.c
> +++ b/fs/f2fs/data.c
> @@ -4070,11 +4070,10 @@ static int f2fs_iomap_begin(struct inode *inode, loff_t offset, loff_t length,
> }
> if (WARN_ON_ONCE(!__is_valid_data_blkaddr(map.m_pblk)))
> return -EINVAL;
> - iomap->addr = blks_to_bytes(inode, map.m_pblk);
>
> - if (WARN_ON_ONCE(f2fs_is_multi_device(F2FS_I_SB(inode))))
> - return -EINVAL;
> - iomap->bdev = inode->i_sb->s_bdev;
> + iomap->bdev = map->m_multidev_dio ? map.m_bdev :
correction: map.m_multidev_dio
> + inode->i_sb->s_bdev;
> + iomap->addr = blks_to_bytes(inode, map.m_pblk);
> } else {
> iomap->length = blks_to_bytes(inode, next_pgofs) -
> iomap->offset;
>
> >
> > - Eric
>
>
> _______________________________________________
> Linux-f2fs-devel mailing list
> Linux-f2fs-devel@...ts.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel
Powered by blists - more mailing lists